26 double presLow = 1.0E-2;
27 double oneBar = 1.0E5;
29 m_dens =
m_sub.density(T, presLow, WATER_GAS, dens);
41 if (h != -241.826E6) {
139 int waterState = WATER_LIQUID;
140 if (T >
m_sub.Tcrit()) {
141 waterState = WATER_SUPERCRIT;
144 double dd =
m_sub.density(T, p, waterState, dens);
147 "Failed to set water SS state: T = {} K and p = {} Pa", T, p);
156 "Water State isn't liquid or crit");
162 return m_sub.coeffThermExp();
168 double dens_save =
m_dens;
169 double tt =
m_temp - 0.04;
172 throw CanteraError(
"PDSS_Water::dthermalExpansionCoeffdT",
173 "unable to solve for the density at T = {}, P = {}", tt, pres);
175 double vald =
m_sub.coeffThermExp();
177 double val2 =
m_sub.coeffThermExp();
178 return (val2 - vald) / 0.04;
183 return m_sub.isothermalCompressibility();
188 return m_sub.Tcrit();
193 return m_sub.Pcrit();
198 return m_sub.Rhocrit();
226 if (temp <
m_sub.Tcrit()) {
227 double pp =
m_sub.psat_est(temp);
232 return m_sub.Pcrit();
239 double pp =
m_sub.psat(t, WATER_LIQUID);
247 eosNode[
"model"] =
"liquid-water-IAPWS95";
Contains the getElementWeight function and the definitions of element constraint types.
Implementation of a pressure dependent standard state virtual function for a Pure Water Phase (see Sp...
Headers for a class for calculating the equation of state of water from the IAPWS 1995 Formulation ba...
A map of string keys to values whose type can vary at runtime.
Base class for exceptions thrown by Cantera classes.
WaterProps m_waterProps
Pointer to the WaterProps object.
void setPressure(double pres) override
Sets the pressure in the object.
double molarVolume() const override
Return the molar volume at standard state.
void setTemperature(double temp) override
Set the internal temperature.
double enthalpy_mole() const override
Return the molar enthalpy in units of J kmol-1.
double thermalExpansionCoeff() const override
Return the volumetric thermal expansion coefficient. Units: 1/K.
WaterPropsIAPWS m_sub
Pointer to the WaterPropsIAPWS object, which does the actual calculations for the real equation of st...
double pressure() const override
Returns the pressure (Pa)
double critPressure() const override
critical pressure
double SW_Offset
Offset constant used to obtain consistency with NIST convention.
double critDensity() const override
critical density
double gibbs_RT_ref() const override
Return the molar Gibbs free energy divided by RT at reference pressure.
double critTemperature() const override
critical temperature
double isothermalCompressibility() const
Returns the isothermal compressibility. Units: 1/Pa.
double entropy_R_ref() const override
Return the molar entropy divided by R at reference pressure.
double dthermalExpansionCoeffdT() const
Return the derivative of the volumetric thermal expansion coefficient.
double enthalpy_RT_ref() const override
Return the molar enthalpy divided by RT at reference pressure.
double cv_mole() const override
Return the molar const volume heat capacity in units of J kmol-1 K-1.
void getParameters(AnyMap &eosNode) const override
Store the parameters needed to reconstruct a copy of this PDSS object.
double EW_Offset
Offset constants used to obtain consistency with the NIST database.
double intEnergy_mole() const override
Return the molar internal Energy in units of J kmol-1.
double entropy_mole() const override
Return the molar entropy in units of J kmol-1 K-1.
void setState_TP(double temp, double pres) override
Set the internal temperature and pressure.
int m_iState
state of the fluid
double cp_mole() const override
Return the molar const pressure heat capacity in units of J kmol-1 K-1.
double m_dens
State of the system - density.
double pref_safe(double temp) const
Returns a reference pressure value that can be safely calculated by the underlying real equation of s...
double density() const override
Return the standard state density at standard state.
double gibbs_mole() const override
Return the molar Gibbs free energy in units of J kmol-1.
bool m_allowGasPhase
Since this phase represents a liquid phase, it's an error to return a gas-phase answer.
double molarVolume_ref() const override
Return the molar volume at reference pressure.
void setDensity(double dens)
Set the density of the water phase.
PDSS_Water()
Default constructor.
double satPressure(double t) override
saturation pressure
double cp_R_ref() const override
Return the molar heat capacity divided by R at reference pressure.
double m_p0
Reference state pressure of the species.
double m_temp
Current temperature used by the PDSS object.
double m_pres
State of the system - pressure.
double m_maxTemp
Maximum temperature.
double m_minTemp
Minimum temperature.
double m_mw
Molecular Weight of the species.
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
const double OneAtm
One atmosphere [Pa].
const double GasConstant
Universal Gas Constant [J/kmol/K].
Namespace for the Cantera kernel.
double getElementWeight(const string &ename)
Get the atomic weight of an element.
Contains declarations for string manipulation functions within Cantera.