![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <rheological_model.h>
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 () |
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.
|
default |
Default constructor.
|
pure virtual |
Calculates the dynamic viscosity, if a kinematic viscosity and a reference density value is specified.
| p_density_ref | The density of the fluid at the reference state |
| field_values | Value of the various fields on which the property may depend. |
Implemented in Carreau, Newtonian, PhaseChangeRheology, and PowerLaw.
|
inlinevirtual |
Calculates the dynamic viscosity used in PSPG and SUPG stabilization terms.
| [in] | p_density_ref | The density of the fluid at the reference state |
| [in] | field_values | Value 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().
|
inlinevirtual |
Calculates the vector values of the dynamic viscosity used in PSPG and SUPG stabilization terms.
| [in] | p_density_ref | The density of the fluid at the reference state |
| [in] | field_vectors | Value of the fields on which the property may depend on. |
| [out] | property_vector | Vector of computed viscosities. |
Reimplemented in PhaseChangeRheology.
Definition at line 162 of file rheological_model.h.
References get_dynamic_viscosity_vector().
|
pure virtual |
Calculates the vector values of the dynamic viscosity.
| p_density_ref | The density of the fluid at the reference state |
| field_vectors | Values of the field on which the dynamic viscosity may depend on. |
| property_vector | todo |
Implemented in Carreau, Newtonian, PhaseChangeRheology, and PowerLaw.
|
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.
|
inlinevirtual |
Calculates the kinematic viscosity used in PSPG and SUPG stabilization terms.
| [in] | field_values | Value 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().
|
inlinevirtual |
Calculates the vector values of the kinematic viscosity used in PSPG and SUPG stabilization terms.
| [in] | field_vectors | Value of the fields on which the property may depend on. |
| [out] | property_vector | Vector of computed viscosities. |
Reimplemented in PhaseChangeRheology.
Definition at line 133 of file rheological_model.h.
References PhysicalPropertyModel::vector_value().
|
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.
|
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.
|
inline |
is_non_newtonian_rheological_model Returns a boolean indicating if the model is a non-Newtonian rheological model.
Definition at line 177 of file rheological_model.h.
References non_newtonian_rheological_model.
|
inline |
Returns a boolean indicating if the model is a phase change rheological model.
Definition at line 189 of file rheological_model.h.
References phase_change_rheological_model.
|
static |
Instantiates and returns a pointer to a RheologicalModel object by casting it to the proper child class.
| material_properties | Parsed physical properties that will provide either the model rheological model being used or say it is a Newtonian flow |
Definition at line 7 of file rheological_model.cc.
References Parameters::CarreauParameters::a, Parameters::Material::carreau, Parameters::NonNewtonian::carreau_parameters, Parameters::PowerLawParameters::K, Parameters::Material::kinematic_viscosity, Parameters::CarreauParameters::kinematic_viscosity_0, Parameters::CarreauParameters::kinematic_viscosity_inf, Parameters::CarreauParameters::lambda, Parameters::CarreauParameters::n, Parameters::PowerLawParameters::n, Parameters::Material::newtonian, Parameters::Material::non_newtonian_parameters, Parameters::Material::phase_change_parameters, Parameters::Material::powerlaw, Parameters::NonNewtonian::powerlaw_parameters, Parameters::Material::rheological_model, and Parameters::PowerLawParameters::shear_rate_min.
|
inlinevirtual |
Sets a new dynamic viscosity value, if the models has a constant dynamic viscosity value.
| p_density_ref | The density of the fluid at the reference state |
Reimplemented in Newtonian.
Definition at line 87 of file rheological_model.h.
|
inlinevirtual |
Sets a new kinematic viscosity value, if the models has one.
| p_kinematic_viscosity | The kinematic viscosity value |
Reimplemented in Carreau, Newtonian, and PowerLaw.
Definition at line 78 of file rheological_model.h.
|
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.
|
protected |
Boolean to indicate if the rheological model is a non-Newtonian model.
Definition at line 196 of file rheological_model.h.
|
protected |
Boolean to indicate if the rheological model is a phase change model.
Definition at line 199 of file rheological_model.h.