Hi,
In my CFD code, I need to get the total enthalpy of each species at every grid point. So far here's the way I'm doing it for species "s":
- Set all moles fractions to 0 except for species "s" which is 1
- call "setState_TPX" with local temperature, pressure and mole fraction previously defined
- get enthalpy from enthalpy_mass(my_gas)
This seems to be an overkill. I could numerically integrate the temperature along Cp and add it to the enthalpy of formation at the reference state. Another method would be to tabulate all the total enthalpies for each species for the expected temperature range and then interpolate. However, I first wanted to know if there was any built in function or a better way to do it with Cantera? Even if it involves introducing minor changes to the source code.
Thanks,
Solal Amouyal