OGS
MaterialLib::Fluid::WaterVaporProperties Class Reference

Detailed Description

This class provides a series of functions to calculate the water vapor properties, including the saturation vapor pressure calculation(Kelvin equation regularized vapor pressure), and corresponding derivatives calculations. The unit of temperature used here are all in Kelvin.

Definition at line 27 of file WaterVaporProperties.h.

#include <WaterVaporProperties.h>

Public Member Functions

 WaterVaporProperties ()=default
 
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.
 
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.
 

Static Public Member Functions

static double getWaterVaporEnthalpySimple (const double temperature, const double heat_capacity_water_vapor, const double, const double)
 Specific enthalpy of water vapor.
 

Private Attributes

const double & _water_mol_mass = PhysicalConstant::MolarMass::Water
 
const double & _air_mol_mass = PhysicalConstant::MolarMass::Air
 

Constructor & Destructor Documentation

◆ WaterVaporProperties()

MaterialLib::Fluid::WaterVaporProperties::WaterVaporProperties ( )
default

Member Function Documentation

◆ calculatedDensityNonwetdT()

double MaterialLib::Fluid::WaterVaporProperties::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.

Definition at line 68 of file WaterVaporProperties.cpp.

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) +
75 (_water_mol_mass - _air_mol_mass) * dPgwdT / IdealGasConstant / T;
76}
double calculateDerivativedPgwdT(const double pc, const double T, const double mass_density_water) const
Derivative of partial vapor pressure in terms of T.

References _air_mol_mass, _water_mol_mass, calculateDerivativedPgwdT(), and MaterialLib::Fluid::T.

◆ calculateDerivativedPgwdPC()

double MaterialLib::Fluid::WaterVaporProperties::calculateDerivativedPgwdPC ( const double pc,
const double T,
const double mass_density_water ) const

Derivative of partial vapor pressure in terms of PC.

Definition at line 60 of file WaterVaporProperties.cpp.

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}
double calculateSaturatedVaporPressure(const double T) const
water vapor saturation pressure

References _water_mol_mass, calculateSaturatedVaporPressure(), and MaterialLib::Fluid::T.

◆ calculateDerivativedPgwdT()

double MaterialLib::Fluid::WaterVaporProperties::calculateDerivativedPgwdT ( const double pc,
const double T,
const double mass_density_water ) const

Derivative of partial vapor pressure in terms of T.

Definition at line 49 of file WaterVaporProperties.cpp.

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}
double calculateDerivativedPsatdT(const double T) const
Derivative of SaturatedVaporPressure in terms of T.

References _water_mol_mass, calculateDerivativedPsatdT(), calculateSaturatedVaporPressure(), and MaterialLib::Fluid::T.

Referenced by calculatedDensityNonwetdT().

◆ calculateDerivativedPsatdT()

double MaterialLib::Fluid::WaterVaporProperties::calculateDerivativedPsatdT ( const double T) const

Derivative of SaturatedVaporPressure in terms of T.

Definition at line 35 of file WaterVaporProperties.cpp.

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 /
39 IdealGasConstant);
40}
static const double p_0
reference temperature in [K]
static const double temperature_0
static const double h_wg
reference pressure

References _water_mol_mass, MaterialLib::Fluid::h_wg, MaterialLib::Fluid::p_0, MaterialLib::Fluid::T, and MaterialLib::Fluid::temperature_0.

Referenced by calculateDerivativedPgwdT().

◆ calculateSaturatedVaporPressure()

double MaterialLib::Fluid::WaterVaporProperties::calculateSaturatedVaporPressure ( const double T) const

water vapor saturation pressure

latent heat of water evaporation

Definition at line 28 of file WaterVaporProperties.cpp.

30{
31 return p_0 * std::exp(((1 / temperature_0) - (1 / T)) * _water_mol_mass *
32 h_wg / IdealGasConstant);
33}

References _water_mol_mass, MaterialLib::Fluid::h_wg, MaterialLib::Fluid::p_0, MaterialLib::Fluid::T, and MaterialLib::Fluid::temperature_0.

Referenced by calculateDerivativedPgwdPC(), calculateDerivativedPgwdT(), and calculateVaporPressureNonwet().

◆ calculateVaporPressureNonwet()

double MaterialLib::Fluid::WaterVaporProperties::calculateVaporPressureNonwet ( const double pc,
const double T,
const double mass_density_water ) const

partial water vapor pressure in nonwetting phase Kelvin equation

Parameters
pccapillary pressure
Ttemperature
mass_density_watermass density of water

Definition at line 42 of file WaterVaporProperties.cpp.

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}

References _water_mol_mass, calculateSaturatedVaporPressure(), and MaterialLib::Fluid::T.

◆ getWaterVaporEnthalpySimple()

double MaterialLib::Fluid::WaterVaporProperties::getWaterVaporEnthalpySimple ( const double temperature,
const double heat_capacity_water_vapor,
const double ,
const double  )
static

Specific enthalpy of water vapor.

Definition at line 77 of file WaterVaporProperties.cpp.

82{
83 return heat_capacity_water_vapor * (temperature - CelsiusZeroInKelvin) +
84 h_wg;
85}

References MaterialLib::Fluid::h_wg.

Member Data Documentation

◆ _air_mol_mass

const double& MaterialLib::Fluid::WaterVaporProperties::_air_mol_mass = PhysicalConstant::MolarMass::Air
private

Definition at line 62 of file WaterVaporProperties.h.

Referenced by calculatedDensityNonwetdT().

◆ _water_mol_mass


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