14 #ifndef CT_SHOMATEPOLY1_H 15 #define CT_SHOMATEPOLY1_H 64 "Default constructor to be removed after Cantera 2.3.");
78 ShomatePoly(
double tlow,
double thigh,
double pref,
const double* coeffs) :
82 for (
size_t i = 0; i < 7; i++) {
100 doublereal tt = 1.e-3*T;
103 T_poly[2] = T_poly[1] * tt;
104 T_poly[3] = 1.0/T_poly[1];
105 T_poly[4] = std::log(tt);
122 doublereal* cp_R, doublereal* h_RT,
123 doublereal* s_R)
const {
125 doublereal Bt =
m_coeff[1]*tt[0];
126 doublereal Ct2 =
m_coeff[2]*tt[1];
127 doublereal Dt3 =
m_coeff[3]*tt[2];
128 doublereal Etm2 =
m_coeff[4]*tt[3];
129 doublereal Ftm1 =
m_coeff[5]*tt[5];
132 *cp_R = A + Bt + Ct2 + Dt3 + Etm2;
133 *h_RT = A + 0.5*Bt + 1.0/3.0*Ct2 + 0.25*Dt3 - Etm2 + Ftm1;
134 *s_R = A*tt[4] + Bt + 0.5*Ct2 + 1.0/3.0*Dt3 - 0.5*Etm2 + G;
138 doublereal* cp_R, doublereal* h_RT,
139 doublereal* s_R)
const {
146 doublereal& tlow, doublereal& thigh,
148 doublereal*
const coeffs)
const {
154 for (
int i = 0; i < 7; i++) {
162 warn_deprecated(
"ShomatePoly::modifyParameters",
"To be removed after " 163 "Cantera 2.3. Use MultiSpeciesThermo::modifySpecies instead.");
164 for (
size_t i = 0; i < 7; i++) {
169 virtual doublereal
reportHf298(doublereal*
const h298 = 0)
const {
170 double cp_R, h_RT, s_R;
177 doublereal delH = Hf298New - hnow;
188 double m_coeff5_orig;
241 "Default constructor to be removed after Cantera 2.3.");
253 ShomatePoly2(
double tlow,
double thigh,
double pref,
const double* coeffs) :
256 msp_low(tlow, coeffs[0], pref, coeffs+1),
257 msp_high(coeffs[0], thigh, pref, coeffs+8),
279 doublereal* cp_R, doublereal* h_RT,
280 doublereal* s_R)
const {
281 double T = 1000 * tt[0];
292 doublereal* s_R)
const {
301 doublereal& tlow, doublereal& thigh,
303 doublereal*
const coeffs)
const {
309 for (
int i = 0; i < 15; i++) {
324 warn_deprecated(
"ShomatePoly2::modifyParameters",
"To be removed after " 325 "Cantera 2.3. Use MultiSpeciesThermo::modifySpecies instead.");
326 std::copy(coeffs, coeffs + 15,
m_coeff.begin());
332 virtual doublereal
reportHf298(doublereal*
const h298 = 0)
const {
347 doublereal delH = Hf298New - h298now;
349 double hnew = h + delH;
doublereal m_midT
Midrange temperature (kelvin)
virtual size_t temperaturePolySize() const
Number of terms in the temperature polynomial for this parameterization.
virtual void updateTemperaturePoly(double T, double *T_poly) const
Given the temperature T, compute the terms of the temperature polynomial T_poly.
Abstract Base class for the thermodynamic manager for an individual species' reference state...
virtual void updateTemperaturePoly(double T, double *T_poly) const
Given the temperature T, compute the terms of the temperature polynomial T_poly.
virtual int reportType() const
Returns an integer representing the type of parameterization.
virtual void reportParameters(size_t &n, int &type, doublereal &tlow, doublereal &thigh, doublereal &pref, doublereal *const coeffs) const
This utility function reports back the type of parameterization and all of the parameters for the spe...
#define SHOMATE
Two regions of Shomate Polynomials.
virtual SpeciesThermoInterpType * duplMyselfAsSpeciesThermoInterpType() const
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) ...
vector_fp m_coeff
Array of coefficients.
virtual void updateProperties(const doublereal *tt, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Update the properties for this species, given a temperature polynomial.
virtual void modifyParameters(doublereal *coeffs)
virtual void updateProperties(const doublereal *tt, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Update the properties for this species, given a temperature polynomial.
ShomatePoly()
Empty constructor.
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
virtual void updatePropertiesTemp(const doublereal temp, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Compute the reference-state property of one species.
vector_fp m_coeff
Array of the original coefficients.
ShomatePoly msp_high
Shomate polynomial for the high temperature region.
virtual void resetHf298()
Restore the original heat of formation for this species.
Pure Virtual Base class for individual species reference state thermodynamic managers and text for th...
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) ...
virtual void updatePropertiesTemp(const doublereal temp, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Compute the reference-state property of one species.
virtual SpeciesThermoInterpType * duplMyselfAsSpeciesThermoInterpType() const
virtual int reportType() const
Returns an integer representing the type of parameterization.
The Shomate polynomial parameterization for one temperature range for one species.
The Shomate polynomial parameterization for two temperature ranges for one species.
doublereal m_highT
Highest valid temperature.
virtual void modifyParameters(doublereal *coeffs)
Modify parameters for the standard state.
virtual void resetHf298()
Restore the original heat of formation for this species.
ShomatePoly msp_low
Shomate polynomial for the low temperature region.
virtual void reportParameters(size_t &n, int &type, doublereal &tlow, doublereal &thigh, doublereal &pref, doublereal *const coeffs) const
This utility function reports back the type of parameterization and all of the parameters for the spe...
#define SHOMATE2
Two regions of Shomate Polynomials.
doublereal m_lowT
lowest valid temperature
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) ...
ShomatePoly2(double tlow, double thigh, double pref, const double *coeffs)
Normal constructor.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
virtual size_t temperaturePolySize() const
Number of terms in the temperature polynomial for this parameterization.
doublereal m_Pref
Reference state pressure.
Namespace for the Cantera kernel.
ShomatePoly2()
Empty constructor.
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) ...
ShomatePoly(double tlow, double thigh, double pref, const double *coeffs)
Normal constructor.