Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
Newtonian Class Reference

#include <rheological_model.h>

Inheritance diagram for Newtonian:
[legend]

Public Member Functions

 Newtonian (const double &p_kinematic_viscosity)
double value (const std::map< field, double > &field_values) override
void vector_value (const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector) override
double jacobian (const std::map< field, double > &field_values, field id) override
void vector_jacobian (const std::map< field, std::vector< double > > &field_vectors, const field id, std::vector< double > &jacobian_vector) override
double get_kinematic_viscosity () const override
double get_kinematic_viscosity_scale () const override
void set_kinematic_viscosity (const double &p_kinematic_viscosity) override
void set_dynamic_viscosity (const double &p_density_ref) override
double get_dynamic_viscosity (const double &p_density_ref, const std::map< field, double > &field_values) const override
void get_dynamic_viscosity_vector (const double &p_density_ref, const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector) override
Public Member Functions inherited from RheologicalModel
 RheologicalModel ()=default
virtual double get_n () const
virtual void set_n (const double &)
virtual double get_kinematic_viscosity_for_stabilization (const std::map< field, double > &field_values)
virtual void get_kinematic_viscosity_for_stabilization_vector (const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector)
virtual double get_dynamic_viscosity_for_stabilization (const double &p_density_ref, const std::map< field, double > &field_values)
virtual void get_dynamic_viscosity_for_stabilization_vector (const double &p_density_ref, const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector)
bool is_non_newtonian_rheological_model () const
bool is_phase_change_rheological_model () const
Public Member Functions inherited from PhysicalPropertyModel
 PhysicalPropertyModel ()
virtual ~PhysicalPropertyModel ()=default
bool depends_on (const field &id)
void provide_simulation_control (std::shared_ptr< SimulationControl > &p_simulation_control)
double numerical_jacobian (const std::map< field, double > &field_values, const field id)
void vector_numerical_jacobian (const std::map< field, std::vector< double > > &field_vectors, const field id, std::vector< double > &jacobian_vector)

Private Attributes

double kinematic_viscosity
double dynamic_viscosity

Additional Inherited Members

Public Types inherited from PhysicalPropertyModel
enum class  ComplexComponent : std::int8_t { real , imag }
Static Public Member Functions inherited from RheologicalModel
static std::shared_ptr< RheologicalModel > model_cast (const Parameters::Material &material_properties)
Protected Member Functions inherited from PhysicalPropertyModel
std::shared_ptr< SimulationControl > & get_simulation_control ()
Protected Attributes inherited from RheologicalModel
bool non_newtonian_rheological_model = false
bool phase_change_rheological_model = false
Protected Attributes inherited from PhysicalPropertyModel
std::map< field, bool > model_depends_on

Detailed Description

Definition at line 202 of file rheological_model.h.

Constructor & Destructor Documentation

◆ Newtonian()

Newtonian::Newtonian ( const double & p_kinematic_viscosity)
inlineexplicit

Parameter constructor.

Parameters
p_kinematic_viscosityThe constant newtonian viscosity

Definition at line 210 of file rheological_model.h.

References dynamic_viscosity, and kinematic_viscosity.

Member Function Documentation

◆ get_dynamic_viscosity()

double Newtonian::get_dynamic_viscosity ( const double & p_density_ref,
const std::map< field, double > & field_values ) const
inlineoverridevirtual

Calculates the dynamic viscosity, if a kinematic viscosity and a reference density value is specified.

Parameters
p_density_refThe density of the fluid at the reference state
field_valuesValue of the various fields on which the property may depend. The constant dynamic viscosity does not depend on anything.

These parameters are not needed if the model has a constant kinematic viscosity, since it implies a constant dynamic viscosity also. The value of the dynamic viscosity needs to be set with "set_dynamic_viscosity(density_ref)" before calling this function.

Implements RheologicalModel.

Definition at line 316 of file rheological_model.h.

References dynamic_viscosity.

◆ get_dynamic_viscosity_vector()

void Newtonian::get_dynamic_viscosity_vector ( const double & p_density_ref,
const std::map< field, std::vector< double > > & field_vectors,
std::vector< double > & property_vector )
inlineoverridevirtual

Calculates the vector values of the dynamic viscosity.

