OGS
MaterialLib::Fluid::LinearTemperatureDependentDensity Class Referencefinal

Detailed Description

Linear temperature dependent density model.

Definition at line 26 of file LinearTemperatureDependentDensity.h.

#include <LinearTemperatureDependentDensity.h>

Inheritance diagram for MaterialLib::Fluid::LinearTemperatureDependentDensity:
[legend]
Collaboration diagram for MaterialLib::Fluid::LinearTemperatureDependentDensity:
[legend]

Public Member Functions

 LinearTemperatureDependentDensity (const double rho0, double T0, const double beta)
 
std::string getName () const override
 Get 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 Attributes

const double _rho0
 Reference density.
 
const double _temperature0
 Reference temperature.
 
const double _beta
 Parameter.
 

Additional Inherited Members

- Public Types inherited from MaterialLib::Fluid::FluidProperty
using ArrayType = std::array<double, PropertyVariableNumber>
 

Constructor & Destructor Documentation

◆ LinearTemperatureDependentDensity()

MaterialLib::Fluid::LinearTemperatureDependentDensity::LinearTemperatureDependentDensity ( const double rho0,
double T0,
const double beta )
inlineexplicit
Parameters
rho0\( \rho_0 \)
T0\( T_0 \)
beta\( \beta \)

Definition at line 34 of file LinearTemperatureDependentDensity.h.

Member Function Documentation

◆ getdValue()

double MaterialLib::Fluid::LinearTemperatureDependentDensity::getdValue ( const ArrayType & var_vals,
const PropertyVariableType var ) const
inlineoverridevirtual

Get the partial differential of the density with respect to temperature.

Parameters
var_valsVariable values in an array. The order of its elements is given in enum class PropertyVariableType.
varVariable type.

Implements MaterialLib::Fluid::FluidProperty.

Definition at line 59 of file LinearTemperatureDependentDensity.h.

61 {
62 (void)var_vals;
63 if (var != PropertyVariableType::T)
64 {
65 return 0.0;
66 }
67 return -_rho0 * _beta;
68 }

References _beta, _rho0, and MaterialLib::Fluid::T.

◆ getName()

std::string MaterialLib::Fluid::LinearTemperatureDependentDensity::getName ( ) const
inlineoverridevirtual

Get model name.

Implements MaterialLib::Fluid::FluidProperty.

Definition at line 41 of file LinearTemperatureDependentDensity.h.

42 {
43 return "Linear temperature dependent density";
44 }

◆ getValue()

double MaterialLib::Fluid::LinearTemperatureDependentDensity::getValue ( const ArrayType & var_vals) const
inlineoverridevirtual

Get density value.

Parameters
var_valsVariable values in an array. The order of its elements is given in enum class PropertyVariableType.

Implements MaterialLib::Fluid::FluidProperty.

Definition at line 49 of file LinearTemperatureDependentDensity.h.

50 {
51 const double T = var_vals[static_cast<int>(PropertyVariableType::T)];
52 return _rho0 * (1 - _beta * (T - _temperature0));
53 }

References _beta, _rho0, _temperature0, and MaterialLib::Fluid::T.

Member Data Documentation

◆ _beta

const double MaterialLib::Fluid::LinearTemperatureDependentDensity::_beta
private

Parameter.

Definition at line 73 of file LinearTemperatureDependentDensity.h.

Referenced by getdValue(), and getValue().

◆ _rho0

const double MaterialLib::Fluid::LinearTemperatureDependentDensity::_rho0
private

Reference density.

Definition at line 71 of file LinearTemperatureDependentDensity.h.

Referenced by getdValue(), and getValue().

◆ _temperature0

const double MaterialLib::Fluid::LinearTemperatureDependentDensity::_temperature0
private

Reference temperature.

Definition at line 72 of file LinearTemperatureDependentDensity.h.

Referenced by getValue().


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