Premixed laminar flame speed comparison Cantera-Chemkin

3,135 views
Skip to first unread message

Ale Singli

unread,
Nov 18, 2014, 7:03:19 AM11/18/14
to canter...@googlegroups.com
Hi everyone,

I'm comparing  the results of premixed laminar flame speed obtained with Cantera (2.1.1) and Chemkin, using the same method.

The method used is getting the first solution  with Energy equation enabled, then Multicomponent Transport and then Soret effect.
Mechanism: GRI3.0; pressure: 1atm; T_unburned: 300K.

The final gridpoints for each value of phi in both Chemkin and Cantera are roughly the same.

I have simulated Methane, Hydrogen and mix 50%H2-50%CH4  (I've attached the resulting graphs).

For Methane: the results are the same for lean mixtures, and they diverge for phi>0.9.
Similarly for the 50%H2-50%CH4.
For Hydrogen: the results diverge for extreme lean and extreme rich mixtures.

Is there any numerical or physic explanation for this?
Is this difference reasonable and negligible?

Thank you!

Alessandro


CH4.png
50H2-50CH4.png
H2.png

Ray Speth

unread,
Nov 18, 2014, 9:20:20 AM11/18/14
to canter...@googlegroups.com
Hi Alessandro,

It's hard to identify the cause of the differences without knowing all of the input parameters for each case. Can you provide the scripts that you used for Cantera simulations, and the parameters used for the Chemkin simulations?

You say the grids are roughly the same, but the laminar flame speed is surprisingly sensitive to this, even when the flame structure is otherwise well-resolved. You might try seeing how much the flame speeds change as the grid tolerances are tightened, and whether this is comparable to the differences in flame speeds between the solvers.

Regards,
Ray

Ale Singli

unread,
Nov 18, 2014, 1:27:47 PM11/18/14
to canter...@googlegroups.com
Hi Ray,

Thank you for your reply. I tried to be accurate with the grid points, knowing that they have a strong impact on the results, and I used the same grid refining for both Cantera and Chemkin and the same inputs, but it's possible I'm missing something, but  it's curious that the solutions of Chemkin and Cantera are roughly coincident for the lean mixtures (at least for CH4 and 50%H2-50%CH4), while they diverge for the richer ones.

I list you the most important properties I changed on Chemkin, and I attached the Cantera script.
Let me know if you need any other information.

Chemkin:

Reactor physical properties:
Use mix- average transport
Use Correction velocity formalism
Automatic Estimated temperature profile

Maximum number of grid points allowed: I  used the number of final grid points for each value of phi from the Cantera results, but the result didn't change significantly. In other words, I calculated the flame speed for each value of phi one by one using the final grid point used by Cantera for each phi.
GRAD:0.06
CURVE: 0.12
domain [-0.1,0.2]  [m]
initial grid: based on temperature profile estimate

C1_inlet: mass flow rate 0.6 kg/(m^2*s)
Solver basic: absolute tolerance and absolute tolerance for pseuo time-stepping: 1e-9; relative tolerance: 1e-3; relative tolerance for pseudo time-stepping: 1e-2

Continuation #1: Use multicomponent transport
Continuation #2: Use multicomponent transport + Use thermal diffusion

Cantera:

File attached.
I had some issues for phi=0.5 for Hydrogen so I enlarged the initial grid points to 50 (instead of 25) and for phi=0.5 for 50%H2-50%CH4 so I reduced the relative tolerances to 1e-4 (insted of 1e-3 and 1e-2).

Regards,

Alessandro
FlameSpeed.py

Ray Speth

unread,
Nov 19, 2014, 1:20:36 PM11/19/14
to canter...@googlegroups.com
Hi Alessandro,

Thanks for providing the input file. It didn't work for me directly with either Cantera 2.1.1 or the current development version, so I wasn't able to recreate your results exactly. With a modified script (attached) and the current development version of Cantera, I get flame speeds that are a bit different from what you reported for Cantera, but still matching the general pattern that found compared to the Chemkin solutions. I spent a bit of time comparing the results for the CH4/air flame at phi=1.3, which was one of the maximum discrepancy cases you showed, and I think that (1) the differences can be attributed to the grid and (2) for the same grid parameters, Cantera's grid better resolves the flame structure than the one that Chemkin uses, even though both use a similar number of grid points (245 for Cantera vs 213 for Chemkin).

I have attached plots showing a couple of regions where the Chemkin-generated grid is surprisingly coarse: (1) in resolving the temperature increase on the leading edge of the flame and (2) in resolving mole fractions downstream of the reaction zone (plotting OH as representative).

I also found it interesting that with the tolerances you used (grad=0.06, curv=0.12) the Chemkin solution overpredicts the burned gas temperature (Tb) by much more than Cantera's solution with the same tolerances. At phi=1.3, Tb should be 2057.3 (according to 'gas.TPX = 300, 101325, 'CH4:0.65, O2:1.0 N2:3.76'; gas.equilibrate('HP')). The Cantera solution gives Tb = 2058.6 (error of 1.3 K), while the Chemkin solution gives Tb = 2064.4 (error of 7.1 K).

As a test of how well resolved the grids are for each solver, here are the computed flame speeds and burned gas temperatures for the baseline grid tolerances (0.06; 0.12) and with higher tolerances (0.03;0.06) for each solver:
        
                   Flame Speed   Burned T   npoints
Cantera, low-res    24.05 cm/s   2058.6 K       245
Cantera, high-res   23.83 cm/s   2058.3 K       441
Chemkin, low-res    25.28 cm/s   2064.4 K       213
Chemkin, high-res   24.55 cm/s   2060.8 K       402

What this suggests is that if you're concerned about differences of a few percent in flame speed, those tolerances are not tight enough, especially if you're using Chemkin.

Regards,
Ray
OH-phi1.3.png
preheat-zone-phi1.3.png
ch4-flamespeed.py

Ale Singli

unread,
Nov 20, 2014, 12:05:00 PM11/20/14
to canter...@googlegroups.com
Hi Ray,

Thank you very much for the information and the files attached, they are all very interesting.
I tried to run my script again to check if I sent you the right one, and yes my script is running on my computer. I tried to run your script and it runs very slow, but it is because  of my laptop, I will try to run in on other more powerful very soon.

I did the same comparison you did for temperaturefor phi=1.3,  but with my script.

As you said, the burned gas temperature is over predicted in Chemkin, but I have got results different from yours:

Chemkin: 2060,84K  (230 gridpoints)
Cantera:  2049K       (211 gridpoints)

The most significative differences between your code and mine are that you used set_grid_min=1e-9 and  ratio=2.7. I will try to set them on my code and I will see what happens. Probrably I will get more grid points and my solution will be closer to yours (245 grid points) and get more accurate results.

Then the Chemkin-generated grid (attached) does not look so coarse. and my burned gas temperature (shown before) look closer to your "high-res" result.

That is all very interesting, could you please send me the Chemkin Input File of the code you used to get your graphs?
I attached you mine, so we might check the differences.

Regards,

Alessandro
Temperature.png
CH4_flamespeed.txt

Ray Speth

unread,
Nov 21, 2014, 3:41:04 PM11/21/14
to canter...@googlegroups.com
Alessandro,

I attached the Chemkin input file I used. It looks pretty similar to yours, except that in mine, it just calculates the multicomponent+Soret flame speed directly, rather than doing the two continuation stages. I don't see any obvious reason why the resulting grids are so different.

One other thing you should fix is that your method for calculating the reactants mixture is overly complex and seems to be introducing some errors. For example, at phi = 1.0, the ratio of the O2 and CH4 mole fractions should be 2, but your code is setting them to 1.9813.

Regards,
Ray
input-phi1.3.txt

dirk.g...@googlemail.com

unread,
Nov 24, 2014, 3:16:48 AM11/24/14
to canter...@googlegroups.com
Ray,

I tried to run your FreelyProp_example script since I am interested in similar problems.

However, with the tight tolerances you are using the computation does not find a solution when Cantera (2.2.0, but similar with 2.1.0 on Windows) switches from mixture averaged to multicomponent diffusion. Usually, I have to use much larger tolerances (like tol_ss = [5.0e-4, 5.0e-6], tol_ts) to find a solution running CH3 and GRI 3.0. Depending on Phi. Am I doing anything wrong here ?

One things makes this even more complicated for me: I am runnig air including 0.01 mol % Ar. This is to get the comparison with the Rayleigh cross sections later in the experiment more precise.
Employing Ar the grid refinement in the multicomponent case or in the multicomponent + Soret case gets cumbersome. Cantera does a lot of refinement on N2 and Ar or even on Ar alone.

Your .py script with some small modifications is attached to demonstrate the issue.

With the current settings in the script the solution did not converge in the multicomponment domain in the last 24 h, I assume tol_ss is still too tight.

Any ideas about the grid refinement issue of Ar ?

Greetings,
Dirk
FreelyPropagat_Example_D.py

Ale Singli

unread,
Nov 24, 2014, 5:32:19 AM11/24/14
to canter...@googlegroups.com
Hi Ray,

You are right, if Chemkin calculates directly multicomponent and Soret flame speed, the grid is coarse as you found it. I tried to calculate flame speed with multicomponent and Soret directly enabled in Cantera and compare it to the multiple continuation method, and I can say that in Cantera the two methods show no significant difference on results and on grid refining.

Thank you again, it's been very helpful.

Alessandro

Ray Speth

unread,
Nov 24, 2014, 2:28:38 PM11/24/14
to canter...@googlegroups.com
Dirk,

Given that Cantera 2.2 hasn't been released yet, you might need to be more specific about what version you're using. Specifically, the changes in r3147 and 3148 (committed on September 7) change the way the multicomponent diffusion fluxes are calculated in a way that resolves some numerical instabilities in the old method which was based on determining the equivalent Fickian diffusion coefficients. I believe this resolves a discussion that you and I had a while back regarding stability problems in the multicomponent case. The behavior you've described with the regridding of N2 and Ar is consistent with the numerical instabilities in the old formulation. With the current development version (r3326), the script you provided runs on my computer in under 10 minutes.

Regards,
Ray

dirk.g...@googlemail.com

unread,
Nov 24, 2014, 5:02:03 PM11/24/14
to canter...@googlegroups.com
Ray,

stupid question: how can I discover which development version I am using ? Is there a chek ?

I downloaded the source code on Nov 10 since I wanted to take advantage of r3147 and r3148.

Windows tells me that Cantera 2.2.0 is the only version I have installed, so I am at least not running the wrong Cantera version.
10 minutes for my script sounds great, that would enourmously facilitate my work.

Dirk 

Ray Speth

unread,
Nov 24, 2014, 6:18:14 PM11/24/14
to canter...@googlegroups.com
Dirk,

How did you download the source code? A checkout of the SVN trunk or Github master branches on Nov 10 should have given you the updated 1D solver. I believe the only thing that reports its version as "2.2.0" is the base Windows package with the static libraries and Matlab toolbox. If you're using the Python interface, the "__version__" attribute of the module object (i.e. ct.__version__) should report 2.2a1. There's no mechanism for determining the revision that a particular build is based on, unfortunately. I've thought about adding something along this line, but it gets slightly tricky when mixing and matching Git and SVN and different operating systems.

The other thing that I sometimes find helpful is to print the value of 'ct.__file__' to make sure that the copy of Cantera you expect is actually being used. You might also want to double check that you're building with optimizations enabled, as that can make a big difference, especially if you're using the copy of BLAS/LAPACK that is included with Cantera.

Regards,
Ray

dirk.g...@googlemail.com

unread,
Nov 25, 2014, 1:59:13 PM11/25/14
to canter...@googlegroups.com
Ray,

thanks for the advice.
I will check this out overv the next weekend when I am back from traveling and let you know the results.

Greetings,
Dirk
Reply all
Reply to author
Forward
0 new messages