[Thermo] Replace numerical constants for ThermoPhase types with strings

Deprecate ThermoPhase::eosType and related methods
This commit is contained in:
Ray Speth 2016-07-06 12:22:10 -04:00
parent 0de6c01384
commit 0f71bbcec5
60 changed files with 203 additions and 71 deletions

View file

@ -146,7 +146,7 @@ public:
* replacing:
*
* - ThermoPhase::id()
* - ThermoPhase::eosType()
* - ThermoPhase::type()
* - ThermoPhase::nSpecies()
*
* @param tpVector Vector of pointers to ThermoPhase objects. this is the

View file

@ -36,8 +36,10 @@ public:
ConstDensityThermo& operator=(const ConstDensityThermo& right);
virtual ThermoPhase* duplMyselfAsThermoPhase() const;
//! Returns a constant corresponding to this class's equation of state
virtual int eosType() const;
virtual std::string type() const {
return "ConstDensity";
}
virtual doublereal enthalpy_mole() const;
virtual doublereal entropy_mole() const;

View file

@ -591,6 +591,9 @@ public:
//! @{
virtual int eosType() const;
virtual std::string type() const {
return "DebyeHuckel";
}
//! @}
//! @name Molar Thermodynamic Properties of the Solution

View file

@ -39,10 +39,14 @@ public:
EdgePhase& operator=(const EdgePhase& right);
virtual ThermoPhase* duplMyselfAsThermoPhase() const;
//! returns the equation of state type
virtual int eosType() const {
warn_deprecated("EdgePhase::eosType",
"To be removed after Cantera 2.3.");
return cEdge;
}
virtual std::string type() const {
return "Edge";
}
//! Set the Equation-of-State parameters by reading an XML Node Input
/*!

View file

@ -190,8 +190,12 @@ public:
* Equation of state flag.
*
* Returns the value cStoichSubstance, defined in mix_defs.h.
* @deprecated To be removed after Cantera 2.3.
*/
virtual int eosType() const;
virtual std::string type() const {
return "FixedChemPot";
}
//! @}
//! @name Mechanical Equation of State

View file

@ -1216,6 +1216,9 @@ public:
//! @{
virtual int eosType() const;
virtual std::string type() const {
return "HMWSoln";
}
//! @}
//! @name Molar Thermodynamic Properties of the Solution

View file

@ -315,10 +315,16 @@ public:
//! Equation of state flag.
/*!
* Returns the value cIdealGas, defined in mix_defs.h.
* @deprecated To be removed after Cantera 2.3.
*/
virtual int eosType() const {
warn_deprecated("IdealGasPhase::eosType",
"To be removed after Cantera 2.3.");
return cIdealGas;
}
virtual std::string type() const {
return "IdealGas";
}
//! @name Molar Thermodynamic Properties of the Solution
//! @{

View file

@ -114,6 +114,10 @@ public:
*/
IdealMolalSoln(XML_Node& phaseRef, const std::string& id = "");
virtual std::string type() const {
return "IdealMolalSoln";
}
//! @}
//! @name Molar Thermodynamic Properties of the Solution
//! @{

View file

@ -22,6 +22,7 @@ namespace Cantera
/*!
* @name CONSTANTS - Models for the Standard State of IdealSolidSolnPhase's
* @deprecated To be removed after Cantera 2.3.
*/
//@{
const int cIdealSolidSolnPhase0 = 5010;
@ -99,8 +100,12 @@ public:
/**
* Equation of state flag. Returns a value depending upon the value of
* #m_formGC, which is defined at instantiation.
* @deprecated To be removed after Cantera 2.3.
*/
virtual int eosType() const;
virtual std::string type() const {
return "IdealSolidSoln";
}
//! @name Molar Thermodynamic Properties of the Solution
//! @{

View file

@ -21,6 +21,7 @@ namespace Cantera
/*!
* @name CONSTANTS
* Models for the Standard State of an IdealSolnPhase
* @deprecated To be removed after Cantera 2.3.
*/
//@{
const int cIdealSolnGasPhaseG = 6009;
@ -56,6 +57,9 @@ public:
//@{
virtual int eosType() const;
virtual std::string type() const {
return "IdealSolnGas";
}
//! @}
//! @name Molar Thermodynamic Properties

