OGS
WaterLiquidDensityIAPWSIF97Region4.cpp
Go to the documentation of this file.
1
12
#include "
WaterLiquidDensityIAPWSIF97Region4.h
"
13
14
#include <cmath>
15
16
#include "
BaseLib/Error.h
"
17
#include "
MaterialLib/Fluid/GibbsFreeEnergy/DimensionLessGibbsFreeEnergyRegion1.h
"
18
#include "
MaterialLib/MPL/Properties/WaterSaturationCurveIAPWSIF97Region4.h
"
19
#include "
MaterialLib/PhysicalConstant.h
"
20
21
namespace
MaterialPropertyLib
22
{
23
24
PropertyDataType
WaterLiquidDensityIAPWSIF97Region4::value
(
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 liquid saturation "
41
"density."
);
42
}
43
44
const
MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1
45
gibbs_free_energy_
;
46
47
static
constexpr
double
ref_T_
= 1386;
48
static
constexpr
double
ref_p_
= 1.653e7;
49
50
double
const
T_s =
IAPWSIF97Region4::waterSaturationTemperature
(p);
51
double
const
tau =
ref_T_
/ T_s;
52
double
const
pi = p /
ref_p_
;
53
54
return
ref_p_
/
55
(
MaterialLib::PhysicalConstant::SpecificGasConstant::WaterVapour
*
56
T_s *
gibbs_free_energy_
.
get_dgamma_dpi
(tau, pi));
57
}
58
59
PropertyDataType
WaterLiquidDensityIAPWSIF97Region4::dValue
(
60
VariableArray
const
&
/*variable_array*/
,
Variable
const
/*variable*/
,
61
ParameterLib::SpatialPosition
const
&
/*pos*/
,
double
const
/*t*/
,
62
double
const
/*dt*/
)
const
63
{
64
OGS_FATAL
(
"WaterLiquidDensityIAPWSIF97Region4::dValue is not implemented."
);
65
}
66
67
}
// namespace MaterialPropertyLib
DimensionLessGibbsFreeEnergyRegion1.h
Declare a class for dimensionless Gibbs free energy, region1.
Error.h
OGS_FATAL
#define OGS_FATAL(...)
Definition
Error.h:26
WARN
void WARN(fmt::format_string< Args... > fmt, Args &&... args)
Definition
Logging.h:40
PhysicalConstant.h
WaterLiquidDensityIAPWSIF97Region4.h
WaterSaturationCurveIAPWSIF97Region4.h
MaterialPropertyLib::Property::value
virtual PropertyDataType value() const
Definition
Property.cpp:76
MaterialPropertyLib::VariableArray
Definition
VariableType.h:97
MaterialPropertyLib::VariableArray::liquid_phase_pressure
double liquid_phase_pressure
Definition
VariableType.h:178
ParameterLib::SpatialPosition
Definition
SpatialPosition.h:27
MaterialLib::PhysicalConstant::SpecificGasConstant::WaterVapour
constexpr double WaterVapour
Specific gas constant for water vapour.
Definition
PhysicalConstant.h:95
MaterialPropertyLib::IAPWSIF97Region4::waterSaturationTemperature
double waterSaturationTemperature(double const pressure)
Definition
WaterSaturationCurveIAPWSIF97Region4.h:23
MaterialPropertyLib
Definition
ChemicalSolverInterface.h:21
MaterialPropertyLib::ref_p_
static constexpr double ref_p_
reference pressure in Pa.
Definition
WaterEnthalpyIAPWSIF97Region1.cpp:27
MaterialPropertyLib::gibbs_free_energy_
const MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1 gibbs_free_energy_
Definition
WaterEnthalpyIAPWSIF97Region1.cpp:24
MaterialPropertyLib::Variable
Variable
Definition
VariableType.h:30
MaterialPropertyLib::ref_T_
static constexpr double ref_T_
reference temperature in K.
Definition
WaterEnthalpyIAPWSIF97Region1.cpp:26
MaterialPropertyLib::PropertyDataType
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
MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1
Definition
DimensionLessGibbsFreeEnergyRegion1.h:34
MaterialLib::Fluid::DimensionLessGibbsFreeEnergyRegion1::get_dgamma_dpi
static double get_dgamma_dpi(const double tau, const double pi)
Definition
DimensionLessGibbsFreeEnergyRegion1.cpp:83
MaterialPropertyLib::WaterLiquidDensityIAPWSIF97Region4::dValue
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
Definition
WaterLiquidDensityIAPWSIF97Region4.cpp:59
MaterialLib
MPL
Properties
Density
WaterLiquidDensityIAPWSIF97Region4.cpp
Generated by
1.10.0