Using REFPROP in Cantera to generate a flamelet table

522 views
Skip to first unread message

Christopher Neal

unread,
Apr 4, 2016, 10:21:14 AM4/4/16
to Cantera Users' Group
I'm very new to Cantera. I'm considering using Cantera to generate laminar counter-flow diffusion flamelet tables. I was wondering if it would be possible for me to write new code or alter existing code in Cantera such that it queries  REFPROP for thermodynamic state information when computing a laminar counter-flow diffusion flamelet table. REFPROP is just a NIST code that has very accurate thermodynamic and transport property data for a wide range of common fluids.

Does anyone have experience with doing anything like this? Or any ideas where I should look in the source code to get a start in establishing whether my goal is even possible?

REFPROP Info: http://www.nist.gov/srd/nist23.cfm

Thank you,
Chris Neal

Ray Speth

unread,
Apr 4, 2016, 11:29:53 AM4/4/16
to Cantera Users' Group
Chris,

Setting aside the software interfacing for a moment, I'm not sure how this would work. REFPROP implements non-ideal equations of states for a set of stable species. If you wanted to use those equations of state for a flame simulation, you would also need to have equations of state for all of the unstable intermediate species present in the flame. In addition, at least in the case of Cantera, the governing equations of the flame are implemented specifically for ideal gases, so you would need to reformulate the governing equations for a more arbitrary equation of state and implement that as well. You would also need a reaction mechanism that was valid under conditions where real gas effects are important, although at least on this front Cantera does support fairly arbitrary parameterizations of rate constants (e.g. Chebyshev polynomials as a function of T and P). Finally, you would need to implement a transport model that worked under these conditions, since REFPROP does not seem to provide these, and Cantera's mixture averaged and multicomponent models only apply to ideal gases.

Regards,
Ray

Christopher Neal

unread,
Apr 5, 2016, 9:57:25 AM4/5/16
to Cantera Users' Group
I see what you are saying Ray. My confusion comes from my limited(learning) knowledge about flamelet table generation. I have experience generating flamelet tables using FlameMaster. In that code I could specify an equation of state to use. I think it had Ideal, Peng-Robinson, and SRK. My original thought was that because FlameMaster was querying an EOS equation, I could insert a code in between the query and the EOS that directed the query information to a REFPROP tabulation of the species.

I want to make sure I understand your explanation for why REFPROP would fail in my plan.

At one state of a combustion process there may be N species that were generated from say 2 original species(fuel and oxidizer). The governing equations may need a mixture density at that state. A weighted sum of the densities of the individual species weighted by their mass fraction can be used to compute a mixture density. The Ideal Gas and Peng-Robinson equations of state would be able to at least estimate a value of the density for all of the species from the information about the atomic structure of the atoms that compose the species and the pressure and temperature of the species. Whereas REFPROP only has properties for common species, so it can not provide an estimate for the N intermediate species.

I appreciate your insight into my question Ray.

Thank you,
Chris

Ray Speth

unread,
Apr 5, 2016, 12:47:57 PM4/5/16
to Cantera Users' Group
Chris,

That's interesting, I was not aware that FlameMaster supported non-ideal equations of state. Cantera's 1D flame model currently does not. There is an implementation of the Redlich-Kwong EOS, which could presumably be extended to include the Soave modification, but there would be additional work to make the flame governing equations work with a non-ideal EOS. Cantera also has an existing thermo model which is effectively a wrapper around what was at one point a separate package implementing several non-ideal equations of state (the PureFluidPhase class), which you could look at as a model for wrapping REFPROP. Presumably you could look at the papers that describe FlameMaster to see the governing equations and how the kinetics and transport properties are treated as well. Even so, implementing all of that in Cantera would be a major undertaking.

Regards,
Ray

Sai Praneeth

unread,
Feb 27, 2017, 7:31:02 AM2/27/17
to Cantera Users' Group
Hi Chris, 

Were you able to implement REFPROP into Cantera ?
I'm really curious to know.

I've been working on the same issue. But barely any progress..

Thanks, 
Sai

chri...@snumerics.com

unread,
Feb 27, 2017, 4:00:14 PM2/27/17
to Cantera Users' Group
Hi Sai,

I did not. It seemed from what Ray had said that there is a fundamental issue with using REFPROP for flamelet calculations(because of the intermediate species not being present in the REFPROP database). Of course maybe there would be some middle ground where species that are present in REFPROP are used, and when they are not present, a suitable EOS is used. This would be worrisome in my mind because special care would have to be taken to ensure that the combination of the properties from REFPROP and the EOS is thermodynamically consistent i.e. definitions of reference values, etc.

-Chris

chri...@snumerics.com

unread,
Nov 29, 2017, 5:57:56 PM11/29/17
to Cantera Users' Group
Hey Ray,

Sorry for reviving a dead thread. Could you summarize what would be the main focus areas of work that would have to be done if we forget about the REFPROP stuff and just considered adding the Peng Robinson EOS? Which areas of the code would have to be adjusted/updated to implement PREOS?

Thank you

Steven DeCaluwe

unread,
Nov 29, 2017, 6:11:02 PM11/29/17
to canter...@googlegroups.com
Hi Chris,

To get an idea, look at the class in RedlichKwongMFTP.cpp.  You would basically need to replicate the derivations done there, but for the PR EoS.  

However, you revive this thread at a good time - my group is actually working on this, at the moment.  We’ve got the derivations done, are double-checking them, and then will work up the code implementation. Hoping to have something around year’s end to merge into Cantera.

Best,
Steven


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

Twitter: @DrDeCaluwe

--
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.

chri...@snumerics.com

unread,
Nov 30, 2017, 1:45:31 PM11/30/17
to Cantera Users' Group
Thanks Steven. Great to hear of your work.  With the PREOS capability added to Cantera, all that needs to be done is to get a working arclength continuation method implemented and Cantera would be a complete tool for generation of flamelet tables.


On Wednesday, November 29, 2017 at 6:11:02 PM UTC-5, S. DeCaluwe wrote:
Hi Chris,

To get an idea, look at the class in RedlichKwongMFTP.cpp.  You would basically need to replicate the derivations done there, but for the PR EoS.  

However, you revive this thread at a good time - my group is actually working on this, at the moment.  We’ve got the derivations done, are double-checking them, and then will work up the code implementation. Hoping to have something around year’s end to merge into Cantera.

Best,
Steven


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

Reply all
Reply to author
Forward
0 new messages