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 [30].

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 primary_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. More...
 
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. More...
 
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  {
72  OGS_FATAL(
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:287

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 74 of file WaterVapourLatentHeatWithCriticalTemperature.cpp.

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

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

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


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