OGS
MaterialPropertyLib::WaterVapourDensityIAPWSIF97Region4 Class Referencefinal

Detailed Description

Water vapour saturation density in region4 curve based on the IAPWS Industrial Formulation 1997 IF97-Rev

Definition at line 23 of file WaterVapourDensityIAPWSIF97Region4.h.

#include <WaterVapourDensityIAPWSIF97Region4.h>

Inheritance diagram for MaterialPropertyLib::WaterVapourDensityIAPWSIF97Region4:
[legend]
Collaboration diagram for MaterialPropertyLib::WaterVapourDensityIAPWSIF97Region4:
[legend]

Public Member Functions

 WaterVapourDensityIAPWSIF97Region4 (std::string name)
 
void checkScale () const override
 
PropertyDataType value (VariableArray const &variable_array, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
 
PropertyDataType dValue (VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const override
 
- Public Member Functions inherited from MaterialPropertyLib::Property
virtual ~Property ()
 
virtual PropertyDataType initialValue (ParameterLib::SpatialPosition const &pos, double const t) const
 
virtual PropertyDataType value () const
 
virtual PropertyDataType value (VariableArray const &variable_array, VariableArray const &variable_array_prev, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
virtual PropertyDataType dValue (VariableArray const &variable_array, VariableArray const &variable_array_prev, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
virtual PropertyDataType d2Value (VariableArray const &variable_array, Variable const variable1, Variable const variable2, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 Default implementation: 2nd derivative of any constant property is zero.
 
virtual void setProperties (std::vector< std::unique_ptr< Phase > > const &phases)
 Default implementation:
 
void setScale (std::variant< Medium *, Phase *, Component * > scale)
 
template<typename T >
initialValue (ParameterLib::SpatialPosition const &pos, double const t) const
 
template<typename T >
value () const
 
template<typename T >
value (VariableArray const &variable_array, VariableArray const &variable_array_prev, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
value (VariableArray const &variable_array, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
dValue (VariableArray const &variable_array, VariableArray const &variable_array_prev, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
dValue (VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
d2Value (VariableArray const &variable_array, Variable const &variable1, Variable const &variable2, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 

Additional Inherited Members

- Protected Attributes inherited from MaterialPropertyLib::Property
std::string name_
 
PropertyDataType value_
 The single value of a property.
 
PropertyDataType dvalue_
 
std::variant< Medium *, Phase *, Component * > scale_
 

Constructor & Destructor Documentation

◆ WaterVapourDensityIAPWSIF97Region4()

MaterialPropertyLib::WaterVapourDensityIAPWSIF97Region4::WaterVapourDensityIAPWSIF97Region4 ( std::string name)
inlineexplicit

Member Function Documentation

◆ checkScale()

void MaterialPropertyLib::WaterVapourDensityIAPWSIF97Region4::checkScale ( ) const
inlineoverridevirtual

Reimplemented from MaterialPropertyLib::Property.

Definition at line 30 of file WaterVapourDensityIAPWSIF97Region4.h.

31 {
32 if (!std::holds_alternative<Phase*>(scale_))
33 {
35 "The property 'WaterVapourDensityIAPWSIF97Region4' is "
36 "implemented on the 'Phase' scale only.");
37 }
38 }
#define OGS_FATAL(...)
Definition Error.h:26
std::variant< Medium *, Phase *, Component * > scale_
Definition Property.h:297

References OGS_FATAL, and MaterialPropertyLib::Property::scale_.

◆ dValue()

PropertyDataType MaterialPropertyLib::WaterVapourDensityIAPWSIF97Region4::dValue ( VariableArray const & variable_array,
Variable const variable,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
overridevirtual
Returns
The derivative of water vapour saturation density in region4 curve.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 61 of file WaterVapourDensityIAPWSIF97Region4.cpp.

65{
66 OGS_FATAL("WaterVapourDensityIAPWSIF97Region4::dValue is not implemented.");
67}

References OGS_FATAL.

◆ value()

PropertyDataType MaterialPropertyLib::WaterVapourDensityIAPWSIF97Region4::value ( VariableArray const & variable_array,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
overridevirtual
Returns
The water vapour saturation density in region4 curve

According to the IAPWS-IF97: http://www.iapws.org/relguide/IF97-Rev.pdf, the vapor-liquid saturation line only covers the pressure range between 611.213 Pa and 22.064 MPa. Thus, for the vapour saturation density calculated from the saturation temperature, it has the same pressure boundaries.

< reference temperature in K.

< reference pressure in Pa.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 24 of file WaterVapourDensityIAPWSIF97Region4.cpp.

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}
void WARN(fmt::format_string< Args... > fmt, Args &&... args)
Definition Logging.h:40
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.

References MaterialLib::Fluid::DimensionlessGibbsFreeEnergyRegion2::getdGammadPi(), MaterialPropertyLib::VariableArray::liquid_phase_pressure, MaterialPropertyLib::ref_p_, MaterialPropertyLib::ref_T_, WARN(), MaterialPropertyLib::IAPWSIF97Region4::waterSaturationTemperature(), and MaterialLib::PhysicalConstant::SpecificGasConstant::WaterVapour.


The documentation for this class was generated from the following files: