19 m_iState(WATER_LIQUID),
22 m_allowGasPhase(false)
29 doublereal T = 298.15;
31 doublereal presLow = 1.0E-2;
32 doublereal oneBar = 1.0E5;
33 doublereal dens = 1.0E-9;
46 if (h != -241.826E6) {
149 int waterState = WATER_LIQUID;
151 waterState = WATER_SUPERCRIT;
157 "Failed to set water SS state: T = {} K and p = {} Pa", T, p);
166 "Water State isn't liquid or crit");
178 doublereal dens_save =
m_dens;
179 doublereal tt =
m_temp - 0.04;
182 throw CanteraError(
"PDSS_Water::dthermalExpansionCoeffdT",
183 "unable to solve for the density at T = {}, P = {}", tt, pres);
188 return (val2 - vald) / 0.04;
256 doublereal pp =
m_sub.
psat(t, WATER_LIQUID);
doublereal psat_est(doublereal temperature) const
This function returns an estimated value for the saturation pressure.
doublereal m_dens
State of the system - density.
CTML ("Cantera Markup Language") is the variant of XML that Cantera uses to store data...
virtual doublereal critPressure() const
critical pressure
const doublereal OneAtm
One atmosphere [Pa].
doublereal enthalpy() const
Calculate the enthalpy in mks units of J kmol-1 using the last temperature and density.
doublereal Pcrit() const
Returns the critical pressure of water (22.064E6 Pa)
void setState_TR(doublereal temperature, doublereal rho)
Set the internal state of the object wrt temperature and density.
doublereal intEnergy() const
Calculate the internal energy in mks units of J kmol-1.
virtual doublereal pressure() const
Returns the pressure (Pa)
doublereal entropy() const
Calculate the entropy in mks units of J kmol-1 K-1.
int phaseState(bool checkState=false) const
Returns the Phase State flag for the current state of the object.
void setDensity(doublereal dens)
Set the density of the water phase.
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...
virtual doublereal critDensity() const
critical density
doublereal m_pres
State of the system - pressure.
WaterPropsIAPWS m_sub
Pointer to the WaterPropsIAPWS object, which does the actual calculations for the real equation of st...
Implementation of a pressure dependent standard state virtual function for a Pure Water Phase (see Sp...
virtual doublereal cv_mole() const
Return the molar const volume heat capacity in units of J kmol-1 K-1.
Contains the getElementWeight function and the definitions of element constraint types.
doublereal molarVolume() const
Calculate the molar volume (kmol m-3) at the last temperature and density.
virtual doublereal cp_R_ref() const
Return the molar heat capacity divided by R at reference pressure.
virtual doublereal isothermalCompressibility() const
Returns the isothermal compressibility. Units: 1/Pa.
doublereal pressure() const
Calculates the pressure (Pascals), given the current value of the 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 an...
doublereal Rhocrit() const
Return the critical density of water (kg m-3)
doublereal isothermalCompressibility() const
Returns the coefficient of isothermal compressibility for the state of the object.
virtual doublereal thermalExpansionCoeff() const
Return the volumetric thermal expansion coefficient. Units: 1/K.
virtual void setState_TP(doublereal temp, doublereal pres)
Set the internal temperature and pressure.
virtual doublereal satPressure(doublereal t)
saturation pressure
virtual doublereal entropy_R_ref() const
Return the molar entropy divided by R at reference pressure.
Base class for exceptions thrown by Cantera classes.
double getElementWeight(const std::string &ename)
Get the atomic weight of an element.
virtual doublereal entropy_mole() const
Return the molar entropy in units of J kmol-1 K-1.
doublereal pref_safe(doublereal temp) const
Returns a reference pressure value that can be safely calculated by the underlying real equation of s...
virtual doublereal molarVolume() const
Return the molar volume at standard state.
virtual doublereal cp_mole() const
Return the molar const pressure heat capacity in units of J kmol-1 K-1.
virtual doublereal dthermalExpansionCoeffdT() const
Return the derivative of the volumetric thermal expansion coefficient.
virtual void setState_TR(doublereal temp, doublereal rho)
Set the internal temperature and density.
doublereal m_maxTemp
Maximum temperature.
int m_iState
state of the fluid
virtual void setTemperature(doublereal temp)
Set the internal temperature.
doublereal m_minTemp
Minimum temperature.
doublereal coeffThermExp() const
Returns the coefficient of thermal expansion.
virtual doublereal gibbs_mole() const
Return the molar Gibbs free energy in units of J kmol-1.
virtual doublereal intEnergy_mole() const
Return the molar internal Energy in units of J kmol-1.
doublereal SW_Offset
Offset constant used to obtain consistency with NIST convention.
virtual doublereal enthalpy_RT_ref() const
Return the molar enthalpy divided by RT at reference pressure.
virtual doublereal molarVolume_ref() const
Return the molar volume at reference pressure.
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
doublereal m_temp
Current temperature used by the PDSS object.
doublereal Tcrit() const
Returns the critical temperature of water (Kelvin)
Contains declarations for string manipulation functions within Cantera.
virtual doublereal critTemperature() const
critical temperature
virtual doublereal gibbs_RT_ref() const
Return the molar Gibbs free energy divided by RT at reference pressure.
doublereal Gibbs() const
Calculate the Gibbs free energy in mks units of J kmol-1 K-1.
virtual void setPressure(doublereal pres)
Sets the pressure in the object.
virtual doublereal density() const
Return the standard state density at standard state.
doublereal cv() const
Calculate the constant volume heat capacity in mks units of J kmol-1 K-1 at the last temperature and ...
bool m_allowGasPhase
Since this phase represents a liquid phase, it's an error to return a gas-phase answer.
Namespace for the Cantera kernel.
doublereal EW_Offset
Offset constants used to obtain consistency with the NIST database.
PDSS_Water()
Default constructor.
doublereal m_p0
Reference state pressure of the species.
doublereal m_mw
Molecular Weight of the species.
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.
virtual doublereal enthalpy_mole() const
Return the molar enthalpy in units of J kmol-1.
Headers for a class for calculating the equation of state of water from the IAPWS 1995 Formulation ba...