Cantera  2.5.1
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
WaterProps Class Reference

The WaterProps class is used to house several approximation routines for properties of water. More...

#include <WaterProps.h>

Collaboration diagram for WaterProps:
[legend]

Public Member Functions

 WaterProps ()
 Default constructor. More...
 
 WaterProps (WaterPropsIAPWS *wptr)
 Constructor. More...
 
 WaterProps (PDSS_Water *wptr)
 Constructor with pointer to Water PDSS object. More...
 
 WaterProps (const WaterProps &b)=delete
 
WaterPropsoperator= (const WaterProps &b)=delete
 
doublereal relEpsilon (doublereal T, doublereal P_pascal, int ifunc=0)
 Bradley-Pitzer equation for the dielectric constant of water as a function of temperature and pressure. More...
 
doublereal ADebye (doublereal T, doublereal P, int ifunc)
 ADebye calculates the value of A_Debye as a function of temperature and pressure according to relations that take into account the temperature and pressure dependence of the water density and dielectric constant. More...
 
doublereal satPressure (doublereal T)
 Returns the saturation pressure given the temperature. More...
 
doublereal density_IAPWS (doublereal T, doublereal P)
 Returns the density of water. More...
 
doublereal density_IAPWS () const
 Returns the density of water. More...
 
doublereal coeffThermalExp_IAPWS (doublereal T, doublereal P)
 returns the coefficient of thermal expansion More...
 
doublereal isothermalCompressibility_IAPWS (doublereal T, doublereal P)
 Returns the isothermal compressibility of water. More...
 

Static Public Member Functions

static doublereal density_T (doublereal T, doublereal P, int ifunc)
 Simple calculation of water density at atmospheric pressure. More...
 

Protected Attributes

WaterPropsIAPWSm_waterIAPWS
 Pointer to the WaterPropsIAPWS object. More...
 
bool m_own_sub
 true if we own the WaterPropsIAPWS object More...
 

Detailed Description

The WaterProps class is used to house several approximation routines for properties of water.

This is a helper class for WaterSSTP and PDSS_Water and does not constitute a complete implementation of a thermo phase by itself (see Thermodynamic Properties and classes WaterSSTP and PDSS_Water).

The class is also a wrapper around the WaterPropsIAPWS class which provides the calculations for the equation of state properties for water.

In particular, this class house routine for the calculation of the dielectric constant of water

Most if not all of the member functions are static.

Definition at line 99 of file WaterProps.h.

Constructor & Destructor Documentation

◆ WaterProps() [1/3]

Default constructor.

Definition at line 15 of file WaterProps.cpp.

References WaterProps::m_own_sub, and WaterProps::m_waterIAPWS.

◆ WaterProps() [2/3]

Constructor.

Parameters
wptrPointer to WaterPropsIAPWS object

Definition at line 38 of file WaterProps.cpp.

References WaterProps::m_own_sub, and WaterProps::m_waterIAPWS.

◆ WaterProps() [3/3]

WaterProps ( PDSS_Water wptr)

Constructor with pointer to Water PDSS object.

Parameters
wptrPointer to water standard state object

Definition at line 24 of file WaterProps.cpp.

References PDSS_Water::getWater(), WaterProps::m_own_sub, and WaterProps::m_waterIAPWS.

Member Function Documentation

◆ density_T()

doublereal density_T ( doublereal  T,
doublereal  P,
int  ifunc 
)
static

Simple calculation of water density at atmospheric pressure.

Valid up to boiling point.

This formulation has no dependence on the pressure and shouldn't be used where accuracy is needed.

Parameters
Ttemperature in kelvin
PPressure in pascal
ifuncchanges what's returned
Returns
value returned depends on ifunc value:
  • ifunc = 0 Returns the density in kg/m^3
  • ifunc = 1 returns the derivative of the density wrt T.
  • ifunc = 2 returns the 2nd derivative of the density wrt T
  • ifunc = 3 returns the derivative of the density wrt P.

Verification: Agrees with the CRC values (6-10) for up to 4 sig digits.

units = returns density in kg m-3.

Definition at line 58 of file WaterProps.cpp.

◆ relEpsilon()

doublereal relEpsilon ( doublereal  T,
doublereal  P_pascal,
int  ifunc = 0 
)

Bradley-Pitzer equation for the dielectric constant of water as a function of temperature and pressure.

Returns the dimensionless relative dielectric constant and its derivatives.

