Cantera
2.2.1
|
Pure Virtual Base class for the thermodynamic manager for an individual species' reference state. More...
#include <SpeciesThermoInterpType.h>
Public Member Functions | |
SpeciesThermoInterpType (size_t n, doublereal tlow, doublereal thigh, doublereal pref) | |
SpeciesThermoInterpType (double tlow, double thigh, double pref) | |
SpeciesThermoInterpType (const SpeciesThermoInterpType &b) | |
virtual SpeciesThermoInterpType * | duplMyselfAsSpeciesThermoInterpType () const =0 |
virtual doublereal | minTemp () const |
Returns the minimum temperature that the thermo parameterization is valid. More... | |
virtual doublereal | maxTemp () const |
Returns the maximum temperature that the thermo parameterization is valid. More... | |
virtual doublereal | refPressure () const |
Returns the reference pressure (Pa) More... | |
virtual void | validate (const std::string &name) |
Check for problems with the parameterization, and generate warnings or throw and exception if any are found. More... | |
virtual int | reportType () const =0 |
Returns an integer representing the type of parameterization. More... | |
virtual size_t | speciesIndex () const |
Returns an integer representing the species index. More... | |
virtual void | setIndex (size_t index) |
virtual size_t | temperaturePolySize () const |
Number of terms in the temperature polynomial for this parameterization. More... | |
virtual void | updateTemperaturePoly (double T, double *T_poly) const |
Given the temperature T, compute the terms of the temperature polynomial T_poly. More... | |
virtual void | updateProperties (const doublereal *tempPoly, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const |
Update the properties for this species, given a temperature polynomial. More... | |
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. More... | |
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 species, index. More... | |
virtual void | modifyParameters (doublereal *coeffs) |
Modify parameters for the standard state. More... | |
virtual doublereal | reportHf298 (doublereal *const h298=0) const |
Report the 298 K Heat of Formation of the standard state of one species (J kmol-1) More... | |
virtual void | modifyOneHf298 (const size_t k, const doublereal Hf298New) |
Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1) More... | |
Protected Attributes | |
doublereal | m_lowT |
lowest valid temperature More... | |
doublereal | m_highT |
Highest valid temperature. More... | |
doublereal | m_Pref |
Reference state pressure. More... | |
size_t | m_index |
species index More... | |
Pure Virtual Base class for the thermodynamic manager for an individual species' reference state.
This differs from the SpeciesThermo virtual base class in the sense that this class is meant to handle only one species. The speciesThermo class is meant to handle the calculation of all the species (or a large subset) in a phase.
One key feature is that the update routines use the same form as the update routines in the speciesThermo class. They update into a vector of cp_R, s_R, and H_R that spans all of the species in a phase. Therefore, this class must carry along a species index into that vector.
These routine may be templated. A key requirement of the template is that there is a constructor with the following form:
Definition at line 158 of file SpeciesThermoInterpType.h.
SpeciesThermoInterpType | ( | size_t | n, |
doublereal | tlow, | ||
doublereal | thigh, | ||
doublereal | pref | ||
) |
Definition at line 22 of file SpeciesThermoInterpType.cpp.
References Cantera::warn_deprecated().
|
inlinevirtual |
Returns the minimum temperature that the thermo parameterization is valid.
Reimplemented in STITbyPDSS.
Definition at line 179 of file SpeciesThermoInterpType.h.
References SpeciesThermoInterpType::m_lowT.
Referenced by GeneralSpeciesThermo::minTemp().
|
inlinevirtual |
Returns the maximum temperature that the thermo parameterization is valid.
Reimplemented in STITbyPDSS.
Definition at line 185 of file SpeciesThermoInterpType.h.
References SpeciesThermoInterpType::m_highT.
Referenced by GeneralSpeciesThermo::maxTemp(), NasaThermo::modifyOneHf298(), ShomateThermo::modifyOneHf298(), Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), NasaThermo::reportOneHf298(), ShomateThermo::reportOneHf298(), NasaThermo::reportParams(), ShomateThermo::reportParams(), and NasaThermo::update_one().
|
inlinevirtual |
Returns the reference pressure (Pa)
Reimplemented in STITbyPDSS.
Definition at line 190 of file SpeciesThermoInterpType.h.
References SpeciesThermoInterpType::m_Pref.
Referenced by Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), and GeneralSpeciesThermo::refPressure().
|
inlinevirtual |
Check for problems with the parameterization, and generate warnings or throw and exception if any are found.
Reimplemented in NasaPoly2.
Definition at line 196 of file SpeciesThermoInterpType.h.
|
pure virtual |
Returns an integer representing the type of parameterization.
Implemented in STITbyPDSS, ShomatePoly2, Mu0Poly, ShomatePoly, NasaPoly2, NasaPoly1, Nasa9Poly1, ConstCpPoly, Adsorbate, Nasa9PolyMultiTempRegion, and StatMech.
Referenced by GeneralSpeciesThermo::reportType().
|
inlinevirtual |
Returns an integer representing the species index.
Definition at line 203 of file SpeciesThermoInterpType.h.
References SpeciesThermoInterpType::m_index.
Referenced by Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), and NasaPoly2::validate().
|
inlinevirtual |
Reimplemented in ShomatePoly2, NasaPoly2, and Nasa9PolyMultiTempRegion.
Definition at line 208 of file SpeciesThermoInterpType.h.
References SpeciesThermoInterpType::m_index.
Referenced by Nasa9PolyMultiTempRegion::setIndex(), NasaPoly2::setIndex(), and ShomatePoly2::setIndex().
|
inlinevirtual |
Number of terms in the temperature polynomial for this parameterization.
Reimplemented in ShomatePoly2, ShomatePoly, NasaPoly2, NasaPoly1, Nasa9Poly1, and Nasa9PolyMultiTempRegion.
Definition at line 213 of file SpeciesThermoInterpType.h.
|
inlinevirtual |
Given the temperature T, compute the terms of the temperature polynomial T_poly.
Reimplemented in ShomatePoly2, ShomatePoly, NasaPoly2, NasaPoly1, Nasa9Poly1, and Nasa9PolyMultiTempRegion.
Definition at line 217 of file SpeciesThermoInterpType.h.
|
virtual |
Update the properties for this species, given a temperature polynomial.
This method is called with a pointer to an array containing the functions of temperature needed by this parameterization, and three pointers to arrays where the computed property values should be written. This method updates only one value in each array.
The form and length of the Temperature Polynomial may vary depending on the parameterization.
tempPoly | vector of temperature polynomials |
cp_R | Vector of Dimensionless heat capacities. (length m_kk). |
h_RT | Vector of Dimensionless enthalpies. (length m_kk). |
s_R | Vector of Dimensionless entropies. (length m_kk). |
Reimplemented in ShomatePoly2, STITbyPDSS, ShomatePoly, NasaPoly2, Mu0Poly, NasaPoly1, Nasa9Poly1, ConstCpPoly, Nasa9PolyMultiTempRegion, and StatMech.
Definition at line 54 of file SpeciesThermoInterpType.cpp.
References SpeciesThermoInterpType::updatePropertiesTemp().
|
pure virtual |
Compute the reference-state property of one species.
Given temperature T in K, this method updates the values of the non-dimensional heat capacity at constant pressure, enthalpy, and entropy, at the reference pressure, Pref of one of the species. The species index is used to reference into the cp_R, h_RT, and s_R arrays.
temp | Temperature (Kelvin) |
cp_R | Vector of Dimensionless heat capacities. (length m_kk). |
h_RT | Vector of Dimensionless enthalpies. (length m_kk). |
s_R | Vector of Dimensionless entropies. (length m_kk). |
Implemented in ShomatePoly2, STITbyPDSS, ShomatePoly, NasaPoly1, NasaPoly2, Mu0Poly, Nasa9Poly1, Nasa9PolyMultiTempRegion, ConstCpPoly, StatMech, and Adsorbate.
Referenced by GeneralSpeciesThermo::update_one(), and SpeciesThermoInterpType::updateProperties().
|
pure virtual |
This utility function reports back the type of parameterization and all of the parameters for the species, index.
All parameters are output variables
index | Species index |
type | Integer type of the standard type |
minTemp | output - Minimum temperature |
maxTemp | output - Maximum temperature |
refPressure | output - reference pressure (Pa). |
coeffs | Vector of coefficients used to set the parameters for the standard state. |
Implemented in ShomatePoly2, STITbyPDSS, ShomatePoly, Nasa9Poly1, NasaPoly1, NasaPoly2, Mu0Poly, Nasa9PolyMultiTempRegion, StatMech, ConstCpPoly, and Adsorbate.
Referenced by GeneralSpeciesThermo::reportParams().
|
inlinevirtual |
Modify parameters for the standard state.
coeffs | Vector of coefficients used to set the parameters for the standard state. |
Reimplemented in ShomatePoly2, STITbyPDSS, ShomatePoly, NasaPoly1, Nasa9Poly1, Mu0Poly, Nasa9PolyMultiTempRegion, StatMech, and ConstCpPoly.
Definition at line 282 of file SpeciesThermoInterpType.h.
|
virtual |
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.
h298 | If this is nonnull, the current value of the Heat of Formation at 298K and 1 bar for species m_speciesIndex is returned in h298[m_speciesIndex]. |
Reimplemented in ShomatePoly2, ShomatePoly, NasaPoly1, NasaPoly2, and ConstCpPoly.
Definition at line 61 of file SpeciesThermoInterpType.cpp.
Referenced by GeneralSpeciesThermo::reportOneHf298().
|
virtual |
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.
k | Species k |
Hf298New | Specify the new value of the Heat of Formation at 298K and 1 bar |
Reimplemented in ShomatePoly2, ShomatePoly, NasaPoly1, NasaPoly2, and ConstCpPoly.
Definition at line 67 of file SpeciesThermoInterpType.cpp.
Referenced by GeneralSpeciesThermo::modifyOneHf298().
|
protected |
lowest valid temperature
Definition at line 314 of file SpeciesThermoInterpType.h.
Referenced by SpeciesThermoInterpType::minTemp(), ShomatePoly2::modifyParameters(), Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), Adsorbate::reportParameters(), ConstCpPoly::reportParameters(), StatMech::reportParameters(), Nasa9PolyMultiTempRegion::reportParameters(), Mu0Poly::reportParameters(), NasaPoly2::reportParameters(), NasaPoly1::reportParameters(), Nasa9Poly1::reportParameters(), ShomatePoly::reportParameters(), ShomatePoly2::reportParameters(), and StatMech::StatMech().
|
protected |
Highest valid temperature.
Definition at line 316 of file SpeciesThermoInterpType.h.
Referenced by SpeciesThermoInterpType::maxTemp(), ShomatePoly2::modifyParameters(), Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), Adsorbate::reportParameters(), ConstCpPoly::reportParameters(), StatMech::reportParameters(), Nasa9PolyMultiTempRegion::reportParameters(), Mu0Poly::reportParameters(), NasaPoly2::reportParameters(), NasaPoly1::reportParameters(), Nasa9Poly1::reportParameters(), ShomatePoly::reportParameters(), and ShomatePoly2::reportParameters().
|
protected |
Reference state pressure.
Definition at line 318 of file SpeciesThermoInterpType.h.
Referenced by ShomatePoly2::modifyParameters(), Nasa9Poly1::Nasa9Poly1(), Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), SpeciesThermoInterpType::refPressure(), Adsorbate::reportParameters(), ConstCpPoly::reportParameters(), StatMech::reportParameters(), Nasa9PolyMultiTempRegion::reportParameters(), Mu0Poly::reportParameters(), NasaPoly1::reportParameters(), NasaPoly2::reportParameters(), Nasa9Poly1::reportParameters(), ShomatePoly::reportParameters(), and ShomatePoly2::reportParameters().
|
protected |
species index
Definition at line 320 of file SpeciesThermoInterpType.h.
Referenced by STITbyPDSS::initAllPtrs(), ConstCpPoly::modifyOneHf298(), NasaPoly2::modifyOneHf298(), NasaPoly1::modifyOneHf298(), ShomatePoly2::modifyOneHf298(), ShomatePoly2::modifyParameters(), Nasa9PolyMultiTempRegion::Nasa9PolyMultiTempRegion(), ConstCpPoly::reportHf298(), NasaPoly2::reportHf298(), NasaPoly1::reportHf298(), ShomatePoly::reportHf298(), ShomatePoly2::reportHf298(), Adsorbate::reportParameters(), ConstCpPoly::reportParameters(), StatMech::reportParameters(), Nasa9PolyMultiTempRegion::reportParameters(), Mu0Poly::reportParameters(), NasaPoly2::reportParameters(), NasaPoly1::reportParameters(), Nasa9Poly1::reportParameters(), ShomatePoly::reportParameters(), STITbyPDSS::reportParameters(), ShomatePoly2::reportParameters(), SpeciesThermoInterpType::setIndex(), SpeciesThermoInterpType::speciesIndex(), STITbyPDSS::STITbyPDSS(), StatMech::updateProperties(), ConstCpPoly::updateProperties(), Nasa9Poly1::updateProperties(), NasaPoly1::updateProperties(), Mu0Poly::updateProperties(), ShomatePoly::updateProperties(), Adsorbate::updatePropertiesTemp(), ConstCpPoly::updatePropertiesTemp(), and STITbyPDSS::updatePropertiesTemp().