OGS
MaterialLib::Fluid::LinearPressureDependentViscosity Class Referencefinal

Detailed Description

Class of a linear pressure dependent viscosity model.

\[ \mu = \mu_0\,(1 + \gamma (p -p_0) ) \]

where

\begin{eqnarray*} &\mu_0:& \mbox{reference viscosity,}\\ &\gamma:& \mbox{parameter,}\\ &p:& \mbox{pressure,}\\ &p_0:& \mbox{initial pressure.}\\ \end{eqnarray*}

Definition at line 35 of file LinearPressureDependentViscosity.h.

#include <LinearPressureDependentViscosity.h>

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

Public Member Functions

 LinearPressureDependentViscosity (const double mu0, const double p0, const double gamma)
 
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 _mu0
 Reference viscosity.
 
const double _p0
 Reference pressure.
 
const double _gamma
 Parameter.
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ LinearPressureDependentViscosity()

MaterialLib::Fluid::LinearPressureDependentViscosity::LinearPressureDependentViscosity ( const double mu0,
const double p0,
const double gamma )
inlineexplicit
Parameters
mu0\( \mu_0 \)
p0\( p_0 \)
gamma\( \gamma \)

Definition at line 43 of file LinearPressureDependentViscosity.h.

Member Function Documentation

◆ getdValue()

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

Get the partial differential of the viscosity with respect to pressure.

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 71 of file LinearPressureDependentViscosity.h.

73 {
74 (void)var_vals;
75 (void)var;
76 return _mu0 * _gamma;
77 }

References _gamma, and _mu0.

◆ getName()

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

Get model name.

Implements MaterialLib::Fluid::FluidProperty.

Definition at line 51 of file LinearPressureDependentViscosity.h.

52 {
53 return "Linear pressure dependent viscosity";
54 }

◆ getValue()

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

Get viscosity 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 60 of file LinearPressureDependentViscosity.h.

61 {
62 const double p = var_vals[static_cast<int>(PropertyVariableType::p)];
63 return _mu0 * (1 + _gamma * (p - _p0));
64 }

References _gamma, _mu0, _p0, and MaterialLib::Fluid::p.

Member Data Documentation

◆ _gamma

const double MaterialLib::Fluid::LinearPressureDependentViscosity::_gamma
private

Parameter.

Definition at line 82 of file LinearPressureDependentViscosity.h.

Referenced by getdValue(), and getValue().

◆ _mu0

const double MaterialLib::Fluid::LinearPressureDependentViscosity::_mu0
private

Reference viscosity.

Definition at line 80 of file LinearPressureDependentViscosity.h.

Referenced by getdValue(), and getValue().

◆ _p0

const double MaterialLib::Fluid::LinearPressureDependentViscosity::_p0
private

Reference pressure.

Definition at line 81 of file LinearPressureDependentViscosity.h.

Referenced by getValue().


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