How to implement a new equation of state ?

100 views
Skip to first unread message

Guowei LYU

unread,
Mar 29, 2024, 9:40:09 AM3/29/24
to Cantera Users' Group
Hello, professors and scholars,
I am planning to implement new real gas EOS in Cantera, such as the SRK EOS and new temperature functions α(T). So, where should I start? 
I think the problems I am going to deal with only include PVT relationships and thermodynamic functions such as heat capacity. The functionalities of Cantera, such as file reading and chemical reaction calculation, are excellent and not something I want to change.
Now I am trying to derive a class from the " MixtureFugacityTP" class. Is this effective?

Wish you a wonderful day.

Ingmar Schoegl

unread,
Mar 29, 2024, 4:02:46 PM3/29/24
to Cantera Users' Group
Hi,
Please have a look at the enhancement request on GitHub (https://github.com/Cantera/enhancements/issues/159) as well as the associated work in progress (https://github.com/Cantera/cantera/pull/1423) - I assume this is what you are asking about. I am not sure what the current status is, but there definitely appears to be an interest to get this over the finishing line. Regards,
-is-

Guowei LYU

unread,
Mar 29, 2024, 10:33:31 PM3/29/24
to Cantera Users' Group
Hi, Ingmar,

Thanks for your help! I'm glad to see someone with the same goals as me. Actually, last night I replaced "ThermoFactory.cpp" and derived a new class from "MixureFugacityTP", and the code ran as I expected. I am currently dealing with various thermodynamic functions. I think I will follow up on the progress of "work in progress" and share my work on it when I make further progress.

Best,
Guowei

Z. Weng

unread,
Mar 31, 2024, 9:55:55 PM3/31/24
to Cantera Users' Group

Hi, 

We have implemented a number of cubic EoS in Cantera 2.4, see Weng, et al. Combustion and Flame 245, 112318 (2022). and Weng, et al., Computers & Fluids 265, 106012 (2023). Copy the native EoS implementations, like RedlichKwong and PengRobinson, and modify it would be a good starting point.

Best,
Z. Weng
Reply all
Reply to author
Forward
0 new messages