OGS
MaterialPropertyLib::WaterTemperatureIAPWSIF97Region1 Class Referencefinal

Detailed Description

Water temperature in IAPWS-IF97 region1 model based on the IAPWS Industrial Formulation 1997 IF97-Rev

Definition at line 24 of file WaterTemperatureIAPWSIF97Region1.h.

#include <WaterTemperatureIAPWSIF97Region1.h>

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

Public Member Functions

 WaterTemperatureIAPWSIF97Region1 (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

◆ WaterTemperatureIAPWSIF97Region1()

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

Member Function Documentation

◆ checkScale()

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

Reimplemented from MaterialPropertyLib::Property.

Definition at line 31 of file WaterTemperatureIAPWSIF97Region1.h.

32 {
33 if (!std::holds_alternative<Phase*>(scale_))
34 {
36 "The property 'WaterTemperatureIAPWSIF97Region1' is "
37 "implemented on the 'Phase' scale only.");
38 }
39 }
#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::WaterTemperatureIAPWSIF97Region1::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 temperature in IAPWS-IF97 region1.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 63 of file WaterTemperatureIAPWSIF97Region1.cpp.

67{
68 OGS_FATAL("WaterTemperatureIAPWSIF97Region1::dValue is not implemented.");
69}

References OGS_FATAL.

◆ value()

PropertyDataType MaterialPropertyLib::WaterTemperatureIAPWSIF97Region1::value ( VariableArray const & variable_array,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
overridevirtual
Returns
The water temperature in IAPWS-IF97 region1.

< reference enthalpy in J/kg.

< reference pressure in Pa.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 46 of file WaterTemperatureIAPWSIF97Region1.cpp.

50{
51 double const p = std::max(0.0, variable_array.liquid_phase_pressure);
52 double const h = variable_array.enthalpy;
53
54 static constexpr double ref_h_ = 2500e3;
55 static constexpr double ref_p_ = 1e6;
56
57 double const eta = h / ref_h_;
58 double const pi = p / ref_p_;
59
60 return computeTemperature(pi, eta);
61}
static constexpr double ref_p_
reference pressure in Pa.
double computeTemperature(double const pi, double const eta)

References MaterialPropertyLib::computeTemperature(), MaterialPropertyLib::VariableArray::enthalpy, MaterialPropertyLib::VariableArray::liquid_phase_pressure, and MaterialPropertyLib::ref_p_.


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