OGS
MaterialPropertyLib::WaterThermalConductivityIAPWS Class Referencefinal

Detailed Description

A class for thermal conductivity model that is defined by The International Association for the Properties of Water and Steam IAPWS (File accessed at 13.01.2023) - (Daucik and Dooley, 2011)

With the definition, the thermal conductivity is a function of temperature and water density

Attention
The critical enhancement, \(\bar{\lambda}_2\), is not considered. For information on region of significance and the significance, please see Figure 2 from the document linked in the upper paragraph.

Definition at line 34 of file WaterThermalConductivityIAPWS.h.

#include <WaterThermalConductivityIAPWS.h>

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

Public Member Functions

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

Static Private Attributes

static constexpr double ref_T_ = 647.096
 reference temperature in K
 
static constexpr double ref_rho_
 reference density in kg/m^3
 
static constexpr double ref_lambda_
 reference thermal conductivity in W.K^-1.m^-1
 

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

◆ WaterThermalConductivityIAPWS()

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

Member Function Documentation

◆ checkScale()

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

Reimplemented from MaterialPropertyLib::Property.

Definition at line 41 of file WaterThermalConductivityIAPWS.h.

42 {
43 if (!std::holds_alternative<Phase*>(scale_))
44 {
46 "The property 'WaterThermalConductivityIAPWS' is "
47 "implemented on the 'Phase' scale only.");
48 }
49 }
#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::WaterThermalConductivityIAPWS::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 thermal conductivity with respect to temperature or phase (water) pressure.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 64 of file WaterThermalConductivityIAPWS.cpp.

68{
69 const double bar_T = variable_array.temperature / ref_T_;
70 const double bar_rho = variable_array.density / ref_rho_;
71
72 switch (variable)
73 {
75 return ref_lambda_ * computedBarLambda_dbarT(bar_T, bar_rho) /
76 ref_T_;
78 return ref_lambda_ * computedBarLambda_dbarRho(bar_T, bar_rho) /
80 default:
82 "WaterThermalConductivityIAPWS::dValue is implemented for "
83 "derivatives with respect to temperature and liquid density "
84 "only.");
85 }
86}
static constexpr double ref_lambda_
reference thermal conductivity in W.K^-1.m^-1
static constexpr double ref_T_
reference temperature in K
static constexpr double ref_rho_
reference density in kg/m^3
static double computedBarLambda_dbarT(const double barT, double bar_rho)
static double computedBarLambda_dbarRho(const double barT, double bar_rho)

References MaterialPropertyLib::computedBarLambda_dbarRho(), MaterialPropertyLib::computedBarLambda_dbarT(), MaterialPropertyLib::density, MaterialPropertyLib::VariableArray::density, OGS_FATAL, ref_lambda_, ref_rho_, ref_T_, MaterialPropertyLib::temperature, and MaterialPropertyLib::VariableArray::temperature.

◆ value()

PropertyDataType MaterialPropertyLib::WaterThermalConductivityIAPWS::value ( VariableArray const & variable_array,
ParameterLib::SpatialPosition const & pos,
double const t,
double const dt ) const
overridevirtual
Returns
The water thermal conductivity.

Reimplemented from MaterialPropertyLib::Property.

Definition at line 46 of file WaterThermalConductivityIAPWS.cpp.

50{
51 const double bar_T = variable_array.temperature / ref_T_;
52 const double bar_rho = variable_array.density / ref_rho_;
53
54 const double lambda0 = std::sqrt(bar_T) / computeBarLambda0Factor(bar_T);
55
56 const auto& series_factorT = computeSeriesFactorTForLambda1(bar_T);
57 const auto& series_factorRho = computeSeriesFactorRhoForLambda1(bar_rho);
58 const double lambda1 = std::exp(
59 bar_rho * computeBarLambda1Factor(series_factorT, series_factorRho));
60
61 return lambda0 * lambda1 * ref_lambda_;
62}
static double computeBarLambda1Factor(const std::array< double, 5 > &series_factorT, const std::array< double, 6 > &series_factorRho)
static std::array< double, 6 > computeSeriesFactorRhoForLambda1(const double bar_rho)
static double computeBarLambda0Factor(const double barT)
static std::array< double, 5 > computeSeriesFactorTForLambda1(const double barT)

References MaterialPropertyLib::computeBarLambda0Factor(), MaterialPropertyLib::computeBarLambda1Factor(), MaterialPropertyLib::computeSeriesFactorRhoForLambda1(), MaterialPropertyLib::computeSeriesFactorTForLambda1(), MaterialPropertyLib::VariableArray::density, ref_lambda_, ref_rho_, ref_T_, and MaterialPropertyLib::VariableArray::temperature.

Member Data Documentation

◆ ref_lambda_

double MaterialPropertyLib::WaterThermalConductivityIAPWS::ref_lambda_
staticconstexprprivate
Initial value:
=
1.0e-3

reference thermal conductivity in W.K^-1.m^-1

Definition at line 66 of file WaterThermalConductivityIAPWS.h.

Referenced by dValue(), and value().

◆ ref_rho_

double MaterialPropertyLib::WaterThermalConductivityIAPWS::ref_rho_
staticconstexprprivate
Initial value:
=
322.0

reference density in kg/m^3

Definition at line 64 of file WaterThermalConductivityIAPWS.h.

Referenced by dValue(), and value().

◆ ref_T_

double MaterialPropertyLib::WaterThermalConductivityIAPWS::ref_T_ = 647.096
staticconstexprprivate

reference temperature in K

Definition at line 63 of file WaterThermalConductivityIAPWS.h.

Referenced by dValue(), and value().


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