View file

@ -156,6 +156,10 @@ public:
//! @{
virtual int eosType() const;
virtual std::string type() const {
return "IonsFromNeutral";
}
//! @}
//! @name Molar Thermodynamic Properties

View file

@ -253,9 +253,15 @@ public:
LatticePhase(XML_Node& phaseRef, const std::string& id = "");
//! Equation of state flag. Returns the value cLattice
//! @deprecated To be removed after Cantera 2.3.
virtual int eosType() const {
warn_deprecated("LatticePhase::eosType",
"To be removed after Cantera 2.3.");
return cLattice;
}
virtual std::string type() const {
return "Lattice";
}
//! @name Molar Thermodynamic Properties of the Solution
//! @{

View file

@ -115,10 +115,16 @@ public:
//! Equation of state type flag.
/*!
* Returns cLatticeSolid, listed in mix_defs.h.
* @deprecated To be removed after Cantera 2.3.
*/
virtual int eosType() const {
warn_deprecated("LatticeSolidPhase::eosType",
"To be removed after Cantera 2.3.");
return cLatticeSolid;
}
virtual std::string type() const {
return "LatticeSolid";
}
virtual doublereal minTemp(size_t k = npos) const;
virtual doublereal maxTemp(size_t k = npos) const;

View file

@ -246,6 +246,10 @@ public:
MargulesVPSSTP& operator=(const MargulesVPSSTP& b);
virtual ThermoPhase* duplMyselfAsThermoPhase() const;
virtual std::string type() const {
return "Margules";
}
//! @name Molar Thermodynamic Properties
//! @{

View file

@ -35,6 +35,10 @@ public:
MaskellSolidSolnPhase& operator=(const MaskellSolidSolnPhase&);
virtual ThermoPhase* duplMyselfAsThermoPhase() const;
virtual std::string type() const {
return "MaskellSolidsoln";
}
virtual void getActivityConcentrations(doublereal* c) const;
virtual doublereal standardConcentration(size_t k=0) const { return 1.0; }
virtual doublereal logStandardConc(size_t k=0) const { return 0.0; }

View file