Range of validity: 0 to 350C, 0 to 1 kbar pressure

Parameters
Ttemperature (kelvin)
P_pascalpressure in pascal
ifuncchanges what's returned from the function
Returns
Depends on the value of ifunc:
  • ifunc = 0 return value
  • ifunc = 1 return temperature derivative
  • ifunc = 2 return temperature second derivative
  • ifunc = 3 return pressure first derivative

Validation: Numerical experiments indicate that this function agrees with the Archer and Wang data in the CRC p. 6-10 to all 4 significant digits shown (0 to 100C).

value at 25C and 1 atm, relEps = 78.38

Definition at line 106 of file WaterProps.cpp.

◆ ADebye()

doublereal ADebye ( doublereal  T,
doublereal  P,
int  ifunc 
)

ADebye calculates the value of A_Debye as a function of temperature and pressure according to relations that take into account the temperature and pressure dependence of the water density and dielectric constant.

The A_Debye expression appears on the top of the ln actCoeff term in the general Debye-Huckel expression It depends on temperature and pressure. And, therefore, most be recalculated whenever T or P changes. The units returned by this expression are sqrt(kg/gmol).

\[ A_{Debye} = \frac{1}{8 \pi} \sqrt{\frac{2 N_{Avog} \rho_w}{1000}} {\left(\frac{e^2}{\epsilon k_{boltz} T}\right)}^{\frac{3}{2}} \]

Nominal value at 25C and 1atm = 1.172576 sqrt(kg/gmol).

Based on:

  • epsilon/epsilon_0 = 78.54 (water at 25C)
  • T = 298.15 K
  • B_Debye = 3.28640E9 sqrt(kg/gmol)/m
Parameters
TTemperature (kelvin)
Ppressure (pascal)
ifuncChanges what's returned from the routine
Returns
a double whose meaning depends on ifunc:
  • ifunc = 0 return value
  • ifunc = 1 return temperature derivative
  • ifunc = 2 return temperature second derivative
  • ifunc = 3 return pressure first derivative

Verification: With the epsRelWater value from the Bradley-Pitzer relation, and the water density from the density_IAPWS() function, The A_Debye computed with this function agrees with the Pitzer table p. 99 to 4 significant digits at 25C. and 20C. (Aphi = ADebye/3)

Definition at line 158 of file WaterProps.cpp.

◆ satPressure()

doublereal satPressure ( doublereal  T)

Returns the saturation pressure given the temperature.

Parameters
Ttemperature (kelvin)
Returns
the saturation pressure (pascal)

Definition at line 231 of file WaterProps.cpp.

◆ density_IAPWS() [1/2]

doublereal density_IAPWS ( doublereal  T,
doublereal  P 
)

Returns the density of water.

This function sets the internal temperature and pressure of the underlying object at the same time.

Parameters
TTemperature (kelvin)
Ppressure (pascal)

Definition at line 236 of file WaterProps.cpp.

References WaterPropsIAPWS::density(), and WaterProps::m_waterIAPWS.

◆ density_IAPWS() [2/2]

doublereal density_IAPWS ( ) const

Returns the density of water.

This function uses the internal state of the underlying water object

Definition at line 241 of file WaterProps.cpp.

References WaterPropsIAPWS::density(), and WaterProps::m_waterIAPWS.

◆ coeffThermalExp_IAPWS()

doublereal coeffThermalExp_IAPWS ( doublereal  T,
doublereal  P 
)

returns the coefficient of thermal expansion

Parameters
TTemperature (kelvin)
Ppressure (pascal)

Definition at line 246 of file WaterProps.cpp.

References WaterPropsIAPWS::density(), and WaterProps::m_waterIAPWS.

◆ isothermalCompressibility_IAPWS()

doublereal isothermalCompressibility_IAPWS ( doublereal  T,
doublereal  P 
)

Returns the isothermal compressibility of water.

Parameters
Ttemperature in kelvin
Ppressure in pascal

Definition at line 256 of file WaterProps.cpp.

References WaterPropsIAPWS::density(), and WaterProps::m_waterIAPWS.

Member Data Documentation

◆ m_waterIAPWS

WaterPropsIAPWS* m_waterIAPWS
protected

◆ m_own_sub

bool m_own_sub
protected

true if we own the WaterPropsIAPWS object

Definition at line 249 of file WaterProps.h.

Referenced by WaterProps::WaterProps().


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