Inexplicable flame speed results of Cantera compared to PREMIX

1,149 views
Skip to first unread message

Nick G

unread,
May 5, 2014, 7:24:53 AM5/5/14
to canter...@googlegroups.com
Hi,

For the last  couple of weeks, I used the python Cantera premixed adiabatic one-dimensional reaction flow FreeFlame in order to calculate the flame speed of several mixtures of nhepante and air, at different inlet temperatures.
I use a reduced mechanism with only 44 species in CHEMKIN format, Cantera 2.1.1, numpy 1.8.1, and python 3.3.5 on a 64-bit machine
After fine tuning the code (grid, tolerances, refinements, Mix, Multi, Multi+Soret, initial temperature, etc.), and following the tips and strategies on this user group, I am capable of generating results.

Unfortunately, when I compared my results with a CHEMKIN II PREMIX adiabatic freely propagating flame, the results of the flame speed differ a lot.
I compared a range of  equivalence ratio's with 298K as the inlet temperature at atmospheric pressure and Cantera gives between the 5-15 cm/s higher flame speeds.

My question is, how is this possible?
In my understanding they should give similar results, but did I missed something obvious?

I prefer Cantera instead of PREMIX because it can handle different inlet temperatures, without inserting a good initial guess manually.

As a check, I also compared the results of the programs CHEMKIN II EQUIL and Cantera equilibrate for different temperatures,concentrations, and constant enthalpy and pressure.
They do give the same results.

If more information is necessary to make my problem clear, please let me know.
I hope someone finds to time to give me a reply.

Regards,
Nick




Bryan W. Weber

unread,
May 5, 2014, 9:40:54 AM5/5/14
to canter...@googlegroups.com
Hi Nick,

Welcome to Cantera! It would probably help if you posted (preferably by attachment) the script you're using to run the simulations in Cantera and the input file you use in CHEMKIN.

Cheers,
Bryan

Grigory Mokhin

unread,
May 5, 2014, 10:40:19 AM5/5/14
to canter...@googlegroups.com
Hi Nick,

Is the temperature profile of the converged solution in Cantera monotonous? 

I've got similar discrepancies between Cantera (full scheme, multispecies diffusion) and Chemkin/Cosilab results and posted a question to this group, but it remained unanswered. 

Regards,
Grigory

понедельник, 5 мая 2014 г., 15:24:53 UTC+4 пользователь Nick G написал:

Ray Speth

unread,
May 5, 2014, 11:03:50 AM5/5/14
to canter...@googlegroups.com
Hi Nick,

In addition to the input files for both solvers, I'd appreciate a CSV file with the temperature and species profiles for the Chemkin cases, as it's somewhat difficult for me to run Chemkin.

Regards,
Ray

Nick G

unread,
May 5, 2014, 11:28:35 AM5/5/14
to canter...@googlegroups.com
Thanks for the fast reply everybody.

I will post an attachment with the requested files after dinner.
It will contain the cases with a mixture averaged transport model in order to show the differences between the two programs without large computational times.

@Grigory you are right, that's why I found it necessary to create a post. I will post a temperature profile as well.

Regards,
Nick

Nick G

unread,
May 5, 2014, 3:31:41 PM5/5/14
to canter...@googlegroups.com
I promised to make the files available.
It is split up in a PREMIX folder containing the .inp .out and a txt file with the results for different equivalence ratios.
For some reason I am unable to attach a file in this thread via google groups.
So if anyone can make it available after downloading it from this link:
https://www.dropbox.com/s/rmjl14tckq4vwt2/Cantera_vs_PREMIX.zip

Further, the Cantera python file is available with a CSV for an equivalence ratio of 1.0, and a plot of its temperature profile in a .xlsx file.
The nhepante mechanism is also available in its converted .cti and .xml file.

Thank you in advance and have a nice evening.

Regards,
Nick

Bryan W. Weber

unread,
May 5, 2014, 4:26:23 PM5/5/14
to canter...@googlegroups.com
Hi Nick,

