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) :
68 std::copy(coeffs, coeffs + 7,
m_coeff.begin());
90 SpeciesThermoInterpType::operator=(b);
129 doublereal* cp_R, doublereal* h_RT, doublereal* s_R)
const {
131 doublereal ct1 =
m_coeff[3]*tt[0];
132 doublereal ct2 =
m_coeff[4]*tt[1];
133 doublereal ct3 =
m_coeff[5]*tt[2];
134 doublereal ct4 =
m_coeff[6]*tt[3];
137 cp = ct0 + ct1 + ct2 + ct3 + ct4;
138 h = ct0 + 0.5*ct1 +
OneThird*ct2 + 0.25*ct3 + 0.2*ct4
140 s = ct0*tt[5] + ct1 + 0.5*ct2 +
OneThird*ct3
153 doublereal* cp_R, doublereal* h_RT,
154 doublereal* s_R)
const {
157 tPoly[1] = temp * temp;
158 tPoly[2] = tPoly[1] * temp;
159 tPoly[3] = tPoly[2] * temp;
160 tPoly[4] = 1.0 / temp;
161 tPoly[5] = std::log(temp);
167 doublereal& tlow, doublereal& thigh,
169 doublereal*
const coeffs)
const {
178 for (
int i = 2; i < 7; i++) {
193 for (
int i = 0; i < 5; i++) {
198 #ifdef H298MODIFY_CAPABILITY
200 virtual doublereal reportHf298(doublereal*
const h298 = 0)
const {
202 double temp = 298.15;
205 tt[2] = tt[1] * temp;
206 tt[3] = tt[2] * temp;
210 doublereal ct1 =
m_coeff[3]*tt[0];
211 doublereal ct2 =
m_coeff[4]*tt[1];
212 doublereal ct3 =
m_coeff[5]*tt[2];
213 doublereal ct4 =
m_coeff[6]*tt[3];
215 double h_RT = ct0 + 0.5*ct1 +
OneThird*ct2 + 0.25*ct3 + 0.2*ct4
225 virtual void modifyOneHf298(
const size_t& k,
const doublereal Hf298New) {
229 double hcurr = reportHf298(0);
230 double delH = Hf298New - hcurr;
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
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
This file contains definitions for utility functions and text for modules, inputfiles, logs, textlogs, HTML_logs (see Input File Handling, Diagnostic Output, Writing messages to the screen and Writing HTML Logfiles).
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.
const doublereal OneThird
1/3
virtual SpeciesThermoInterpType * duplMyselfAsSpeciesThermoInterpType() const
duplicator
vector_fp m_coeff
array of polynomial coefficients
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.
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
virtual void reportParameters(size_t &n, int &type, doublereal &tlow, doublereal &thigh, doublereal &pref, doublereal *const coeffs) const
The NASA polynomial parameterization for one temperature range.
doublereal m_Pref
Reference state pressure.
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.