diff --git a/include/cantera/thermo/WaterSSTP.h b/include/cantera/thermo/WaterSSTP.h index bb56f3a6e..30de4cbf4 100644 --- a/include/cantera/thermo/WaterSSTP.h +++ b/include/cantera/thermo/WaterSSTP.h @@ -65,9 +65,14 @@ class WaterProps; * * ## Instantiation of the Class * - * The constructor for this phase is NOT located in the default ThermoFactory - * for %Cantera. However, a new WaterSSTP object may be created by the following - * code snippets, combined with an XML file given in the XML example section. + * A new WaterSSTP object may be created by the following code snippets, + * combined with an XML file given in the XML example section. + * + * @code + * ThermoPhase* w = newPhase("waterSSTPphase.xml"); + * @endcode + * + * or * * @code * WaterSSTP *w = new WaterSSTP("waterSSTPphase.xml",""); diff --git a/src/thermo/ThermoFactory.cpp b/src/thermo/ThermoFactory.cpp index f09dfb8c8..bb85636b1 100644 --- a/src/thermo/ThermoFactory.cpp +++ b/src/thermo/ThermoFactory.cpp @@ -39,6 +39,7 @@ #include "cantera/thermo/IdealMolalSoln.h" #include "cantera/thermo/MolarityIonicVPSSTP.h" #include "cantera/thermo/IdealSolnGasVPSS.h" +#include "cantera/thermo/WaterSSTP.h" #include "cantera/base/stringUtils.h" using namespace std; @@ -77,6 +78,7 @@ ThermoFactory::ThermoFactory() reg("RedlichKwong", []() { return new RedlichKwongMFTP(); }); m_synonyms["RedlichKwongMFTP"] = "RedlichKwong"; reg("MaskellSolidSolnPhase", []() { return new MaskellSolidSolnPhase(); }); + reg("PureLiquidWater", []() { return new WaterSSTP(); }); } ThermoPhase* ThermoFactory::newThermoPhase(const std::string& model) diff --git a/test_problems/cathermo/testWaterTP/testWaterSSTP.cpp b/test_problems/cathermo/testWaterTP/testWaterSSTP.cpp index 1f5673611..cc1dd8bee 100644 --- a/test_problems/cathermo/testWaterTP/testWaterSSTP.cpp +++ b/test_problems/cathermo/testWaterTP/testWaterSSTP.cpp @@ -1,4 +1,4 @@ -#include "cantera/thermo/WaterSSTP.h" +#include "cantera/thermo/ThermoFactory.h" #include using namespace std; @@ -20,7 +20,7 @@ int main() #endif double pres; try { - WaterSSTP* w = new WaterSSTP("waterTPphase.xml", "water"); + ThermoPhase* w = newPhase("waterTPphase.xml"); /* * Print out the triple point conditions diff --git a/test_problems/cathermo/wtWater/wtWater.cpp b/test_problems/cathermo/wtWater/wtWater.cpp index 8c21ca3fd..1cdd18437 100644 --- a/test_problems/cathermo/wtWater/wtWater.cpp +++ b/test_problems/cathermo/wtWater/wtWater.cpp @@ -1,5 +1,5 @@ -#include "cantera/thermo/WaterSSTP.h" +#include "cantera/thermo/ThermoFactory.h" #include "cantera/transport/WaterTransport.h" #include @@ -20,7 +20,7 @@ int main() { try { double lambda; - WaterSSTP* w = new WaterSSTP("waterTPphase.xml", ""); + ThermoPhase* w = newPhase("waterTPphase.xml"); WaterTransport* wtTran = new WaterTransport(w, 3); printf("------------------------------------------------------------------------------------\n");