diff --git a/include/cantera/thermo/ConstDensityThermo.h b/include/cantera/thermo/ConstDensityThermo.h index 109af837a..2c59a9a0c 100644 --- a/include/cantera/thermo/ConstDensityThermo.h +++ b/include/cantera/thermo/ConstDensityThermo.h @@ -48,9 +48,6 @@ class ConstDensityThermo : public ThermoPhase public: //! Constructor. - /*! - * - */ ConstDensityThermo(); //! Destructor @@ -79,18 +76,12 @@ public: //! overloaded methods of class ThermoPhase virtual int eosType() const; - //! Return the Molar Enthalpy. Units: J/kmol. - /*! - * - */ - /// Molar enthalpy. Units: J/kmol. virtual doublereal enthalpy_mole() const; /// Molar internal energy. Units: J/kmol. virtual doublereal intEnergy_mole() const; - /// Molar entropy. Units: J/kmol/K. virtual doublereal entropy_mole() const; @@ -371,32 +362,6 @@ public: virtual void setParametersFromXML(const XML_Node& eosdata); protected: - - //! number of elements - size_t m_mm; - - - //! Minimum temperature for valid species standard state thermo props - /*! - * This is the minimum temperature at which all species have valid standard - * state thermo props defined. - */ - doublereal m_tmin; - - //! Maximum temperature for valid species standard state thermo props - /*! - * This is the maximum temperature at which all species have valid standard - * state thermo props defined. - */ - doublereal m_tmax; - - //! Reference state pressure - /*! - * Value of the reference state pressure in Pascals. - * All species must have the same reference state pressure. - */ - doublereal m_p0; - //! last value of the temperature processed by reference state mutable doublereal m_tlast; diff --git a/include/cantera/thermo/IdealGasPhase.h b/include/cantera/thermo/IdealGasPhase.h index 4f91088ff..2d15b9abb 100644 --- a/include/cantera/thermo/IdealGasPhase.h +++ b/include/cantera/thermo/IdealGasPhase.h @@ -913,27 +913,6 @@ public: //@} protected: - - //! Number of Elements in the phase - /*! - * This member is defined here, from a call to the Elements object, for speed. - */ - size_t m_mm; - - //! Minimum temperature for valid species standard state thermo props - /*! - * This is the minimum temperature at which all species have valid standard - * state thermo props defined. - */ - doublereal m_tmin; - - //! Maximum temperature for valid species standard state thermo props - /*! - * This is the maximum temperature at which all species have valid standard - * state thermo props defined. - */ - doublereal m_tmax; - //! Reference state pressure /*! * Value of the reference state pressure in Pascals. diff --git a/include/cantera/thermo/IdealSolidSolnPhase.h b/include/cantera/thermo/IdealSolidSolnPhase.h index 9ee18cf18..4f24aff6f 100644 --- a/include/cantera/thermo/IdealSolidSolnPhase.h +++ b/include/cantera/thermo/IdealSolidSolnPhase.h @@ -965,23 +965,7 @@ protected: * 2 = C_k = X_k / V_N */ int m_formGC; - /** - * m_mm = Number of distinct elements defined in species in this - * phase - */ - size_t m_mm; - /** - * Maximum temperature that this phase can accurately describe - * the thermodynamics. - */ - doublereal m_tmin; - - /** - * Minimum temperature that this phase can accurately describe - * the thermodynamics. - */ - doublereal m_tmax; /** * Value of the reference pressure for all species in this phase. * The T dependent polynomials are evaluated at the reference diff --git a/include/cantera/thermo/LatticePhase.h b/include/cantera/thermo/LatticePhase.h index 7da310b31..eae389309 100644 --- a/include/cantera/thermo/LatticePhase.h +++ b/include/cantera/thermo/LatticePhase.h @@ -926,29 +926,9 @@ public: //@} protected: - - - //! Number of elements - size_t m_mm; - - //! Minimum temperature for valid species standard state thermo props - /*! - * This is the minimum temperature at which all species have valid standard - * state thermo props defined. - */ - doublereal m_tmin; - - //! Maximum temperature for valid species standard state thermo props - /*! - * This is the maximum temperature at which all species have valid standard - * state thermo props defined. - */ - doublereal m_tmax; - //! Reference state pressure doublereal m_Pref; - //! The current pressure /*! * Since the density isn't a function of pressure, but only of the diff --git a/include/cantera/thermo/LatticeSolidPhase.h b/include/cantera/thermo/LatticeSolidPhase.h index 6d19159db..5511070e7 100644 --- a/include/cantera/thermo/LatticeSolidPhase.h +++ b/include/cantera/thermo/LatticeSolidPhase.h @@ -666,10 +666,6 @@ private: doublereal err(const std::string& msg) const; protected: - - //! Number of elements - size_t m_mm; - //! Last temperature at which the reference thermo was calculated mutable doublereal m_tlast; diff --git a/include/cantera/thermo/SingleSpeciesTP.h b/include/cantera/thermo/SingleSpeciesTP.h index e6a99ff2b..dc53012e6 100644 --- a/include/cantera/thermo/SingleSpeciesTP.h +++ b/include/cantera/thermo/SingleSpeciesTP.h @@ -717,12 +717,6 @@ public: protected: - - //! Lower value of the temperature for which reference thermo is valid - doublereal m_tmin; - //! Upper value of the temperature for which reference thermo is valid - doublereal m_tmax; - //! The current pressure of the solution (Pa) /*! * It gets initialized to 1 atm. diff --git a/include/cantera/thermo/StoichSubstance.h b/include/cantera/thermo/StoichSubstance.h index e57d3e660..e33d10e64 100644 --- a/include/cantera/thermo/StoichSubstance.h +++ b/include/cantera/thermo/StoichSubstance.h @@ -389,10 +389,6 @@ public: virtual void setParametersFromXML(const XML_Node& eosdata); protected: - - size_t m_kk; - doublereal m_tmin; - doublereal m_tmax; doublereal m_press; doublereal m_p0; diff --git a/include/cantera/thermo/SurfPhase.h b/include/cantera/thermo/SurfPhase.h index 99bac2b48..fd77d7f3b 100644 --- a/include/cantera/thermo/SurfPhase.h +++ b/include/cantera/thermo/SurfPhase.h @@ -621,20 +621,6 @@ protected: //! log of the surface site density doublereal m_logn0; - //! Minimum temperature for valid species standard state thermo props - /*! - * This is the minimum temperature at which all species have valid standard - * state thermo props defined. - */ - doublereal m_tmin; - - //! Maximum temperature for valid species standard state thermo props - /*! - * This is the maximum temperature at which all species have valid standard - * state thermo props defined. - */ - doublereal m_tmax; - //! Current value of the pressure (Pa) doublereal m_press; diff --git a/src/thermo/ConstDensityThermo.cpp b/src/thermo/ConstDensityThermo.cpp index 3624db0c5..257f567ce 100644 --- a/src/thermo/ConstDensityThermo.cpp +++ b/src/thermo/ConstDensityThermo.cpp @@ -35,10 +35,6 @@ ConstDensityThermo& ConstDensityThermo::operator=(const ConstDensityThermo& righ return *this; } - m_mm = right.m_mm; - m_tmin = right.m_tmin; - m_tmax = right.m_tmax; - m_p0 = right.m_p0; m_tlast = right.m_tlast; m_h0_RT = right.m_h0_RT; m_cp0_R = right.m_cp0_R; @@ -152,17 +148,6 @@ void ConstDensityThermo::getStandardChemPotentials(doublereal* mu0) const void ConstDensityThermo::initThermo() { m_kk = nSpecies(); - m_mm = nElements(); - doublereal tmin = m_spthermo->minTemp(); - doublereal tmax = m_spthermo->maxTemp(); - if (tmin > 0.0) { - m_tmin = tmin; - } - if (tmax > 0.0) { - m_tmax = tmax; - } - m_p0 = refPressure(); - m_h0_RT.resize(m_kk); m_g0_RT.resize(m_kk); m_cp0_R.resize(m_kk); diff --git a/src/thermo/IdealGasPhase.cpp b/src/thermo/IdealGasPhase.cpp index c47ce50f2..624b6b767 100644 --- a/src/thermo/IdealGasPhase.cpp +++ b/src/thermo/IdealGasPhase.cpp @@ -16,9 +16,6 @@ namespace Cantera { // Default empty Constructor IdealGasPhase::IdealGasPhase(): - m_mm(0), - m_tmin(0.0), - m_tmax(0.0), m_p0(-1.0), m_tlast(0.0), m_logc0(0.0) @@ -27,9 +24,6 @@ IdealGasPhase::IdealGasPhase(): // Copy Constructor IdealGasPhase::IdealGasPhase(const IdealGasPhase& right): - m_mm(right.m_mm), - m_tmin(right.m_tmin), - m_tmax(right.m_tmax), m_p0(right.m_p0), m_tlast(right.m_tlast), m_logc0(right.m_logc0) @@ -54,9 +48,6 @@ operator=(const IdealGasPhase& right) { if (&right != this) { ThermoPhase::operator=(right); - m_mm = right.m_mm; - m_tmin = right.m_tmin; - m_tmax = right.m_tmax; m_p0 = right.m_p0; m_tlast = right.m_tlast; m_logc0 = right.m_logc0; @@ -557,18 +548,7 @@ void IdealGasPhase::getStandardVolumes_ref(doublereal* vol) const void IdealGasPhase::initThermo() { - - m_mm = nElements(); - doublereal tmin = m_spthermo->minTemp(); - doublereal tmax = m_spthermo->maxTemp(); - if (tmin > 0.0) { - m_tmin = tmin; - } - if (tmax > 0.0) { - m_tmax = tmax; - } m_p0 = refPressure(); - m_h0_RT.resize(m_kk); m_g0_RT.resize(m_kk); m_expg0_RT.resize(m_kk); diff --git a/src/thermo/IdealSolidSolnPhase.cpp b/src/thermo/IdealSolidSolnPhase.cpp index e641f6337..655434aa1 100644 --- a/src/thermo/IdealSolidSolnPhase.cpp +++ b/src/thermo/IdealSolidSolnPhase.cpp @@ -29,9 +29,6 @@ namespace Cantera IdealSolidSolnPhase::IdealSolidSolnPhase(int formGC) : ThermoPhase(), m_formGC(formGC), - m_mm(0), - m_tmin(0.0), - m_tmax(1000000.), m_Pref(OneAtm), m_Pcurrent(OneAtm), m_tlast(0.0) @@ -47,9 +44,6 @@ IdealSolidSolnPhase::IdealSolidSolnPhase(const std::string& inputFile, int formGC) : ThermoPhase(), m_formGC(formGC), - m_mm(0), - m_tmin(0.0), - m_tmax(1000000.), m_Pref(OneAtm), m_Pcurrent(OneAtm), m_tlast(0.0) @@ -65,9 +59,6 @@ IdealSolidSolnPhase::IdealSolidSolnPhase(XML_Node& root, const std::string& id, int formGC) : ThermoPhase(), m_formGC(formGC), - m_mm(0), - m_tmin(0.0), - m_tmax(1000000.), m_Pref(OneAtm), m_Pcurrent(OneAtm), m_tlast(0.0) @@ -92,9 +83,6 @@ operator=(const IdealSolidSolnPhase& b) //ThermoPhase::operator=(b); // m_spthermo = dupMyselfAsSpeciesThermo(b.m_spthermo); m_formGC = b.m_formGC; - m_mm = b.m_mm; - m_tmin = b.m_tmin; - m_tmax = b.m_tmax; m_Pref = b.m_Pref; m_Pcurrent = b.m_Pcurrent; m_speciesMolarVolume = b.m_speciesMolarVolume; @@ -1185,22 +1173,6 @@ void IdealSolidSolnPhase::initThermoXML(XML_Node& phaseNode, const std::string& void IdealSolidSolnPhase:: initLengths() { - m_kk = nSpecies(); - m_mm = nElements(); - - /* - * Obtain the limits of the temperature from the species - * thermo handler's limits. - */ - doublereal tmin = m_spthermo->minTemp(); - doublereal tmax = m_spthermo->maxTemp(); - if (tmin > 0.0) { - m_tmin = tmin; - } - if (tmax > 0.0) { - m_tmax = tmax; - } - /* * Obtain the reference pressure by calling the ThermoPhase * function refPressure, which in turn calls the @@ -1237,7 +1209,7 @@ setToEquilState(const doublereal* lambda_RT) doublereal pres = 0.0; for (size_t k = 0; k < m_kk; k++) { m_pp[k] = -grt[k]; - for (size_t m = 0; m < m_mm; m++) { + for (size_t m = 0; m < nElements(); m++) { m_pp[k] += nAtoms(k,m)*lambda_RT[m]; } m_pp[k] = m_Pref * exp(m_pp[k]); diff --git a/src/thermo/LatticePhase.cpp b/src/thermo/LatticePhase.cpp index 25cb58e95..c8d4edfc5 100644 --- a/src/thermo/LatticePhase.cpp +++ b/src/thermo/LatticePhase.cpp @@ -23,9 +23,6 @@ namespace Cantera // Base Empty constructor LatticePhase::LatticePhase() : - m_mm(0), - m_tmin(0.0), - m_tmax(0.0), m_Pref(OneAtm), m_Pcurrent(OneAtm), m_tlast(0.0), @@ -39,9 +36,6 @@ LatticePhase::LatticePhase() : * @param right Object to be copied */ LatticePhase::LatticePhase(const LatticePhase& right) : - m_mm(0), - m_tmin(0.0), - m_tmax(0.0), m_Pref(OneAtm), m_Pcurrent(OneAtm), m_tlast(0.0), @@ -59,9 +53,6 @@ LatticePhase& LatticePhase::operator=(const LatticePhase& right) { if (&right != this) { ThermoPhase::operator=(right); - m_mm = right.m_mm; - m_tmin = right.m_tmin; - m_tmax = right.m_tmax; m_Pref = right.m_Pref; m_Pcurrent = right.m_Pcurrent; m_tlast = right.m_tlast; @@ -405,18 +396,7 @@ const vector_fp& LatticePhase::cp_R_ref() const */ void LatticePhase::initThermo() { - m_kk = nSpecies(); - m_mm = nElements(); - doublereal tmin = m_spthermo->minTemp(); - doublereal tmax = m_spthermo->maxTemp(); - if (tmin > 0.0) { - m_tmin = tmin; - } - if (tmax > 0.0) { - m_tmax = tmax; - } m_Pref = refPressure(); - size_t leng = m_kk; m_h0_RT.resize(leng); m_g0_RT.resize(leng); diff --git a/src/thermo/LatticeSolidPhase.cpp b/src/thermo/LatticeSolidPhase.cpp index 2f98d51ea..8b39e786c 100644 --- a/src/thermo/LatticeSolidPhase.cpp +++ b/src/thermo/LatticeSolidPhase.cpp @@ -25,7 +25,6 @@ namespace Cantera //==================================================================================================================== // Base empty constructor LatticeSolidPhase::LatticeSolidPhase() : - m_mm(0), m_tlast(0.0), m_press(-1.0), m_molar_density(0.0), @@ -42,7 +41,6 @@ LatticeSolidPhase::LatticeSolidPhase() : * @param right Object to be copied */ LatticeSolidPhase::LatticeSolidPhase(const LatticeSolidPhase& right) : - m_mm(0), m_tlast(0.0), m_press(-1.0), m_molar_density(0.0), @@ -64,7 +62,6 @@ LatticeSolidPhase::operator=(const LatticeSolidPhase& right) { if (&right != this) { ThermoPhase::operator=(right); - m_mm = right.m_mm; m_tlast = right.m_tlast; m_press = right.m_press; m_molar_density = right.m_molar_density; @@ -526,15 +523,15 @@ void LatticeSolidPhase::installSlavePhases(Cantera::XML_Node* phaseNode) econ += int2str(n); econ += "_" + id(); size_t m = addUniqueElementAfterFreeze(econ, 0.0, 0, 0.0, CT_ELEM_TYPE_LATTICERATIO); - m_mm = nElements(); + size_t mm = nElements(); LatticePhase* lp0 = m_lattice[0]; size_t nsp0 = lp0->nSpecies(); for (size_t k = 0; k < nsp0; k++) { - m_speciesComp[k * m_mm + m] = -theta_[0]; + m_speciesComp[k * mm + m] = -theta_[0]; } for (size_t k = 0; k < nsp; k++) { size_t ks = kstart + k; - m_speciesComp[ks * m_mm + m] = theta_[n]; + m_speciesComp[ks * mm + m] = theta_[n]; } } } @@ -558,8 +555,6 @@ void LatticeSolidPhase::installSlavePhases(Cantera::XML_Node* phaseNode) */ void LatticeSolidPhase::initThermo() { - m_kk = nSpecies(); - m_mm = nElements(); initLengths(); size_t nsp, loc = 0; for (size_t n = 0; n < m_nlattice; n++) { diff --git a/src/thermo/SingleSpeciesTP.cpp b/src/thermo/SingleSpeciesTP.cpp index 862391bb4..3174a3e9f 100644 --- a/src/thermo/SingleSpeciesTP.cpp +++ b/src/thermo/SingleSpeciesTP.cpp @@ -30,8 +30,6 @@ namespace Cantera */ SingleSpeciesTP::SingleSpeciesTP() : ThermoPhase(), - m_tmin(0.0), - m_tmax(0.0), m_press(OneAtm), m_p0(OneAtm), m_tlast(-1.0) @@ -45,8 +43,6 @@ SingleSpeciesTP::SingleSpeciesTP() : */ SingleSpeciesTP::SingleSpeciesTP(const SingleSpeciesTP& right): ThermoPhase(), - m_tmin(0.0), - m_tmax(0.0), m_press(OneAtm), m_p0(OneAtm), m_tlast(-1.0) @@ -62,8 +58,6 @@ SingleSpeciesTP& SingleSpeciesTP::operator=(const SingleSpeciesTP& right) { if (&right != this) { ThermoPhase::operator=(right); - m_tmin = right.m_tmin; - m_tmax = right.m_tmax; m_press = right.m_press; m_p0 = right.m_p0; m_tlast = right.m_tlast; @@ -651,24 +645,10 @@ void SingleSpeciesTP::initThermo() /* * Make sure there is one and only one species in this phase. */ - m_kk = nSpecies(); - if (m_kk != 1) { + if (nSpecies() != 1) { throw CanteraError("initThermo", "stoichiometric substances may only contain one species."); } - doublereal tmin = m_spthermo->minTemp(); - doublereal tmax = m_spthermo->maxTemp(); - if (tmin > 0.0) { - m_tmin = tmin; - } - if (tmax > 0.0) { - m_tmax = tmax; - } - - /* - * Store the reference pressure in the variables for the class. - */ - m_p0 = refPressure(); /* * Resize temporary arrays. diff --git a/src/thermo/StoichSubstance.cpp b/src/thermo/StoichSubstance.cpp index bd9aa3285..10a839f38 100644 --- a/src/thermo/StoichSubstance.cpp +++ b/src/thermo/StoichSubstance.cpp @@ -16,9 +16,6 @@ namespace Cantera // Default empty constructor StoichSubstance::StoichSubstance() : - m_kk(0), - m_tmin(0.0), - m_tmax(0.0), m_press(OneAtm), m_p0(OneAtm), m_tlast(-1.0) @@ -35,9 +32,6 @@ StoichSubstance::StoichSubstance() : * @param right Object to be copied. */ StoichSubstance::StoichSubstance(const StoichSubstance& right) : - m_kk(0), - m_tmin(0.0), - m_tmax(0.0), m_press(OneAtm), m_p0(OneAtm), m_tlast(-1.0) @@ -58,9 +52,6 @@ operator=(const StoichSubstance& right) { if (&right != this) { ThermoPhase::operator=(right); - m_kk = right.m_kk; - m_tmin = right.m_tmin; - m_tmax = right.m_tmax; m_press = right.m_press; m_p0 = right.m_p0; m_tlast = right.m_tlast; @@ -126,19 +117,12 @@ doublereal StoichSubstance::cv_mole() const void StoichSubstance::initThermo() { - m_kk = nSpecies(); if (m_kk > 1) { throw CanteraError("initThermo", "stoichiometric substances may only contain one species."); } doublereal tmin = m_spthermo->minTemp(); doublereal tmax = m_spthermo->maxTemp(); - if (tmin > 0.0) { - m_tmin = tmin; - } - if (tmax > 0.0) { - m_tmax = tmax; - } m_p0 = refPressure(); m_h0_RT.resize(m_kk); diff --git a/src/thermo/StoichSubstanceSSTP.cpp b/src/thermo/StoichSubstanceSSTP.cpp index 0b2a1efa0..4c380be89 100644 --- a/src/thermo/StoichSubstanceSSTP.cpp +++ b/src/thermo/StoichSubstanceSSTP.cpp @@ -418,14 +418,6 @@ void StoichSubstanceSSTP::initThermo() throw CanteraError("initThermo", "stoichiometric substances may only contain one species."); } - doublereal tmin = m_spthermo->minTemp(); - doublereal tmax = m_spthermo->maxTemp(); - if (tmin > 0.0) { - m_tmin = tmin; - } - if (tmax > 0.0) { - m_tmax = tmax; - } /* * Store the reference pressure in the variables for the class. */ diff --git a/src/thermo/SurfPhase.cpp b/src/thermo/SurfPhase.cpp index cb40c6976..c700991d6 100644 --- a/src/thermo/SurfPhase.cpp +++ b/src/thermo/SurfPhase.cpp @@ -28,8 +28,6 @@ SurfPhase::SurfPhase(doublereal n0): ThermoPhase(), m_n0(n0), m_logn0(0.0), - m_tmin(0.0), - m_tmax(0.0), m_press(OneAtm), m_tlast(0.0) { @@ -43,8 +41,6 @@ SurfPhase::SurfPhase(const std::string& infile, std::string id) : ThermoPhase(), m_n0(0.0), m_logn0(0.0), - m_tmin(0.0), - m_tmax(0.0), m_press(OneAtm), m_tlast(0.0) { @@ -72,8 +68,6 @@ SurfPhase::SurfPhase(XML_Node& xmlphase) : ThermoPhase(), m_n0(0.0), m_logn0(0.0), - m_tmin(0.0), - m_tmax(0.0), m_press(OneAtm), m_tlast(0.0) { @@ -98,8 +92,6 @@ SurfPhase::SurfPhase(XML_Node& xmlphase) : SurfPhase::SurfPhase(const SurfPhase& right) : m_n0(right.m_n0), m_logn0(right.m_logn0), - m_tmin(right.m_tmin), - m_tmax(right.m_tmax), m_press(right.m_press), m_tlast(right.m_tlast) { @@ -121,8 +113,6 @@ operator=(const SurfPhase& right) ThermoPhase::operator=(right); m_n0 = right.m_n0; m_logn0 = right.m_logn0; - m_tmin = right.m_tmin; - m_tmax = right.m_tmax; m_press = right.m_press; m_tlast = right.m_tlast; m_h0 = right.m_h0;