Is it possible to calculate the Cp equilibrium with Cantera like CEA on Nasa page

418 views
Skip to first unread message

Martin

unread,
Sep 15, 2021, 2:22:53 PM9/15/21
to Cantera Users' Group
Hello everyone,

My question is simple, is it possible to calculate the Cp equilibrium with Cantera like CEA on Nasa page ?

Because with Cantera we can get the Cp frozen, but I can't find the Cp equilibrium. 

I would need it for a combustion model.

And I tried to understand the equations, but it's way too complicated for me, it requires a partial derivation of the mole of an element as a function of temperature as I read here : http://www.diva-portal.org/smash/get/diva2:1131579/FULLTEXT01.pdf

PAGE 7.

Thank you in advance for your answer and you time.

Martin

Kyle Niemeyer

unread,
Sep 15, 2021, 7:17:14 PM9/15/21
to Cantera Users' Group
Hi Martin,

Yes, it is possible! It's just a bit more complicated. I actually put together a (not brief) explainer on how to do this: https://kyleniemeyer.github.io/rocket-propulsion/thermochemistry/cea_cantera.html

I'm also working on a Cantera-based equivalent to CEA, that uses this method, but it is not ready to share. In the meantime, you can do the calculations using the code I shared.

Kyle

nick.ma...@gmail.com

unread,
Sep 16, 2021, 1:49:19 AM9/16/21
to Cantera Users' Group
An approximate result can be obtained using Cantera using finite differences, much like the equilibrium sound speed example in Cantera's documentation:

For equilibrium Cp, you can take a mixture, perturb its temperature at constant pressure, equilibrate at constant temperature and pressure, find the new enthalpy, and estimate (dh/dT)_P,X=X_eq = Cp_eq.

A minimum worked example below:

In [1]: import cantera as ct

In [2]: gas = ct.Solution('gri30_highT.cti')

In [3]: gas.TPX = 298.15,200e5,'H2:2 O2:1'

In [4]: h1 = gas.enthalpy_mass

In [5]: dT = 0.01 # K

In [6]: gas.equilibrate('HP')

In [7]: Cpfrozen = gas.cp_mass

In [8]: print(Cpfrozen)
3275.657932377731

In [9]: gas.TP = gas.T+dT,gas.P

In [10]: h2frozen = gas.enthalpy_mass

In [11]: gas.equilibrate('TP')

In [12]: h2equilibrium = gas.enthalpy_mass

In [13]: Cpequilibrium = (h2equilibrium - h1)/dT

In [14]: print(Cpequilibrium)
9216.541787126356

In [15]: (h2frozen-h1)/dT
Out[15]: 3275.669037765571

Martin

unread,
Sep 16, 2021, 4:28:49 AM9/16/21
to Cantera Users' Group
Hello everyone !

YOU ARE THE BEST ! 

I have all to continue my work, it's incredible !

Kyle, You are right my model is for a rocket engine ahah ! 
I prefer to use Cantera is more flexible than CEA, for my opinion. 
And your site is wonderful, all things I have learnt is sum-up here, congratulation for your work and to share it !! 


Nick, thank you for your answer this approach is very interesting. 
The advantage is is very fast to obtain the CP equilibrium.

Thank you more, 

Have a good day/night

Martin

unread,
Sep 19, 2021, 9:37:36 AM9/19/21
to Cantera Users' Group
Hello, I have another small question about your website Kyle:

In the input data for O2(L) and H2(L) you only use T0 and h0 but why not use parametric equations to get the same things? 

For example, in the file "liquidvapor.yaml" we have equations for liquid H2. 

What is the difference with your model? 

In your model, we can't change the temperature and it's a little problem for me..

Thank you 
Reply all
Reply to author
Forward
0 new messages