OGS
MaterialPropertyLib::LiquidViscosityVogels< VogelsConstants > Class Template Referencefinal

Detailed Description

template<typename VogelsConstants>
class MaterialPropertyLib::LiquidViscosityVogels< VogelsConstants >

A temperature dependent viscosity model. ddbst

Definition at line 25 of file LiquidViscosityVogels.h.

#include <LiquidViscosityVogels.h>

Inheritance diagram for MaterialPropertyLib::LiquidViscosityVogels< VogelsConstants >:
[legend]
Collaboration diagram for MaterialPropertyLib::LiquidViscosityVogels< VogelsConstants >:
[legend]

Public Member Functions

 LiquidViscosityVogels (std::string name, VogelsConstants constants)
 
void checkScale () const override
 
PropertyDataType value (VariableArray const &variable_array, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
 
PropertyDataType dValue (VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
 
- Public Member Functions inherited from MaterialPropertyLib::Property
virtual ~Property ()
 
virtual PropertyDataType initialValue (ParameterLib::SpatialPosition const &pos, double const t) const
 
virtual PropertyDataType value () const
 
virtual PropertyDataType value (VariableArray const &variable_array, VariableArray const &variable_array_prev, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
virtual PropertyDataType dValue (VariableArray const &variable_array, VariableArray const &variable_array_prev, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
virtual PropertyDataType d2Value (VariableArray const &variable_array, Variable const variable1, Variable const variable2, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 Default implementation: 2nd derivative of any constant property is zero.
 
virtual void setProperties (std::vector< std::unique_ptr< Phase > > const &phases)
 Default implementation:
 
void setScale (std::variant< Medium *, Phase *, Component * > scale)
 
template<typename T >
initialValue (ParameterLib::SpatialPosition const &pos, double const t) const
 
template<typename T >
value () const
 
template<typename T >
value (VariableArray const &variable_array, VariableArray const &variable_array_prev, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
value (VariableArray const &variable_array, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
dValue (VariableArray const &variable_array, VariableArray const &variable_array_prev, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
dValue (VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
d2Value (VariableArray const &variable_array, Variable const &variable1, Variable const &variable2, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 

Private Attributes

const VogelsConstants constants_
 

Additional Inherited Members

- Protected Attributes inherited from MaterialPropertyLib::Property
std::string name_
 
PropertyDataType value_
 The single value of a property.
 
PropertyDataType dvalue_
 
std::variant< Medium *, Phase *, Component * > scale_
 

Constructor & Destructor Documentation

◆ LiquidViscosityVogels()

template<typename VogelsConstants >
MaterialPropertyLib::LiquidViscosityVogels< VogelsConstants >::LiquidViscosityVogels ( std::string name,
VogelsConstants constants )
inlineexplicit

Definition at line 28 of file LiquidViscosityVogels.h.

29 : constants_(std::move(constants))
30 {
31 name_ = std::move(name);
32 };

References MaterialPropertyLib::name, and MaterialPropertyLib::Property::name_.

Member Function Documentation

◆ checkScale()

template<typename VogelsConstants >
void MaterialPropertyLib::LiquidViscosityVogels< VogelsConstants >::checkScale ( ) const
inlineoverridevirtual

Reimplemented from MaterialPropertyLib::Property.

Definition at line 34 of file LiquidViscosityVogels.h.

35 {
36 if (!std::holds_alternative<Phase*>(scale_))
37 {
39 "The property 'LiquidViscosityVogels' is "
40 "implemented on the 'Phase' scale only.");
41 }
42 }
#define OGS_FATAL(...)
Definition Error.h:26
std::variant< Medium *, Phase *, Component * > scale_
Definition Property.h:297

References OGS_FATAL, and MaterialPropertyLib::Property::scale_.

◆ dValue()

template<typename VogelsConstants >
PropertyDataType MaterialPropertyLib::LiquidViscosityVogels< VogelsConstants >::dValue ( VariableArray const & variable_array,
Variable const variable,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
overridevirtual
Returns
The derivative of the liquid viscosity with respect to temperature or phase (water) pressure.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 34 of file LiquidViscosityVogels.cpp.

38{
39 if (variable != Variable::temperature)
40 {
42 "LiquidViscosityVogels::dValue is implemented for "
43 "derivatives with respect to temperature only.");
44 }
45 const double T = variable_array.temperature;
46 const double f_buff = constants_.B / (constants_.C + T);
47 // Note: the constant of 1.e-3 is for the SI unit conversion.
48 return -1.e-3 * f_buff * std::exp(constants_.A + f_buff) /
49 (constants_.C + T);
50}

References OGS_FATAL, MaterialPropertyLib::temperature, and MaterialPropertyLib::VariableArray::temperature.

◆ value()

template<typename VogelsConstants >
PropertyDataType MaterialPropertyLib::LiquidViscosityVogels< VogelsConstants >::value ( VariableArray const & variable_array,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
overridevirtual
Returns
The liquid viscosity.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 23 of file LiquidViscosityVogels.cpp.

27{
28 const double T = variable_array.temperature;
29 // Note: the constant of 1.e-3 is for the SI unit conversion.
30 return 1.e-3 * std::exp(constants_.A + constants_.B / (constants_.C + T));
31}

References MaterialPropertyLib::VariableArray::temperature.

Member Data Documentation

◆ constants_

template<typename VogelsConstants >
const VogelsConstants MaterialPropertyLib::LiquidViscosityVogels< VogelsConstants >::constants_
private

Definition at line 56 of file LiquidViscosityVogels.h.


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