18 WaterSSTP::WaterSSTP() :
23 m_allowGasPhase(false)
32 m_allowGasPhase(false)
42 m_allowGasPhase(false)
68 m_mw = 2.0 * mw_H + mw_O;
74 doublereal T = 298.15;
78 doublereal presLow = 1.0E-2;
79 doublereal oneBar = 1.0E5;
80 doublereal dd =
m_sub.
density(T, presLow, WATER_GAS, 7.0E-8);
93 if (h != -241.826E6) {
111 eosdata.
_require(
"model",
"PureLiquidWater");
160 int waterState = WATER_GAS;
163 waterState = WATER_LIQUID;
179 int waterState = WATER_GAS;
182 waterState = WATER_LIQUID;
197 for (
size_t k = 0; k <
m_kk; k++) {
207 int waterState = WATER_GAS;
210 waterState = WATER_LIQUID;
229 int waterState = WATER_GAS;
232 waterState = WATER_LIQUID;
249 int waterState = WATER_GAS;
252 waterState = WATER_LIQUID;
271 int waterState = WATER_GAS;
274 waterState = WATER_LIQUID;
296 doublereal dens_save =
density();
298 double tt = T - 0.04;
299 doublereal dd =
m_sub.
density(tt, pres, WATER_LIQUID, dens_save);
301 throw CanteraError(
"WaterSSTP::dthermalExpansionCoeffdT",
302 "Unable to solve for the density at T = {}, P = {}", tt, pres);
307 return (val2 - vald) / 0.04;
const doublereal OneAtm
One atmosphere [Pa].
doublereal temperature() const
Temperature (K).
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.
doublereal entropy() const
Calculate the entropy in mks units of J kmol-1 K-1.
virtual void initThermo()
Initialize the ThermoPhase object after all species have been set up.
const size_t npos
index returned by functions to indicate "no position"
size_t elementIndex(const std::string &name) const
Return the index of element named 'name'.
Headers for the factory class that can create known ThermoPhase objects (see Thermodynamic Properties...
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...
Class XML_Node is a tree-based representation of the contents of an XML file.
virtual doublereal density() const
Density (kg/m^3).
doublereal RT() const
Return the Gas Constant multiplied by the current temperature.
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 atomicWeight(size_t m) const
Atomic weight of element m.
void _require(const std::string &a, const std::string &v) const
Require that the current XML node have an attribute named by the first argument, a, and that this attribute have the the string value listed in the second argument, v.
doublereal isothermalCompressibility() const
Returns the coefficient of isothermal compressibility for the state of the object.
The WaterProps class is used to house several approximation routines for properties of water...
Base class for exceptions thrown by Cantera classes.
virtual doublereal enthalpy_mole() const
Molar enthalpy. Units: J/kmol.
void importPhase(XML_Node &phase, ThermoPhase *th)
Import a phase information into an empty ThermoPhase object.
doublereal coeffThermExp() const
Returns the coefficient of thermal expansion.
void setMolecularWeight(const int k, const double mw)
Set the molecular weight of a single species to a given value.
doublereal meanMolecularWeight() const
The mean molecular weight. Units: (kg/kmol)
virtual void setTemperature(const doublereal temp)
Set the internally stored temperature of the phase (K).
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
doublereal Tcrit() const
Returns the critical temperature of water (Kelvin)
Contains declarations for string manipulation functions within Cantera.
doublereal Gibbs() const
Calculate the Gibbs free energy in mks units of J kmol-1 K-1.
size_t m_kk
Number of species in the phase.
doublereal cv() const
Calculate the constant volume heat capacity in mks units of J kmol-1 K-1 at the last temperature and ...
virtual void initThermoFile(const std::string &inputFile, const std::string &id)
Namespace for the Cantera kernel.
virtual void setDensity(const doublereal density_)
Set the internally stored density (kg/m^3) of the phase.
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 void setMoleFractions(const doublereal *const x)
Mole fractions are fixed, with x[0] = 1.0.
virtual doublereal entropy_mole() const
Molar entropy. Units: J/kmol/K.