OGS
VapourDiffusionFEBEX.cpp
Go to the documentation of this file.
1
12
#include "
VapourDiffusionFEBEX.h
"
13
14
#include <algorithm>
15
#include <cmath>
16
17
#include "
MaterialLib/MPL/Medium.h
"
18
#include "
MaterialLib/MPL/VariableType.h
"
19
#include "
MaterialLib/PhysicalConstant.h
"
20
21
namespace
MaterialPropertyLib
22
{
23
PropertyDataType
VapourDiffusionFEBEX::value
(
24
const
VariableArray
& variable_array,
25
const
ParameterLib::SpatialPosition
&
/*pos*/
,
const
double
/*t*/
,
26
const
double
/*dt*/
)
const
27
{
28
const
double
T = variable_array.
temperature
;
29
30
return
base_diffusion_coefficient_
*
31
std::pow(T /
MaterialLib::PhysicalConstant::CelsiusZeroInKelvin
,
32
exponent_
);
33
}
34
35
PropertyDataType
VapourDiffusionFEBEX::dValue
(
36
VariableArray
const
& variable_array,
Variable
const
variable,
37
ParameterLib::SpatialPosition
const
&
/*pos*/
,
double
const
/*t*/
,
38
double
const
/*dt*/
)
const
39
{
40
const
double
T = variable_array.
temperature
;
41
42
if
(variable ==
Variable::temperature
)
43
{
44
return
exponent_
*
base_diffusion_coefficient_
*
45
std::pow(T /
MaterialLib::PhysicalConstant::CelsiusZeroInKelvin
,
46
exponent_
- 1.0) /
47
MaterialLib::PhysicalConstant::CelsiusZeroInKelvin
;
48
}
49
if
(variable ==
Variable::liquid_saturation
)
50
{
51
return
0.0;
52
}
53
54
OGS_FATAL
(
55
"VapourDiffusionFEBEX::dValue is implemented for derivatives with "
56
"respect to temperature or saturation only."
);
57
}
58
59
}
// namespace MaterialPropertyLib
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:26
Medium.h
PhysicalConstant.h
VapourDiffusionFEBEX.h
VariableType.h
MaterialPropertyLib::Property::value
virtual PropertyDataType value() const
Definition
Property.cpp:76
MaterialPropertyLib::VapourDiffusionFEBEX::exponent_
double const exponent_
Definition
VapourDiffusionFEBEX.h:86
MaterialPropertyLib::VapourDiffusionFEBEX::base_diffusion_coefficient_
double const base_diffusion_coefficient_
Definition
VapourDiffusionFEBEX.h:85
MaterialPropertyLib::VapourDiffusionFEBEX::dValue
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
Definition
VapourDiffusionFEBEX.cpp:35
MaterialPropertyLib::VariableArray
Definition
VariableType.h:99
MaterialPropertyLib::VariableArray::temperature
double temperature
Definition
VariableType.h:191
ParameterLib::SpatialPosition
Definition
SpatialPosition.h:27
MaterialLib::PhysicalConstant::CelsiusZeroInKelvin
constexpr double CelsiusZeroInKelvin
Zero degrees Celsius in Kelvin.
Definition
PhysicalConstant.h:22
MaterialPropertyLib
Definition
ChemicalSolverInterface.h:21
MaterialPropertyLib::Variable
Variable
Definition
VariableType.h:30
MaterialPropertyLib::Variable::liquid_saturation
@ liquid_saturation
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
VapourDiffusion
VapourDiffusionFEBEX.cpp
Generated by
1.11.0