OGS
WaterVapourDensityIAPWSIF97Region4.cpp
Go to the documentation of this file.
1
13
14#include <cmath>
15
16#include "BaseLib/Error.h"
20
21namespace MaterialPropertyLib
22{
23
25 VariableArray const& variable_array,
26 ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/,
27 double const /*dt*/) const
28{
29 double const p = variable_array.liquid_phase_pressure;
30
37 if ((p < 611.213) || (p > 22.064e6))
38 {
39 WARN(
40 "Pressure is out of the range for the water vapour saturation "
41 "density.");
42 }
43
45
46 static constexpr double ref_T_ = 540;
47 static constexpr double ref_p_ = 1.e6;
48 double const tau = ref_T_ / T_s;
49 double const pi = p / ref_p_;
50
51 double dgamma_dtau =
53 tau, pi);
54
55 return p /
56 (pi *
58 T_s * dgamma_dtau);
59}
60
62 VariableArray const& /*variable_array*/, Variable const /*variable*/,
63 ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/,
64 double const /*dt*/) const
65{
66 OGS_FATAL("WaterVapourDensityIAPWSIF97Region4::dValue is not implemented.");
67}
68
69} // namespace MaterialPropertyLib
#define OGS_FATAL(...)
Definition Error.h:26
void WARN(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:40
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 WaterVapour
Specific gas constant for water vapour.
static constexpr double ref_p_
reference pressure in Pa.
static constexpr double ref_T_
reference temperature in K.
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