Class for calculating the equation of state of water. More...
#include <WaterPropsIAPWS.h>
Public Member Functions | |
WaterPropsIAPWS () | |
Base constructor. | |
WaterPropsIAPWS (const WaterPropsIAPWS &right) | |
Copy constructor. | |
WaterPropsIAPWS & | operator= (const WaterPropsIAPWS &right) |
assignment constructor | |
~WaterPropsIAPWS () | |
destructor | |
void | setState_TR (doublereal temperature, doublereal rho) |
Set the internal state of the object wrt temperature and density. | |
doublereal | helmholtzFE () const |
Calculate the Helmholtz free energy in mks units of J kmol-1 K-1, using the last temperature and density. | |
doublereal | Gibbs () const |
Calculate the Gibbs free energy in mks units of J kmol-1 K-1. | |
doublereal | enthalpy () const |
Calculate the enthalpy in mks units of J kmol-1 using the last temperature and density. | |
doublereal | intEnergy () const |
Calculate the internal energy in mks units of J kmol-1. | |
doublereal | entropy () const |
Calculate the entropy in mks units of J kmol-1 K-1. | |
doublereal | cv () const |
Calculate the constant volume heat capacity in mks units of J kmol-1 K-1 at the last temperature and density. | |
doublereal | cp () const |
Calculate the constant pressure heat capacity in mks units of J kmol-1 K-1 at the last temperature and density. | |
doublereal | molarVolume () const |
Calculate the molar volume (kmol m-3) at the last temperature and density. | |
doublereal | pressure () const |
Calculates the pressure (Pascals), given the current value of the temperature and density. | |
doublereal | density (doublereal temperature, doublereal pressure, int phase=-1, doublereal rhoguess=-1.0) |
Calculates the density given the temperature and the pressure, and a guess at the density. | |
doublereal | density_const (doublereal pressure, int phase=-1, doublereal rhoguess=-1.0) const |
Calculates the density given the temperature and the pressure, and a guess at the density, while not changing the internal state. | |
doublereal | density () const |
Returns the density (kg m-3). | |
doublereal | temperature () const |
Returns the temperature (Kelvin). | |
doublereal | coeffThermExp () const |
Returns the coefficient of thermal expansion. | |
doublereal | coeffPresExp () const |
Returns the isochoric pressure derivative wrt temperature. | |
doublereal | isothermalCompressibility () const |
Returns the coefficient of isothermal compressibility for the state of the object. | |
doublereal | dpdrho () const |
Returns the value of dp / drho at constant T for the state of the object. | |
doublereal | psat_est (doublereal temperature) const |
This function returns an estimated value for the saturation pressure. | |
doublereal | psat (doublereal temperature, int waterState=WATER_LIQUID) |
This function returns the saturation pressure given the temperature as an input parameter, and sets the internal state to the saturated conditions. | |
doublereal | densSpinodalWater () const |
Return the value of the density at the water spinodal point (on the liquid side) for the current temperature. | |
doublereal | densSpinodalSteam () const |
Return the value of the density at the water spinodal point (on the gas side) for the current temperature. | |
int | phaseState (bool checkState=false) const |
Returns the Phase State flag for the current state of the object. | |
doublereal | Tcrit () const |
Returns the critical temperature of water (Kelvin). | |
doublereal | Pcrit () const |
Returns the critical pressure of water (22.064E6 Pa). | |
doublereal | Rhocrit () const |
Return the critical density of water (kg m-3). | |
Private Member Functions | |
void | calcDim (doublereal temperature, doublereal rho) |
Calculate the dimensionless temp and rho and store internally. | |
void | corr (doublereal temperature, doublereal pressure, doublereal &densLiq, doublereal &densGas, doublereal &delGRT) |
Utility routine in the calculation of the saturation pressure. | |
void | corr1 (doublereal temperature, doublereal pressure, doublereal &densLiq, doublereal &densGas, doublereal &pcorr) |
Utility routine in the calculation of the saturation pressure. | |
Private Attributes | |
WaterPropsIAPWSphi * | m_phi |
pointer to the underlying object that does the calculations. | |
doublereal | tau |
Dimensionless temperature. | |
doublereal | delta |
Dimensionless density. | |
int | iState |
Current state of the system. |
Class for calculating the equation of state 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.
This class provides a very complicated polynomial for the specific helmholtz free energy of water, as a function of temperature and density.
where
The following constants are assumed
The free energy is a unique single-valued function of the temperature and density over its entire range.
Note, the base thermodynamic state for this class is the one used in the steam tables, i.e., the liquid at the triple point for water has the following properties:
Therefore, to use this class within Cantera, offsets to u() and s() must be used to put the water class onto the same basis as other thermodynamic quantities. For example, in the WaterSSTP class, these offsets are calculated in the following way. The thermodynamic base state for water is set to the NIST basis here by specifying constants EW_Offset and SW_Offset. These offsets are calculated on the fly so that the following properties hold:
The offsets are calculated by actually computing the above quantities and then calculating the correction factor.
This class provides an interface to the WaterPropsIAPWSphi class, which actually calculates the and the polynomials in dimensionless form.
All thermodynamic results from this class are returned in dimensional form. This is because the gas constant (and molecular weight) used within this class is allowed to be potentially different than that used elsewhere in Cantera. Therefore, everything has to be in dimensional units. Note, however, the thermodynamic basis is set to that used in the steam tables. (u = s = 0 for liquid water at the triple point).
This class is not a ThermoPhase. However, it does maintain an internal state of the object that is dependent on temperature and density. The internal state is characterized by an internally storred and a value, and an iState value, which indicates whether the point is a liquid, a gas, or a supercritical fluid. Along with that the and a values are polynomials of and a that are kept by the WaterPropsIAPWSphi class. Therefore, whenever or is changed, the function setState() must be called in order for the internal state to be kept up to date.
The class is pretty straightfoward. However, one function deserves mention. the density() function calculates the density that is consistent with a particular value of the temperature and pressure. It may therefore be multivalued or potentially there may be no answer from this function. It therefore takes a phase guess and a density guess as optional parameters. If no guesses are supplied to density(), a gas phase guess is assumed. This may or may not be what is wanted. Therefore, density() should usually at leat be supplied with a phase guess so that it may manufacture an appropriate density guess. density() manufactures the initial density guess, nondimensionalizes everything, and then calls WaterPropsIAPWSphi::dfind(), which does the iterative calculation to find the density condition that matches the desired input pressure.
The phase guess defines are located in the .h file. they are
There are only three functions which actually change the value of the internal state of this object after it's been instantiated
The setState_TR() is the main function that sets the temperature and rho value. The density() function serves as a setState_TP() function, in that it sets internal state to a temperature and pressure. However, note that this is potentially multivalued. Therefore, we need to supply in addition a phase guess and a rho guess to the input temperature and pressure. The psat() function sets the internal state to the saturated liquid or saturated gas state, dependeing on the waterState parameter.
Because the underlying object WaterPropsIAPWSphi is privately held, you can be sure that the underlying state of this object doesn't change except due to the three function calls listed above.
Definition at line 161 of file WaterPropsIAPWS.h.
WaterPropsIAPWS | ( | ) |
Base constructor.
Definition at line 55 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::m_phi.
WaterPropsIAPWS | ( | const WaterPropsIAPWS & | right | ) |
Copy constructor.
right | Object to be copied |
Definition at line 68 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::delta, WaterPropsIAPWS::m_phi, WaterPropsIAPWS::tau, and WaterPropsIAPWSphi::tdpolycalc().
~WaterPropsIAPWS | ( | ) |
void calcDim | ( | doublereal | temperature, | |
doublereal | rho | |||
) | [private] |
Calculate the dimensionless temp and rho and store internally.
Private routine
temperature | input temperature (kelvin) | |
rho | density in kg m-3 |
Definition at line 105 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::delta, WaterPropsIAPWS::iState, Cantera::Rho_c, Cantera::T_c, and WaterPropsIAPWS::tau.
Referenced by WaterPropsIAPWS::setState_TR().
doublereal coeffPresExp | ( | ) | const |
Returns the isochoric pressure derivative wrt temperature.
beta = M / (rho * Rgas) (d (pressure) / dT) at constant rho
Note for ideal gases this is equal to one.
beta = delta (phi0_d() + phiR_d())
Definition at line 403 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::delta, WaterPropsIAPWSphi::dimdpdT(), WaterPropsIAPWS::m_phi, and WaterPropsIAPWS::tau.
Referenced by WaterPropsIAPWS::coeffThermExp(), and WaterProps::thermalConductivityWater().
doublereal coeffThermExp | ( | ) | const |
Returns the coefficient of thermal expansion.
alpha = d (ln V) / dT at constant P.
Definition at line 414 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::coeffPresExp(), WaterPropsIAPWS::delta, WaterPropsIAPWS::isothermalCompressibility(), and Cantera::Rho_c.
Referenced by WaterProps::coeffThermalExp_IAPWS(), WaterSSTP::dthermalExpansionCoeffdT(), PDSS_Water::dthermalExpansionCoeffdT(), and WaterSSTP::thermalExpansionCoeff().
void corr | ( | doublereal | temperature, | |
doublereal | pressure, | |||
doublereal & | densLiq, | |||
doublereal & | densGas, | |||
doublereal & | delGRT | |||
) | [private] |
Utility routine in the calculation of the saturation pressure.
Private routine
temperature | temperature (kelvin) | |
pressure | pressure (Pascal) | |
densLiq | Output density of liquid | |
densGas | output Density of gas | |
delGRT | output delGRT |
Definition at line 444 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::density(), Cantera::fp2str(), WaterPropsIAPWSphi::gibbs_RT(), WaterPropsIAPWS::m_phi, and WaterPropsIAPWS::setState_TR().
Referenced by WaterPropsIAPWS::psat().
void corr1 | ( | doublereal | temperature, | |
doublereal | pressure, | |||
doublereal & | densLiq, | |||
doublereal & | densGas, | |||
doublereal & | pcorr | |||
) | [private] |
Utility routine in the calculation of the saturation pressure.
Private routine
temperature | temperature (kelvin) | |
pressure | pressure (Pascal) | |
densLiq | Output density of liquid | |
densGas | output Density of gas | |
pcorr | output corrected pressure |
Definition at line 479 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::density(), Cantera::fp2str(), WaterPropsIAPWS::m_phi, WaterPropsIAPWSphi::phiR(), and WaterPropsIAPWS::setState_TR().
Referenced by WaterPropsIAPWS::psat().
doublereal cp | ( | ) | const |
Calculate the constant pressure heat capacity in mks units of J kmol-1 K-1 at the last temperature and density.
Definition at line 866 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWSphi::cp_R(), and WaterPropsIAPWS::m_phi.
Referenced by PDSS_Water::cv_mole(), WaterSSTP::getCp_R(), and WaterSSTP::getCp_R_ref().
doublereal cv | ( | ) | const |
Calculate the constant volume heat capacity in mks units of J kmol-1 K-1 at the last temperature and density.
Definition at line 859 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWSphi::cv_R(), and WaterPropsIAPWS::m_phi.
Referenced by WaterSSTP::cv_mole(), and PDSS_Water::molarVolume().
doublereal density | ( | ) | const |
Returns the density (kg m-3).
The density is an independent variable in the underlying equation of state
Definition at line 311 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::delta, and Cantera::Rho_c.
Referenced by WaterPropsIAPWS::corr(), WaterPropsIAPWS::corr1(), and WaterPropsIAPWS::psat().
doublereal density | ( | doublereal | temperature, | |
doublereal | pressure, | |||
int | phase = -1 , |
|||
doublereal | rhoguess = -1.0 | |||
) |
Calculates the density given the temperature and the pressure, and a guess at the density.
Sets the internal state.
Note, below T_c, this is a multivalued function.
The density() function calculates the density that is consistent with a particular value of the temperature and pressure. It may therefore be multivalued or potentially there may be no answer from this function. It therefore takes a phase guess and a density guess as optional parameters. If no guesses are supplied to density(), a gas phase guess is assumed. This may or may not be what is wanted. Therefore, density() should usually at leat be supplied with a phase guess so that it may manufacture an appropriate density guess. density() manufactures the initial density guess, nondimensionalizes everything, and then calls WaterPropsIAPWSphi::dfind(), which does the iterative calculation to find the density condition that matches the desired input pressure.
temperature,: | Kelvin | |
pressure | : Pressure in Pascals (Newton/m**2) | |
phase | : guessed phase of water : -1: no guessed phase | |
rhoguess | : guessed density of the water : -1.0 no guessed density |
Definition at line 159 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::delta, WaterPropsIAPWSphi::dfind(), Cantera::int2str(), WaterPropsIAPWS::m_phi, Cantera::Rho_c, WaterPropsIAPWS::setState_TR(), Cantera::T_c, and WaterPropsIAPWS::tau.
Referenced by WaterProps::coeffThermalExp_IAPWS(), WaterProps::density_IAPWS(), WaterSSTP::dthermalExpansionCoeffdT(), WaterSSTP::getCp_R_ref(), WaterSSTP::getEnthalpy_RT_ref(), WaterSSTP::getEntropy_R_ref(), WaterSSTP::getGibbs_RT_ref(), WaterSSTP::getStandardVolumes_ref(), WaterSSTP::initThermoXML(), WaterProps::isothermalCompressibility_IAPWS(), WaterSSTP::setPressure(), WaterProps::thermalConductivityWater(), and WaterProps::viscosityWater().
doublereal density_const | ( | doublereal | pressure, | |
int | phase = -1 , |
|||
doublereal | rhoguess = -1.0 | |||
) | const |
Calculates the density given the temperature and the pressure, and a guess at the density, while not changing the internal state.
Note, below T_c, this is a multivalued function.
The density() function calculates the density that is consistent with a particular value of the temperature and pressure. It may therefore be multivalued or potentially there may be no answer from this function. It therefore takes a phase guess and a density guess as optional parameters. If no guesses are
supplied to density(), a gas phase guess is assumed. This may or may not be what is wanted. Therefore, density() should usually at leat be supplied with a phase guess so that it may manufacture an appropriate density guess. density() manufactures the initial density guess, nondimensionalizes everything, and then calls WaterPropsIAPWSphi::dfind(), which does the iterative calculation to find the density condition that matches the desired input pressure.
pressure | : Pressure in Pascals (Newton/m**2) | |
phase | : guessed phase of water : -1: no guessed phase | |
rhoguess | : guessed density of the water : -1.0 no guessed density |
Definition at line 244 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::delta, WaterPropsIAPWSphi::dfind(), Cantera::int2str(), WaterPropsIAPWS::m_phi, Cantera::Rho_c, Cantera::T_c, WaterPropsIAPWS::tau, WaterPropsIAPWSphi::tdpolycalc(), and WaterPropsIAPWS::temperature().
Referenced by WaterPropsIAPWS::densSpinodalSteam(), and WaterPropsIAPWS::densSpinodalWater().
doublereal densSpinodalSteam | ( | ) | const |
Return the value of the density at the water spinodal point (on the gas side) for the current temperature.
Definition at line 724 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::delta, WaterPropsIAPWS::density_const(), WaterPropsIAPWS::dpdrho(), WaterPropsIAPWS::m_phi, MAX, WaterPropsIAPWS::psat_est(), Cantera::Rho_c, Cantera::T_c, WaterPropsIAPWS::tau, WaterPropsIAPWSphi::tdpolycalc(), and WaterPropsIAPWS::temperature().
doublereal densSpinodalWater | ( | ) | const |
Return the value of the density at the water spinodal point (on the liquid side) for the current temperature.
Definition at line 628 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::delta, WaterPropsIAPWS::density_const(), WaterPropsIAPWS::dpdrho(), WaterPropsIAPWS::m_phi, MAX, WaterPropsIAPWS::psat_est(), Cantera::Rho_c, Cantera::T_c, WaterPropsIAPWS::tau, WaterPropsIAPWSphi::tdpolycalc(), and WaterPropsIAPWS::temperature().
doublereal dpdrho | ( | ) | const |
Returns the value of dp / drho at constant T for the state of the object.
units - Joules / kg
Definition at line 387 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::delta, WaterPropsIAPWSphi::dimdpdrho(), WaterPropsIAPWS::m_phi, Cantera::T_c, WaterPropsIAPWS::tau, and WaterPropsIAPWS::temperature().
Referenced by WaterPropsIAPWS::densSpinodalSteam(), WaterPropsIAPWS::densSpinodalWater(), WaterPropsIAPWS::isothermalCompressibility(), WaterProps::thermalConductivityWater(), and WaterProps::viscosityWater().
doublereal enthalpy | ( | ) | const |
Calculate the enthalpy in mks units of J kmol-1 using the last temperature and density.
Definition at line 830 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWSphi::enthalpy_RT(), WaterPropsIAPWS::m_phi, Cantera::T_c, WaterPropsIAPWS::tau, and WaterPropsIAPWS::temperature().
Referenced by WaterSSTP::getEnthalpy_RT(), WaterSSTP::getEnthalpy_RT_ref(), and PDSS_Water::intEnergy_mole().
doublereal entropy | ( | ) | const |
Calculate the entropy in mks units of J kmol-1 K-1.
Definition at line 850 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWSphi::entropy_R(), and WaterPropsIAPWS::m_phi.
Referenced by WaterSSTP::getEntropy_R(), WaterSSTP::getEntropy_R_ref(), and PDSS_Water::gibbs_mole().
doublereal Gibbs | ( | ) | const |
Calculate the Gibbs free energy in mks units of J kmol-1 K-1.
using the last temperature and density
Definition at line 423 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWSphi::gibbs_RT(), WaterPropsIAPWS::m_phi, Cantera::T_c, WaterPropsIAPWS::tau, and WaterPropsIAPWS::temperature().
Referenced by PDSS_Water::cp_mole(), WaterSSTP::getGibbs_RT(), WaterSSTP::getGibbs_RT_ref(), and WaterSSTP::getStandardChemPotentials().
doublereal helmholtzFE | ( | ) | const |
Calculate the Helmholtz free energy in mks units of J kmol-1 K-1, using the last temperature and density.
Definition at line 124 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::delta, WaterPropsIAPWS::m_phi, WaterPropsIAPWSphi::phi(), Cantera::T_c, WaterPropsIAPWS::tau, and WaterPropsIAPWS::temperature().
doublereal intEnergy | ( | ) | const |
Calculate the internal energy in mks units of J kmol-1.
Definition at line 840 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWSphi::intEnergy_RT(), WaterPropsIAPWS::m_phi, Cantera::T_c, WaterPropsIAPWS::tau, and WaterPropsIAPWS::temperature().
Referenced by PDSS_Water::entropy_mole(), and WaterSSTP::getIntEnergy_RT().
doublereal isothermalCompressibility | ( | ) | const |
Returns the coefficient of isothermal compressibility for the state of the object.
kappa = - d (ln V) / dP at constant T.
units - 1/Pascal
Definition at line 374 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::delta, WaterPropsIAPWS::dpdrho(), and Cantera::Rho_c.
Referenced by WaterPropsIAPWS::coeffThermExp(), PDSS_Water::critTemperature(), WaterSSTP::isothermalCompressibility(), WaterProps::isothermalCompressibility_IAPWS(), and WaterPropsIAPWS::phaseState().
doublereal molarVolume | ( | ) | const |
Calculate the molar volume (kmol m-3) at the last temperature and density.
Definition at line 873 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::delta, and Cantera::Rho_c.
Referenced by PDSS_Water::gibbs_RT_ref().
WaterPropsIAPWS & operator= | ( | const WaterPropsIAPWS & | right | ) |
assignment constructor
right | Object to be copied |
Definition at line 82 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::delta, WaterPropsIAPWS::iState, WaterPropsIAPWS::m_phi, WaterPropsIAPWS::tau, and WaterPropsIAPWSphi::tdpolycalc().
doublereal Pcrit | ( | ) | const [inline] |
Returns the critical pressure of water (22.064E6 Pa).
This is hard coded to the value of 22.064E6 pascals
Definition at line 411 of file WaterPropsIAPWS.h.
Referenced by WaterSSTP::critPressure(), and PDSS_Water::setDensity().
int phaseState | ( | bool | checkState = false |
) | const |
Returns the Phase State flag for the current state of the object.
checkState | If true, this function does a complete check to see where in paramters space we are |
There are three values: WATER_GAS below the critical temperature but below the critical density WATER_LIQUID below the critical temperature but above the critical density WATER_SUPERCRIT above the critical temperature
Definition at line 579 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::delta, WaterPropsIAPWS::isothermalCompressibility(), WaterPropsIAPWS::iState, WaterPropsIAPWS::m_phi, Cantera::Rho_c, Cantera::T_c, WaterPropsIAPWS::tau, and WaterPropsIAPWSphi::tdpolycalc().
doublereal pressure | ( | ) | const |
Calculates the pressure (Pascals), given the current value of the temperature and density.
The density is an independent variable in the underlying equation of state
Definition at line 137 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::delta, WaterPropsIAPWS::m_phi, WaterPropsIAPWSphi::pressureM_rhoRT(), Cantera::Rho_c, Cantera::T_c, WaterPropsIAPWS::tau, and WaterPropsIAPWS::temperature().
Referenced by WaterSSTP::pressure(), and PDSS_Water::pressure().
doublereal psat | ( | doublereal | temperature, | |
int | waterState = WATER_LIQUID | |||
) |
This function returns the saturation pressure given the temperature as an input parameter, and sets the internal state to the saturated conditions.
Note this function will return the saturation pressure, given the temperature. It will then set the state of the system to the saturation condition. The input parameter waterState is used to either specify the liquid state or the gas state at the desired temperatue and saturated pressure.
If the input temperature, T, is above T_c, this routine will set the internal state to T and the pressure to P_c. Then, return P_c.
temperature | input temperature (kelvin) | |
waterState | integer specifying the water state |
Definition at line 525 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::corr(), WaterPropsIAPWS::corr1(), WaterPropsIAPWS::density(), Cantera::int2str(), WaterPropsIAPWS::psat_est(), WaterPropsIAPWS::setState_TR(), and Cantera::T_c.
Referenced by WaterSSTP::satPressure(), and WaterProps::satPressure().
doublereal psat_est | ( | doublereal | temperature | ) | const |
This function returns an estimated value for the saturation pressure.
It does this via a polynomial fit of the vapor pressure curve. units = (Pascals)
temperature | Input temperature (Kelvin) |
Definition at line 334 of file WaterPropsIAPWS.cpp.
Referenced by WaterPropsIAPWS::densSpinodalSteam(), WaterPropsIAPWS::densSpinodalWater(), and WaterPropsIAPWS::psat().
doublereal Rhocrit | ( | ) | const [inline] |
Return the critical density of water (kg m-3).
This is equal to 322 kg m-3.
Definition at line 417 of file WaterPropsIAPWS.h.
Referenced by WaterSSTP::critDensity(), WaterSSTP::getCp_R_ref(), WaterSSTP::getEnthalpy_RT_ref(), WaterSSTP::getEntropy_R_ref(), WaterSSTP::getGibbs_RT_ref(), WaterSSTP::getStandardVolumes_ref(), WaterSSTP::setPressure(), and WaterSSTP::vaporFraction().
void setState_TR | ( | doublereal | temperature, | |
doublereal | rho | |||
) |
Set the internal state of the object wrt temperature and density.
temperature | temperature (kelvin) | |
rho | density (kg m-3) |
Definition at line 821 of file WaterPropsIAPWS.cpp.
References WaterPropsIAPWS::calcDim(), WaterPropsIAPWS::delta, WaterPropsIAPWS::m_phi, WaterPropsIAPWS::tau, and WaterPropsIAPWSphi::tdpolycalc().
Referenced by WaterPropsIAPWS::corr(), WaterPropsIAPWS::corr1(), WaterPropsIAPWS::density(), PDSS_Water::density(), WaterSSTP::dthermalExpansionCoeffdT(), WaterSSTP::getCp_R_ref(), WaterSSTP::getEntropy_R_ref(), WaterSSTP::getGibbs_RT_ref(), PDSS_Water::pref_safe(), WaterPropsIAPWS::psat(), WaterSSTP::satPressure(), WaterSSTP::setDensity(), PDSS_Water::setState_TP(), and WaterSSTP::setTemperature().
doublereal Tcrit | ( | ) | const [inline] |
Returns the critical temperature of water (Kelvin).
This is hard coded to the value 647.096 Kelvin
Definition at line 405 of file WaterPropsIAPWS.h.
Referenced by PDSS_Water::critDensity(), WaterSSTP::critTemperature(), and WaterSSTP::vaporFraction().
doublereal temperature | ( | ) | const |
Returns the temperature (Kelvin).
Definition at line 319 of file WaterPropsIAPWS.cpp.
References Cantera::T_c, and WaterPropsIAPWS::tau.
Referenced by WaterPropsIAPWS::density_const(), WaterPropsIAPWS::densSpinodalSteam(), WaterPropsIAPWS::densSpinodalWater(), WaterPropsIAPWS::dpdrho(), WaterPropsIAPWS::enthalpy(), WaterPropsIAPWS::Gibbs(), WaterPropsIAPWS::helmholtzFE(), WaterPropsIAPWS::intEnergy(), WaterPropsIAPWS::pressure(), WaterProps::thermalConductivityWater(), and WaterProps::viscosityWater().
doublereal delta [mutable, private] |
Dimensionless density.
delta = rho / rho_c
Definition at line 470 of file WaterPropsIAPWS.h.
Referenced by WaterPropsIAPWS::calcDim(), WaterPropsIAPWS::coeffPresExp(), WaterPropsIAPWS::coeffThermExp(), WaterPropsIAPWS::density(), WaterPropsIAPWS::density_const(), WaterPropsIAPWS::densSpinodalSteam(), WaterPropsIAPWS::densSpinodalWater(), WaterPropsIAPWS::dpdrho(), WaterPropsIAPWS::helmholtzFE(), WaterPropsIAPWS::isothermalCompressibility(), WaterPropsIAPWS::molarVolume(), WaterPropsIAPWS::operator=(), WaterPropsIAPWS::phaseState(), WaterPropsIAPWS::pressure(), WaterPropsIAPWS::setState_TR(), and WaterPropsIAPWS::WaterPropsIAPWS().
int iState [mutable, private] |
Current state of the system.
Definition at line 473 of file WaterPropsIAPWS.h.
Referenced by WaterPropsIAPWS::calcDim(), WaterPropsIAPWS::operator=(), and WaterPropsIAPWS::phaseState().
WaterPropsIAPWSphi* m_phi [private] |
pointer to the underlying object that does the calculations.
Definition at line 458 of file WaterPropsIAPWS.h.
Referenced by WaterPropsIAPWS::coeffPresExp(), WaterPropsIAPWS::corr(), WaterPropsIAPWS::corr1(), WaterPropsIAPWS::cp(), WaterPropsIAPWS::cv(), WaterPropsIAPWS::density(), WaterPropsIAPWS::density_const(), WaterPropsIAPWS::densSpinodalSteam(), WaterPropsIAPWS::densSpinodalWater(), WaterPropsIAPWS::dpdrho(), WaterPropsIAPWS::enthalpy(), WaterPropsIAPWS::entropy(), WaterPropsIAPWS::Gibbs(), WaterPropsIAPWS::helmholtzFE(), WaterPropsIAPWS::intEnergy(), WaterPropsIAPWS::operator=(), WaterPropsIAPWS::phaseState(), WaterPropsIAPWS::pressure(), WaterPropsIAPWS::setState_TR(), WaterPropsIAPWS::WaterPropsIAPWS(), and WaterPropsIAPWS::~WaterPropsIAPWS().
doublereal tau [private] |
Dimensionless temperature.
tau = T_C / T
Definition at line 464 of file WaterPropsIAPWS.h.
Referenced by WaterPropsIAPWS::calcDim(), WaterPropsIAPWS::coeffPresExp(), WaterPropsIAPWS::density(), WaterPropsIAPWS::density_const(), WaterPropsIAPWS::densSpinodalSteam(), WaterPropsIAPWS::densSpinodalWater(), WaterPropsIAPWS::dpdrho(), WaterPropsIAPWS::enthalpy(), WaterPropsIAPWS::Gibbs(), WaterPropsIAPWS::helmholtzFE(), WaterPropsIAPWS::intEnergy(), WaterPropsIAPWS::operator=(), WaterPropsIAPWS::phaseState(), WaterPropsIAPWS::pressure(), WaterPropsIAPWS::setState_TR(), WaterPropsIAPWS::temperature(), and WaterPropsIAPWS::WaterPropsIAPWS().