Skip to content

hConst in combination with multiComponentMixture uses Tref of first specie for all reference enthalpies Href

Summary

When defining different reference enthalpies with individual reference temperatures in the thermophysicalProperties dictionary, only the reference temperature of the first one is used to calculate the enthalpy of the sum of two species in hConstThermoI.H under Foam::operator+:

[...] return hConstThermo<EquationOfState> ( eofs, ct1.Y()/eofs.Y()*ct1.Cp_ + ct2.Y()/eofs.Y()*ct2.Cp_, ct1.Y()/eofs.Y()*ct1.Hf_ + ct2.Y()/eofs.Y()*ct2.Hf_, ct1.Tref_, ct1.Y()/eofs.Y()*ct1.Hsref_ + ct2.Y()/eofs.Y()*ct2.Hsref_ ); [...]

Steps to reproduce

Definition of multiple species using multiComponentMixture in combination with hConst and individual Trefs for each species.

Example case

What is the current bug behaviour?

Only the first reference temperature is used (see above).

What is the expected correct behavior?

It would be correct to calculate the mixture enthalpy with each individual reference temperature. Alternatively, the reference temperature should be defined only once in the thermophysicalProperties dict to make it clear to the user that the same reference temperature must be used for each species.

Relevant logs and/or images

Environment information

  • OpenFOAM version : v2012
  • Operating system : ubuntu 22.04.4 LTS
  • Hardware info : intel
  • Compiler : gcc 9.5.0

Possible fixes

Define a global reference temperature in thermophysical properties instead of individual ones for each species.