Enthalpy of formation ThermoPhase call not in Python

15 views
Skip to first unread message

Estevan Rezende

unread,
Aug 28, 2025, 10:02:42 AM (10 days ago) Aug 28
to Cantera Users' Group
Hello everyone!

I would like to open a conversation about the enthalpy of formation function(s) present in ThermoPhase.h

- Hf298SS()
- modifyOneHf298SS()
- resetHf298()

Although these functions exist in the C++ header file, i think they are not specified in the .pxd for compatibility to the Python code. 

For background: I'm working with enthalpy of formation of some custom species in Python, but if I would try to call any of these functions it returns "AttributeError: 'Solution' object has no attribute 'reportOneHf298'" so I need to calculate it by hand (I know, super hard), still I would like to share this.

This is true for any Solution object in Python. The big question is, i could not find anywhere a reference or use for this call, still I would wager it could be added in the Cython code if it has no inherent problems. To finalize, would a ticket in GITHUB be apropriate for this? 

Thanks for any suggestion! 

Ray Speth

unread,
Aug 28, 2025, 2:54:56 PM (10 days ago) Aug 28
to Cantera Users' Group

Hi,

I think the need for this function even in C++ is dubious. If you want to calculate the standard state properties of a mixture at the reference temperature, all you have to do is set the mixture to that temperature and access the standard state properties (which are available in Python in their nondimensional forms, for example gas.standard_enthalpies_RT.). The only reason for this special function in C++ is as a convenience for setting up sensitivity analysis with respect to enthalpy of formation without having to modify and then reset the state of the mixture. I’d consider removing it outright before propagating it to the other language interfaces.

Regards,
Ray

Reply all
Reply to author
Forward
0 new messages