changing polynomial equations used by Cantera to determine thermo props (cp, H, and s)

165 views
Skip to first unread message

Christopher Goldenstein

unread,
Jan 9, 2018, 9:18:14 AM1/9/18
to Cantera Users' Group
Hello,

I would like to change how Cantera calculates the specific heat capacity and enthalpy of select species in a kinetic simulation of a reacting ideal gas. Specifically, I would like to specify specific and constant values of specific heat capacity (cp) and enthalpy (h), however this is problematic given that these thermodynamic properties are calculated by default using the 7-coefficient NASA polynomial method shown below:

Cp       = R*(a1 + a2.*T + a3.*T.^2 + a4.*T.^3 + a5.*T.^4);

 

H        = R*(a1.*T + 0.5.*a2.*T.^2 + (1/3).*a3.*T.^3 + (1/4).*a4.*T.^4 + (1/5).*a5.*T.^5 + a6);


Can someone tell me how I could prescribe a constant and user-specified value of cp and H (i.e., cp = 10 J/mole-K, H = 3000 J/mole) for a given chemical species (e.g., N2, O2, CO etc.)?  I would like to incorporate this functionality into the thermo data file used for running kinetic simulations of ideal gas reactors with kinetic mechanism files in the Chemkin format (converted to cti format of course).

Thank you

Bryan W. Weber

unread,
Jan 9, 2018, 9:29:57 AM1/9/18
to Cantera Users' Group
Christopher,

You can specify a constant specific heat using the const_cp thermodynamics type, rather than the NASA type, see: http://cantera.org/docs/sphinx/html/cti/species.html#constant-heat-capacity

However, I don't think you can have non-zero c_p and constant h, since c_p = dh/dT. If you want both to be constant, you'll have to define a new thermo class. Watch out for the units too, many CTI files will default to cgs units if they've been converted from CK files.

Also, for what it's worth, you could possibly keep using the NASA polynomials and set all the constants except a1 and a6 (as you have it written, a0 and a5 in the online documentation) to zero. That would give you the same behavior as the const_cp type for c_p and h, but the entropy would be computed differently.

Best,
Bryan

Steven DeCaluwe

unread,
Jan 9, 2018, 11:57:21 AM1/9/18
to <cantera-users@googlegroups.com>
Hi Christopher, 

I second Bryan’s comments, but just want to push back a little more forcefully on the idea that you can have a phase with constant Cp and h.  I would strongly advise against this

You could, in principle, define a new phase with these qualities. But it is at its very nature thermodynamically inconsistent because, as Bryan points out, Cp = dh/dT.  You would, essentially, be changing the very definition of Cp in such a model. I’m also not quite sure what benefit this gets you.

I would recommend deciding on one or the other — constant h (and Cp = 0) or constant Cp and an enthalpy that varies linearly with T — and using the const_cp thermo type.

Best,
Steven


——————————————————————————————————
Steven DeCaluwe, PhD
Assistant Professor of Mechanical Engineering
Colorado School of Mines
Brown Building W410B
Golden, CO 80401

Twitter: @DeCaluweGroup

--
You received this message because you are subscribed to the Google Groups "Cantera Users' Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cantera-user...@googlegroups.com.
To post to this group, send email to canter...@googlegroups.com.
Visit this group at https://groups.google.com/group/cantera-users.
For more options, visit https://groups.google.com/d/optout.

Christopher Goldenstein

unread,
Mar 8, 2018, 4:22:41 PM3/8/18
to Cantera Users' Group
Thank you Bryan and Steve, I was able to achieve my goals using the constant specific heat operation.

Best wishes


On Tuesday, January 9, 2018 at 11:57:21 AM UTC-5, S. DeCaluwe wrote:
Hi Christopher, 

I second Bryan’s comments, but just want to push back a little more forcefully on the idea that you can have a phase with constant Cp and h.  I would strongly advise against this

You could, in principle, define a new phase with these qualities. But it is at its very nature thermodynamically inconsistent because, as Bryan points out, Cp = dh/dT.  You would, essentially, be changing the very definition of Cp in such a model. I’m also not quite sure what benefit this gets you.

I would recommend deciding on one or the other — constant h (and Cp = 0) or constant Cp and an enthalpy that varies linearly with T — and using the const_cp thermo type.

Best,
Steven

——————————————————————————————————
Steven DeCaluwe, PhD
Assistant Professor of Mechanical Engineering
Colorado School of Mines
Brown Building W410B
Golden, CO 80401

Twitter: @DeCaluweGroup

Steven DeCaluwe

unread,
Mar 8, 2018, 4:32:07 PM3/8/18
to canter...@googlegroups.com
Excellent - glad to hear it!

——————————————————————————————————
Steven DeCaluwe, PhD
Assistant Professor of Mechanical Engineering
Colorado School of Mines
Brown Building W410B
Golden, CO 80401

Twitter: @DeCaluweGroup
Reply all
Reply to author
Forward
0 new messages