14 #ifndef CT_SHOMATEPOLY1_H 15 #define CT_SHOMATEPOLY1_H 71 ShomatePoly(
double tlow,
double thigh,
double pref,
const double* coeffs) :
75 for (
size_t i = 0; i < 7; i++) {
88 doublereal tt = 1.e-3*T;
91 T_poly[2] = T_poly[1] * tt;
92 T_poly[3] = 1.0/T_poly[1];
93 T_poly[4] = std::log(tt);
110 doublereal* cp_R, doublereal* h_RT,
111 doublereal* s_R)
const {
113 doublereal Bt =
m_coeff[1]*tt[0];
114 doublereal Ct2 =
m_coeff[2]*tt[1];
115 doublereal Dt3 =
m_coeff[3]*tt[2];
116 doublereal Etm2 =
m_coeff[4]*tt[3];
117 doublereal Ftm1 =
m_coeff[5]*tt[5];
120 *cp_R = A + Bt + Ct2 + Dt3 + Etm2;
121 *h_RT = A + 0.5*Bt + 1.0/3.0*Ct2 + 0.25*Dt3 - Etm2 + Ftm1;
122 *s_R = A*tt[4] + Bt + 0.5*Ct2 + 1.0/3.0*Dt3 - 0.5*Etm2 + G;
126 doublereal* cp_R, doublereal* h_RT,
127 doublereal* s_R)
const {
134 doublereal& tlow, doublereal& thigh,
136 doublereal*
const coeffs)
const {
142 for (
int i = 0; i < 7; i++) {
147 virtual doublereal
reportHf298(doublereal*
const h298 = 0)
const {
148 double cp_R, h_RT, s_R;
155 doublereal delH = Hf298New - hnow;
166 double m_coeff5_orig;
221 ShomatePoly2(
double tlow,
double thigh,
double pref,
const double* coeffs) :
224 msp_low(tlow, coeffs[0], pref, coeffs+1),
225 msp_high(coeffs[0], thigh, pref, coeffs+8),
242 doublereal* cp_R, doublereal* h_RT,
243 doublereal* s_R)
const {
244 double T = 1000 * tt[0];
255 doublereal* s_R)
const {
264 doublereal& tlow, doublereal& thigh,
266 doublereal*
const coeffs)
const {
272 for (
int i = 0; i < 15; i++) {
277 virtual doublereal
reportHf298(doublereal*
const h298 = 0)
const {
292 doublereal delH = Hf298New - h298now;
294 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 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 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 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 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 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.
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.