# WaterPropsIAPWSphi Class Reference

`#include <WaterPropsIAPWSphi.h>`

List of all members.

## Public Member Functions

WaterPropsIAPWSphi ()
Base constructor.
doublereal phi (doublereal tau, doublereal delta)
Calculate the Phi function, which is the base function.
doublereal phi_d (doublereal tau, doublereal delta)
Delta derivative of phi.
doublereal phi_dd (doublereal tau, doublereal delta)
2nd derivative of phi wrt delta
doublereal phi_t (doublereal tau, doublereal delta)
First derivative of phi wrt tau.
doublereal phi_tt (doublereal tau, doublereal delta)
Second derivative of phi wrt tau.
void check1 ()
Internal check # 1.
void check2 ()
Internal check # 2.
doublereal pressureM_rhoRT (doublereal tau, doublereal delta)
Calculate the dimensionless pressure at tau and delta;.
doublereal dimdpdrho (doublereal tau, doublereal delta)
Dimensionless derivative of p wrt rho at constant T.
doublereal dimdpdT (doublereal tau, doublereal delta)
Dimensionless derivative of p wrt T at constant rho.
doublereal dfind (doublereal p_red, doublereal tau, doublereal deltaGuess)
This program computes the reduced density, given the reduced pressure and the reduced temperature, tau.
doublereal gibbs_RT () const
Calculate the dimensionless gibbs free energy.
doublereal enthalpy_RT () const
Calculate the dimensionless enthalpy, h/RT.
doublereal entropy_R () const
Calculate the dimensionless entropy, s/R.
doublereal intEnergy_RT () const
Calculate the dimensionless internal energy, u/RT.
doublereal cv_R () const
Calculate the dimensionless constant volume heat capacity, Cv/R.
doublereal cp_R () const
Calculate the dimensionless constant pressure heat capacity, Cv/R.
void tdpolycalc (doublereal tau, doublereal delta)
Calculates internal polynomials in tau and delta.
doublereal phiR () const
Return the value of phiR(), res.

## Private Member Functions

doublereal phi0 () const
nau calculation
doublereal phiR_d () const
calculation of d_phiR/d_d
doublereal phi0_d () const
calculation of d_nau/d_d
doublereal phiR_dd () const
calculation of d2_res/d_dd
doublereal phi0_dd () const
calculation of d2_nau/d_dd
doublereal phi0_t () const
calculation of d_nau/d_t
doublereal phiR_t () const
calculation of d_res/d_t
doublereal phiR_tt () const
calculation of d2_res/d_tt
doublereal phi0_tt () const
calculation of d2_nau/d_tt
doublereal phiR_dt () const
calculation of d2_res/d_dt
doublereal phi0_dt () const
calculation of d2_nau/d_dt
void intCheck (doublereal tau, doublereal delta)
intCheck() calculates all of the functions at a one point and prints out the result.

## Private Attributes

doublereal TAUp 
Value of internally calculated polynomials of powers of TAU.
doublereal DELTAp 
Value of internally calculated polynomials of powers of delta.
doublereal TAUsave
Last tau that was used to calculate polynomials.
doublereal TAUsqrt
sqrt of TAU
doublereal DELTAsave
Last delta that was used to calculate polynomials.

## Detailed Description

the WaterPropsIAPSWSphi class support low level calls for the real description of water.

The reference is W. Wagner, A. Prub, "The IAPWS Formulation 1995 for the Themodynamic Properties of Ordinary Water Substance for General and Scientific Use," J. Phys. Chem. Ref. Dat, 31, 387, 2002.

Units Note: This class works with reduced units exclusively.

Definition at line 32 of file WaterPropsIAPWSphi.h.

## Constructor & Destructor Documentation

 WaterPropsIAPWSphi ( )

Base constructor.

Constructor for the object.

Definition at line 367 of file WaterPropsIAPWSphi.cpp.

References DELTAp, and TAUp.

## Member Function Documentation

 void check1 ( )

Internal check # 1.

Definition at line 408 of file WaterPropsIAPWSphi.cpp.

References intCheck(), Cantera::Rho_c, and Cantera::T_c.

 void check2 ( )

Internal check # 2.

Definition at line 417 of file WaterPropsIAPWSphi.cpp.

References intCheck(), Cantera::Rho_c, and Cantera::T_c.

 doublereal cp_R ( ) const

Calculate the dimensionless constant pressure heat capacity, Cv/R.

Definition at line 1261 of file WaterPropsIAPWSphi.cpp.

References cv_R(), DELTAsave, phiR_d(), phiR_dd(), phiR_dt(), and TAUsave.

Referenced by WaterPropsIAPWS::cp().

 doublereal cv_R ( ) const

Calculate the dimensionless constant volume heat capacity, Cv/R.

Definition at line 1250 of file WaterPropsIAPWSphi.cpp.

References phi0_tt(), phiR_tt(), and TAUsave.

Referenced by cp_R(), and WaterPropsIAPWS::cv().

 doublereal dfind ( doublereal p_red, doublereal tau, doublereal deltaGuess )

This program computes the reduced density, given the reduced pressure and the reduced temperature, tau.

It takes an initial guess, deltaGuess. DeltaGuess is important as this is a multivalued function below the critical point.

Parameters:
 p_red Value of the dimensionless pressure tau Dimensionless temperature = T_c/T deltaGuess Initial guess for the dimensionless density
Returns:
Returns the dimensionless density.

It takes an initial guess, deltaGuess. DeltaGuess is important as this is a multivalued function below the critical point.

Definition at line 1116 of file WaterPropsIAPWSphi.cpp.

References phiR_d(), phiR_dd(), and tdpolycalc().

Referenced by WaterPropsIAPWS::density(), and WaterPropsIAPWS::density_const().

 doublereal dimdpdrho ( doublereal tau, doublereal delta )

Dimensionless derivative of p wrt rho at constant T.

dp/drho * 1/RT = (2. delta phi_d() + delta**2 phi_dd()) (1.0 + 2. delta phiR_d() + delta**2 phiR_dd())

Parameters:
 tau Dimensionless temperature = T_c/T delta Dimensionless density = delta = rho / Rho_c

Definition at line 786 of file WaterPropsIAPWSphi.cpp.

References phiR_d(), phiR_dd(), and tdpolycalc().

Referenced by WaterPropsIAPWS::dpdrho().

 doublereal dimdpdT ( doublereal tau, doublereal delta )

Dimensionless derivative of p wrt T at constant rho.

