![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <density_model.h>
Public Member Functions | |
| DensityIsothermalIdealGas (const double p_density_ref, const double p_R, const double p_T) | |
| 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, const 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_psi () const override |
| double | get_density_ref () const override |
| Public Member Functions inherited from DensityModel | |
| bool | is_constant_density_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 | |
| const double | density_ref |
| const double | psi |
Additional Inherited Members | |
| Public Types inherited from PhysicalPropertyModel | |
| enum class | ComplexComponent : std::int8_t { real , imag } |
| Static Public Member Functions inherited from DensityModel | |
| static std::shared_ptr< DensityModel > | model_cast (const Parameters::Material &material_properties) |
| Protected Member Functions inherited from PhysicalPropertyModel | |
| std::shared_ptr< SimulationControl > & | get_simulation_control () |
| Protected Attributes inherited from DensityModel | |
| bool | constant_density_model = false |
| Protected Attributes inherited from PhysicalPropertyModel | |
| std::map< field, bool > | model_depends_on |
Isothermal ideal gas density.
Isothermal ideal gas density assumes that the fluid's density varies according the following state equation:
\(\rho = \rho_\text{ref} + \psi p = \rho_\text{ref} + \frac{1}{R T} \ p\)
where \(\rho_\text{ref}\) is the density of the fluid at the reference state, \(\psi = \frac{1}{R T}\) is the compressibility factor derived from the ideal gas law with \(R= \frac{R_u}{M}\) the specific gas constant (universal gas constant ( \(R_u\)) divided by the molar mass of the gas ( \(M\))) and \(T\) the temperature of the gas, finally, \(p\) is the differential pressure between the reference state and the current state. The model is used for weakly compressible flows when temperature fluctuations' influence on density can be neglected.
Definition at line 222 of file density_model.h.
|
inline |
Constructor of the isothermal ideal gas density model.
| [in] | p_density_ref | Value of the density of the gas at reference state. |
| [in] | p_R | Value of the specific gas constant \(\left(R=\frac{R_u}{M} \right)\) with \(R_u\) the universal gas constant and \(M\) the molar mass of the gas. |
| [in] | p_T | Value of the temperature of the gas at reference state. |
Definition at line 237 of file density_model.h.
References density_ref, PhysicalPropertyModel::model_depends_on, pressure, and psi.
|
inlineoverridevirtual |
Get the value of the reference state density used in the density model.
Implements DensityModel.
Definition at line 354 of file density_model.h.
References density_ref.
|
inlineoverridevirtual |
Get the value of the compressibility factor used in the density model.
Implements DensityModel.
Definition at line 342 of file density_model.h.
References psi.
|
inlineoverridevirtual |
Compute the jacobian (the partial derivative) of the density with respect to a specified field.
| [in] | field_values | Values of the various fields on which the density may depend. The map stores a single value per field. |
| [in] | id | Indicator of the field with respect to which the jacobian should be computed. |
Implements PhysicalPropertyModel.
Definition at line 300 of file density_model.h.
|
inlineoverridevirtual |
Compute the density of the isothermal ideal gas.
| [in] | field_values | Values of the various fields on which the property may depend. In this case, the density depends on pressure. The map stores a single value per field. |
field_values. Implements PhysicalPropertyModel.
Definition at line 256 of file density_model.h.
References density_ref, pressure, and psi.
|
inlineoverridevirtual |
Compute the derivative of the density with respect to a field for an isothermal ideal gas.
| [in] | field_vectors | Vector of values of the fields used to evaluate the density. The map stores a vector of values per field. |
| [in] | id | Identifier of the field with respect to which a derivative should be computed. |
| [out] | jacobian_vector | Vector of computed derivative values of the density with respect to the field of the specified id. |
Implements PhysicalPropertyModel.
Definition at line 324 of file density_model.h.
|
inlineoverridevirtual |
Compute a vector of density values for an isothermal ideal gas.
| [in] | field_vectors | Vectors of the fields on which the density may depend. In this case, the density depends on pressure. The map stores a vector of values per field. |
| [out] | property_vector | Vectors of computed density values. |
Implements PhysicalPropertyModel.
Definition at line 275 of file density_model.h.
References density_ref, pressure, and psi.
|
private |
Density of the isothermal ideal gas at reference state.
Definition at line 361 of file density_model.h.
|
private |
Compressibility factor of the isothermal ideal gas at reference state.
Definition at line 363 of file density_model.h.