diff --git a/include/cantera/thermo/SpeciesThermo.h b/include/cantera/thermo/SpeciesThermo.h index 74b82a1b9..c727b435f 100644 --- a/include/cantera/thermo/SpeciesThermo.h +++ b/include/cantera/thermo/SpeciesThermo.h @@ -104,7 +104,6 @@ class SpeciesThermoInterpType; * - This is a general model. Each species is handled separately * via a vector over SpeciesThermoInterpType classes. * . - * - SpeciesThermo1 in file SpeciesThermoMgr.h * - SpeciesThermoDuo in file SpeciesThermoMgr.h * - This is a combination of two SpeciesThermo types. * . diff --git a/include/cantera/thermo/SpeciesThermoMgr.h b/include/cantera/thermo/SpeciesThermoMgr.h index 971fb9e49..60b7cc0b1 100644 --- a/include/cantera/thermo/SpeciesThermoMgr.h +++ b/include/cantera/thermo/SpeciesThermoMgr.h @@ -1,10 +1,9 @@ /** * @file SpeciesThermoMgr.h * This file contains descriptions of templated subclasses of - * the virtual base class, SpeciesThermo, which include SpeciesThermoDuo and SpeciesThermo1 - * (see \ref mgrsrefcalc and classes - * \link Cantera::SpeciesThermoDuo SpeciesThermoDuo\endlink and - * \link Cantera::SpeciesThermo1 SpeciesThermo1\endlink) + * the virtual base class, SpeciesThermo, which includes SpeciesThermoDuo + * (see \ref mgrsrefcalc and class + * \link Cantera::SpeciesThermoDuo SpeciesThermoDuo\endlink) */ // Copyright 2001 California Institute of Technology @@ -346,178 +345,6 @@ private: std::map speciesToType; }; -//! This species thermo manager requires that all species have the -//! same parameterization. -/*! - * - * This is a templated class. The first template is called SPM. SPM - * is an object that calculates the thermo for one species. This - * class contains a vector of SPM's, one for each - * species. Together, the vector of SPM's is itself a SpeciesThermo - * class. - * - * @todo The form of the template class, SPM, is basically - * unspecified. it needs to be nailed down to a specific - * form. One way to do this is with a virtual base class - * formulation. Note, that the specification could be that it - * inherits from the class SpeciesThermo, itself. - * - * @deprecated Note this is currently unused and it may be on its way out. - * - * @ingroup mgrsrefcalc - */ -template -class SpeciesThermo1 : public SpeciesThermo -{ - -public: - //! base constructor - DEPRECATED(SpeciesThermo1()); - //! destructor - virtual ~SpeciesThermo1(); - - //! Copy Constructor - /*! - * @param right Object to be copied - */ - SpeciesThermo1(const SpeciesThermo1& right); - - //! Assignment Operator - /*! - * @param right Object to be copied - */ - SpeciesThermo1& operator=(const SpeciesThermo1& right); - - //! Duplication routine for objects which inherit from - //! %SpeciesThermo - /*! - * This virtual routine can be used to duplicate %SpeciesThermo objects - * inherited from %SpeciesThermo even if the application only has - * a pointer to %SpeciesThermo to work with. - * ->commented out because we first need to add copy constructors - * and assignment operators to all of the derived classes. - */ - virtual SpeciesThermo* duplMyselfAsSpeciesThermo() const; - - //! Install one species into this Species Thermo Manager - /*! - * @param name Name of the species - * @param sp Species index - * @param type species type in terms of an int - * @param c Parameters for the species thermo - */ - virtual void install(std::string name, size_t sp, int type, - const vector_fp& c); - - //! update the object, because the temperature changed - /*! - * @param t temperature(Kelvin) - * @param cp_R vector of dimensionless heat capacity - * @param h_RT vector of dimensionless enthalpy - * @param s_R vector of dimensionless entropy - */ - virtual void update(doublereal t, vector_fp& cp_R, - vector_fp& h_RT, vector_fp& s_R) const; - - //! update the object for one species, because the temperature changed - /*! - * @param k species index - * @param t temperature(Kelvin) - * @param cp_R vector of dimensionless heat capacity - * @param h_RT vector of dimensionless enthalpy - * @param s_R vector of dimensionless entropy - */ - virtual void update_one(size_t k, doublereal t, vector_fp& cp_R, - vector_fp& h_RT, vector_fp& s_R) const; - - //! Returns the minimum temperature - /*! - * @param k species index. Defaults to -1. - */ - virtual doublereal minTemp(size_t k = npos) const; - - //! Returns the maximum temperature - /*! - * @param k species index. Defaults to -1. - */ - virtual doublereal maxTemp(size_t k = npos) const; - - //! returns the reference pressure - /*! - * @param k species index. Defaults to -1. - */ - virtual doublereal refPressure(size_t k = npos) const; - - //! This utility function reports the type of parameterization - //! used for the species with index number index. - /*! - * Note, all parameterizations are the same, by definition, here - * - * @param k Species index - */ - virtual int reportType(size_t) const; - - /*! - * This utility function reports back the type of - * parameterization and all of the parameters for the - * species, index. - * - * @param index Species index - * @param type Integer type of the standard type - * @param c Vector of coefficients used to set the - * parameters for the standard state. - * @param minTemp output - Minimum temperature - * @param maxTemp output - Maximum temperature - * @param refPressure output - reference pressure (Pa). - */ - virtual void reportParams(size_t index, int& type, - doublereal* const c, - doublereal& minTemp, - doublereal& maxTemp, - doublereal& refPressure) const; - - //! Modify parameters for the standard state - /*! - * @param index Species index - * @param c Vector of coefficients used to set the - * parameters for the standard state. - * @deprecated - */ - DEPRECATED(virtual void modifyParams(size_t index, doublereal* c)); - -#ifdef H298MODIFY_CAPABILITY - //! Report the 298 K Heat of Formation of the standard state of one species (J kmol-1) - /*! - * The 298K Heat of Formation is defined as the enthalpy change to create the standard state - * of the species from its constituent elements in their standard states at 298 K and 1 bar. - * - * @param k species index - * @return Returns the current value of the Heat of Formation at 298K and 1 bar - */ - virtual doublereal reportOneHf298(int k) const { - throw CanteraError("reportHF298", "unimplemented"); - } - - //! Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1) - /*! - * The 298K heat of formation is defined as the enthalpy change to create the standard state - * of the species from its constituent elements in their standard states at 298 K and 1 bar. - * - * @param k Species k - * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar - */ - virtual void modifyOneHf298(const int k, const doublereal Hf298New) { - throw CanteraError("reportHF298", "unimplemented"); - } -#endif - -private: - //! Vector of SPM objects. There are m_kk of them - std::vector m_thermo; - - //! Reference pressure (Pa) - doublereal m_pref; -}; // ------------------------- cpp part of file ------------------------------------- @@ -672,130 +499,5 @@ SpeciesThermoDuo::modifyParams(size_t index, doublereal* c) } } -// Definitions for the SpeciesTherm1 templated class - -template -SpeciesThermo1::SpeciesThermo1() : - m_pref(0.0) -{ } - -template -SpeciesThermo1::~SpeciesThermo1() -{ -} - -template -SpeciesThermo1::SpeciesThermo1(const SpeciesThermo1& right) : - m_pref(0.0) -{ - *this = operator=(right); -} - -template -SpeciesThermo1 & -SpeciesThermo1::operator=(const SpeciesThermo1& right) -{ - if (&right == this) { - return *this; - } - m_thermo = right.m_thermo; - m_pref = right.m_pref; - return *this; -} - -template -SpeciesThermo* -SpeciesThermo1::duplMyselfAsSpeciesThermo() const -{ - SpeciesThermo1 *nt = new SpeciesThermo1(*this); - return (SpeciesThermo*) nt; -} - -template -void -SpeciesThermo1::install(std::string name, size_t sp, int type, const vector_fp& c) -{ - m_thermo.push_back(SPM(sp, c)); - if (m_pref) { - if (m_thermo.begin()->refPressure() != m_pref) { - throw RefPressureMismatch("SpeciesThermo1:install", - refPressure(), m_pref); - } - } else { - m_pref = m_thermo.begin()->refPressure(); - } -} - -template -inline void -SpeciesThermo1::update(doublereal t, vector_fp& cp_R, - vector_fp& h_RT, vector_fp& s_R) const -{ - _updateAll(m_thermo.begin(), m_thermo.end(), t, cp_R, h_RT, s_R); -} - -template -void -SpeciesThermo1::update_one(size_t k, doublereal t, vector_fp& cp_R, - vector_fp& h_RT, vector_fp& s_R) const -{ - m_thermo[k]->update(t, cp_R, h_RT, s_R); -} - -template -doublereal -SpeciesThermo1::minTemp(size_t k) const -{ - if (k == npos) { - return _minTemp(m_thermo.begin(), m_thermo.end()); - } else { - return m_thermo[k].minTemp(); - } -} - -template -doublereal -SpeciesThermo1::maxTemp(size_t k) const -{ - if (k == npos) { - return _maxTemp(m_thermo.begin(), m_thermo.end()); - } else { - return m_thermo[k].maxTemp(); - } -} - -template -doublereal -SpeciesThermo1::refPressure(size_t k) const -{ - return m_pref; -} - -template -int -SpeciesThermo1::reportType(size_t k) const -{ - return m_thermo[k]->reportType(-1); -} - -template -void -SpeciesThermo1::reportParams(size_t index, int& type, - doublereal* const c, - doublereal& minTemp, - doublereal& maxTemp, - doublereal& refPressure) const -{ - m_thermo[index]->reportParameters(index, type, c, minTemp, maxTemp, refPressure); -} - -template -void -SpeciesThermo1::modifyParams(size_t index, doublereal* c) -{ - m_thermo[index]->modifyParameters(index, c); -} -} - #endif