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

#include <rheological_model.h>

Inheritance diagram for PhaseChangeRheology:
[legend]

Public Member Functions

 PhaseChangeRheology (const Parameters::PhaseChange &p_phase_change_parameters)
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_scale () const 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
double get_kinematic_viscosity_for_stabilization (const std::map< field, double > &field_values) override
void get_kinematic_viscosity_for_stabilization_vector (const std::map< field, std::vector< double > > &field_vectors, std::vector< double > &property_vector) override
virtual double get_dynamic_viscosity_for_stabilization (const double &p_density_ref, const std::map< field, double > &field_values) override
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) 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 () const
virtual void set_kinematic_viscosity (const double &p_kinematic_viscosity)
virtual void set_dynamic_viscosity (const double &p_density_ref)
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 Member Functions

double kinematic_viscosity (const double T) const

Private Attributes

Parameters::PhaseChange param

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 705 of file rheological_model.h.

Constructor & Destructor Documentation

◆ PhaseChangeRheology()

PhaseChangeRheology::PhaseChangeRheology ( const Parameters::PhaseChange & p_phase_change_parameters)
inline

Parameter constructor.

Parameters
p_phase_change_parametersThe parameters needed by the phase change rheology

Definition at line 714 of file rheological_model.h.

References PhysicalPropertyModel::model_depends_on, param, RheologicalModel::phase_change_rheological_model, and temperature.

Member Function Documentation

◆ get_dynamic_viscosity()

double PhaseChangeRheology::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.

Implements RheologicalModel.

Definition at line 783 of file rheological_model.h.

References kinematic_viscosity(), and temperature.

◆ get_dynamic_viscosity_for_stabilization()

double PhaseChangeRheology::get_dynamic_viscosity_for_stabilization ( const double & p_density_ref,
const std::map< field, double > & field_values )
overridevirtual

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

Calculates the dynamic viscosity used in PSPG and SUPG stabilization.

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 from RheologicalModel.

Definition at line 242 of file rheological_model.cc.

References param.

◆ get_dynamic_viscosity_for_stabilization_vector()

void PhaseChangeRheology::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 )
overridevirtual

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

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

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 from RheologicalModel.

Definition at line 257 of file rheological_model.cc.

References param.

◆ get_dynamic_viscosity_vector()

void PhaseChangeRheology::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
field_vectorsValues of the field on which the dynamic viscosity may depend on.
property_vector

Implements RheologicalModel.

Definition at line 802 of file rheological_model.h.

References kinematic_viscosity(), and temperature.

◆ get_kinematic_viscosity_for_stabilization()

double PhaseChangeRheology::get_kinematic_viscosity_for_stabilization ( const std::map< field, double > & field_values)
overridevirtual

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

Calculates the kinematic viscosity used in PSPG and SUPG stabilizations.

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

Reimplemented from RheologicalModel.

Definition at line 215 of file rheological_model.cc.

References param.

◆ get_kinematic_viscosity_for_stabilization_vector()

void PhaseChangeRheology::get_kinematic_viscosity_for_stabilization_vector ( const std::map< field, std::vector< double > > & field_vectors,
std::vector< double > & property_vector )
overridevirtual

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

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

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

Reimplemented from RheologicalModel.

Definition at line 228 of file rheological_model.cc.

References param.

◆ get_kinematic_viscosity_scale()

double PhaseChangeRheology::get_kinematic_viscosity_scale ( ) const
inlineoverridevirtual

Returns the kinematic viscosity scale.

Reimplemented from RheologicalModel.

Definition at line 777 of file rheological_model.h.

References param.

◆ jacobian()

double PhaseChangeRheology::jacobian ( const std::map< field, double > & field_values,
field id )
overridevirtual

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 183 of file rheological_model.cc.

References PhysicalPropertyModel::numerical_jacobian(), and temperature.

◆ kinematic_viscosity()

double PhaseChangeRheology::kinematic_viscosity ( const double T) const
inlineprivate

kinematic_viscosity Calculates the kinematic viscosity from the temperature using the liquid fraction

Parameters
Tvalue of the temperature
Returns
value of the kinematic viscosity

Definition at line 871 of file rheological_model.h.

References param.

◆ value()

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

Returns the kinematic viscosity.

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

Implements PhysicalPropertyModel.

Definition at line 155 of file rheological_model.cc.

References kinematic_viscosity(), and temperature.

◆ vector_jacobian()

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

vector_jacobian Calculate the derivative of the with respect to a field

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

Implements PhysicalPropertyModel.

Definition at line 198 of file rheological_model.cc.

References temperature, and PhysicalPropertyModel::vector_numerical_jacobian().

◆ vector_value()

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

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_vector

Implements PhysicalPropertyModel.

Definition at line 166 of file rheological_model.cc.

References kinematic_viscosity(), and temperature.

Member Data Documentation

◆ param

Parameters::PhaseChange PhaseChangeRheology::param
private

Definition at line 883 of file rheological_model.h.


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