18 WaterSSTP::WaterSSTP() :
23 m_allowGasPhase(false)
32 m_allowGasPhase(false)
42 m_allowGasPhase(false)
50 EW_Offset(b.EW_Offset),
51 SW_Offset(b.SW_Offset),
53 m_allowGasPhase(b.m_allowGasPhase)
62 WaterSSTP& WaterSSTP::operator=(
const WaterSSTP& b)
103 m_mw = 2.0 * mw_H + mw_O;
109 doublereal T = 298.15;
113 doublereal presLow = 1.0E-2;
114 doublereal oneBar = 1.0E5;
115 doublereal dd =
m_sub.
density(T, presLow, WATER_GAS, 7.0E-8);
121 if (s != 188.835E3) {
128 if (h != -241.826E6) {
150 eosdata.
_require(
"model",
"PureLiquidWater");
199 int waterState = WATER_GAS;
202 waterState = WATER_LIQUID;
218 int waterState = WATER_GAS;
221 waterState = WATER_LIQUID;
236 for (
size_t k = 0; k <
m_kk; k++) {
246 int waterState = WATER_GAS;
249 waterState = WATER_LIQUID;
268 int waterState = WATER_GAS;
271 waterState = WATER_LIQUID;
288 int waterState = WATER_GAS;
291 waterState = WATER_LIQUID;
310 int waterState = WATER_GAS;
313 waterState = WATER_LIQUID;
335 doublereal dens_save =
density();
337 double tt = T - 0.04;
338 doublereal dd =
m_sub.
density(tt, pres, WATER_LIQUID, dens_save);
340 throw CanteraError(
"WaterSSTP::dthermalExpansionCoeffdT",
341 "Unable to solve for the density at T = {}, P = {}", tt, pres);
346 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.
Base class for a phase with thermodynamic properties.
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.
MultiSpeciesThermo * m_spthermo
Pointer to the calculation manager for species reference-state thermodynamic properties.
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.
The SingleSpeciesTP class is a filter class for ThermoPhase.
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.