13 #ifndef CT_NASAPOLY1_H
14 #define CT_NASAPOLY1_H
70 NasaPoly1(
size_t n, doublereal tlow, doublereal thigh, doublereal pref,
71 const doublereal* coeffs) :
77 std::copy(coeffs, coeffs + 7,
m_coeff.begin());
173 doublereal* cp_R, doublereal* h_RT, doublereal* s_R)
const {
176 doublereal ct1 =
m_coeff[3]*tt[0];
177 doublereal ct2 =
m_coeff[4]*tt[1];
178 doublereal ct3 =
m_coeff[5]*tt[2];
179 doublereal ct4 =
m_coeff[6]*tt[3];
182 cp = ct0 + ct1 + ct2 + ct3 + ct4;
183 h = ct0 + 0.5*ct1 +
OneThird*ct2 + 0.25*ct3 + 0.2*ct4
185 s = ct0*tt[5] + ct1 + 0.5*ct2 +
OneThird*ct3
215 doublereal* cp_R, doublereal* h_RT,
216 doublereal* s_R)
const {
219 tPoly[1] = temp * temp;
220 tPoly[2] = tPoly[1] * temp;
221 tPoly[3] = tPoly[2] * temp;
222 tPoly[4] = 1.0 / temp;
223 tPoly[5] = std::log(temp);
242 doublereal& tlow, doublereal& thigh,
244 doublereal*
const coeffs)
const {
252 for (
int i = 2; i < 7; i++) {
265 for (
int i = 0; i < 5; i++) {
270 #ifdef H298MODIFY_CAPABILITY
272 virtual doublereal reportHf298(doublereal*
const h298 = 0)
const {
274 double temp = 298.15;
277 tt[2] = tt[1] * temp;
278 tt[3] = tt[2] * temp;
282 doublereal ct1 =
m_coeff[3]*tt[0];
283 doublereal ct2 =
m_coeff[4]*tt[1];
284 doublereal ct3 =
m_coeff[5]*tt[2];
285 doublereal ct4 =
m_coeff[6]*tt[3];
287 double h_RT = ct0 + 0.5*ct1 +
OneThird*ct2 + 0.25*ct3 + 0.2*ct4
297 virtual void modifyOneHf298(
const int k,
const doublereal Hf298New) {
301 double hcurr = reportHf298(0);
302 double delH = Hf298New - hcurr;