OGS
VapourDiffusionPMQ.cpp
Go to the documentation of this file.
1
12#include "VapourDiffusionPMQ.h"
13
14#include <algorithm>
15#include <cmath>
16
20
21namespace MaterialPropertyLib
22{
24 const VariableArray& variable_array,
25 const ParameterLib::SpatialPosition& /*pos*/, const double /*t*/,
26 const double /*dt*/) const
27{
28 const double S_L = std::clamp(variable_array.liquid_saturation, 0.0, 1.0);
29
30 const double T = variable_array.temperature;
31
32 const double S_v = 1 - S_L;
33 const double D_vr = S_v;
34
37 exponent_) *
38 D_vr;
39}
40
42 VariableArray const& variable_array, Variable const variable,
43 ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/,
44 double const /*dt*/) const
45{
46 const double S_L = std::clamp(variable_array.liquid_saturation, 0.0, 1.0);
47
48 const double T = variable_array.temperature;
49
50 if (variable == Variable::temperature)
51 {
52 const double S_v = 1 - S_L;
53 const double D_vr = S_v;
54
57 exponent_ - 1.0) *
59 }
60
61 if (variable == Variable::liquid_saturation)
62 {
65 exponent_);
66 }
67
69 "VapourDiffusionPMQ::dValue is implemented for "
70 "derivatives with respect to temperature or saturation only.");
71}
72
73} // namespace MaterialPropertyLib
#define OGS_FATAL(...)
Definition Error.h:26
virtual PropertyDataType value() const
Definition Property.cpp:76
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
constexpr double CelsiusZeroInKelvin
Zero degrees Celsius in Kelvin.
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