14 #ifndef CT_NASAPOLY1_H 15 #define CT_NASAPOLY1_H 56 NasaPoly1(
double tlow,
double thigh,
double pref,
const double* coeffs)
72 T_poly[2] = T_poly[1] * T;
73 T_poly[3] = T_poly[2] * T;
75 T_poly[5] = std::log(T);
90 doublereal* cp_R, doublereal* h_RT, doublereal* s_R)
const {
92 doublereal ct1 =
m_coeff[1]*tt[0];
93 doublereal ct2 =
m_coeff[2]*tt[1];
94 doublereal ct3 =
m_coeff[3]*tt[2];
95 doublereal ct4 =
m_coeff[4]*tt[3];
98 cp = ct0 + ct1 + ct2 + ct3 + ct4;
99 h = ct0 + 0.5*ct1 + 1.0/3.0*ct2 + 0.25*ct3 + 0.2*ct4
101 s = ct0*tt[5] + ct1 + 0.5*ct2 + 1.0/3.0*ct3
111 doublereal* cp_R, doublereal* h_RT,
112 doublereal* s_R)
const {
119 doublereal& tlow, doublereal& thigh,
121 doublereal*
const coeffs)
const {
130 virtual doublereal
reportHf298(doublereal*
const h298 = 0)
const {
132 double temp = 298.15;
135 doublereal ct1 =
m_coeff[1]*tt[0];
136 doublereal ct2 =
m_coeff[2]*tt[1];
137 doublereal ct3 =
m_coeff[3]*tt[2];
138 doublereal ct4 =
m_coeff[4]*tt[3];
140 double h_RT = ct0 + 0.5*ct1 + 1.0/3.0*ct2 + 0.25*ct3 + 0.2*ct4
152 double delH = Hf298New - hcurr;
164 double m_coeff5_orig;
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) ...
Abstract Base class for the thermodynamic manager for an individual species' reference state...
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.
Pure Virtual Base class for individual species reference state thermodynamic managers and text for th...
virtual int reportType() const
Returns an integer representing the type of parameterization.
virtual void resetHf298()
Restore the original heat of formation for this species.
#define NASA1
7 coefficient NASA Polynomials This is implemented in the class NasaPoly1 in NasaPoly1.h
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 polynomial coefficients, stored in the order [a0, ..., a6]
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...
doublereal m_highT
Highest 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) ...
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 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.
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
NasaPoly1(double tlow, double thigh, double pref, const double *coeffs)
Normal constructor.
The NASA polynomial parameterization for one temperature range.
doublereal m_Pref
Reference state pressure.
Namespace for the Cantera kernel.