OGS
MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature Class Referencefinal

Detailed Description

A latent heat model of vaporisation of water considering the critical temperature.

The model uses an equation for a general expression of the latent heat of vaporisation of water in the vicinity of and far away from the critical temperature, which was presented by Torquato and Stell in [37].

Denoting the critical temperature as \(T_c\), and introducing a dimensionless variable \(\tau=(T_c-T)/T_c\) associated with temperature \(T\), the equation is given by

\[ L(\tau) = a_1 \tau^{\beta}+a_2 \tau^{\beta+\Delta} +a_4 \tau^{1-\alpha+\beta} +\sum_{n=1}^{M}(b_n \tau^n),\,\text{[kJ/kg]}, \]

where the parameters of \(b_n\) are obtained by the least square method by fitting the equation with the experiment data.

In this model, the parameter set of \(M=5\) is taken for a high accuracy. All parameters are given below:

  • \(\alpha=1/8,\,\beta=1/3,\, \Delta=0.79-\beta\),
  • \(a_1=1989.41582,\, a_2=11178.45586, a_4=26923.68994\),
  • \(b_n:=\{-28989.28947, -19797.03646, 28403.32283, -30382.306422, 15210.380\}\).

The critical temperature is 373.92 \(^{\circ}\)C.

A comparison of this model with the model of MaterialPropertyLib::LinearWaterVapourLatentHeat is given in the following figure.

Definition at line 60 of file WaterVapourLatentHeatWithCriticalTemperature.h.

#include <WaterVapourLatentHeatWithCriticalTemperature.h>

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

Public Member Functions

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

◆ WaterVapourLatentHeatWithCriticalTemperature()

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

Member Function Documentation

◆ checkScale()

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

Reimplemented from MaterialPropertyLib::Property.

Definition at line 68 of file WaterVapourLatentHeatWithCriticalTemperature.h.

69 {
70 if (!std::holds_alternative<Phase*>(scale_))
71 {
73 "The property 'WaterVapourLatentHeatWithCriticalTemperature' "
74 "is "
75 "implemented on the 'phase' scale only.");
76 }
77 }
#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::WaterVapourLatentHeatWithCriticalTemperature::dValue ( VariableArray const & variable_array,
Variable const variable,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
overridevirtual

This virtual method will compute the property derivative value based on the variables that are passed as arguments with the default implementation using empty variables array for the previous time step.

The default implementation of this method only returns the property value derivative without altering it.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 73 of file WaterVapourLatentHeatWithCriticalTemperature.cpp.

77{
78 if (variable != Variable::temperature)
79 {
81 "WaterVapourLatentHeatWithCriticalTemperature::dValue is "
82 "implemented "
83 "for "
84 "the derivative with respect to temperature only.");
85 }
86 const double T = variable_array.temperature;
87
88 if (T >= T_c)
89 {
90 return 0.0;
91 }
92
93 constexpr std::array dc = {c[0] * beta,
94 c[1] * (beta + Delta),
95 c[2] * (1 - alpha + beta),
96 c[3],
97 c[4] * 2,
98 c[5] * 3,
99 c[6] * 4,
100 c[7] * 5};
101
102 double const tau = (T_c - T) / T_c;
103 double const tau_p2 = tau * tau;
104 double const tau_p3 = tau_p2 * tau;
105 double const tau_p4 = tau_p3 * tau;
106 std::array v = {std::pow(tau, beta - 1),
107 std::pow(tau, beta + Delta - 1),
108 std::pow(tau, -alpha + beta),
109 1.,
110 tau,
111 tau_p2,
112 tau_p3,
113 tau_p4};
114
115 // The formula gives the value in kJ/kg/K, and the value is return in
116 // the unit of J/kg/K.
117 return -1000.0 *
118#if __GNUC__ < 9 || (__GNUC__ == 9 && (__GNUC_MINOR__ < 3))
119 std::inner_product
120#else
121 std::transform_reduce
122#endif
123 (begin(dc), end(dc), begin(v), 0.) /
124 T_c;
125}
constexpr double T_c
Critical temperature.

References MaterialPropertyLib::alpha, MaterialPropertyLib::beta, MaterialPropertyLib::c, MaterialPropertyLib::Delta, OGS_FATAL, MaterialPropertyLib::T_c, MaterialPropertyLib::temperature, and MaterialPropertyLib::VariableArray::temperature.

◆ value()

PropertyDataType MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature::value ( VariableArray const & variable_array,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
overridevirtual

This virtual method will compute the property value based on the variables that are passed as arguments with the default implementation using empty variables array for the previous time step.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 34 of file WaterVapourLatentHeatWithCriticalTemperature.cpp.

38{
39 const double T = variable_array.temperature;
40
41 if (T >= T_c)
42 {
43 return 0.0;
44 }
45
46 double const tau = (T_c - T) / T_c;
47 double const tau_p2 = tau * tau;
48 double const tau_p3 = tau_p2 * tau;
49 double const tau_p4 = tau_p3 * tau;
50 double const tau_p5 = tau_p4 * tau;
51
52 std::array v = {std::pow(tau, beta),
53 std::pow(tau, beta + Delta),
54 std::pow(tau, 1 - alpha + beta),
55 tau,
56 tau_p2,
57 tau_p3,
58 tau_p4,
59 tau_p5};
60
61 // The formula gives the value in kJ/kg, and the return value is in the
62 // units of J/kg.
63
64 return 1000.0 *
65#if __GNUC__ < 9 || (__GNUC__ == 9 && (__GNUC_MINOR__ < 3))
66 std::inner_product
67#else
68 std::transform_reduce
69#endif
70 (begin(c), end(c), begin(v), 0.);
71}

References MaterialPropertyLib::alpha, MaterialPropertyLib::beta, MaterialPropertyLib::c, MaterialPropertyLib::Delta, MaterialPropertyLib::T_c, and MaterialPropertyLib::VariableArray::temperature.


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