11 #ifndef CT_SPECIESTHERMO_MGR_H
12 #define CT_SPECIESTHERMO_MGR_H
35 +
") does not match any known type.") {}
43 CanteraError(proc,
"Specified species parameterization type (" + stype
44 +
") does not match any known type.") {}
55 template<
class T1,
class T2>
78 virtual void install(
const std::string& name,
size_t sp,
int type,
87 virtual void update(doublereal t, doublereal* cp_R,
88 doublereal* h_RT, doublereal* s_R)
const;
111 #ifdef H298MODIFY_CAPABILITY
113 virtual doublereal reportOneHf298(
int k)
const {
117 virtual void modifyOneHf298(
const int k,
const doublereal Hf298New) {
118 throw CanteraError(
"reportHF298",
"unimplemented");
140 template<
class T1,
class T2>
144 if (&right ==
this) {
156 template<
class T1,
class T2>
163 template<
class T1,
class T2>
169 doublereal refPressure_)
172 if (type == m_thermo1.ID) {
173 m_thermo1.install(name, sp, 0, c, minTemp_, maxTemp_,
175 speciesToType[sp] = m_thermo1.ID;
176 }
else if (type == m_thermo2.ID) {
177 m_thermo2.install(name, sp, 0, c, minTemp_, maxTemp_,
179 speciesToType[sp] = m_thermo2.ID;
185 template<
class T1,
class T2>
188 doublereal* h_RT, doublereal* s_R)
const
190 m_thermo1.update(t, cp_R, h_RT, s_R);
191 m_thermo2.update(t, cp_R, h_RT, s_R);
194 template<
class T1,
class T2>
198 std::map<size_t, int>::const_iterator p = speciesToType.find(k);
199 if (p != speciesToType.end()) {
205 template<
class T1,
class T2>
209 doublereal& minTemp_,
210 doublereal& maxTemp_,
211 doublereal& refPressure_)
const
213 int ctype = reportType(index);
214 if (ctype == m_thermo1.ID) {
215 m_thermo1.reportParams(index, type, c, minTemp_, maxTemp_,
217 }
else if (ctype == m_thermo2.ID) {
218 m_thermo2.reportParams(index, type, c, minTemp_, maxTemp_,
UnknownSpeciesThermo(const std::string &proc, const std::string &stype)
Alternate constructor.
std::string int2str(const int n, const std::string &fmt)
Convert an int to a string using a format converter.
Pure Virtual Base class for the thermodynamic manager for an individual species' reference state...
virtual doublereal maxTemp(size_t k=npos) const
Maximum temperature.
T2 m_thermo2
Thermo Type 2.
virtual doublereal minTemp(size_t k=npos) const
Minimum temperature.
const size_t npos
index returned by functions to indicate "no position"
This file contains definitions of terms that are used in internal routines and are unlikely to need m...
Virtual base class for the calculation of multiple-species thermodynamic reference-state property man...
doublereal m_p0
Reference pressure.
Pure Virtual base class for the species thermo manager classes.
virtual void reportParams(size_t index, int &type, doublereal *const c, doublereal &minTemp, doublereal &maxTemp, doublereal &refPressure) const
SpeciesThermoDuo & operator=(const SpeciesThermoDuo &right)
Assignment operator.
UnknownSpeciesThermo(const std::string &proc, int type)
constructor
virtual void install(const std::string &name, size_t sp, int type, const doublereal *c, doublereal minTemp, doublereal maxTemp, doublereal refPressure)
Install a new species thermodynamic property parameterization for one species.
virtual void install_STIT(SpeciesThermoInterpType *stit_ptr)
Install a new species thermodynamic property parameterization for one species.
SpeciesThermoDuo(const SpeciesThermoDuo &right)
copy constructor
Base class for exceptions thrown by Cantera classes.
virtual doublereal refPressure(size_t k=npos) const
The reference-state pressure for species k.
SpeciesThermoDuo()
Constructor.
virtual SpeciesThermo * duplMyselfAsSpeciesThermo() const
Duplication routine for objects derived from SpeciesThermo.
This species thermo manager requires that all species have one of two parameterizations.
Unknown species thermo manager string error.
Contains declarations for string manipulation functions within Cantera.
T1 m_thermo1
Thermo Type 1.
virtual void update(doublereal t, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Compute the reference-state properties for all species.
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...
virtual int reportType(size_t k) const
This utility function reports the type of parameterization used for the species with index number ind...
std::map< size_t, int > speciesToType
map from species to type