Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
RheologicalModel Class Referenceabstract

#include <rheological_model.h>

Inheritance diagram for RheologicalModel:
[legend]

Public Member Functions

 RheologicalModel ()=default
virtual double get_n () const
virtual void set_n (const double &)
virtual double get_kinematic_viscosity () const
virtual double get_kinematic_viscosity_scale () const
virtual void set_kinematic_viscosity (const double &p_kinematic_viscosity)
virtual void set_dynamic_viscosity (const double &p_density_ref)
virtual double get_dynamic_viscosity (const double &p_density_ref, const std::map< field, double > &field_values) const =0
virtual void get_dynamic_viscosity_vector (const double &p_density_ref, const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector)=0
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)
virtual double value (const std::map< field, double > &fields_value)=0
virtual void vector_value (const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector)=0
virtual double jacobian (const std::map< field, double > &field_values, const field id)=0
virtual void vector_jacobian (const std::map< field, std::vector< double > > &field_vectors, const field id, std::vector< double > &jacobian_vector)=0
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)

Static Public Member Functions

static std::shared_ptr< RheologicalModel > model_cast (const Parameters::Material &material_properties)

Protected Attributes

bool non_newtonian_rheological_model = false
bool phase_change_rheological_model = false
Protected Attributes inherited from PhysicalPropertyModel
std::map< field, bool > model_depends_on

Additional Inherited Members

Public Types inherited from PhysicalPropertyModel
enum class  ComplexComponent : std::int8_t { real , imag }
Protected Member Functions inherited from PhysicalPropertyModel
std::shared_ptr< SimulationControl > & get_simulation_control ()

Detailed Description

Abstract class that allows to calculate the non-Newtonian viscosity on each quadrature point and the shear rate magnitude.

Definition at line 17 of file rheological_model.h.

Constructor & Destructor Documentation

◆ RheologicalModel()

RheologicalModel::RheologicalModel ( )
default

Default constructor.

Member Function Documentation

◆ get_dynamic_viscosity()

virtual double RheologicalModel::get_dynamic_viscosity ( const double & p_density_ref,
const std::map< field, double > & field_values ) const
pure virtual

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.

Implemented in Carreau, Newtonian, PhaseChangeRheology, and PowerLaw.

◆ get_dynamic_viscosity_for_stabilization()

virtual double RheologicalModel::get_dynamic_viscosity_for_stabilization ( const double & p_density_ref,
const std::map< field, double > & field_values )
inlinevirtual

Calculates the dynamic viscosity used in PSPG and SUPG stabilization terms.

Parameters
[in]p_density_refThe density of the fluid at the reference state
[in]field_valuesValue of the various fields on which the property may depend.

Reimplemented in PhaseChangeRheology.

Definition at line 147 of file rheological_model.h.

References get_dynamic_viscosity().

◆ get_dynamic_viscosity_for_stabilization_vector()

virtual void RheologicalModel::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 )
inlinevirtual

Calculates the vector values of the dynamic viscosity used in PSPG and SUPG stabilization terms.

Parameters
[in]p_density_refThe density of the fluid at the reference state
[in]field_vectorsValue of the fields on which the property may depend on.
[out]property_vectorVector of computed viscosities.

Reimplemented in PhaseChangeRheology.

Definition at line 162 of file rheological_model.h.

References get_dynamic_viscosity_vector().

◆ get_dynamic_viscosity_vector()

virtual void RheologicalModel::get_dynamic_viscosity_vector ( const double & p_density_ref,
const std::map< field, std::vector< double > > & field_vectors,
std::vector< double > & property_vector )
pure virtual

Calculates the vector values of the dynamic viscosity.

Parameters
p_density_refThe density of the fluid at the reference state
field_vectorsValues of the field on which the dynamic viscosity may depend on.
property_vectortodo

Implemented in Carreau, Newtonian, PhaseChangeRheology, and PowerLaw.

◆ get_kinematic_viscosity()

