14 #ifndef CT_NASAPOLY1_H 15 #define CT_NASAPOLY1_H 53 "Default constructor to be removed after Cantera 2.3.");
64 NasaPoly1(
double tlow,
double thigh,
double pref,
const double* coeffs)
85 T_poly[2] = T_poly[1] * T;
86 T_poly[3] = T_poly[2] * T;
88 T_poly[5] = std::log(T);
103 doublereal* cp_R, doublereal* h_RT, doublereal* s_R)
const {
105 doublereal ct1 =
m_coeff[1]*tt[0];
106 doublereal ct2 =
m_coeff[2]*tt[1];
107 doublereal ct3 =
m_coeff[3]*tt[2];
108 doublereal ct4 =
m_coeff[4]*tt[3];
111 cp = ct0 + ct1 + ct2 + ct3 + ct4;
112 h = ct0 + 0.5*ct1 + 1.0/3.0*ct2 + 0.25*ct3 + 0.2*ct4
114 s = ct0*tt[5] + ct1 + 0.5*ct2 + 1.0/3.0*ct3
124 doublereal* cp_R, doublereal* h_RT,
125 doublereal* s_R)
const {
132 doublereal& tlow, doublereal& thigh,
134 doublereal*
const coeffs)
const {
147 "Cantera 2.3. Use MultiSpeciesThermo::modifySpecies instead.");
148 std::copy(coeffs, coeffs+7,
m_coeff.begin());
151 virtual doublereal
reportHf298(doublereal*
const h298 = 0)
const {
153 double temp = 298.15;
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];
161 double h_RT = ct0 + 0.5*ct1 + 1.0/3.0*ct2 + 0.25*ct3 + 0.2*ct4
173 double delH = Hf298New - hcurr;
185 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.
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
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 modifyParameters(doublereal *coeffs)
virtual SpeciesThermoInterpType * duplMyselfAsSpeciesThermoInterpType() const
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.
NasaPoly1()
Empty constructor.