One thing I notice right away is that your ending grid point in Cantera is at 25 meters(!), while your ending grid point in PREMIX is at 10 centimeters. Cantera uses SI units for everything, whereas CHEMKIN (PREMIX) uses CGS units... usually. You should try to change the end point in Cantera to something closer to what it is in PREMIX and see about your results.

You can look at this example to see how the initial grid is set: http://cantera.github.io/docs/sphinx/html/cython/examples/onedim_adiabatic_flame.html

Hope it helps,
Bryan

Nick G

unread,
May 6, 2014, 3:22:13 AM5/6/14
to canter...@googlegroups.com
Hi Bryan,

I have set the grid in Cantera at the same size as in PREMIX. This is done by making a linear spaced grid with begin point 0.0, end point 0.1 in meters, and 25 is the number of grid points used between these borders.

import numpy as np
initial_grid = np.linspace(0.0, 0.1, 25)

In this way I could change the grid fast if a case didn't run successfully.

I have tried several grid sizes in the past and it didn't have a big influence on my flame speed. The results at the outlet do differ, and if I am correct, the longer it is, the more the solution goes towards equilibrium values.

Thanks for taking the time to look into my files.

Regards,
Nick

Bryan W. Weber

unread,
May 6, 2014, 9:05:52 AM5/6/14
to canter...@googlegroups.com
Hi Nick,

Oh my goodness, my mistake! Sorry about that. Taking a closer look, it seems like the final GRAD and CURV values in the PREMIX input file you use are somewhat higher than in the Cantera file... I don't think they have a 1-to-1 correspondence as meaning the same thing, but nonetheless have you tried to reduce GRAD and CURV in PREMIX to, say, 0.1 and see what you get?

Could you also attach the CHEMKIN chemistry file? Also, have you tried to compare the results you get to experimental results or previous computational results and see how the comparison goes?

Thanks!
Bryan

Ray Speth

unread,
May 6, 2014, 11:06:14 AM5/6/14
to canter...@googlegroups.com
Nick,

The output you provided for Cantera is for a stoichiometric flame with the fuel 'NXC7H16'. The output you provided from Premix is a rich flame with the fuel 'CH4'. If you'd like to provide an actually comparable example, I'll reiterate the request for *CSV* output from Chemkin, so that it can be easily imported for plotting, rather than the raw output from the solver.

Regards,
Ray

Nick G

unread,
May 6, 2014, 11:34:26 AM5/6/14
to canter...@googlegroups.com
No problem, I am glad with any input.

Running Cantera on the same GRAD and CURV as PREMIX didn't give noticeable differences. Running PREMIX on other refinement settings resulted in a large amount of grid points or resulted in unsuccessful runs.
I played with the other settings as well but it seems to be another problem which I will try to explain in this post.

While using Cantera in order to check the behaviour of the nHeptane mechanism, I found some major differences compared to literature, flame speeds are at some equivalence ratios 15cm/s higher, and the maximum was at equivalence ratio 1.2 instead of the expected 1.1.
See the following papers:

Laminar flame speeds and oxidation kinetics of iso-octane-air and n-heptane-air flames
S. G. Davis and C. K. Law 1998
Laminar flame speeds of preheated iso-ocatne/O2/N2 and n-heptane/O2/N2 mixtures
K. Kumar, J.E. Freeh, C.J. Sung and Y. Huang 2007

Because I did not trust the results, I tried to mimic the results from literature with PREMIX. In most papers the researchers use CHEMKIN PREMIX so did I.
In PREMIX the shape of the flame speed graph, and the range of flame speeds are more like the experimental results. In this way I can use a factor or explain the results.
With Cantera the shape has an offset, and the results gave even higher flame speeds which I try to explain with everyone's help.

I try to visualize it with the following graphs. The title represents the program used. Y-axis laminar flame speed in cm/s X-axis is the equivalence ratio of the fuel/O2/N2.
In the legend the mechanism is shown as GRI3.0 or nHeptane, the program as PREMIX or Cantera, and C7H16 or CH4the fuel used.




It looks like there is a problem with the CHEMKIN mechanism file, when it is converter to a .CTI file.

