OGS
LiquidViscosityVogels.cpp
Go to the documentation of this file.
1
12
#include "
LiquidViscosityVogels.h
"
13
14
#include <cmath>
15
16
#include "
BaseLib/Error.h
"
17
#include "
MaterialLib/MPL/Medium.h
"
18
19
namespace
MaterialPropertyLib
20
{
21
22
template
<
typename
VogelsConstants>
23
PropertyDataType
LiquidViscosityVogels<VogelsConstants>::value
(
24
VariableArray
const
& variable_array,
25
ParameterLib::SpatialPosition
const
&
/*pos*/
,
double
const
/*t*/
,
26
double
const
/*dt*/
)
const
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
}
32
33
template
<
typename
VogelsConstants>
34
PropertyDataType
LiquidViscosityVogels<VogelsConstants>::dValue
(
35
VariableArray
const
& variable_array,
Variable
const
variable,
36
ParameterLib::SpatialPosition
const
&
/*pos*/
,
double
const
/*t*/
,
37
double
const
/*dt*/
)
const
38
{
39
if
(variable !=
Variable::temperature
)
40
{
41
OGS_FATAL
(
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
}
51
52
template
class
LiquidViscosityVogels<VogelsViscosityConstantsWater>
;
53
template
class
LiquidViscosityVogels<VogelsViscosityConstantsCO2>
;
54
template
class
LiquidViscosityVogels<VogelsViscosityConstantsCH4>
;
55
56
}
// namespace MaterialPropertyLib
Error.h
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:26
LiquidViscosityVogels.h
Medium.h
MaterialPropertyLib::LiquidViscosityVogels
Definition
LiquidViscosityVogels.h:26
MaterialPropertyLib::LiquidViscosityVogels::dValue
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
Definition
LiquidViscosityVogels.cpp:34
MaterialPropertyLib::Property::value
virtual PropertyDataType value() const
Definition
Property.cpp:76
MaterialPropertyLib::VariableArray
Definition
VariableType.h:97
MaterialPropertyLib::VariableArray::temperature
double temperature
Definition
VariableType.h:188
ParameterLib::SpatialPosition
Definition
SpatialPosition.h:27
MaterialPropertyLib
Definition
ChemicalSolverInterface.h:21
MaterialPropertyLib::Variable
Variable
Definition
VariableType.h:30
MaterialPropertyLib::Variable::temperature
@ temperature
MaterialPropertyLib::PropertyDataType
std::variant< double, Eigen::Matrix< double, 2, 1 >, Eigen::Matrix< double, 3, 1 >, Eigen::Matrix< double, 2, 2 >, Eigen::Matrix< double, 3, 3 >, Eigen::Matrix< double, 4, 1 >, Eigen::Matrix< double, 6, 1 >, Eigen::MatrixXd > PropertyDataType
Definition
Property.h:31
MaterialLib
MPL
Properties
Viscosity
LiquidViscosityVogels.cpp
Generated by
1.10.0