OGS
MaterialLib::Fluid::VogelsLiquidDynamicViscosity< VogelsConstants > Class Template Referencefinal

Detailed Description

template<typename VogelsConstants>
class MaterialLib::Fluid::VogelsLiquidDynamicViscosity< VogelsConstants >

A temperature dependent viscosity model. ddbst

Definition at line 32 of file VogelsLiquidDynamicViscosity.h.

#include <VogelsLiquidDynamicViscosity.h>

Inheritance diagram for MaterialLib::Fluid::VogelsLiquidDynamicViscosity< VogelsConstants >:
[legend]
Collaboration diagram for MaterialLib::Fluid::VogelsLiquidDynamicViscosity< VogelsConstants >:
[legend]

Public Member Functions

 VogelsLiquidDynamicViscosity (VogelsConstants constants)
 Viscosity defined by \(10^3 \, e^{A+\frac{B}{C+T}}\).
 
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 VogelsConstants _constants
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ VogelsLiquidDynamicViscosity()

template<typename VogelsConstants >
MaterialLib::Fluid::VogelsLiquidDynamicViscosity< VogelsConstants >::VogelsLiquidDynamicViscosity ( VogelsConstants constants)
inlineexplicit

Viscosity defined by \(10^3 \, e^{A+\frac{B}{C+T}}\).

Parameters
constantsConstants of the fluid.

Definition at line 40 of file VogelsLiquidDynamicViscosity.h.

41 : _constants(std::move(constants))
42 {
43 }

Member Function Documentation

◆ getdValue()

template<typename VogelsConstants >
double MaterialLib::Fluid::VogelsLiquidDynamicViscosity< VogelsConstants >::getdValue ( const ArrayType & var_vals,
const PropertyVariableType var ) const
inlineoverridevirtual

Get the partial differential of the viscosity 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 69 of file VogelsLiquidDynamicViscosity.h.

71 {
72 (void)var;
73 const double T = var_vals[static_cast<int>(PropertyVariableType::T)];
74 const double f_buff = _constants.B / (_constants.C + T);
75 // Note: the constant of 1.e-3 is for the SI unit conversion.
76 return -1.e-3 * f_buff * std::exp(_constants.A + f_buff) /
77 (_constants.C + T);
78 }

References MaterialLib::Fluid::VogelsLiquidDynamicViscosity< VogelsConstants >::_constants, and MaterialLib::Fluid::T.

◆ getName()

template<typename VogelsConstants >
std::string MaterialLib::Fluid::VogelsLiquidDynamicViscosity< VogelsConstants >::getName ( ) const
inlineoverridevirtual

Get model name.

Implements MaterialLib::Fluid::FluidProperty.

Definition at line 46 of file VogelsLiquidDynamicViscosity.h.

47 {
48 return "Liquid viscosity by Vogel's equation";
49 }

◆ getValue()

template<typename VogelsConstants >
double MaterialLib::Fluid::VogelsLiquidDynamicViscosity< VogelsConstants >::getValue ( const ArrayType & var_vals) const
inlineoverridevirtual

Get viscosity value (in SI unit: Pa * s).

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 55 of file VogelsLiquidDynamicViscosity.h.

56 {
57 const double T = var_vals[static_cast<int>(PropertyVariableType::T)];
58 // Note: the constant of 1.e-3 is for the SI unit conversion.
59 return 1.e-3 *
60 std::exp(_constants.A + _constants.B / (_constants.C + T));
61 }

References MaterialLib::Fluid::VogelsLiquidDynamicViscosity< VogelsConstants >::_constants, and MaterialLib::Fluid::T.

Member Data Documentation

◆ _constants


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