OGS
WaterVapourEnthalpyIAPWSIF97Region4.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
5
6#include <cmath>
7
8#include "BaseLib/Error.h"
12
13namespace MaterialPropertyLib
14{
16 VariableArray const& variable_array,
17 ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/,
18 double const /*dt*/) const
19{
20 double const p = variable_array.liquid_phase_pressure;
21
23 p, "the water vapour saturation enthalpy");
24
25 static constexpr double ref_T_ = 540;
26 static constexpr double ref_p_ = 1.e6;
27
29 double const tau = ref_T_ / T_s;
30 double const pi = p / ref_p_;
31
32 double dgamma_dtau =
34 tau, pi);
35
37 T_s * dgamma_dtau;
38}
39
41 VariableArray const& /*variable_array*/, Variable const /*variable*/,
42 ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/,
43 double const /*dt*/) const
44{
46 "WaterVapourEnthalpyIAPWSIF97Region4::dValue is not implemented.");
47}
48
49} // namespace MaterialPropertyLib
#define OGS_FATAL(...)
Definition Error.h:10
virtual PropertyDataType value() const
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
void checkPressureInRange(double const pressure, std::string_view const quantity)
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