I will convert a GRI3.0 CHEMKIN mechanism to .CTI and run the same cases with CH4 as with the already provided gri30.cti file in the Cantera data folder.
Hopefully this will present a similar difference as with the converted nHeptane mechanism.

@Ray I started with that rich mixture in order to use it as continuation solution for C7H16 (see the bottom of the .inp file for NXC7H16 cases). I had difficulties finding the right initial temperature and species grid to get a converged solution with PREMIX for C7H16. This rich mixture was an available and working case from a course at my university. Further, I can't seem to get a *CSV* file out of CHEMKIN II PREMIX. I can save it in that file extension, but it won't be separated by commas.

Thanks again and I will keep you updated.

Regards,
Nick

Nick G

unread,
May 6, 2014, 12:49:52 PM5/6/14
to canter...@googlegroups.com
Apologies for not sending the graphs in my previous post.
Again the graphs via a link because it is impossible to upload it to the group...

https://www.dropbox.com/sh/ulnehcvsti2jlxm/wfW7c81RxQ

Regards,
Nick

Ray Speth

unread,
May 6, 2014, 2:18:24 PM5/6/14
to canter...@googlegroups.com
Nick,

I agree, it looks like Chemkin and Cantera are interpreting your mechanism input files differently. Can you provide the original versions of the mechanism, thermo and transport data files?

I'm not really concerned about why you choose any particular mixture condition for your simulation. The point is that no meaningful comparison can be made between the Premix and Cantera results unless the simulation conditions are the same. Please try not to filter out details about the input and output of your simulations; it makes identifying the cause of the discrepancies unnecessarily difficult.

Regards,
Ray

Nick G

unread,
May 6, 2014, 2:58:50 PM5/6/14
to canter...@googlegroups.com
Ray,

I try to find the time to convert the mechanism to .CTI today.

Mechanism is available via the following link:
https://www.dropbox.com/sh/s1z20uw89yb2iee/iqxWFLq8qm

You can find the source of the paper where the mechanism is used in the top of the chem.inp file.
Any other requests, feel free to ask.

Regards,
Nick

Nick G

unread,
May 6, 2014, 4:06:50 PM5/6/14
to canter...@googlegroups.com
Ray,

I converted a CK version of the GRI3.0 mechanism to a .CTI file.
I ran a python script for a CH4 case with exact the same settings as for the GRI3.0.cti file made available in Cantera.
They give exactly the same results:
https://www.dropbox.com/s/3ptbpbipd4bhhpd/5.jpg

The problem still seems to remain in the interpretation of the nHeptane mechanism in Cantera.
If the tran.dat is opened, one can see that 3 columns contain only 0.0.
This is also visible in the transport part in the .CTI and .XML file.
Another difference is that all the species are marked as 'atom' instead of other options like 'linear' or 'nonlinear' as in the GRI3.0.cti file.

Can the difference be explained by this part? If so, is it solvable without the information in the 3 columns containing zero in the tran.dat file of my mechanism?

Like to hear from you.

Regards,
Nick

Bryan W. Weber

unread,
May 6, 2014, 6:03:31 PM5/6/14
to canter...@googlegroups.com
Hi Nick,

From where did you acquire these files? I do not see them attached as "Supplementary material" to the article on ScienceDirect... 

In the tran.dat file, the first column that is all zero is what indicates that each molecule should be treated as an atom. This is *not* a dummy column! You can easily correct this column by inserting 0 for an atom, 1 for a linear molecule, and 2 for a non-linear molecule.

Attached is the CHEMKIN-Pro solution for the laminar flame speed of n-heptane, at the stoichiometric condition using the files as Nick uploaded to dropbox. Also attached is the Cantera solution at the same condition. The temperature profiles are shifted, but are quite similar otherwise. There is an approximately 9cm/s difference in the calculated flame speed.

Best,
Bryan
export-temp.csv
nheptane_adiabatic_mix_eq1.csv

Ray Speth

unread,
May 6, 2014, 11:34:52 PM5/6/14
to canter...@googlegroups.com
Hi Nick,

Yes, of course you get the same results converting the Chemkin-format GRI 3.0 mechanism as you do using gri30.cti, as that's how gri30.cti is generated in the first place. The puzzling thing here is why this n-heptane mechanism shows such large differences between Chemkin and Cantera.

I ran a 0-D, constant volume simulation with Chemkin and Cantera, and got very good agreement for ignition delay, so that suggests the thermodynamic and kinetic data are being handled consistently, although I haven't looked at the detailed species data yet.

I agree with Bryan that the bogus transport data in the input files you provided is somewhat concerning, but changing those values doesn't appear to have enough of an effect to account for the difference in calculated flame speed (although I couldn't immediately find transport data for all of the species). 

Regards,
Ray

Nick G

unread,
May 7, 2014, 4:21:41 AM5/7/14
to canter...@googlegroups.com
Hi Bryan and Ray,

My download source:
http://www.stanford.edu/group/pitsch/Downloads.htm

I used this mechanism in ANSYS Fluent in combination with the EDC model. Due to the available computational power and the limited possibilities to implement large mechanisms, I looked for a small mechanism.
The tran.dat isn't required for most models in Fluent so I looked into it after my problem arose in Cantera.

If there is a way to assist you in finding the source of the problem please tell me.
I already tried to find how the missing transport data is used in Cantera in the C++ database.
No success until now.

Kind regards,
Nick

Ray Speth

unread,
Jun 30, 2014, 6:54:42 PM6/30/14
to canter...@googlegroups.com
Hi Nick,

I had a chance to look at this, and the difference in behavior is definitely due to how the transport data is being handled. I compared Chemkin and Cantera using both the original transport input file as well as one updated with correct geometry flags and other properties from the GRI3.0 transport file (which should cover all the species in the CH4 sub-mechanism). For a stoichiometric CH4/air flame at 1 atm and 298 K inlet, I get the following flame speeds:

Cantera, original transport: 52.0 cm/s
Cantera, modified transport: 50.9 cm/s
Premix, original transport: 39.2 cm/s
Premix, modified transport: 52.6 cm/s

So, the two give fairly similar results when reasonable transport data is provided, but Chemkin is clearly doing something quite different when all the species are erroneously declared to be monatomic.

Regards,
Ray

Nick Gralike

unread,
Jul 4, 2014, 9:53:21 AM7/4/14
to canter...@googlegroups.com
Thank you Ray. I will keep this in mind during further research.

Regards,
Nick

Ray Speth schreef op 1-7-2014 0:54:
--
You received this message because you are subscribed to a topic in the Google Groups "Cantera Users' Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cantera-users/O98ieDYdt3c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cantera-user...@googlegroups.com.
To post to this group, send email to canter...@googlegroups.com.
Visit this group at http://groups.google.com/group/cantera-users.
For more options, visit https://groups.google.com/d/optout.

Howard Shaw

unread,
Dec 7, 2015, 12:11:39 PM12/7/15
to Cantera Users' Group
Hi,Nick. I tried to calculate the flame speed with cantera . With the I just change the mechanism but there is no solution so could I ask how to deal with this problem?

Howard Shaw

unread,
Dec 7, 2015, 12:11:39 PM12/7/15
to Cantera Users' Group
Hi,Byran. I tried to calculate the flame speed with CHEMKIN . I just change the mechanism in the sample of CHEMKIN but there is no solution, I tried several mechanisms but only GRI works. I also tried to change the setting of grid, but still no solution. So could I ask how to deal with this problem?

Bryan W. Weber

unread,
Dec 7, 2015, 1:58:07 PM12/7/15
to Cantera Users' Group
Dear Howard,

Unfortunately, I cannot help you deal with this problem without some more detail. I have three requests for you:

1) Please start a new discussion on the board, so we can focus on your problem
2) Please post whatever code you're using, including any CTI files you are using
3) Please provide a detailed description of what you are trying to do and exactly where the code is failing. Please provide any error information that your program generates.

Thanks!
Bryan

Howard Shaw

unread,
Dec 7, 2015, 2:56:33 PM12/7/15
to Cantera Users' Group
Thanks a lot. I already opened a new one. Hope to hear the answer soon.
Reply all
Reply to author
Forward
0 new messages