OGS
WaterVaporProperties.cpp
Go to the documentation of this file.
1
12
13#include <array>
14#include <cmath>
15
17
18namespace MaterialLib
19{
22namespace Fluid
23{
24static const double temperature_0 = 373.15;
25static const double p_0 = 101325.0;
26static const double h_wg = 2258000.0;
27
29 const double T) const
30{
31 return p_0 * std::exp(((1 / temperature_0) - (1 / T)) * _water_mol_mass *
33}
34
36{
37 return p_0 * (_water_mol_mass * h_wg / IdealGasConstant) * (1. / T / T) *
38 std::exp(((1. / temperature_0) - (1. / T)) * _water_mol_mass * h_wg /
40}
41
43 const double pc, const double T, const double mass_density_water) const
44{
45 const double p_sat = calculateSaturatedVaporPressure(T);
46 const double c_w = _water_mol_mass / IdealGasConstant / T;
47 return p_sat * std::exp(-pc * c_w / mass_density_water);
48}
50 const double pc, const double T, const double mass_density_water) const
51{
52 const double c_w = _water_mol_mass / IdealGasConstant / T;
53 const double p_sat = calculateSaturatedVaporPressure(T);
54 const double dPsatdT = calculateDerivativedPsatdT(T);
55 return dPsatdT * std::exp(-pc * c_w / mass_density_water) +
56 p_sat * std::exp(-pc * c_w / mass_density_water) *
57 (pc * _water_mol_mass / mass_density_water / IdealGasConstant /
58 T / T);
59}
61 const double pc, const double T, const double mass_density_water) const
62{
63 const double c_w = _water_mol_mass / IdealGasConstant / T;
64 const double p_sat = calculateSaturatedVaporPressure(T);
65 return p_sat * std::exp(-pc * c_w / mass_density_water) *
66 (-c_w / mass_density_water);
67}
69 const double p_air_nonwet, const double p_vapor_nonwet, const double pc,
70 const double T, const double mass_density_water) const
71{
72 const double dPgwdT = calculateDerivativedPgwdT(pc, T, mass_density_water);
73 return -((p_air_nonwet * _air_mol_mass + p_vapor_nonwet * _water_mol_mass) /
74 IdealGasConstant / T / T) +
76}
78 const double temperature,
79 const double heat_capacity_water_vapor,
80 const double /*pressure*/,
81 const double /*latent_heat_evaporation*/)
82{
83 return heat_capacity_water_vapor * (temperature - CelsiusZeroInKelvin) +
84 h_wg;
85}
86
87} // namespace Fluid
88} // namespace MaterialLib
double calculatedDensityNonwetdT(const double p_air_nonwet, const double p_vapor_nonwet, const double pc, const double T, const double mass_density_water) const
Derivative of vapor density in terms of T.
double calculateSaturatedVaporPressure(const double T) const
water vapor saturation pressure
double calculateDerivativedPsatdT(const double T) const
Derivative of SaturatedVaporPressure in terms of T.
double calculateVaporPressureNonwet(const double pc, const double T, const double mass_density_water) const
double calculateDerivativedPgwdT(const double pc, const double T, const double mass_density_water) const
Derivative of partial vapor pressure in terms of T.
double calculateDerivativedPgwdPC(const double pc, const double T, const double mass_density_water) const
Derivative of partial vapor pressure in terms of PC.
static double getWaterVaporEnthalpySimple(const double temperature, const double heat_capacity_water_vapor, const double, const double)
Specific enthalpy of water vapor.
static const double p_0
reference temperature in [K]
static const double temperature_0
static const double h_wg
reference pressure
constexpr double CelsiusZeroInKelvin
Zero degrees Celsius in Kelvin.