在求解温度的过程中到了显焓Hs(p,t)和比热Cp(p,t)函数,其计算方法在
// $FOAM_SRCthermophysicalModels/specie/thermo/janaf/janafThermoI.H
template
inline Foam::scalar Foam::janafThermo::Cp
(
const scalar p,
const scalar T
) const
{
const coeffArray& a = coeffs(T);
return
((((a[4]*T + a[3])*T + a[2])*T + a[1])*T + a[0])
+ EquationOfState::Cp(p, T);
}
template
inline Foam::scalar Foam::janafThermo::Ha
(
const scalar p,
const scalar T
) const
{
const coeffArray& a = coeffs(T);
return
(
((((a[4]/5.0*T + a[3]/4.0)*T + a[2]/3.0)*T + a[1]/2.0)*T + a[0])*T
+ a[5]
) + EquationOfState::H(p, T);
}
template
inline Foam::scalar Foam::janafThermo::Hs
(
const scalar p,
const scalar T
) const
{
return Ha(p, T) - Hc();
}
template
inline Foam::scalar Foam::janafThermo::Hc() const
{
const coeffArray& a = lowCpCoeffs_;
return
(
(
(((a[4]/5.0*Tstd + a[3]/4.0)*Tstd + a[2]/3.0)*Tstd + a[1]/2.0)*Tstd
+ a[0]
)*Tstd + a[5]
);
}
理想气体的计算公式在
// $FOAM_SRC/thermophysicalModels/specie/equationOfState/perfectGas
template
inline Foam::scalar Foam::perfectGas::rho(scalar p, scalar T) const
{
return p/(this->R()*T);
}
template
inline Foam::scalar Foam::perfectGas::H(scalar p, scalar T) const
{
return 0;
}
template
inline Foam::scalar Foam::perfectGas::Cp(scalar p, scalar T) const
{
return 0;
}
根据温度的不同,janaf选用高温和低温两组不同的系数来计算热物性参数,例如,当温度大于Tcommon(一般为1000K)时采用高温度的多项式系数,当温度小于Tcommon时,采用低温度的多项式系数。
// thermophysicalModels/specie/thermo/janaf/janafThermoI.H
template
inline const typename Foam::janafThermo::coeffArray&
Foam::janafThermo::coeffs
(
const scalar T
) const
{
if (T < Tcommon_)
{
return lowCpCoeffs_;
}
else
{
return highCpCoeffs_;
}
}
其中比热的计算方法:
template
inline Foam::scalar Foam::janafThermo::Cp
(
const scalar p,
const scalar T
) const
{
const coeffArray& a = coeffs(T);
return
((((a[4]*T + a[3])*T + a[2])*T + a[1])*T + a[0])
+ EquationOfState::Cp(p, T);
}
总焓的计算方法
template
inline Foam::scalar Foam::janafThermo::Ha
(
const scalar p,
const scalar T
) const
{
const coeffArray& a = coeffs(T);
return
(
((((a[4]/5.0*T + a[3]/4.0)*T + a[2]/3.0)*T + a[1]/2.0)*T + a[0])*T
+ a[5]
) + EquationOfState::H(p, T);
}
显焓的计算方法
template
inline Foam::scalar Foam::janafThermo::Hs
(
const scalar p,
const scalar T
) const
{
return Ha(p, T) - Hc();
}
生成焓的计算方法:
template
inline Foam::scalar Foam::janafThermo::Hc() const
{
const coeffArray& a = lowCpCoeffs_;
return
(
(
(((a[4]/5.0*Tstd + a[3]/4.0)*Tstd + a[2]/3.0)*Tstd + a[1]/2.0)*Tstd
+ a[0]
)*Tstd + a[5]
);
}
可以明显地看出,显焓=总焓-生成焓