OGS
|
Class of a generic density model for liquid fluids varying with temperature or pressure.
The formula is given on engineeringtoolbox which reads
\[ \rho_l = \rho_0/(1+\beta(T-T_0))/(1-(p-p_0)/E) \]
where
\begin{eqnarray*} &\rho_l:& \mbox{liquid density,}\\ &\rho_0:& \mbox{initial liquid density,}\\ &\beta: & \mbox{volumetric temperature expansion coefficient,}\\ &T:& \mbox{temperature,}\\ &T_0:& \mbox{initial temperature,}\\ &p:& \mbox{pressure,}\\ &p_0:& \mbox{initial pressure,}\\ &E:& \mbox{bulk modulus fluid elasticity.}\\ \end{eqnarray*}
Definition at line 49 of file LiquidDensity.h.
#include <LiquidDensity.h>
Public Member Functions | |
LiquidDensity (const double beta, const double rho0, const double T0, const double p0, const double E) | |
std::string | getName () const override |
Get density model name. | |
double | getValue (const ArrayType &var_vals) const override |
double | getdValue (const ArrayType &var_vals, const PropertyVariableType var) const override |
Public Member Functions inherited from MaterialLib::Fluid::FluidProperty | |
virtual | ~FluidProperty ()=default |
Private Member Functions | |
double | dLiquidDensity_dT (const double T, const double p) const |
double | dLiquidDensity_dp (const double T, const double p) const |
Private Attributes | |
const double | _beta |
Volumetric temperature expansion coefficient. | |
const double | _rho0 |
Initial density. | |
const double | _temperature0 |
Initial temperature. | |
const double | _p0 |
Initial pressure. | |
const double | _bulk_modulus |
Bulk modulus. | |
Additional Inherited Members | |
Public Types inherited from MaterialLib::Fluid::FluidProperty | |
using | ArrayType = std::array<double, PropertyVariableNumber> |
|
inlineexplicit |
Definition at line 52 of file LiquidDensity.h.
|
inlineprivate |
Calculate the derivative of density of fluids with respect to pressure.
T | Temperature (K). |
p | Pressure (Pa). |
Definition at line 130 of file LiquidDensity.h.
References _beta, _bulk_modulus, _p0, _rho0, _temperature0, MaterialLib::Fluid::p, and MaterialLib::Fluid::T.
Referenced by getdValue().
|
inlineprivate |
Calculate the derivative of density of fluids with respect to temperature.
T | Temperature (K). |
p | Pressure (Pa). |
Definition at line 118 of file LiquidDensity.h.
References _beta, _bulk_modulus, _p0, _rho0, _temperature0, MaterialLib::Fluid::p, and MaterialLib::Fluid::T.
Referenced by getdValue().
|
inlineoverridevirtual |
Get the partial differential of the density with respect to temperature or liquid pressure.
var_vals | Variable values in an array. The order of its elements is given in enum class PropertyVariableType. |
var | Variable type. |
Implements MaterialLib::Fluid::FluidProperty.
Definition at line 80 of file LiquidDensity.h.
References dLiquidDensity_dp(), dLiquidDensity_dT(), MaterialLib::Fluid::p, and MaterialLib::Fluid::T.
|
inlineoverridevirtual |
Get density model name.
Implements MaterialLib::Fluid::FluidProperty.
Definition at line 59 of file LiquidDensity.h.
|
inlineoverridevirtual |
Get density value.
var_vals | Variable values in an array. The order of its elements is given in enum class PropertyVariableType. |
Implements MaterialLib::Fluid::FluidProperty.
Definition at line 67 of file LiquidDensity.h.
References _beta, _bulk_modulus, _p0, _rho0, _temperature0, MaterialLib::Fluid::p, and MaterialLib::Fluid::T.
|
private |
Volumetric temperature expansion coefficient.
Definition at line 98 of file LiquidDensity.h.
Referenced by dLiquidDensity_dp(), dLiquidDensity_dT(), and getValue().
|
private |
Bulk modulus.
Definition at line 110 of file LiquidDensity.h.
Referenced by dLiquidDensity_dp(), dLiquidDensity_dT(), and getValue().
|
private |
Initial pressure.
Definition at line 107 of file LiquidDensity.h.
Referenced by dLiquidDensity_dp(), dLiquidDensity_dT(), and getValue().
|
private |
Initial density.
Definition at line 101 of file LiquidDensity.h.
Referenced by dLiquidDensity_dp(), dLiquidDensity_dT(), and getValue().
|
private |
Initial temperature.
Definition at line 104 of file LiquidDensity.h.
Referenced by dLiquidDensity_dp(), dLiquidDensity_dT(), and getValue().