eConstThermo: Improve consistency between the H and E functions

so that conversions between H and E and back again reproduce the original
values.
This commit is contained in:
Henry Weller
2018-10-13 21:46:48 +01:00
parent e1e7d4d763
commit 7f16808709
2 changed files with 3 additions and 3 deletions

View File

@ -106,7 +106,7 @@ inline Foam::scalar Foam::eConstThermo<EquationOfState>::Ha
const scalar T
) const
{
return Cp(p, T)*T + Hf_ + EquationOfState::H(p, T);
return Hs(p, T) + Hc();
}
@ -117,7 +117,7 @@ inline Foam::scalar Foam::eConstThermo<EquationOfState>::Hs
const scalar T
) const
{
return Cp(p, T)*T + EquationOfState::H(p, T);
return Cv_*T + p/EquationOfState::rho(p, T) + EquationOfState::H(p, T);
}

View File

@ -105,7 +105,7 @@ inline Foam::scalar Foam::hConstThermo<EquationOfState>::Ha
const scalar p, const scalar T
) const
{
return Cp_*T + Hf_ + EquationOfState::H(p, T);
return Hs(p, T) + Hc();
}