26 double presLow = 1.0E-2;
27 double oneBar = 1.0E5;
41 if (h != -241.826E6) {
139 int waterState = WATER_LIQUID;
141 waterState = WATER_SUPERCRIT;
147 "Failed to set water SS state: T = {} K and p = {} Pa", T, p);
156 "Water State isn't liquid or crit");
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);
178 return (val2 - vald) / 0.04;
226 warn_deprecated(
"PDSS_Water::setState_TR",
"To be removed after Cantera 3.0");
255 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.
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 setState_TR(double temp, double rho) override
Set the internal temperature and density.
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.
double coeffThermExp() const
Returns the coefficient of thermal expansion.
double density(double temperature, double pressure, int phase=-1, double rhoguess=-1.0)
Calculates the density given the temperature and the pressure, and a guess at the density.
double pressure() const
Calculates the pressure (Pascals), given the current value of the temperature and density.
double gibbs_mass() const
Get the Gibbs free energy (J/kg) at the current temperature and density.
double isothermalCompressibility() const
Returns the coefficient of isothermal compressibility for the state of the object.
double psat(double temperature, int waterState=WATER_LIQUID)
This function returns the saturation pressure given the temperature as an input parameter,...
double Pcrit() const
Returns the critical pressure of water (22.064E6 Pa)
double cv_mass() const
Get the constant volume heat capacity (J/kg/K) at the current temperature and density.
double entropy_mass() const
Get the entropy (J/kg/K) at the current temperature and density.
double Rhocrit() const
Return the critical density of water (kg m-3)
double Tcrit() const
Returns the critical temperature of water (Kelvin)
double cp_mass() const
Get the constant pressure heat capacity (J/kg/K) at the current temperature and density.
double intEnergy_mass() const
Get the internal energy (J/kg) at the current temperature and density.
void setState_TD(double temperature, double rho)
Set the internal state of the object wrt temperature and density.
int phaseState(bool checkState=false) const
Returns the Phase State flag for the current state of the object.
double psat_est(double temperature) const
This function returns an estimated value for the saturation pressure.
double enthalpy_mass() const
Get the enthalpy (J/kg) at the current temperature and density.
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.
void warn_deprecated(const string &source, const AnyBase &node, const string &message)
A deprecation warning for syntax in an input file.
Contains declarations for string manipulation functions within Cantera.