From 2e50b8a929eeb43c8399cfb9748ad9935b2daa07 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Thu, 18 Nov 2010 03:09:45 +0000 Subject: [PATCH] Fixed an error. The m_speciesData XML tree wasn't being created. I created one in the constructor. --- Cantera/src/thermo/FixedChemPotSSTP.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Cantera/src/thermo/FixedChemPotSSTP.cpp b/Cantera/src/thermo/FixedChemPotSSTP.cpp index e9d565e82..0f845b1f6 100644 --- a/Cantera/src/thermo/FixedChemPotSSTP.cpp +++ b/Cantera/src/thermo/FixedChemPotSSTP.cpp @@ -127,6 +127,23 @@ namespace Cantera { m_p0 = OneAtm; m_tlast = 298.15; setChemicalPotential(val); + + // Create an XML_Node entry for this species + XML_Node *s = new XML_Node("species", 0); + s->addAttribute("name", pname); + std::string aaS = Ename + ":1"; + s->addChild("atomArray", aaS); + XML_Node &tt = s->addChild("thermo"); + XML_Node &ss = tt.addChild("Simple"); + ss.addAttribute("Pref", "1 bar"); + ss.addAttribute("Tmax", "5000."); + ss.addAttribute("Tmin", "100."); + ss.addChild("t0", "298.15"); + ss.addChild("cp0", "0.0"); + std::string sval = fp2str(val); + ss.addChild("h", sval); + ss.addChild("s", "0.0"); + saveSpeciesData(0, s); } //====================================================================================================================