diff --git a/include/cantera/thermo/SpeciesThermoFactory.h b/include/cantera/thermo/SpeciesThermoFactory.h index 80fb0e05d..4fe41382f 100644 --- a/include/cantera/thermo/SpeciesThermoFactory.h +++ b/include/cantera/thermo/SpeciesThermoFactory.h @@ -157,6 +157,9 @@ public: * @param spthermo_ptr Species reference state thermo manager * @param phaseNode_ptr Optional Pointer to the XML phase information for * the phase in which the species resides + * @deprecated To be removed after Cantera 2.2. Use the alternate form + * which omits the unused arguments 'vpss_ptr' and + * 'spthermo_ptr'. */ void installVPThermoForSpecies(size_t k, const XML_Node& speciesNode, VPStandardStateTP* vp_ptr, @@ -164,6 +167,26 @@ public: SpeciesThermo* spthermo_ptr, const XML_Node* phaseNode_ptr) const; + //! Install a species thermodynamic property parameterization for the + //! standard state for one species into a species thermo manager, VPSSMgr + /*! + * This is a wrapper around the createInstallVPSS() function in the + * VPStandardStateTP object. + * + * This serves to install the species into vpss_ptr, create a PDSS file. We + * also read the xml database to extract the constants for these steps. + * + * @param k species number + * @param speciesNode Reference to the XML node specifying the species + * standard state information + * @param vp_ptr variable pressure ThermoPhase object + * @param phaseNode_ptr Optional Pointer to the XML phase information for + * the phase in which the species resides + */ + void installVPThermoForSpecies(size_t k, const XML_Node& speciesNode, + VPStandardStateTP* vp_ptr, + const XML_Node* phaseNode_ptr) const; + private: //! Pointer to the sole instance of this class, which is static diff --git a/src/thermo/SpeciesThermoFactory.cpp b/src/thermo/SpeciesThermoFactory.cpp index 89ff0ca5d..85799d793 100644 --- a/src/thermo/SpeciesThermoFactory.cpp +++ b/src/thermo/SpeciesThermoFactory.cpp @@ -755,7 +755,9 @@ void SpeciesThermoFactory::installVPThermoForSpecies(size_t k, SpeciesThermo* spthermo_ptr, const XML_Node* phaseNode_ptr) const { - + warn_deprecated("SpeciesThermoFactory::installVPThermoForSpecies", + "Use alternate overload without unused VPSSMgr* and " + "SpeciesThermo* arguments."); // Call the VPStandardStateTP object to install the pressure dependent species // standard state into the object. // @@ -767,6 +769,15 @@ void SpeciesThermoFactory::installVPThermoForSpecies(size_t k, vp_ptr->createInstallPDSS(k, speciesNode, phaseNode_ptr); } +void SpeciesThermoFactory::installVPThermoForSpecies(size_t k, + const XML_Node& speciesNode, VPStandardStateTP* vp_ptr, + const XML_Node* phaseNode_ptr) const +{ + // Call the VPStandardStateTP object to install the pressure dependent + // species standard state into the object. + vp_ptr->createInstallPDSS(k, speciesNode, phaseNode_ptr); +} + SpeciesThermo* newSpeciesThermoMgr(int type, SpeciesThermoFactory* f) { if (f == 0) { diff --git a/src/thermo/ThermoFactory.cpp b/src/thermo/ThermoFactory.cpp index b79db0b12..fe36838f7 100644 --- a/src/thermo/ThermoFactory.cpp +++ b/src/thermo/ThermoFactory.cpp @@ -655,8 +655,7 @@ bool installSpecies(size_t k, const XML_Node& s, thermo_t& th, if (vpss_ptr) { VPStandardStateTP* vp_ptr = dynamic_cast(&th); - factory->installVPThermoForSpecies(k, s, vp_ptr, vpss_ptr, spthermo_ptr, - phaseNode_ptr); + factory->installVPThermoForSpecies(k, s, vp_ptr, phaseNode_ptr); } else { // install the thermo parameterization for this species into // the species thermo manager for phase th