virtual double RheologicalModel::get_kinematic_viscosity ( ) const
inlinevirtual

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

Reimplemented in Carreau, Newtonian, and PowerLaw.

Definition at line 57 of file rheological_model.h.

◆ get_kinematic_viscosity_for_stabilization()

virtual double RheologicalModel::get_kinematic_viscosity_for_stabilization ( const std::map< field, double > & field_values)
inlinevirtual

Calculates the kinematic viscosity used in PSPG and SUPG stabilization terms.

Parameters
[in]field_valuesValue of the various fields on which the property may depend.

Reimplemented in PhaseChangeRheology.

Definition at line 120 of file rheological_model.h.

References PhysicalPropertyModel::value().

◆ get_kinematic_viscosity_for_stabilization_vector()

virtual void RheologicalModel::get_kinematic_viscosity_for_stabilization_vector ( const std::map< field, std::vector< double > > & field_vectors,
std::vector< double > & property_vector )
inlinevirtual

Calculates the vector values of the kinematic viscosity used in PSPG and SUPG stabilization terms.

Parameters
[in]field_vectorsValue of the fields on which the property may depend on.
[out]property_vectorVector of computed viscosities.

Reimplemented in PhaseChangeRheology.

Definition at line 133 of file rheological_model.h.

References PhysicalPropertyModel::vector_value().

◆ get_kinematic_viscosity_scale()

virtual double RheologicalModel::get_kinematic_viscosity_scale ( ) const
inlinevirtual

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 in Carreau, Newtonian, PhaseChangeRheology, and PowerLaw.

Definition at line 68 of file rheological_model.h.

◆ get_n()

virtual double RheologicalModel::get_n ( ) const
inlinevirtual

Returns the value of the n parameters of the model, if the model has one.

Reimplemented in Carreau, and PowerLaw.

Definition at line 41 of file rheological_model.h.

◆ is_non_newtonian_rheological_model()

bool RheologicalModel::is_non_newtonian_rheological_model ( ) const
inline

is_non_newtonian_rheological_model Returns a boolean indicating if the model is a non-Newtonian rheological model.

Returns
Boolean value of if the model corresponds to a non-Newtonian rheological model.

Definition at line 177 of file rheological_model.h.

References non_newtonian_rheological_model.

◆ is_phase_change_rheological_model()

bool RheologicalModel::is_phase_change_rheological_model ( ) const
inline

Returns a boolean indicating if the model is a phase change rheological model.

Returns
Boolean value of if the model corresponds to a phase change rheological model.

Definition at line 189 of file rheological_model.h.

References phase_change_rheological_model.

◆ model_cast()

◆ set_dynamic_viscosity()

virtual void RheologicalModel::set_dynamic_viscosity ( const double & p_density_ref)
inlinevirtual

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 in Newtonian.

Definition at line 87 of file rheological_model.h.

◆ set_kinematic_viscosity()

virtual void RheologicalModel::set_kinematic_viscosity ( const double & p_kinematic_viscosity)
inlinevirtual

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

Parameters
p_kinematic_viscosityThe kinematic viscosity value

Reimplemented in Carreau, Newtonian, and PowerLaw.

Definition at line 78 of file rheological_model.h.

◆ set_n()

virtual void RheologicalModel::set_n ( const double & )
inlinevirtual

Sets a new value to the n parameter, if the models has one.

Reimplemented in Carreau, and PowerLaw.

Definition at line 50 of file rheological_model.h.

Member Data Documentation

◆ non_newtonian_rheological_model

bool RheologicalModel::non_newtonian_rheological_model = false
protected

Boolean to indicate if the rheological model is a non-Newtonian model.

Definition at line 196 of file rheological_model.h.

◆ phase_change_rheological_model

bool RheologicalModel::phase_change_rheological_model = false
protected

Boolean to indicate if the rheological model is a phase change model.

Definition at line 199 of file rheological_model.h.


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