Fixed an error in the entropy calculation for NASA9 polynomials.
This commit is contained in:
parent
5a4576a65e
commit
26797f4a59
2 changed files with 7 additions and 4 deletions
|
|
@ -200,10 +200,9 @@ namespace Cantera {
|
|||
doublereal cpdivR = ct0 + ct1 + ct2 + ct3 + ct4 + ct5 + ct6;
|
||||
doublereal hdivRT = -ct0 + tt[6]*ct1 + ct2 + 0.5*ct3 + OneThird*ct4
|
||||
+ 0.25*ct5 + 0.2*ct6 + m_coeff[7] * tt[4];
|
||||
doublereal sdivR = -2.0*ct0 - ct1 + tt[6]*ct2 + ct3 + 0.5*ct4
|
||||
doublereal sdivR = -0.5*ct0 - ct1 + tt[6]*ct2 + ct3 + 0.5*ct4
|
||||
+ OneThird*ct5 + 0.25*ct6 + m_coeff[8];
|
||||
|
||||
|
||||
// return the computed properties in the location in the output
|
||||
// arrays for this species
|
||||
cp_R[m_index] = cpdivR;
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ namespace Cantera {
|
|||
}
|
||||
}
|
||||
#endif
|
||||
m_regionPts[m_currRegion]->updateProperties(tt, cp_R, h_RT, s_R);
|
||||
(m_regionPts[m_currRegion])->updateProperties(tt, cp_R, h_RT, s_R);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -347,6 +347,7 @@ namespace Cantera {
|
|||
tlow = m_lowT;
|
||||
thigh = m_highT;
|
||||
pref = m_Pref;
|
||||
double ctmp[12];
|
||||
coeffs[0] = m_numTempRegions;
|
||||
int index = 1;
|
||||
int n_tmp = 0;;
|
||||
|
|
@ -355,7 +356,10 @@ namespace Cantera {
|
|||
for (int iReg = 0; iReg < m_numTempRegions; iReg++) {
|
||||
m_regionPts[iReg]->reportParameters(n_tmp, type_tmp,
|
||||
coeffs[index], coeffs[index+1],
|
||||
pref_tmp, coeffs + index + 2);
|
||||
pref_tmp, ctmp);
|
||||
for (int i = 0; i < 9; i++) {
|
||||
coeffs[index+2+i] = ctmp[3+i];
|
||||
}
|
||||
index += 11;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue