OGS
MaterialLib::Fluid::LinearConcentrationDependentDensity Class Referencefinal

Detailed Description

Linear concentration dependent density model.

\[ \varrho = \varrho_{\text{ref}} (1 + \bar \alpha (C - C_{\text{ref}})) \]

where

  • \( \varrho_{\text{ref}}\) is the reference density
  • \( \bar \alpha\) is the fluid density difference ratio
  • \( C_{\text{ref}}\) is the reference concentration

Definition at line 28 of file LinearConcentrationDependentDensity.h.

#include <LinearConcentrationDependentDensity.h>

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

Public Member Functions

 LinearConcentrationDependentDensity (const double reference_density, double reference_concentration, const double fluid_density_difference_ratio)
 
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 _reference_density
 
const double _reference_concentration
 
const double _fluid_density_difference_ratio
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ LinearConcentrationDependentDensity()

MaterialLib::Fluid::LinearConcentrationDependentDensity::LinearConcentrationDependentDensity ( const double reference_density,
double reference_concentration,
const double fluid_density_difference_ratio )
inlineexplicit
Parameters
reference_density\(\rho_0\)
reference_concentration\(C_0\)
fluid_density_difference_ratio\( \bar \alpha \) in reference Coupled groundwater flow and transport: 2. Thermohaline and 3D convection systems

Definition at line 38 of file LinearConcentrationDependentDensity.h.

Member Function Documentation

◆ getdValue()

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

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

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 69 of file LinearConcentrationDependentDensity.h.

71 {
72 (void)var_vals;
73 if (var != PropertyVariableType::C)
74 {
75 return 0.0;
76 }
78 }

References _fluid_density_difference_ratio, _reference_density, and MaterialLib::Fluid::C.

◆ getName()

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

Get model name.

Implements MaterialLib::Fluid::FluidProperty.

Definition at line 48 of file LinearConcentrationDependentDensity.h.

49 {
50 return "Linear concentration dependent density";
51 }

◆ getValue()

double MaterialLib::Fluid::LinearConcentrationDependentDensity::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 56 of file LinearConcentrationDependentDensity.h.

57 {
58 const double C = var_vals[static_cast<int>(PropertyVariableType::C)];
59 return _reference_density * (1 +
62 }

References _fluid_density_difference_ratio, _reference_concentration, _reference_density, and MaterialLib::Fluid::C.

Member Data Documentation

◆ _fluid_density_difference_ratio

const double MaterialLib::Fluid::LinearConcentrationDependentDensity::_fluid_density_difference_ratio
private

Definition at line 83 of file LinearConcentrationDependentDensity.h.

Referenced by getdValue(), and getValue().

◆ _reference_concentration

const double MaterialLib::Fluid::LinearConcentrationDependentDensity::_reference_concentration
private

Definition at line 82 of file LinearConcentrationDependentDensity.h.

Referenced by getValue().

◆ _reference_density

const double MaterialLib::Fluid::LinearConcentrationDependentDensity::_reference_density
private

Definition at line 81 of file LinearConcentrationDependentDensity.h.

Referenced by getdValue(), and getValue().


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