23 GeneralSpeciesThermo::GeneralSpeciesThermo() :
36 m_tlow_max(b.m_tlow_max),
37 m_thigh_min(b.m_thigh_min),
41 for (
size_t k = 0; k <
m_kk; k++) {
56 for (
size_t k = 0; k <
m_kk; k++) {
65 for (
size_t k = 0; k <
m_kk; k++) {
77 for (
size_t k = 0; k <
m_kk; k++) {
99 doublereal refPressure_)
106 if (minTemp_ <= 0.0) {
108 " Cannot take 0 tmin as input. \n\n");
112 m_sp.resize(index+1, 0);
136 m_sp[index] =
new Mu0Poly(index, minTemp_, maxTemp_,
150 refPressure_, c, name);
159 "GeneralSpeciesThermo::install",
160 "unknown species type",
int2str(type));
164 cout <<
"Null m_sp... index = " << index << endl;
165 cout <<
"type = " << type << endl;
178 throw CanteraError(
"GeneralSpeciesThermo::install_STIT",
183 m_sp.resize(index+1, 0);
187 "Index position isn't null, duplication of assignment: " +
int2str(index));
191 m_sp[index] = stit_ptr;
209 doublereal* h_RT, doublereal* s_R)
const
219 doublereal* h_RT, doublereal* s_R)
const
221 vector<SpeciesThermoInterpType*>::const_iterator _begin, _end;
222 _begin =
m_sp.begin();
225 for (; _begin != _end; ++_begin) {
247 doublereal& minTemp_, doublereal& maxTemp_, doublereal& refPressure_)
const
256 throw CanteraError(
"GeneralSpeciesThermo::reportParams",
257 "Internal error encountered");
308 #ifdef H298MODIFY_CAPABILITY
310 doublereal GeneralSpeciesThermo::reportOneHf298(
int k)
const
315 h = sp_ptr->reportHf298(0);
320 void GeneralSpeciesThermo::modifyOneHf298(
const int k,
const doublereal Hf298New)
322 SpeciesThermoInterpType* sp_ptr =
m_sp[k];
324 sp_ptr->modifyOneHf298(k, Hf298New);
SpeciesThermoInterpType * provideSTIT(size_t k)
Provide the SpeciesthermoInterpType object.
std::string int2str(const int n, const std::string &fmt)
Convert an int to a string using a format converter.
Header for a single-species standard state object derived from SpeciesThermoInterpType based on a pie...
Pure Virtual Base class for the thermodynamic manager for an individual species' reference state...
#define CONSTANT_CP
Constant Cp.
The NASA polynomial parameterization for two temperature ranges.
const doublereal OneAtm
One atmosphere [Pa].
std::vector< SpeciesThermoInterpType * > m_sp
This is the main unknown in the object.
Virtual base class for the classes that manage the calculation of standard state properties for all t...
virtual void update_one(size_t k, doublereal T, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Like update(), but only updates the single species k.
const size_t npos
index returned by functions to indicate "no position"
virtual size_t speciesIndex() const
Returns an integer representing the species index.
#define NASA2
Two regions of 7 coefficient NASA Polynomials This is implemented in the class NasaPoly2 in NasaPoly2...
virtual SpeciesThermo * duplMyselfAsSpeciesThermo() const
Duplication routine for objects derived from SpeciesThermo.
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
The Mu0Poly class implements an interpolation of the Gibbs free energy based on a piecewise constant ...
A constant-heat capacity species thermodynamic property manager class.
doublereal m_tlow_max
Maximum value of the lowest temperature.
Pure Virtual base class for the species thermo manager classes.
size_t m_kk
Internal variable indicating the length of the number of species in the phase.
virtual int reportType() const =0
Returns an integer representing the type of parameterization.
#define MU0_INTERP
piecewise interpolation of mu0.
virtual SpeciesThermoInterpType * duplMyselfAsSpeciesThermoInterpType() const =0
duplicator
#define NASA1
7 coefficient NASA Polynomials This is implemented in the class NasaPoly1 in NasaPoly1.h
virtual doublereal refPressure() const
Returns the reference pressure (Pa)
virtual doublereal maxTemp() const
Returns the maximum temperature that the thermo parameterization is valid.
A species thermodynamic property manager for a phase.
GeneralSpeciesThermo & operator=(const GeneralSpeciesThermo &b)
Assignment operator.
virtual void reportParameters(size_t &index, int &type, doublereal &minTemp, doublereal &maxTemp, doublereal &refPressure, doublereal *const coeffs) const =0
This utility function reports back the type of parameterization and all of the parameters for the spe...
The Shomate polynomial parameterization for one temperature range for one species.
Header for a single-species standard state object derived from SpeciesThermoInterpType based on the S...
The Shomate polynomial parameterization for two temperature ranges for one species.
Class for the thermodynamic manager for an individual species' reference state which uses the PDSS ba...
#define AssertThrow(expr, procedure)
Assertion must be true or an error is thrown.
virtual doublereal maxTemp(size_t k=npos) const
Maximum temperature.
Base class for exceptions thrown by Cantera classes.
virtual doublereal minTemp(size_t k=npos) const
Minimum temperature.
#define SIMPLE
Constant Cp thermo.
Header for a single-species standard state object derived from SpeciesThermoInterpType based on the N...
#define SHOMATE2
Two regions of Shomate Polynomials.
virtual ~GeneralSpeciesThermo()
Destructor.
virtual doublereal minTemp() const
Returns the minimum temperature that the thermo parameterization is valid.
Throw a named error for an unknown or missing species thermo model.
An adsorbed surface species.
Header for factory to build instances of classes that manage the standard-state thermodynamic propert...
Headers for a completely general species thermodynamic property manager for a phase (see Managers for...
doublereal m_p0
reference pressure (Pa)
Virtual base class for a species with a pressure dependent standard state.
#define STAT
Properties derived from theoretical considerations This is implemented in the class statmech in StatM...
virtual doublereal refPressure(size_t k=npos) const
The reference-state pressure for species k.
Headers for the SpeciesThermoInterpType object that employs a constant heat capacity assumption (see ...
virtual void updatePropertiesTemp(const doublereal temp, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const =0
Compute the reference-state property of one species.
doublereal m_thigh_min
Minimum value of the highest temperature.
Header for a single-species standard state object derived from SpeciesThermoInterpType based on the e...
virtual void install_STIT(SpeciesThermoInterpType *stit_ptr)
Install a new species thermodynamic property parameterization for one species.
The NASA polynomial parameterization for one temperature range.
virtual int reportType(size_t index) const
This utility function reports the type of parameterization used for the species with index number ind...
Header for a single-species standard state object derived from SpeciesThermoInterpType based on the N...
GeneralSpeciesThermo()
Constructor.
virtual void update(doublereal T, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Compute the reference-state properties for all species.
#define SHOMATE1
one region of Shomate Polynomials used in NIST database This is implemented in the NIST database...
virtual void install(const std::string &name, size_t index, int type, const doublereal *c, doublereal minTemp, doublereal maxTemp, doublereal refPressure)
Install a new species thermodynamic property parameterization for one species.
virtual void reportParams(size_t index, int &type, doublereal *const c, doublereal &minTemp, doublereal &maxTemp, doublereal &refPressure) const
#define ADSORBATE
Surface Adsorbate Model for a species on a surface.
void installPDSShandler(size_t k, PDSS *PDSS_ptr, VPSSMgr *vpssmgr_ptr)
Install a PDSS object to handle the reference state thermodynamics calculation.