dp/dT * M/(Rho R) = (1.0 + delta phiR_d()

Parameters:
 tau Dimensionless temperature = T_c/T delta Dimensionless density = delta = rho / Rho_c

Definition at line 794 of file WaterPropsIAPWSphi.cpp.

References phiR_d(), phiR_dt(), and tdpolycalc().

Referenced by WaterPropsIAPWS::coeffPresExp().

 doublereal enthalpy_RT ( ) const

Calculate the dimensionless enthalpy, h/RT.

Calculate the dimensionless enthalpy h/RT.

Definition at line 1213 of file WaterPropsIAPWSphi.cpp.

References DELTAsave, phi0_t(), phiR_d(), phiR_t(), and TAUsave.

Referenced by WaterPropsIAPWS::enthalpy().

 doublereal entropy_R ( ) const

Calculate the dimensionless entropy, s/R.

Definition at line 1226 of file WaterPropsIAPWSphi.cpp.

References phi0(), phi0_t(), phiR(), phiR_t(), and TAUsave.

Referenced by WaterPropsIAPWS::entropy().

 doublereal gibbs_RT ( ) const

Calculate the dimensionless gibbs free energy.

Calculate the dimensionless gibbs free energy g/RT.

Definition at line 1203 of file WaterPropsIAPWSphi.cpp.

References DELTAsave, phi0(), phiR(), and phiR_d().

Referenced by WaterPropsIAPWS::corr(), and WaterPropsIAPWS::Gibbs().

 void intCheck ( doublereal tau, doublereal delta ) ` [private]`

intCheck() calculates all of the functions at a one point and prints out the result.

It's used for conducting the internal check.

Parameters:
 tau Dimensionless temperature = T_c/T delta Dimensionless density = delta = rho / Rho_c

Definition at line 385 of file WaterPropsIAPWSphi.cpp.

Referenced by check1(), and check2().

 doublereal intEnergy_RT ( ) const

Calculate the dimensionless internal energy, u/RT.

Definition at line 1239 of file WaterPropsIAPWSphi.cpp.

References phi0_t(), phiR_t(), and TAUsave.

Referenced by WaterPropsIAPWS::intEnergy().

 doublereal phi ( doublereal tau, doublereal delta )

Calculate the Phi function, which is the base function.

The phi functino is basically the helmholtz free energy Eqn. (6.4) All internal polynomials are recalculated.

Parameters:
 tau Dimensionless temperature = T_c/T delta Dimensionless density = delta = rho / Rho_c

Definition at line 531 of file WaterPropsIAPWSphi.cpp.

References phi0(), phiR(), and tdpolycalc().

Referenced by WaterPropsIAPWS::helmholtzFE(), phiR(), phiR_d(), phiR_dd(), phiR_dt(), phiR_t(), and phiR_tt().

 doublereal phi0 ( ) const` [private]`

nau calculation

Definition at line 452 of file WaterPropsIAPWSphi.cpp.

References DELTAsave, and TAUsave.

Referenced by entropy_R(), gibbs_RT(), intCheck(), and phi().

 doublereal phi0_d ( ) const` [private]`

calculation of d_nau/d_d

Definition at line 623 of file WaterPropsIAPWSphi.cpp.

References DELTAsave.

Referenced by intCheck(), and phi_d().

 doublereal phi0_dd ( ) const` [private]`

calculation of d2_nau/d_dd

Definition at line 768 of file WaterPropsIAPWSphi.cpp.

References DELTAsave.

Referenced by intCheck(), and phi_dd().

 doublereal phi0_dt ( ) const` [private]`

calculation of d2_nau/d_dt

Calculate d2_phi0/dtauddelta.

Definition at line 1013 of file WaterPropsIAPWSphi.cpp.

Referenced by intCheck().

 doublereal phi0_t ( ) const` [private]`

calculation of d_nau/d_t

Definition at line 805 of file WaterPropsIAPWSphi.cpp.

References TAUsave.

Referenced by enthalpy_RT(), entropy_R(), intCheck(), intEnergy_RT(), and phi_t().

 doublereal phi0_tt ( ) const` [private]`

calculation of d2_nau/d_tt

Definition at line 903 of file WaterPropsIAPWSphi.cpp.

References TAUsave.

Referenced by cv_R(), intCheck(), and phi_tt().

 doublereal phi_d ( doublereal tau, doublereal delta )

Delta derivative of phi.

Parameters:
 tau Dimensionless temperature = T_c/T delta Dimensionless density = delta = rho / Rho_c

Definition at line 633 of file WaterPropsIAPWSphi.cpp.

References phi0_d(), phiR_d(), and tdpolycalc().

 doublereal phi_dd ( doublereal tau, doublereal delta )

2nd derivative of phi wrt delta

Parameters:
 tau Dimensionless temperature = T_c/T delta Dimensionless density = delta = rho / Rho_c

Definition at line 778 of file WaterPropsIAPWSphi.cpp.

References phi0_dd(), phiR_dd(), and tdpolycalc().

 doublereal phi_t ( doublereal tau, doublereal delta )

First derivative of phi wrt tau.

Parameters:
 tau Dimensionless temperature = T_c/T delta Dimensionless density = delta = rho / Rho_c

Definition at line 892 of file WaterPropsIAPWSphi.cpp.

References phi0_t(), phiR_t(), and tdpolycalc().

 doublereal phi_tt ( doublereal tau, doublereal delta )

Second derivative of phi wrt tau.

Parameters:
 tau Dimensionless temperature = T_c/T delta Dimensionless density = delta = rho / Rho_c

Definition at line 1002 of file WaterPropsIAPWSphi.cpp.

References phi0_tt(), phiR_tt(), and tdpolycalc().

 doublereal phiR ( ) const

Return the value of phiR(), res.

Definition at line 472 of file WaterPropsIAPWSphi.cpp.

References DELTAp, DELTAsave, phi(), TAUp, TAUsave, and TAUsqrt.

Referenced by WaterPropsIAPWS::corr1(), entropy_R(), gibbs_RT(), intCheck(), and phi().

 doublereal phiR_d ( ) const` [private]`

calculation of d_phiR/d_d

Definition at line 547 of file WaterPropsIAPWSphi.cpp.

References DELTAp, DELTAsave, phi(), TAUp, TAUsave, and TAUsqrt.

Referenced by cp_R(), dfind(), dimdpdrho(), dimdpdT(), enthalpy_RT(), gibbs_RT(), intCheck(), phi_d(), and pressureM_rhoRT().

 doublereal phiR_dd ( ) const` [private]`

calculation of d2_res/d_dd

Definition at line 662 of file WaterPropsIAPWSphi.cpp.

References DELTAp, DELTAsave, phi(), TAUp, TAUsave, and TAUsqrt.

Referenced by cp_R(), dfind(), dimdpdrho(), intCheck(), and phi_dd().

 doublereal phiR_dt ( ) const` [private]`

calculation of d2_res/d_dt

Definition at line 1024 of file WaterPropsIAPWSphi.cpp.

References DELTAp, DELTAsave, phi(), TAUp, TAUsave, and TAUsqrt.

Referenced by cp_R(), dimdpdT(), and intCheck().

 doublereal phiR_t ( ) const` [private]`

calculation of d_res/d_t

Definition at line 823 of file WaterPropsIAPWSphi.cpp.

References DELTAp, DELTAsave, phi(), TAUp, TAUsave, and TAUsqrt.

Referenced by enthalpy_RT(), entropy_R(), intCheck(), intEnergy_RT(), and phi_t().

 doublereal phiR_tt ( ) const` [private]`

calculation of d2_res/d_tt

Definition at line 922 of file WaterPropsIAPWSphi.cpp.

References DELTAp, DELTAsave, phi(), TAUp, TAUsave, and TAUsqrt.

Referenced by cv_R(), intCheck(), and phi_tt().

 doublereal pressureM_rhoRT ( doublereal tau, doublereal delta )

Calculate the dimensionless pressure at tau and delta;.

pM/(rhoRT) = delta * phi_d() = 1.0 + delta phiR_d()

Parameters:
 tau Dimensionless temperature = T_c/T delta Dimensionless density = delta = rho / Rho_c

note: this is done so much, we have a seperate routine.

Definition at line 648 of file WaterPropsIAPWSphi.cpp.

References phiR_d(), and tdpolycalc().

Referenced by WaterPropsIAPWS::pressure().

 void tdpolycalc ( doublereal tau, doublereal delta )

Calculates internal polynomials in tau and delta.

This routine is used to store the internal state of tau and delta for later use by the other routines in the class.

Parameters:
 tau Dimensionless temperature = T_c/T delta Dimensionless density = delta = rho / Rho_c

Definition at line 430 of file WaterPropsIAPWSphi.cpp.

References DELTAp, DELTAsave, TAUp, TAUsave, and TAUsqrt.

## Member Data Documentation

 doublereal DELTAp` [private]`

Value of internally calculated polynomials of powers of delta.

Definition at line 216 of file WaterPropsIAPWSphi.h.

Referenced by phiR(), phiR_d(), phiR_dd(), phiR_dt(), phiR_t(), phiR_tt(), tdpolycalc(), and WaterPropsIAPWSphi().

 doublereal DELTAsave` [private]`

Last delta that was used to calculate polynomials.

Definition at line 225 of file WaterPropsIAPWSphi.h.

Referenced by cp_R(), enthalpy_RT(), gibbs_RT(), phi0(), phi0_d(), phi0_dd(), phiR(), phiR_d(), phiR_dd(), phiR_dt(), phiR_t(), phiR_tt(), and tdpolycalc().

 doublereal TAUp` [private]`

Value of internally calculated polynomials of powers of TAU.

Definition at line 213 of file WaterPropsIAPWSphi.h.

Referenced by phiR(), phiR_d(), phiR_dd(), phiR_dt(), phiR_t(), phiR_tt(), tdpolycalc(), and WaterPropsIAPWSphi().

 doublereal TAUsave` [private]`

Last tau that was used to calculate polynomials.

Definition at line 219 of file WaterPropsIAPWSphi.h.

 doublereal TAUsqrt` [private]`

sqrt of TAU

Definition at line 222 of file WaterPropsIAPWSphi.h.

Referenced by phiR(), phiR_d(), phiR_dd(), phiR_dt(), phiR_t(), phiR_tt(), and tdpolycalc().

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