OGS
WaterLiquidDensityIAPWSIF97Region4.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{
15
17 VariableArray const& variable_array,
18 ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/,
19 double const /*dt*/) const
20{
21 double const p = variable_array.liquid_phase_pressure;
22
29 if ((p < 611.213) || (p > 22.064e6))
30 {
31 WARN(
32 "Pressure is out of the range for the water liquid saturation "
33 "density.");
34 }
35
38
39 static constexpr double ref_T_ = 1386;
40 static constexpr double ref_p_ = 1.653e7;
41
43 double const tau = ref_T_ / T_s;
44 double const pi = p / ref_p_;
45
46 return ref_p_ /
48 T_s * gibbs_free_energy_.get_dgamma_dpi(tau, pi));
49}
50
52 VariableArray const& /*variable_array*/, Variable const /*variable*/,
53 ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/,
54 double const /*dt*/) const
55{
56 OGS_FATAL("WaterLiquidDensityIAPWSIF97Region4::dValue is not implemented.");
57}
58
59} // namespace MaterialPropertyLib
#define OGS_FATAL(...)
Definition Error.h:19
void WARN(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:34
virtual PropertyDataType value() const
constexpr double WaterVapour
Specific gas constant for water vapour.
static constexpr double ref_p_
reference pressure in Pa.
const MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1 gibbs_free_energy_
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
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override