12 #ifndef CT_NASAPOLY1_H
13 #define CT_NASAPOLY1_H
64 NasaPoly1(
size_t n, doublereal tlow, doublereal thigh, doublereal pref,
65 const doublereal* coeffs) :
69 for (
size_t i = 0; i < 5; i++) {
84 NasaPoly1(
double tlow,
double thigh,
double pref,
const double* coeffs)
106 SpeciesThermoInterpType::operator=(b);
113 duplMyselfAsSpeciesThermoInterpType()
const {
127 T_poly[2] = T_poly[1] * T;
128 T_poly[3] = T_poly[2] * T;
130 T_poly[5] = std::log(T);
154 doublereal* cp_R, doublereal* h_RT, doublereal* s_R)
const {
156 doublereal ct1 =
m_coeff[1]*tt[0];
157 doublereal ct2 =
m_coeff[2]*tt[1];
158 doublereal ct3 =
m_coeff[3]*tt[2];
159 doublereal ct4 =
m_coeff[4]*tt[3];
162 cp = ct0 + ct1 + ct2 + ct3 + ct4;
163 h = ct0 + 0.5*ct1 + 1.0/3.0*ct2 + 0.25*ct3 + 0.2*ct4
165 s = ct0*tt[5] + ct1 + 0.5*ct2 + 1.0/3.0*ct3
178 doublereal* cp_R, doublereal* h_RT,
179 doublereal* s_R)
const {
186 doublereal& tlow, doublereal& thigh,
188 doublereal*
const coeffs)
const {
203 std::copy(coeffs, coeffs+7,
m_coeff.begin());
206 virtual doublereal
reportHf298(doublereal*
const h298 = 0)
const {
208 double temp = 298.15;
211 doublereal ct1 =
m_coeff[1]*tt[0];
212 doublereal ct2 =
m_coeff[2]*tt[1];
213 doublereal ct3 =
m_coeff[3]*tt[2];
214 doublereal ct4 =
m_coeff[4]*tt[3];
216 double h_RT = ct0 + 0.5*ct1 + 1.0/3.0*ct2 + 0.25*ct3 + 0.2*ct4
231 double delH = Hf298New - hcurr;
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 updateTemperaturePoly(double T, double *T_poly) const
Given the temperature T, compute the terms of the temperature polynomial T_poly.
Pure Virtual Base class for the thermodynamic manager for an individual species' reference state...
virtual int reportType() const
Returns an integer representing the type of parameterization.
NasaPoly1(size_t n, doublereal tlow, doublereal thigh, doublereal pref, const doublereal *coeffs)
constructor used in templated instantiations
size_t m_index
species index
NasaPoly1 & operator=(const NasaPoly1 &b)
assignment operator
Pure Virtual Base class for individual species reference state thermodynamic managers and text for th...
NasaPoly1(const NasaPoly1 &b)
copy constructor
#define NASA1
7 coefficient NASA Polynomials This is implemented in the class NasaPoly1 in NasaPoly1.h
virtual void modifyParameters(doublereal *coeffs)
Modify parameters for the standard state.
vector_fp m_coeff
array of polynomial coefficients, stored in the order [a0, ..., a6]
doublereal m_highT
Highest valid temperature.
virtual void updatePropertiesTemp(const doublereal temp, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Compute the reference-state property of one species.
doublereal m_lowT
lowest valid temperature
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
virtual size_t temperaturePolySize() const
Number of terms in the temperature polynomial for this parameterization.
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
NasaPoly1(double tlow, double thigh, double pref, const double *coeffs)
Normal constructor.
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...
The NASA polynomial parameterization for one temperature range.
doublereal m_Pref
Reference state pressure.
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) ...
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.
NasaPoly1()
Empty constructor.