OGS
LiquidViscosityVogels.cpp
Go to the documentation of this file.
1
13
14#include <cmath>
15
16#include "BaseLib/Error.h"
18
19namespace MaterialPropertyLib
20{
21
22template <typename VogelsConstants>
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
33template <typename VogelsConstants>
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 {
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
55
56} // namespace MaterialPropertyLib
#define OGS_FATAL(...)
Definition Error.h:26
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
virtual PropertyDataType value() const
Definition Property.cpp:76
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