@ -44,8 +44,13 @@ public:
// Overloaded methods of class ThermoPhase
virtual int eosType() const {
warn_deprecated("MetalPhase::eosType",
"To be removed after Cantera 2.3.");
return cMetal;
}
virtual std::string type() const {
return "Metal";
}
virtual doublereal enthalpy_mole() const {
return 0.0;

View file

@ -204,8 +204,12 @@ public:
* Equation of state flag.
*
* Returns the value cMetalSHEelectrons, defined in mix_defs.h.
* @deprecated To be removed after Cantera 2.3.
*/
virtual int eosType() const;
virtual std::string type() const {
return "MetalSHEelectrons";
}
//! @name Mechanical Equation of State
//! @{

View file

@ -119,8 +119,12 @@ public:
* Equation of state flag.
*
* Returns the value cStoichSubstance, defined in mix_defs.h.
* @deprecated To be removed after Cantera 2.3.
*/
virtual int eosType() const;
virtual std::string type() const {
return "MineralEQ3";
}
//! @name Mechanical Equation of State
//! @{

View file

@ -238,6 +238,10 @@ public:
MixedSolventElectrolyte& operator=(const MixedSolventElectrolyte& b);
virtual ThermoPhase* duplMyselfAsThermoPhase() const;
virtual std::string type() const {
return "MixedSolventElectrolyte";
}
//! @name Molar Thermodynamic Properties
//! @{

View file

@ -82,6 +82,10 @@ public:
//! @name Utilities
//! @{
virtual std::string type() const {
return "MixtureFugacity";
}
virtual int standardStateConvention() const;
//! Set the solution branch to force the ThermoPhase to exist on one branch

View file

@ -74,6 +74,10 @@ public:
MolarityIonicVPSSTP& operator=(const MolarityIonicVPSSTP& b);
virtual ThermoPhase* duplMyselfAsThermoPhase() const;
virtual std::string type() const {
return "MolarityIonic";
}
/**
* @name Activities, Standard States, and Activity Concentrations
*

View file

@ -335,6 +335,9 @@ public:
//! @{
virtual int eosType() const;
virtual std::string type() const {
return "PhaseCombo_Interaction";
}
//! @}
//! @name Molar Thermodynamic Properties

View file

@ -38,9 +38,15 @@ public:
virtual ThermoPhase* duplMyselfAsThermoPhase() const;
//! Equation of state type
//! @deprecated To be removed after Cantera 2.3.
virtual int eosType() const {
warn_deprecated("PureFluidPhase::eosType",
"To be removed after Cantera 2.3.");
return cPureFluid;
}
virtual std::string type() const {
return "PureFluid";
}
virtual doublereal enthalpy_mole() const;
virtual doublereal intEnergy_mole() const;

View file

@ -247,6 +247,10 @@ public:
RedlichKisterVPSSTP& operator=(const RedlichKisterVPSSTP& b);
virtual ThermoPhase* duplMyselfAsThermoPhase() const;
virtual std::string type() const {
return "RedlichKister";
}
//! @name Molar Thermodynamic Properties
//! @{

View file

@ -50,6 +50,9 @@ public:
virtual ThermoPhase* duplMyselfAsThermoPhase() const;
virtual int eosType() const;
virtual std::string type() const {
return "RedlichKwong";
}
//! @name Molar Thermodynamic properties
//! @{

View file

@ -53,8 +53,13 @@ public:
// Overloaded methods of class ThermoPhase
virtual int eosType() const {
warn_deprecated("SemiconductorPhase::eosType",
"To be removed after Cantera 2.3.");
return cSemiconductor;
}
virtual std::string type() const {
return "Semiconductor";
}
virtual void setPressure(doublereal pres) {
m_press = pres;

View file

@ -68,8 +68,12 @@ public:
* Returns the equation of state type flag. This is a modified base class.
* Therefore, if not overridden in derived classes, this call will throw an
* exception.
* @deprecated To be removed after Cantera 2.3.
*/
virtual int eosType() const;
virtual std::string type() const {
return "SingleSpecies";
}
/**
* @name Molar Thermodynamic Properties of the Solution

View file

@ -179,8 +179,12 @@ public:
* Equation of state flag.
*
* Returns the value cStoichSubstance, defined in mix_defs.h.
* @deprecated To be removed after Cantera 2.3.
*/
virtual int eosType() const;
virtual std::string type() const {
return "StoichSubstance";
}
//! @name Mechanical Equation of State
//! @{

View file

@ -172,10 +172,16 @@ public:
//! Equation of state type flag.
/*!
* Redefine this to return cSurf, listed in mix_defs.h.
* @deprecated To be removed after Cantera 2.3.
*/
virtual int eosType() const {
warn_deprecated("SurfPhase::eosType",
"To be removed after Cantera 2.3.");
return cSurf;
}
virtual std::string type() const {
return "Surf";
}
//! Return the Molar Enthalpy. Units: J/kmol.
/*!

View file

@ -110,6 +110,7 @@ inline ThermoPhase* newThermoPhase(const std::string& model,
* @param ieos eosType id of the phase. This is unique for the phase
* @param length maximum length of the return string. Defaults to 100
* @returns a string representation of the eosType id for a phase
* @deprecated To be removed after Cantera 2.3.
*/
std::string eosTypeString(int ieos, int length = 100);

View file

@ -119,11 +119,21 @@ public:
* The base class returns zero. Subclasses should define this to return a
* unique non-zero value. Constants defined for this purpose are listed in
* mix_defs.h.
* @deprecated To be removed after Cantera 2.3. Use `type()` instead.
*/
virtual int eosType() const {
warn_deprecated("ThermoPhase::eosType",
"To be removed after Cantera 2.3.");
return 0;
}
//! String indicating the thermodynamic model implemented. Usually
//! corresponds to the name of the derived class, less any suffixes such as
//! "Phase", TP", "VPSS", etc.
virtual std::string type() const {
return "ThermoPhase";
}
/**
* Returns the reference pressure in Pa. This function is a wrapper
* that calls the species thermo refPressure function.

View file

@ -137,8 +137,13 @@ public:
explicit WaterSSTP(XML_Node& phaseRef, const std::string& id = "");
virtual int eosType() const {
warn_deprecated("WaterSSTP::eosType",
"To be removed after Cantera 2.3.");
return -1;
}
virtual std::string type() const {
return "Water";
}
//! @name Molar Thermodynamic Properties of the Solution
//! @{

View file

@ -37,6 +37,7 @@ const int cEST_nonpolarNeutral = 5; // Nonpolar neutral species. These
/**
* eosTypes returned for this ThermoPhase Object
* @deprecated To be removed after Cantera 2.3.
*/
const int cHMWSoln0 = 45010;
const int cHMWSoln1 = 45011;
@ -44,6 +45,7 @@ const int cHMWSoln2 = 45012;
/**
* eosTypes returned for this ThermoPhase Object
* @deprecated To be removed after Cantera 2.3.
*/
const int cDebyeHuckel0 = 46010;
const int cDebyeHuckel1 = 46011;

View file

@ -31,6 +31,7 @@ const int cHarmonicOsc = 4;
* listed below. The Cantera Kernel however, will not be know about the class
* and will therefore not be able to initialize the class within its "factory"
* routines.
* @deprecated To be removed after Cantera 2.3.
*/
const int cIdealGas = 1; // IdealGasPhase in IdealGasPhase.h
const int cIncompressible = 2; // ConstDensityThermo in ConstDensityThermo.h

View file

@ -43,10 +43,6 @@ cdef extern from "cantera/base/global.h" namespace "Cantera":
cdef void Cxx_make_deprecation_warnings_fatal "Cantera::make_deprecation_warnings_fatal" ()
cdef extern from "cantera/thermo/mix_defs.h":
cdef int thermo_type_ideal_gas "Cantera::cIdealGas"
cdef int thermo_type_surf "Cantera::cSurf"
cdef int thermo_type_edge "Cantera::cEdge"
cdef int kinetics_type_gas "Cantera::cGasKinetics"
cdef int kinetics_type_interface "Cantera::cInterfaceKinetics"
cdef int kinetics_type_edge "Cantera::cEdgeKinetics"
@ -108,7 +104,7 @@ cdef extern from "cantera/thermo/ThermoPhase.h" namespace "Cantera":
CxxThermoPhase()
# miscellaneous
int eosType()
string type()
string report(cbool, double) except +
string name()
void setName(string)

View file

@ -466,7 +466,7 @@ cdef class _FlowBase(Domain1D):
cdef CxxIdealGasPhase* getIdealGasPhase(ThermoPhase phase) except *:
if phase.thermo.eosType() != thermo_type_ideal_gas:
if pystr(phase.thermo.type()) != "IdealGas":
raise TypeError('ThermoPhase object is not an IdealGasPhase')
return <CxxIdealGasPhase*>(phase.thermo)

View file

@ -1219,7 +1219,7 @@ cdef class ThermoPhase(_SolutionBase):
cdef class InterfacePhase(ThermoPhase):
""" A class representing a surface or edge phase"""
def __cinit__(self, *args, **kwargs):
if self.thermo.eosType() not in (thermo_type_surf, thermo_type_edge):
if pystr(self.thermo.type()) not in ("Surf", "Edge"):
raise TypeError('Underlying ThermoPhase object is of the wrong type.')
self.surf = <CxxSurfPhase*>(self.thermo)

View file

@ -715,8 +715,8 @@ int vcs_Cantera_to_vprob(MultiPhase* mphase, VCS_PROB* vprob)
size_t nelem = tPhase->nElements();
// Query Cantera for the equation of state type of the current phase.
int eos = tPhase->eosType();
bool gasPhase = (eos == cIdealGas);
std::string eos = tPhase->type();
bool gasPhase = (eos == "IdealGas");
// Find out the number of species in the phase
size_t nSpPhase = tPhase->nSpecies();
@ -747,36 +747,22 @@ int vcs_Cantera_to_vprob(MultiPhase* mphase, VCS_PROB* vprob)
VolPhase->p_activityConvention = tPhase->activityConvention();
// Assign the value of eqn of state. Handle conflicts here.
switch (eos) {
case cIdealGas:
if (eos == "IdealGas") {
VolPhase->m_eqnState = VCS_EOS_IDEAL_GAS;
break;
case cIncompressible:
} else if (eos == "ConstDensity") {
VolPhase->m_eqnState = VCS_EOS_CONSTANT;
break;
case cSurf:
throw CanteraError("VCSnonideal", "cSurf not handled yet.");
case cStoichSubstance:
} else if (eos == "StoichSubstance") {
VolPhase->m_eqnState = VCS_EOS_STOICH_SUB;
break;
case cPureFluid:
if (printLvl > 1) {
plogf("cPureFluid not recognized yet by VCSnonideal\n");
}
break;
case cEdge:
throw CanteraError("VCSnonideal", "cEdge not handled yet.");
case cIdealSolidSolnPhase0:
case cIdealSolidSolnPhase1:
case cIdealSolidSolnPhase2:
} else if (eos == "IdealSolidSoln") {
VolPhase->m_eqnState = VCS_EOS_IDEAL_SOLN;
break;
default:
} else if (eos == "Surf" || eos == "Edge") {
throw CanteraError("VCSnonideal",
"Surface/edge phase not handled yet.");
} else {
if (printLvl > 1) {
plogf("Unknown Cantera EOS to VCSnonideal: %d\n", eos);
writelog("Unknown Cantera EOS to VCSnonideal: '{}'\n", eos);
}
VolPhase->m_eqnState = VCS_EOS_UNK_CANTERA;
break;
}
// Transfer all of the element information from the ThermoPhase object

View file

@ -731,21 +731,13 @@ void vcs_VolPhase::setPtrThermoPhase(ThermoPhase* tp_ptr)
if (nsp == 1) {
m_isIdealSoln = true;
} else {
int eos = TP_ptr->eosType();
switch (eos) {
case cIdealGas:
case cIncompressible:
case cSurf:
case cMetal:
case cStoichSubstance:
case cSemiconductor:
case cLatticeSolid:
case cLattice:
case cEdge:
case cIdealSolidSolnPhase:
std::string eos = TP_ptr->type();
if (eos == "IdealGas" || eos == "ConstDensity" || eos == "Surf"
|| eos == "Metal" || eos == "StoichSubstance"
|| eos == "Semiconductor" || eos == "LatticeSolid"
|| eos == "Lattice" || eos == "Edge" || eos == "IdealSolidSoln") {
m_isIdealSoln = true;
break;
default:
} else {
m_isIdealSoln = false;
};
}

View file

@ -132,9 +132,9 @@ void Kinetics::assignShallowPointers(const std::vector<thermo_t*> & tpVector)
throw CanteraError(" Kinetics::assignShallowPointers",
" id() of the ThermoPhase objects isn't the same");
}
if (ntp->eosType() != otp->eosType()) {
if (ntp->type() != otp->type()) {
throw CanteraError(" Kinetics::assignShallowPointers",
" eosType() of the ThermoPhase objects isn't the same");
" type() of the ThermoPhase objects isn't the same");
}
if (ntp->nSpecies() != otp->nSpecies()) {
throw CanteraError(" Kinetics::assignShallowPointers",
@ -485,13 +485,13 @@ void Kinetics::addPhase(thermo_t& thermo)
}
// there should only be one surface phase
int ptype = -100;
string ptype;
if (type() == cEdgeKinetics) {
ptype = cEdge;
ptype = "Edge";
} else if (type() == cInterfaceKinetics) {
ptype = cSurf;
ptype = "Surf";
}
if (thermo.eosType() == ptype) {
if (thermo.type() == ptype) {
m_surfphase = nPhases();
m_rxnphase = nPhases();
}

View file

@ -40,6 +40,8 @@ ThermoPhase* ConstDensityThermo::duplMyselfAsThermoPhase() const
int ConstDensityThermo::eosType() const
{
warn_deprecated("ConstDensityThermo::eosType",
"To be removed after Cantera 2.3.");
return cIncompressible;
}

View file

@ -141,6 +141,8 @@ ThermoPhase* DebyeHuckel::duplMyselfAsThermoPhase() const
int DebyeHuckel::eosType() const
{
warn_deprecated("DebyeHuckel::eosType",
"To be removed after Cantera 2.3.");
int res;
switch (m_formGC) {
case 0:

View file

@ -100,6 +100,8 @@ ThermoPhase* FixedChemPotSSTP::duplMyselfAsThermoPhase() const
int FixedChemPotSSTP::eosType() const
{
warn_deprecated("FixedChemPotSSTP::eosType",
"To be removed after Cantera 2.3.");
return cFixedChemPot;
}

View file

@ -373,6 +373,8 @@ ThermoPhase* HMWSoln::duplMyselfAsThermoPhase() const
int HMWSoln::eosType() const
{
warn_deprecated("HMWSoln::eosType",
"To be removed after Cantera 2.3.");
int res;
switch (m_formGC) {
case 0:

View file

@ -90,6 +90,8 @@ ThermoPhase* IdealSolidSolnPhase::duplMyselfAsThermoPhase() const
int IdealSolidSolnPhase::eosType() const
{
warn_deprecated("EdgePhase::IdealSolidSolnPhase",
"To be removed after Cantera 2.3.");
integer res;
switch (m_formGC) {
case 0:

View file

@ -73,6 +73,8 @@ ThermoPhase* IdealSolnGasVPSS::duplMyselfAsThermoPhase() const
int IdealSolnGasVPSS::eosType() const
{
warn_deprecated("EdgePhase::IdealSolnGasVPSS",
"To be removed after Cantera 2.3.");
if (m_idealGas) {
return cIdealSolnGasVPSS;
}

View file

@ -164,6 +164,8 @@ void IonsFromNeutralVPSSTP::constructPhaseXML(XML_Node& phaseNode, std::string i
int IonsFromNeutralVPSSTP::eosType() const
{
warn_deprecated("IonsFromNeutralVPSSTP::eosType",
"To be removed after Cantera 2.3.");
return cIonsFromNeutral;
}

View file

@ -59,6 +59,8 @@ ThermoPhase* MetalSHEelectrons::duplMyselfAsThermoPhase() const
int MetalSHEelectrons::eosType() const
{
warn_deprecated("MetalSHEelectrons::eosType",
"To be removed after Cantera 2.3.");
return cMetalSHEelectrons;
}

View file

@ -68,6 +68,8 @@ ThermoPhase* MineralEQ3::duplMyselfAsThermoPhase() const
int MineralEQ3::eosType() const
{
warn_deprecated("MineralEQ3::eosType",
"To be removed after Cantera 2.3.");
return cStoichSubstance;
}

View file

@ -84,6 +84,8 @@ ThermoPhase* PhaseCombo_Interaction::duplMyselfAsThermoPhase() const
int PhaseCombo_Interaction::eosType() const
{
warn_deprecated("PhaseCombo_Interaction::eosType",
"To be removed after Cantera 2.3.");
return cPhaseCombo_Interaction;
}

View file

@ -112,6 +112,8 @@ ThermoPhase* RedlichKwongMFTP::duplMyselfAsThermoPhase() const
int RedlichKwongMFTP::eosType() const
{
warn_deprecated("RedlichKwongMFTP::eosType",
"To be removed after Cantera 2.3.");
return cRedlichKwongMFTP;
}

View file

@ -51,6 +51,8 @@ ThermoPhase* SingleSpeciesTP::duplMyselfAsThermoPhase() const
int SingleSpeciesTP::eosType() const
{
warn_deprecated("SingleSpeciesTP::eosType",
"To be removed after Cantera 2.3.");
throw NotImplementedError("SingleSpeciesTP::eosType");
}

View file

@ -55,6 +55,8 @@ ThermoPhase* StoichSubstance::duplMyselfAsThermoPhase() const
int StoichSubstance::eosType() const
{
warn_deprecated("StoichSubstance::eosType",
"To be removed after Cantera 2.3.");
return cStoichSubstance;
}

View file

@ -114,6 +114,7 @@ ThermoPhase* ThermoFactory::newThermoPhase(const std::string& model)
std::string eosTypeString(int ieos, int length)
{
warn_deprecated("eosTypeString", "To be removed after Cantera 2.3.");
for (int n = 0; n < ntypes; n++) {
if (_itypes[n] == ieos) {
return _types[n];

View file

@ -265,13 +265,6 @@ VPSSMgr* VPSSMgrFactory::newVPSSMgr(VPStandardStateTP* vp_ptr,
return create(vpssManager, vp_ptr, spth);
}
// Handle special cases based on the VPStandardState types
if (vp_ptr->eosType() == cVPSS_IdealGas) {
return new VPSSMgr_IdealGas(vp_ptr, spth);
} else if (vp_ptr->eosType() == cVPSS_ConstVol) {
return new VPSSMgr_ConstVol(vp_ptr, spth);
}
int inasaIG = 0, inasaCV = 0, ishomateIG = 0, ishomateCV = 0,
isimpleIG = 0, isimpleCV = 0, iwater = 0, itpx = 0, iother = 0;
int ihptx = 0;

View file

@ -14,7 +14,7 @@ void IdealGasConstPressureReactor::setThermoMgr(ThermoPhase& thermo)
{
//! @TODO: Add a method to ThermoPhase that indicates whether a given
//! subclass is compatible with this reactor model
if (thermo.eosType() != cIdealGas) {
if (thermo.type() != "IdealGas") {
throw CanteraError("IdealGasReactor::setThermoMgr",
"Incompatible phase type provided");
}

View file

@ -13,7 +13,7 @@ void IdealGasReactor::setThermoMgr(ThermoPhase& thermo)
{
//! @TODO: Add a method to ThermoPhase that indicates whether a given
//! subclass is compatible with this reactor model
if (thermo.eosType() != cIdealGas) {
if (thermo.type() != "IdealGas") {
throw CanteraError("IdealGasReactor::setThermoMgr",
"Incompatible phase type provided");
}

View file

@ -3,9 +3,9 @@ Number of elements = 3
dg_corr = -1.57754e+08
um_li_chempot = -1.65555e+08
Trying VCS equilibrium solver
Unknown Cantera EOS to VCSnonideal: 0
Unknown Cantera EOS to VCSnonideal: 20
Unknown Cantera EOS to VCSnonideal: 70
Unknown Cantera EOS to VCSnonideal: 'Margules'
Unknown Cantera EOS to VCSnonideal: 'LatticeSolid'
Unknown Cantera EOS to VCSnonideal: 'FixedChemPot'
================================================================================
================ Cantera_to_vprob: START OF PROBLEM STATEMENT ====================

View file

@ -3,14 +3,14 @@ Number of elements = 3
dg_corr = -1.57754e+08
um_li_chempot = -1.65555e+08
Trying VCS equilibrium solver
Unknown Cantera EOS to VCSnonideal: 0
Unknown Cantera EOS to VCSnonideal: 'Margules'
vcs_Cantera_convert: Species Type 8 not known
vcs_Cantera_convert: Species Type 8 not known
Unknown Cantera EOS to VCSnonideal: 20
Unknown Cantera EOS to VCSnonideal: 'LatticeSolid'
vcs_Cantera_convert: Species Type 8 not known
vcs_Cantera_convert: Species Type 1 not known
vcs_Cantera_convert: Species Type 1 not known
Unknown Cantera EOS to VCSnonideal: 70
Unknown Cantera EOS to VCSnonideal: 'FixedChemPot'
vcs_Cantera_convert: Species Type 1 not known
================================================================================

View file

@ -1,5 +1,5 @@
Trying VCS equilibrium solver
Unknown Cantera EOS to VCSnonideal: 45012
Unknown Cantera EOS to VCSnonideal: 'HMWSoln'
================================================================================
================ Cantera_to_vprob: START OF PROBLEM STATEMENT ====================