diff --git a/data/liquidvapor.yaml b/data/liquidvapor.yaml index 123a234cf89..f06363dd3fb 100644 --- a/data/liquidvapor.yaml +++ b/data/liquidvapor.yaml @@ -25,6 +25,18 @@ phases: T: 300.0 P: 1.01325e+05 pure-fluid-name: water +- name: liquid-water-IAPWS95 + elements: [O, H] + species: [H2O] + thermo: liquid-water-IAPWS95 + state: + T: 300.0 + P: 1.01325e+05 + note: >- + Equation of state is based on W. Wagner, A. Pruss, "The IAPWS Formulation + 1995 for the Thermodynamic Properties of Ordinary Water Substance for + General and Scientific Use," J. Phys. Chem. Ref. Dat, 31, 387, 2002. + Important: Only liquid and supercritical states are currently implemented - name: nitrogen thermo: pure-fluid elements: [N] @@ -92,6 +104,12 @@ phases: T: 300.0 P: 1.01325e+05 pure-fluid-name: HFC-134a + note: >- + Equation of state is based on R. Tillner-Roth and H. D. Baehr, "An + International Standard Formulation for The Thermodynamic Properties of + 1,1,1,2-Tetrafluoroethane (HFC-134a) for Temperatures From 170 K to 455 K + and Pressures up to 70 MPa". J. Phys. Chem. Ref. Data, Vol. 23, No. 5, 1994. + pp. 657--729. - name: hfc134a thermo: pure-fluid elements: [C, F, H] diff --git a/include/cantera/thermo/WaterProps.h b/include/cantera/thermo/WaterProps.h index ec0520b2bee..74fd66d7209 100644 --- a/include/cantera/thermo/WaterProps.h +++ b/include/cantera/thermo/WaterProps.h @@ -83,6 +83,11 @@ class PDSS_Water; //! The WaterProps class is used to house several approximation routines for //! properties of water. /*! + * This is a helper class for WaterSSTP and PDSS_Water and does not constitute + * a complete implementation of a thermo phase by itself (see \ref thermoprops + * and classes \link Cantera::WaterSSTP WaterSSTP\endlink and + * \link Cantera::PDSS_Water PDSS_Water\endlink). + * * The class is also a wrapper around the WaterPropsIAPWS class which provides * the calculations for the equation of state properties for water. * diff --git a/include/cantera/thermo/WaterPropsIAPWS.h b/include/cantera/thermo/WaterPropsIAPWS.h index 85f14b9e5c4..b0d5a26b103 100644 --- a/include/cantera/thermo/WaterPropsIAPWS.h +++ b/include/cantera/thermo/WaterPropsIAPWS.h @@ -37,6 +37,11 @@ namespace Cantera //! Class for calculating the equation of state of water. /*! + * This is a helper class for WaterSSTP and PDSS_Water and does not constitute + * a complete implementation of a thermo phase by itself (see \ref thermoprops + * and classes \link Cantera::WaterSSTP WaterSSTP\endlink and + * \link Cantera::PDSS_Water PDSS_Water\endlink). + * * The reference is W. Wagner, A. Pruss, "The IAPWS Formulation 1995 for the * Thermodynamic Properties of Ordinary Water Substance for General and * Scientific Use," J. Phys. Chem. Ref. Dat, 31, 387, 2002. diff --git a/include/cantera/thermo/WaterPropsIAPWSphi.h b/include/cantera/thermo/WaterPropsIAPWSphi.h index fc274b1c347..e0faa94133f 100644 --- a/include/cantera/thermo/WaterPropsIAPWSphi.h +++ b/include/cantera/thermo/WaterPropsIAPWSphi.h @@ -20,6 +20,11 @@ namespace Cantera //! Low level class for the real description of water. /*! + * This is a helper class for WaterSSTP and PDSS_Water and does not constitute + * a complete implementation of a thermo phase by itself (see \ref thermoprops + * and classes \link Cantera::WaterSSTP WaterSSTP\endlink and + * \link Cantera::PDSS_Water PDSS_Water\endlink). + * * The reference is W. Wagner, A. Pruss, "The IAPWS Formulation 1995 for the * Thermodynamic Properties of Ordinary Water Substance for General and * Scientific Use," J. Phys. Chem. Ref. Dat, 31, 387, 2002. diff --git a/include/cantera/thermo/WaterSSTP.h b/include/cantera/thermo/WaterSSTP.h index 215304cbfb9..e6850d5a9a7 100644 --- a/include/cantera/thermo/WaterSSTP.h +++ b/include/cantera/thermo/WaterSSTP.h @@ -20,7 +20,7 @@ namespace Cantera class WaterPropsIAPWS; class WaterProps; //! Class for single-component water. This is designed to cover just the liquid -//! part of water. +//! and supercritical phases of water. /*! * The reference is W. Wagner, A. Pruss, "The IAPWS Formulation 1995 for the * Thermodynamic Properties of Ordinary Water Substance for General and @@ -140,9 +140,11 @@ class WaterSSTP : public SingleSpeciesTP explicit WaterSSTP(XML_Node& phaseRef, const std::string& id = ""); virtual std::string type() const { - return "Water"; + return "liquid-water-IAPWS95"; } + virtual std::string phaseOfMatter() const; + //! @name Molar Thermodynamic Properties of the Solution //! @{ @@ -238,6 +240,15 @@ class WaterSSTP : public SingleSpeciesTP return m_waterProps.get(); } + //! Switch that enables calculations in the gas phase + /** + * Since this phase represents a liquid (or supercritical) phase, it is an + * error to return a gas-phase answer. The sole intended use for this + * member function is to check the thermodynamic consistency of the + * underlying WaterProps class with ideal-gas thermo functions. + */ + void _allowGasPhase(bool flag) { m_allowGasPhase = flag; } + protected: /** * @internal This internal routine must be overridden because it is not @@ -278,8 +289,8 @@ class WaterSSTP : public SingleSpeciesTP bool m_ready; /** - * Since this phase represents a liquid phase, it's an error to - * return a gas-phase answer. However, if the below is true, then + * Since this phase represents a liquid (or supercritical) phase, it is an + * error to return a gas-phase answer. However, if the below is true, then * a gas-phase answer is allowed. This is used to check the thermodynamic * consistency with ideal-gas thermo functions for example. */ diff --git a/interfaces/cython/cantera/liquidvapor.py b/interfaces/cython/cantera/liquidvapor.py index fbb1e40c9a3..8bf6a17d834 100644 --- a/interfaces/cython/cantera/liquidvapor.py +++ b/interfaces/cython/cantera/liquidvapor.py @@ -4,47 +4,186 @@ from . import PureFluid, _cantera -def Water(): +def Water(backend='Reynolds'): """ Create a `PureFluid` object using the equation of state for water and the `WaterTransport` class for viscosity and thermal conductivity. + + The object returned by this method implements an accurate equation of state + for water, where implementations are selected using the *backend* switch. + + For the ``Reynolds`` backend, the equation of state is taken from + + W. C. Reynolds, *Thermodynamic Properties in SI: graphs, tables, and + computational equations for forty substances.* Stanford: Stanford + University, 1979. Print. + + which can be used in the liquid, vapor, saturated liquid/vapor, and + supercritical regions of the phase diagram. + + The ``IAPWS95`` backend implements an IAPWS (International Association for + the Properties of Water and Steam) formulation for thermodynamic properties + taken from + + W. Wagner, A. Pruss, *The IAPWS Formulation 1995 for the Thermodynamic + Properties of Ordinary Water Substance for General and Scientific Use,* + J. Phys. Chem. Ref. Dat, 31, 387, 2002. + + which currently only implements liquid and supercritical regions. + + In both cases, formulas for transport are taken from + + J. V. Sengers, J. T. R. Watson, *Improved International Formulations for + the Viscosity and Thermal Conductivity of Water Substance,* J. Phys. + Chem. Ref. Data, 15, 1291, 1986. + + For more details, see classes :ct:PureFluid, tpx::water, + :ct:WaterSSTP and :ct:WaterTransport in the Cantera C++ source + code documentation. """ class WaterWithTransport(PureFluid, _cantera.Transport): __slots__ = () - return WaterWithTransport('liquidvapor.yaml', 'water', transport_model='Water') + if backend == 'Reynolds': + return WaterWithTransport('liquidvapor.yaml', 'water', + transport_model='Water') + if backend == 'IAPWS95': + return WaterWithTransport('liquidvapor.yaml', 'liquid-water-IAPWS95', + transport_model='Water') + + raise KeyError("Unknown backend '{}'".format(backend)) def Nitrogen(): - """Create a `PureFluid` object using the equation of state for nitrogen.""" + """ + Create a `PureFluid` object using the equation of state for nitrogen. + + The object returned by this method implements an accurate equation of + state for nitrogen that can be used in the liquid, vapor, saturated + liquid/vapor, and supercritical regions of the phase diagram. The + equation of state is taken from + + W. C. Reynolds, *Thermodynamic Properties in SI: graphs, tables, and + computational equations for forty substances* Stanford: Stanford + University, 1979. Print. + + For more details, see classes :ct:PureFluid and tpx::nitrogen in the + Cantera C++ source code documentation. + """ return PureFluid('liquidvapor.yaml', 'nitrogen') def Methane(): - """Create a `PureFluid` object using the equation of state for methane.""" + """ + Create a `PureFluid` object using the equation of state for methane. + + The object returned by this method implements an accurate equation of + state for methane that can be used in the liquid, vapor, saturated + liquid/vapor, and supercritical regions of the phase diagram. The + equation of state is taken from + + W. C. Reynolds, *Thermodynamic Properties in SI: graphs, tables, and + computational equations for forty substances* Stanford: Stanford + University, 1979. Print. + + For more details, see classes :ct:PureFluid and tpx::methane in the + Cantera C++ source code documentation. + """ return PureFluid('liquidvapor.yaml', 'methane') def Hydrogen(): - """Create a `PureFluid` object using the equation of state for hydrogen.""" + """ + Create a `PureFluid` object using the equation of state for hydrogen. + + The object returned by this method implements an accurate equation of + state for hydrogen that can be used in the liquid, vapor, saturated + liquid/vapor, and supercritical regions of the phase diagram. The + equation of state is taken from + + W. C. Reynolds, *Thermodynamic Properties in SI: graphs, tables, and + computational equations for forty substances* Stanford: Stanford + University, 1979. Print. + + For more details, see classes :ct:PureFluid and tpx::hydrogen in the + Cantera C++ source code documentation. + """ return PureFluid('liquidvapor.yaml', 'hydrogen') def Oxygen(): - """Create a `PureFluid` object using the equation of state for oxygen.""" + """ + Create a `PureFluid` object using the equation of state for oxygen. + + The object returned by this method implements an accurate equation of + state for oxygen that can be used in the liquid, vapor, saturated + liquid/vapor, and supercritical regions of the phase diagram. The + equation of state is taken from + + W. C. Reynolds, *Thermodynamic Properties in SI: graphs, tables, and + computational equations for forty substances* Stanford: Stanford + University, 1979. Print. + + For more details, see classes :ct:PureFluid and tpx::oxygen in the + Cantera C++ source code documentation. + """ return PureFluid('liquidvapor.yaml', 'oxygen') def Hfc134a(): - """Create a `PureFluid` object using the equation of state for HFC-134a.""" + """ + Create a `PureFluid` object using the equation of state for HFC-134a. + + The object returned by this method implements an accurate equation of + state for refrigerant HFC134a (R134a) that can be used in the liquid, + vapor, saturated liquid/vapor, and supercritical regions of the phase + diagram. Implements the equation of state given in: + + R. Tillner-Roth, H. D. Baehr. *An International Standard Formulation for + The Thermodynamic Properties of 1,1,1,2-Tetrafluoroethane (HFC-134a) for + Temperatures From 170 K to 455 K and Pressures up to 70 MPa.* J. Phys. + Chem. Ref. Data, Vol. 23, No. 5, 1994. pp. 657--729. + http://dx.doi.org/10.1063/1.555958 + + For more details, see classes :ct:PureFluid and tpx::HFC134a in the + Cantera C++ source code documentation. + """ return PureFluid('liquidvapor.yaml', 'HFC-134a') def CarbonDioxide(): - """Create a `PureFluid` object using the equation of state for carbon dioxide.""" + """ + Create a `PureFluid` object using the equation of state for carbon dioxide. + + The object returned by this method implements an accurate equation of + state for carbon dioxide that can be used in the liquid, vapor, saturated + liquid/vapor, and supercritical regions of the phase diagram. The + equation of state is taken from + + W. C. Reynolds, *Thermodynamic Properties in SI: graphs, tables, and + computational equations for forty substances.* Stanford: Stanford + University, 1979. Print. + + For more details, see classes :ct:PureFluid and tpx::CarbonDioxide in + the Cantera C++ source code documentation. + """ return PureFluid('liquidvapor.yaml', 'carbon-dioxide') def Heptane(): - """Create a `PureFluid` object using the equation of state for heptane.""" + """ + Create a `PureFluid` object using the equation of state for heptane. + + The object returned by this method implements an accurate equation of + state for n-heptane that can be used in the liquid, vapor, saturated + liquid/vapor, and supercritical regions of the phase diagram. The + equation of state is taken from + + W. C. Reynolds, *Thermodynamic Properties in SI: graphs, tables, and + computational equations for forty substances.* Stanford: Stanford + University, 1979. Print. + + For more details, see classes :ct:PureFluid and tpx::Heptane in the + Cantera C++ source code documentation. + """ return PureFluid('liquidvapor.yaml', 'heptane') diff --git a/interfaces/cython/cantera/test/test_composite.py b/interfaces/cython/cantera/test/test_composite.py index b63687f2735..06e1742d73f 100644 --- a/interfaces/cython/cantera/test/test_composite.py +++ b/interfaces/cython/cantera/test/test_composite.py @@ -87,6 +87,9 @@ def check(a, b): try: sol = ct.Solution(self.yml_file, ph_name) a = ct.SolutionArray(sol, 10) + if ph['thermo'] == 'liquid-water-IAPWS95': + # ensure that phase remains liquid + a.TP = sol.T, sol.critical_pressure # assign some state T = 373.15 + 100*np.random.rand(10) diff --git a/interfaces/cython/cantera/test/test_convert.py b/interfaces/cython/cantera/test/test_convert.py index 88b508e173f..228891d2afa 100644 --- a/interfaces/cython/cantera/test/test_convert.py +++ b/interfaces/cython/cantera/test/test_convert.py @@ -841,10 +841,10 @@ def checkConversion(self, basename, cls=ct.Solution, ctmlphases=(), return ctmlPhase, yamlPhase - def checkThermo(self, ctmlPhase, yamlPhase, temperatures, tol=1e-7): + def checkThermo(self, ctmlPhase, yamlPhase, temperatures, pressure=ct.one_atm, tol=1e-7): for T in temperatures: - ctmlPhase.TP = T, ct.one_atm - yamlPhase.TP = T, ct.one_atm + ctmlPhase.TP = T, pressure + yamlPhase.TP = T, pressure cp_ctml = ctmlPhase.partial_molar_cp cp_yaml = yamlPhase.partial_molar_cp h_ctml = ctmlPhase.partial_molar_enthalpies @@ -1134,7 +1134,7 @@ def test_water_IAPWS95_thermo(self): Path(self.test_work_dir).joinpath("liquid-water.yaml"), ) ctmlWater, yamlWater = self.checkConversion("liquid-water") - self.checkThermo(ctmlWater, yamlWater, [300, 500, 1300, 2000]) + self.checkThermo(ctmlWater, yamlWater, [300, 500, 1300, 2000], pressure=22064000.0) self.assertEqual(ctmlWater.transport_model, yamlWater.transport_model) dens = ctmlWater.density for T in [298, 1001, 2400]: diff --git a/interfaces/cython/cantera/test/test_purefluid.py b/interfaces/cython/cantera/test/test_purefluid.py index 8cbe2c9aa60..8913204f76a 100644 --- a/interfaces/cython/cantera/test/test_purefluid.py +++ b/interfaces/cython/cantera/test/test_purefluid.py @@ -357,6 +357,44 @@ def test_phase_of_matter(self): co2 = ct.CarbonDioxide() self.assertEqual(co2.phase_of_matter, "gas") + def test_water_backends(self): + w = ct.Water(backend='Reynolds') + self.assertEqual(w.thermo_model, 'PureFluid') + w = ct.Water(backend='IAPWS95') + self.assertEqual(w.thermo_model, 'liquid-water-IAPWS95') + with self.assertRaisesRegex(KeyError, 'Unknown backend'): + ct.Water('foobar') + + def test_water_iapws(self): + w = ct.Water(backend='IAPWS95') + self.assertNear(w.critical_density, 322.) + self.assertNear(w.critical_temperature, 647.096) + self.assertNear(w.critical_pressure, 22064000.0) + + # test internal TP setters (setters update temperature at constant + # density before updating pressure) + w.TP = 300, ct.one_atm + dens = w.density + w.TP = 2000, ct.one_atm # supercritical + self.assertEqual(w.phase_of_matter, "supercritical") + w.TP = 300, ct.one_atm # state goes from supercritical -> gas -> liquid + self.assertNear(w.density, dens) + self.assertEqual(w.phase_of_matter, "liquid") + + # test setters for critical conditions + w.TP = w.critical_temperature, w.critical_pressure + self.assertNear(w.density, 322.) + w.TP = 2000, ct.one_atm # uses current density as initial guess + w.TP = 273.16, ct.one_atm # uses fixed density as initial guess + self.assertNear(w.density, 999.84376) + self.assertEqual(w.phase_of_matter, "liquid") + w.TP = w.T, w.P_sat + self.assertEqual(w.phase_of_matter, "liquid") + with self.assertRaisesRegex(ct.CanteraError, "assumes liquid phase"): + w.TP = 273.1599999, ct.one_atm + with self.assertRaisesRegex(ct.CanteraError, "assumes liquid phase"): + w.TP = 500, ct.one_atm + # To minimize errors when transcribing tabulated data, the input units here are: # T: K, P: MPa, rho: kg/m3, v: m3/kg, (u,h): kJ/kg, s: kJ/kg-K diff --git a/interfaces/matlab/toolbox/HFC134a.m b/interfaces/matlab/toolbox/HFC134a.m index 3ebb902d309..61aa00d3cba 100644 --- a/interfaces/matlab/toolbox/HFC134a.m +++ b/interfaces/matlab/toolbox/HFC134a.m @@ -2,10 +2,10 @@ % HFC134A Return an object representing refrigerant HFC134a. % h = HFC134a() % The object returned by this method implements an accurate equation of -% state for refrigerant HFC134a (R134a) that can be used in the liquid, +% state for refrigerant HFC134a (R134a) that can be used in the liquid, % vapor, saturated liquid/vapor, and supercritical regions of the phase % diagram. Implements the equation of state given in: -% R. Tillner-Roth and H.D. Baehr. "An International Standard Formulation for +% R. Tillner-Roth and H. D. Baehr. "An International Standard Formulation for % The Thermodynamic Properties of 1,1,1,2-Tetrafluoroethane (HFC-134a) for % Temperatures From 170 K to 455 K and Pressures up to 70 MPa". J. Phys. % Chem. Ref. Data, Vol. 23, No. 5, 1994. pp. 657--729. diff --git a/src/thermo/ThermoPhase.cpp b/src/thermo/ThermoPhase.cpp index 294cd0dc297..33aed0ad12e 100644 --- a/src/thermo/ThermoPhase.cpp +++ b/src/thermo/ThermoPhase.cpp @@ -135,8 +135,15 @@ void ThermoPhase::setState_TPY(doublereal t, doublereal p, const std::string& y) void ThermoPhase::setState_TP(doublereal t, doublereal p) { - setTemperature(t); - setPressure(p); + double tsave = temperature(); + double dsave = density(); + try { + setTemperature(t); + setPressure(p); + } catch (CanteraError&) { + setState_TR(tsave, dsave); + throw; + } } void ThermoPhase::setState_RPX(doublereal rho, doublereal p, const doublereal* x) diff --git a/src/thermo/WaterPropsIAPWS.cpp b/src/thermo/WaterPropsIAPWS.cpp index 59aacaa68e1..9eee1dfc33d 100644 --- a/src/thermo/WaterPropsIAPWS.cpp +++ b/src/thermo/WaterPropsIAPWS.cpp @@ -78,6 +78,12 @@ doublereal WaterPropsIAPWS::pressure() const doublereal WaterPropsIAPWS::density(doublereal temperature, doublereal pressure, int phase, doublereal rhoguess) { + if (fabs(pressure - P_c) / P_c < 1.e-8 && + fabs(temperature - T_c) / T_c < 1.e-8) { + // Catch critical point, as no solution is found otherwise + setState_TR(temperature, Rho_c); + return Rho_c; + } doublereal deltaGuess = 0.0; if (rhoguess == -1.0) { if (phase != -1) { @@ -108,8 +114,13 @@ doublereal WaterPropsIAPWS::density(doublereal temperature, doublereal pressure, deltaGuess = rhoguess / Rho_c; setState_TR(temperature, rhoguess); doublereal delta_retn = m_phi.dfind(p_red, tau, deltaGuess); + if (delta_retn <= 0) { + // No solution found for first initial guess; perturb initial guess once + // to avoid spurious failures (band-aid fix) + delta_retn = m_phi.dfind(p_red, tau, 0.9 * deltaGuess); + } doublereal density_retn; - if (delta_retn >0.0) { + if (delta_retn > 0.0) { delta = delta_retn; // Dimensionalize the density before returning diff --git a/src/thermo/WaterSSTP.cpp b/src/thermo/WaterSSTP.cpp index a381c01aa87..85926fcfd38 100644 --- a/src/thermo/WaterSSTP.cpp +++ b/src/thermo/WaterSSTP.cpp @@ -44,6 +44,13 @@ WaterSSTP::WaterSSTP(XML_Node& phaseRoot, const std::string& id) : importPhase(phaseRoot, this); } +std::string WaterSSTP::phaseOfMatter() const { + const vector phases = { + "gas", "liquid", "supercritical", "unstable-liquid", "unstable-gas" + }; + return phases[m_sub.phaseState()]; +} + void WaterSSTP::initThermo() { SingleSpeciesTP::initThermo(); @@ -267,14 +274,22 @@ void WaterSSTP::setPressure(doublereal p) { double T = temperature(); double dens = density(); - int waterState = WATER_GAS; - double rc = m_sub.Rhocrit(); - if (dens > rc) { - waterState = WATER_LIQUID; + double pp = m_sub.psat(T); + int waterState = WATER_SUPERCRIT; + if (T < m_sub.Tcrit()) { + if (p >= pp) { + waterState = WATER_LIQUID; + dens = 1000.; + } else if (!m_allowGasPhase) { + throw CanteraError("WaterSSTP::setPressure", + "Model assumes liquid phase; pressure p = {} lies below\n" + "the saturation pressure (P_sat = {}).", p, pp); + } } - doublereal dd = m_sub.density(T, p, waterState, dens); + + double dd = m_sub.density(T, p, waterState, dens); if (dd <= 0.0) { - throw CanteraError("WaterSSTP::setPressure", "error"); + throw CanteraError("WaterSSTP::setPressure", "Error"); } setDensity(dd); } @@ -323,6 +338,11 @@ doublereal WaterSSTP::critDensity() const void WaterSSTP::setTemperature(const doublereal temp) { + if (temp < 273.16) { + throw CanteraError("WaterSSTP::setTemperature", + "Model assumes liquid phase; temperature T = {} lies below\n" + "the triple point temperature (T_triple = 273.16).", temp); + } Phase::setTemperature(temp); m_sub.setState_TR(temp, density()); } diff --git a/src/tpx/HFC134a.h b/src/tpx/HFC134a.h index 498facb4d95..0351279ec51 100644 --- a/src/tpx/HFC134a.h +++ b/src/tpx/HFC134a.h @@ -13,7 +13,7 @@ namespace tpx //! Equation of state for HFC-134a. //! //! Implements the equation of state given in: -//! R. Tillner-Roth and H.D. Baehr. "An International Standard Formulation for +//! R. Tillner-Roth and H. D. Baehr. "An International Standard Formulation for //! The Thermodynamic Properties of 1,1,1,2-Tetrafluoroethane (HFC-134a) for //! Temperatures From 170 K to 455 K and Pressures up to 70 MPa". J. Phys. //! Chem. Ref. Data, Vol. 23, No. 5, 1994. pp. 657--729. diff --git a/test_problems/cathermo/testWaterTP/testWaterSSTP.cpp b/test_problems/cathermo/testWaterTP/testWaterSSTP.cpp index 2e1a433a293..54066c47ee4 100644 --- a/test_problems/cathermo/testWaterTP/testWaterSSTP.cpp +++ b/test_problems/cathermo/testWaterTP/testWaterSSTP.cpp @@ -1,4 +1,5 @@ #include "cantera/thermo/ThermoFactory.h" +#include "cantera/thermo/WaterSSTP.h" #include using namespace std; @@ -20,7 +21,8 @@ int main() #endif double pres; try { - ThermoPhase* w = newPhase("liquid-water.xml"); + ThermoPhase* w = newPhase("liquidvapor.yaml", "liquid-water-IAPWS95"); + (dynamic_cast(w))->_allowGasPhase(true); /* * Print out the triple point conditions