Parameters
p_density_refThe density of the fluid at the reference state. This value is not needed if the model has a constant kinematic viscosity, since it implies a constant dynamic viscosity also. The value of the dynamic viscosity needs to be set with "set_dynamic_viscosity(density_ref)" before calling this function.
field_vectorsValues of the field on which the dynamic viscosity may depend on. These are not used for the constant kinematic viscosity.
property_vectorVector of the value of the dynamic viscosity.

Implements RheologicalModel.

Definition at line 335 of file rheological_model.h.

References dynamic_viscosity.

◆ get_kinematic_viscosity()

double Newtonian::get_kinematic_viscosity ( ) const
inlineoverridevirtual

Returns the value of the kinematic viscosity, if the model has one.

Reimplemented from RheologicalModel.

Definition at line 280 of file rheological_model.h.

References kinematic_viscosity.

◆ get_kinematic_viscosity_scale()

double Newtonian::get_kinematic_viscosity_scale ( ) const
inlineoverridevirtual

Returns the kinematic viscosity scale. This is used to get the kinematic viscosity scale in the problem when it's not constant. This is useful for weak boundary conditions.

Reimplemented from RheologicalModel.

Definition at line 286 of file rheological_model.h.

References kinematic_viscosity.

◆ jacobian()

double Newtonian::jacobian ( const std::map< field, double > & field_values,
field id )
inlineoverridevirtual

jacobian Calculates the jacobian (the partial derivative) of the kinematic viscosity with respect to a field

Parameters
field_valuesValue of the various fields on which the property may depend. The constant kinematic viscosity does not depend on anything
idIndicator of the field with respect to which the jacobian should be calculated
Returns
value of the partial derivative of the kinematic viscosity with respect to the field.

Implements PhysicalPropertyModel.

Definition at line 253 of file rheological_model.h.

◆ set_dynamic_viscosity()

void Newtonian::set_dynamic_viscosity ( const double & p_density_ref)
inlineoverridevirtual

Sets a new dynamic viscosity value, if the models has a constant dynamic viscosity value.

Parameters
p_density_refThe density of the fluid at the reference state

Reimplemented from RheologicalModel.

Definition at line 298 of file rheological_model.h.

References dynamic_viscosity, and kinematic_viscosity.

◆ set_kinematic_viscosity()

void Newtonian::set_kinematic_viscosity ( const double & p_kinematic_viscosity)
inlineoverridevirtual

Sets a new kinematic viscosity value, if the models has one.

Parameters
p_kinematic_viscosityThe kinematic viscosity value

Reimplemented from RheologicalModel.

Definition at line 292 of file rheological_model.h.

References kinematic_viscosity.

◆ value()

double Newtonian::value ( const std::map< field, double > & field_values)
overridevirtual

Returns the kinematic viscosity.

Parameters
[in]field_valuesValues of the field on which the viscosity may depend on. For the constant kinematic viscosity, the kinematic viscosity does not depend on anything.

Implements PhysicalPropertyModel.

Definition at line 37 of file rheological_model.cc.

References kinematic_viscosity.

◆ vector_jacobian()

void Newtonian::vector_jacobian ( const std::map< field, std::vector< double > > & field_vectors,
const field id,
std::vector< double > & jacobian_vector )
inlineoverridevirtual

vector_jacobian Calculate the derivative of the with respect to a field

Parameters
[in]field_vectorsVector for the values of the fields used to evaluate the property
[in]idIdentifier of the field with respect to which a derivative should be calculated
[out]jacobian_vectorVector of the value of the derivative of the kinematic viscosity with respect to the field id

Implements PhysicalPropertyModel.

Definition at line 271 of file rheological_model.h.

◆ vector_value()

void Newtonian::vector_value ( const std::map< field, std::vector< double > > & field_vectors,
std::vector< double > & property_vector )
inlineoverridevirtual

vector_value Calculates the vector values of the kinematic viscosity.

Parameters
field_vectorsValues of the field on which the kinematic viscosity may depend on. These are not used for the constant kinematic viscosity.
property_vectorVector of the value of the kinematic viscosity.

Implements PhysicalPropertyModel.

Definition at line 233 of file rheological_model.h.

References kinematic_viscosity.

Member Data Documentation

◆ dynamic_viscosity

double Newtonian::dynamic_viscosity
private

Definition at line 345 of file rheological_model.h.

◆ kinematic_viscosity

double Newtonian::kinematic_viscosity
private

Definition at line 344 of file rheological_model.h.


The documentation for this class was generated from the following files: