Note
Go to the end to download the full example code
Burner-stabilized flame including ionized species#
A burner-stabilized premixed methane-air flame with charged species.
Requires: cantera >= 3.0
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> burner <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Mass Flux: 0.08419 kg/m^2/s
Temperature: 600 K
Mass Fractions:
O2 0.2201
CH4 0.05519
N2 0.7247
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> flame <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Pressure: 1.013e+05 Pa
-------------------------------------------------------------------------------
z velocity spread_rate T lambda eField
-------------------------------------------------------------------------------
0 0.15 0 600 0 0
0.005 0.3748 0 1483 0 0
0.01 0.5997 0 2367 0 0
0.015 0.5997 0 2367 0 0
0.025 0.5997 0 2367 0 0
0.035 0.5997 0 2367 0 0
0.05 0.5997 0 2367 0 0
-------------------------------------------------------------------------------
z H2 O2 H2O CH4 CO
-------------------------------------------------------------------------------
0 0 0.2201 0 0.05519 0
0.005 0.0002251 0.1146 0.05888 0.02759 0.007971
0.01 0.0004502 0.009096 0.1178 7.615e-17 0.01594
0.015 0.0004502 0.009096 0.1178 7.615e-17 0.01594
0.025 0.0004502 0.009096 0.1178 7.615e-17 0.01594
0.035 0.0004502 0.009096 0.1178 7.615e-17 0.01594
0.05 0.0004502 0.009096 0.1178 7.615e-17 0.01594
-------------------------------------------------------------------------------
z CO2 N2 H O OH
-------------------------------------------------------------------------------
0 0 0.7247 0 0 0
0.005 0.06317 0.7238 1.956e-05 0.000187 0.001699
0.01 0.1263 0.723 3.912e-05 0.000374 0.003398
0.015 0.1263 0.723 3.912e-05 0.000374 0.003398
0.025 0.1263 0.723 3.912e-05 0.000374 0.003398
0.035 0.1263 0.723 3.912e-05 0.000374 0.003398
0.05 0.1263 0.723 3.912e-05 0.000374 0.003398
-------------------------------------------------------------------------------
z HO2 H2O2 C CH CH2
-------------------------------------------------------------------------------
0 0 0 0 0 0
0.005 6.771e-07 5.135e-08 9.678e-17 1.385e-17 2.861e-17
0.01 1.354e-06 1.027e-07 1.936e-16 2.77e-17 5.722e-17
0.015 1.354e-06 1.027e-07 1.936e-16 2.77e-17 5.722e-17
0.025 1.354e-06 1.027e-07 1.936e-16 2.77e-17 5.722e-17
0.035 1.354e-06 1.027e-07 1.936e-16 2.77e-17 5.722e-17
0.05 1.354e-06 1.027e-07 1.936e-16 2.77e-17 5.722e-17
-------------------------------------------------------------------------------
z CH2(S) CH3 HCO CH2O CH2OH
-------------------------------------------------------------------------------
0 0 0 0 0 0
0.005 1.953e-18 1.142e-16 1.547e-09 2.113e-11 1.202e-16
0.01 3.906e-18 2.283e-16 3.094e-09 4.226e-11 2.404e-16
0.015 3.906e-18 2.283e-16 3.094e-09 4.226e-11 2.404e-16
0.025 3.906e-18 2.283e-16 3.094e-09 4.226e-11 2.404e-16
0.035 3.906e-18 2.283e-16 3.094e-09 4.226e-11 2.404e-16
0.05 3.906e-18 2.283e-16 3.094e-09 4.226e-11 2.404e-16
-------------------------------------------------------------------------------
z CH3O CH3OH C2H C2H2 C2H3
-------------------------------------------------------------------------------
0 0 0 0 0 0
0.005 2.124e-18 7.384e-18 5.169e-23 5.828e-21 7.313e-26
0.01 4.249e-18 1.477e-17 1.034e-22 1.166e-20 1.463e-25
0.015 4.249e-18 1.477e-17 1.034e-22 1.166e-20 1.463e-25
0.025 4.249e-18 1.477e-17 1.034e-22 1.166e-20 1.463e-25
0.035 4.249e-18 1.477e-17 1.034e-22 1.166e-20 1.463e-25
0.05 4.249e-18 1.477e-17 1.034e-22 1.166e-20 1.463e-25
-------------------------------------------------------------------------------
z C2H4 C2H5 C2H6 HCCO CH2CO
-------------------------------------------------------------------------------
0 0 0 0 0 0
0.005 4.62e-26 8.295e-31 4.216e-32 4.51e-19 3.854e-19
0.01 9.24e-26 1.659e-30 8.432e-32 9.021e-19 7.707e-19
0.015 9.24e-26 1.659e-30 8.432e-32 9.021e-19 7.707e-19
0.025 9.24e-26 1.659e-30 8.432e-32 9.021e-19 7.707e-19
0.035 9.24e-26 1.659e-30 8.432e-32 9.021e-19 7.707e-19
0.05 9.24e-26 1.659e-30 8.432e-32 9.021e-19 7.707e-19
-------------------------------------------------------------------------------
z HCCOH N NH NH2 NH3
-------------------------------------------------------------------------------
0 0 0 0 0 0
0.005 5.811e-22 1.719e-08 2.663e-09 8.531e-10 1.544e-09
0.01 1.162e-21 3.439e-08 5.327e-09 1.706e-09 3.088e-09
0.015 1.162e-21 3.439e-08 5.327e-09 1.706e-09 3.088e-09
0.025 1.162e-21 3.439e-08 5.327e-09 1.706e-09 3.088e-09
0.035 1.162e-21 3.439e-08 5.327e-09 1.706e-09 3.088e-09
0.05 1.162e-21 3.439e-08 5.327e-09 1.706e-09 3.088e-09
-------------------------------------------------------------------------------
z NNH NO NO2 N2O HNO
-------------------------------------------------------------------------------
0 0 0 0 0 0
0.005 1.158e-09 0.0018 5.49e-07 1.393e-07 4.547e-08
0.01 2.316e-09 0.0036 1.098e-06 2.787e-07 9.094e-08
0.015 2.316e-09 0.0036 1.098e-06 2.787e-07 9.094e-08
0.025 2.316e-09 0.0036 1.098e-06 2.787e-07 9.094e-08
0.035 2.316e-09 0.0036 1.098e-06 2.787e-07 9.094e-08
0.05 2.316e-09 0.0036 1.098e-06 2.787e-07 9.094e-08
-------------------------------------------------------------------------------
z CN HCN H2CN HCNN HCNO
-------------------------------------------------------------------------------
0 0 0 0 0 0
0.005 2.55e-13 3.671e-11 2.022e-17 1.127e-20 4.623e-16
0.01 5.1e-13 7.342e-11 4.044e-17 2.253e-20 9.246e-16
0.015 5.1e-13 7.342e-11 4.044e-17 2.253e-20 9.246e-16
0.025 5.1e-13 7.342e-11 4.044e-17 2.253e-20 9.246e-16
0.035 5.1e-13 7.342e-11 4.044e-17 2.253e-20 9.246e-16
0.05 5.1e-13 7.342e-11 4.044e-17 2.253e-20 9.246e-16
-------------------------------------------------------------------------------
z HOCN HNCO NCO AR C3H7
-------------------------------------------------------------------------------
0 0 0 0 0 0
0.005 2.763e-12 6.82e-10 4.628e-11 0 1.74e-45
0.01 5.526e-12 1.364e-09 9.256e-11 0 3.479e-45
0.015 5.526e-12 1.364e-09 9.256e-11 0 3.479e-45
0.025 5.526e-12 1.364e-09 9.256e-11 0 3.479e-45
0.035 5.526e-12 1.364e-09 9.256e-11 0 3.479e-45
0.05 5.526e-12 1.364e-09 9.256e-11 0 3.479e-45
-------------------------------------------------------------------------------
z C3H8 CH2CHO CH3CHO HCO+ H3O+
-------------------------------------------------------------------------------
0 0 0 0 0 0
0.005 8.216e-47 2.656e-24 3.776e-25 9.147e-15 5.946e-12
0.01 1.643e-46 5.312e-24 7.553e-25 1.829e-14 1.189e-11
0.015 1.643e-46 5.312e-24 7.553e-25 1.829e-14 1.189e-11
0.025 1.643e-46 5.312e-24 7.553e-25 1.829e-14 1.189e-11
0.035 1.643e-46 5.312e-24 7.553e-25 1.829e-14 1.189e-11
0.05 1.643e-46 5.312e-24 7.553e-25 1.829e-14 1.189e-11
-------------------------------------------------------------------------------
z E
-------------------------------------------------------------------------------
0 0
0.005 1.716e-16
0.01 3.433e-16
0.015 3.433e-16
0.025 3.433e-16
0.035 3.433e-16
0.05 3.433e-16
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> outlet <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-------------------------------------------------------------------------------
z
-------------------------------------------------------------------------------
0
************ Solving on 7 point grid with energy equation enabled ************
..............................................................................
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 2.136e-05 4.885
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 1.52e-05 6.52
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 1.082e-05 6.174
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 1.3e-05 5.824
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 0.0002222 4.525
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 0.001265 4.127
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 0.01622 3.285
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 0.4675 -0.9249
Attempt Newton solution of steady-state problem... success.
Problem solved on [7] point grid(s).
..............................................................................
grid refinement disabled.
******************** Solving with grid refinement enabled ********************
..............................................................................
Attempt Newton solution of steady-state problem... success.
Problem solved on [7] point grid(s).
..............................................................................
##############################################################################
Refining grid in flame.
New points inserted after grid points 0 1 2 3 4 5
to resolve C C2H2 C2H4 CH CH2 CH2(S) CH2CO CH2O CH2OH CH3 CH3OH CH4 CO CO2 H H2 H2O H2O2 HCN HCNO HCO HNCO HNO HO2 HOCN N N2 N2O NCO NH2 NH3 NO NO2 O O2 OH T velocity
##############################################################################
..............................................................................
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 6.328e-06 5.294
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 4.505e-06 4.498
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 6.414e-06 4.477
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 4.871e-05 4.571
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 0.0002081 5.201
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 7.315e-06 6.731
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 1.562e-05 5.952
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 0.0001186 4.613
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 0.0003801 3.993
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 9.019e-05 3.873
Attempt Newton solution of steady-state problem... success.
Problem solved on [13] point grid(s).
..............................................................................
##############################################################################
Refining grid in flame.
New points inserted after grid points 0 1 2 3 4
to resolve C C2H2 C2H4 CH CH2 CH2(S) CH2CO CH2O CH2OH CH3 CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCNO HCO HNCO HNO HO2 N N2 N2O NCO NH2 NH3 NO NO2 O O2 OH T velocity
##############################################################################
..............................................................................
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 5.339e-06 5.499
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 9.123e-05 4.688
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 0.0001948 4.044
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 5.202e-05 5.456
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 6.943e-06 6.526
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 3.954e-05 5.662
Attempt Newton solution of steady-state problem... success.
Problem solved on [18] point grid(s).
..............................................................................
##############################################################################
Refining grid in flame.
New points inserted after grid points 0 1 2 3 4 5
to resolve C C2H2 C2H3 C2H4 C2H6 CH CH2 CH2(S) CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCNO HCO HNCO HO2 N N2 N2O NCO NH3 NO O O2 OH T velocity
##############################################################################
..............................................................................
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 1.78e-06 5.505
Attempt Newton solution of steady-state problem... success.
Problem solved on [24] point grid(s).
..............................................................................
##############################################################################
Refining grid in flame.
New points inserted after grid points 0 1 2 3 4 5 6 7
to resolve C C2H C2H2 C2H3 C2H4 C2H5 C2H6 C3H7 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCCOH HCN HCNO HCO HNCO HO2 N N2 N2O NCO NH3 NO NO2 O O2 OH T velocity
##############################################################################
..............................................................................
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 4.271e-05 5.869
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 9.123e-05 5.472
Attempt Newton solution of steady-state problem... success.
Problem solved on [32] point grid(s).
..............................................................................
##############################################################################
Refining grid in flame.
New points inserted after grid points 0 1 2 3 4 5 6 7 8
to resolve C C2H2 C2H3 C2H4 C2H5 C2H6 C3H7 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCCOH HCN HCNO HCO HNCO HO2 N N2 N2O NCO NH3 NO NO2 O O2 OH T velocity
##############################################################################
..............................................................................
Attempt Newton solution of steady-state problem... success.
Problem solved on [41] point grid(s).
..............................................................................
##############################################################################
Refining grid in flame.
New points inserted after grid points 0 1 2 3 4 5 6 7 8 9 10 11 12
to resolve C C2H2 C2H3 C2H4 C2H5 C2H6 C3H7 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCCOH HCN HCNO HCO HNCO HO2 N2 N2O NH3 NO NO2 O O2 OH T velocity
##############################################################################
..............................................................................
Attempt Newton solution of steady-state problem... success.
Problem solved on [54] point grid(s).
..............................................................................
##############################################################################
Refining grid in flame.
New points inserted after grid points 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
to resolve C C2H2 C2H3 C2H4 C2H5 C2H6 C3H7 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCCOH HCN HCNO HCO HNCO HO2 N2 NO NO2 O O2 OH T velocity
##############################################################################
..............................................................................
Attempt Newton solution of steady-state problem... success.
Problem solved on [73] point grid(s).
..............................................................................
##############################################################################
Refining grid in flame.
New points inserted after grid points 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO H H2 H2O H2O2 HCCO HCCOH HCN HCO HNCO HO2 N2 NO NO2 O O2 OH T velocity
##############################################################################
..............................................................................
Attempt Newton solution of steady-state problem... success.
Problem solved on [98] point grid(s).
..............................................................................
##############################################################################
Refining grid in flame.
New points inserted after grid points 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2OH CH3 CH3CHO CH3O CH3OH H H2O2 HCCO HCO HO2 NO2 O OH
##############################################################################
..............................................................................
Attempt Newton solution of steady-state problem... success.
Problem solved on [141] point grid(s).
..............................................................................
##############################################################################
Refining grid in flame.
New points inserted after grid points 0 1 2 3 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 68 69 70 71 72 73 74 75 76
to resolve C2H3 C2H5 C3H8 CH2 CH3O HCCO HCO
##############################################################################
..............................................................................
Attempt Newton solution of steady-state problem... success.
Problem solved on [170] point grid(s).
..............................................................................
no new points needed in flame
..............................................................................
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 1.266e-05 1.159
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 1.802e-05 0.41
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 0.0003079 0.04959
Attempt Newton solution of steady-state problem... success.
Problem solved on [170] point grid(s).
..............................................................................
no new points needed in flame
from pathlib import Path
import cantera as ct
p = ct.one_atm
tburner = 600.0
reactants = 'CH4:1.0, O2:2.0, N2:7.52' # premixed gas composition
width = 0.05 # m
loglevel = 1 # amount of diagnostic output (0 to 5)
gas = ct.Solution('gri30_ion.yaml')
gas.TPX = tburner, p, reactants
mdot = 0.15 * gas.density
f = ct.BurnerFlame(gas, width=width)
f.burner.mdot = mdot
f.set_refine_criteria(ratio=3.0, slope=0.05, curve=0.1)
f.show()
f.solve(loglevel, auto=True)
f.solve(loglevel=loglevel, stage=2)
if "native" in ct.hdf_support():
output = Path() / "ion_burner_flame.h5"
else:
output = Path() / "ion_burner_flame.yaml"
output.unlink(missing_ok=True)
f.save(output, name="mix", description="solution with mixture-averaged transport")
f.save('ion_burner_flame.csv', basis="mole", overwrite=True)
Total running time of the script: (0 minutes 40.313 seconds)