Ignition delay calculator: methane-air auto-ignition with Cantera
Stoichiometric methane-air at 1250 K and 5 atm in a closed constant-volume reactor ignites after 4.98 ms: GRI-Mech 3.0 in Cantera 3.2.0, with ignition taken as the moment the temperature passes T0 + 400 K. At 1 atm it takes 21.5 ms, and at 500 K nothing happens in 10 s.
This calculator gives the delay for any start temperature from 600 to 1800 K, 0.5 to 40 atm and equivalence ratio 0.5 to 2, in a constant-volume or constant-pressure reactor, with three ignition criteria. Free, no sign-up, runs in your browser. Further tabs show the species inside the reactor, which of the 325 reactions control the delay, the compact notation of a mechanism you type, and why chemistry ODEs need implicit solvers. The last tab checks a delay or a ν matrix from your report. Built for Skill-Lync's Computational Combustion using Python and Cantera challenges.
Cantera 3.2.0 · GRI-Mech 3.0 (gri30.yaml) · 4,410 reactor runs, rtol 1e-9, atol 1e-15 · checked against a separate solution (1,632 checks at build) · Updated 23 Nov 2026
Stoichiometric to φ is CH4 in air (O2 + 3.76 N2), closed adiabatic reactor, 10 s. The delay is interpolated from a Cantera grid (T0 every 25 K, 9 pressures from 0.5 to 40 atm, 5 equivalence ratios); between grid points it is within 1.2 % of a direct Cantera run on 20 test points.
Precomputed Cantera runs (GRI-Mech 3.0, solver steps to 10 s), mole fractions on a log scale so the radicals that build up before ignition are visible. The challenge's two cases are 1000 K and 500 K at 5 bar.
Brute force: each of the 325 rate constants multiplied by 1.01 and 0.99 in turn (2,600 extra reactor runs). The last option is what most sensitivity reports compute with add_sensitivity_reaction: d ln T / d ln k, the largest value over 0 to 2 ms.
Species are numbered in the order they first appear. Element balance counts C, H, O, N, Ar and He; names it cannot read as a formula are listed. The equations re-render as you type.
The course's Week 5.2 ODE when a = 1000. Explicit Euler is stable only for Δt < 2/a; implicit (backward) Euler for any Δt. Errors are the largest |y − exact| over the steps.
Compares your number with the grid at your settings, then tries one slip at a time (criterion, pressure unit, reactor, φ, ms vs s, a fixed time step) and names the one that explains it within 3 %.
- T0 + 400 K: 4.982 ms; max dT/dt: 4.991 ms; max dOH/dt: 4.991 ms.
| ν′ | R1 | R2 | R3 | R4 |
|---|---|---|---|---|
| CO | 1 | 0 | 1 | 0 |
| O2 | 1 | 0 | 0 | 1 |
| CO2 | 0 | 0 | 0 | 0 |
| O | 0 | 1 | 0 | 0 |
| H2O | 0 | 1 | 0 | 0 |
| OH | 0 | 0 | 1 | 0 |
| H | 0 | 0 | 0 | 1 |
| ν″ | R1 | R2 | R3 | R4 |
|---|---|---|---|---|
| CO | 0 | 0 | 0 | 0 |
| O2 | 0 | 0 | 0 | 0 |
| CO2 | 1 | 0 | 1 | 0 |
| O | 1 | 0 | 0 | 1 |
| H2O | 0 | 0 | 0 | 0 |
| OH | 0 | 2 | 0 | 1 |
| H | 0 | 0 | 1 | 0 |
| ν | R1 | R2 | R3 | R4 |
|---|---|---|---|---|
| CO | -1 | 0 | -1 | 0 |
| O2 | -1 | 0 | 0 | -1 |
| CO2 | 1 | 0 | 1 | 0 |
| O | 1 | -1 | 0 | 1 |
| H2O | 0 | -1 | 0 | 0 |
| OH | 0 | 2 | -1 | 1 |
| H | 0 | 0 | 1 | -1 |
What is ignition delay?
Ignition delay is the time a fuel-air mixture takes, from being brought to a temperature and pressure, to ignite on its own. In the course's closed reactor nothing seems to happen for most of that time: radicals build up slowly, then the temperature jumps. At 1250 K and 5 atm it climbs 1733 K in all, and only 58 K of that has happened by 90 % of the delay. The challenge marks ignition when the temperature passes T0 + 400 K:
Two other markers are common: the time of the steepest temperature rise (max dT/dt) and the time OH rises fastest (max d[OH]/dt). The OH peak itself is used too, but in rich mixtures OH climbs to its equilibrium level without overshooting, so the "peak" is wherever the run stops: that happens at 19 of the grid points, which is why the calculator uses the steepest OH rise. In a homogeneous reactor all three fall inside the same jump. Over the 3,537 grid points that ignite, the largest gap between the three is 6.4 %; at 1250 K and 5 atm they read 4.982 ms (T0 + 400 K), 4.991 ms (max dT/dt), 4.991 ms (max dOH/dt). The criterion matters far less than getting the mixture, the pressure unit and the reactor right.
How do you calculate ignition delay in Cantera?
Set the gas state, put it in a reactor, step the reactor network and watch the temperature. This is the whole calculation behind the challenge's 1250 K, 5 atm point, ten lines with Cantera 3.2:
import cantera as ct
gas = ct.Solution("gri30.yaml")
gas.TP = 1250, 5 * ct.one_atm
gas.set_equivalence_ratio(1.0, "CH4", "O2:1, N2:3.76")
r = ct.IdealGasReactor(gas, clone=False)
net = ct.ReactorNet([r]); net.rtol, net.atol = 1e-9, 1e-15
t0, T0 = 0.0, r.phase.T
while r.phase.T < 1250 + 400:
t0, T0 = net.time, r.phase.T; net.step()
tau = t0 + (1650 - T0) * (net.time - t0) / (r.phase.T - T0)It prints τ = 0.0049819 s (4.982 ms); the calculator's grid holds 4.982 ms. Three details decide whether your number matches:
- Pressure.
5 * ct.one_atmis 506,625 Pa; 5 bar is 500,000 Pa. At 1250 K the 5 bar delay is 5.047 ms, 1.3 % longer. The challenge's Part 1 says atm, Part 2 says bar. - Time resolution.
net.step()lets the solver choose its steps and the crossing is interpolated. A loop ofnet.advance(t)every 1 ms reports the first millisecond after ignition: 4.98 ms reads as 5 ms (0.4 % off), harmless here, but at 5 atm and 1350 K the true 1.52 ms reads 2 ms (31 % off) and at 1450 K 0.515 ms reads 1 ms (94 % off). The hot end of the 950 to 1450 K sweep flattens out. A loop that keepst = timewhileT <= T0 + 400without a break reports the last step before ignition instead, one step early. - Mechanism file. Cantera 3.2.0 refuses
gri30.xmlandgri30.cti("The CTI and XML formats are no longer supported"); loadct.Solution("gri30.yaml"). All three describe GRI-Mech 3.0, 53 species and 325 reactions.
Why does ignition delay fall with temperature and pressure?
Because the reactions that branch the radical chain have high activation energies, and their rates grow with concentration, which grows with pressure. Over a narrow range the delay follows an Arrhenius-type law, so ln τ against 1/T0 is close to a straight line:
At 1250 K and 5 atm the local slope gives an apparent activation energy of 161 kJ/mol. Between 1 and 5 atm at 1250 K the delay falls from 21.5 ms to 4.98 ms, so τ ∝ P−0.91. These are the challenge's two sweeps (constant volume, φ = 1, T0 + 400 K):
| 1250 K, P0 | 1 atm | 2 atm | 3 atm | 4 atm | 5 atm |
|---|---|---|---|---|---|
| τ | 21.5 ms | 11.85 ms | 8.172 ms | 6.207 ms | 4.982 ms |
| 5 atm, T0 | τ (Cantera, solver steps) | 1 ms loop: first step past | last step before |
|---|---|---|---|
| 950 K | 0.4257 s | 0.426 s | 0.425 s |
| 1000 K | 0.1739 s | 0.174 s | 0.173 s |
| 1050 K | 77.75 ms | 78 ms | 77 ms |
| 1100 K | 36.93 ms | 37 ms | 36 ms |
| 1150 K | 18.32 ms | 19 ms | 18 ms |
| 1200 K | 9.404 ms | 10 ms | 9 ms |
| 1250 K | 4.982 ms | 5 ms | 4 ms |
| 1300 K | 2.717 ms | 3 ms | 2 ms |
| 1350 K | 1.522 ms | 2 ms | 1 ms |
| 1400 K | 0.8748 ms | 1 ms | 0 |
| 1450 K | 0.5151 ms | 1 ms | 0 |
The last two columns are what a net.advance(t) loop with a 1 ms step reports, depending on whether it records the first step past T0 + 400 K or the last step below it.
The mixture strength matters less than either. At 1250 K and 5 atm, φ = 0.5 gives 3.63 ms and φ = 2 gives 7.12 ms: rich methane-air ignites more slowly here. That fits the sensitivity tab: CH4 + H ⇌ CH3 + H2 (R53) has a positive S of 0.251 at this condition, so more methane, which takes H atoms away from H + O2 → O + OH, lengthens the delay.
Constant volume or constant pressure: which reactor?
The challenge uses a closed constant-volume reactor (Cantera's IdealGasReactor or Reactor), like a shock tube or a rapid compression machine after the piston stops. The sensitivity projects mostly use IdealGasConstPressureReactor, a parcel that expands as it heats. Before ignition the two barely differ; the gap comes from the pressure rise that the constant-volume reactor gets from the early heat release. At 1250 K, 5 atm the delays are 4.982 ms (constant volume) and 5.254 ms (constant pressure); at 1500 K, 1 atm, 1.1 ms and 1.163 ms.
Why does methane-air not ignite at 500 K?
Because the radical pool never forms. In the challenge's second case, 500 K and 5 bar, Cantera's solver needs only 4 steps to cover 10 s: nothing changes fast enough to need more. The temperature rises by 1.5 × 10−11 K and OH peaks at a mole fraction of 8.2 × 10−23. With GRI-Mech 3.0 the lowest start temperature that ignites within 10 s is 825 K at 5 atm and 775 K at 40 atm. (GRI-Mech 3.0 was built for high-temperature natural gas flames and has no low-temperature peroxy chemistry, so below about 1000 K treat its delays as indicative.)
What happens to OH during ignition?
At 1000 K and 5 bar the mixture ignites after 177 ms. Halfway to ignition, OH is still at a mole fraction of 6.8 × 10−10 and 0.2 % of the methane is gone. During the jump OH overshoots to a mole fraction of 0.0183 at 177 ms, then falls back to 0.0131 at 10 s as the hot products settle to equilibrium at 2877 K. The overshoot is why the OH peak marks ignition so sharply.
The 1000 K case is plotted in the calculator's "Inside the reactor" tab.
Which reactions control methane ignition?
A sensitivity coefficient says how much the delay moves when one rate constant moves. The calculator gets it by brute force, two reactor runs per reaction:
Negative S means a faster reaction shortens the delay. At 1250 K and 5 atm (constant volume) the top three are R158 2 CH3 (+M) <=> C2H6 (+M) (S = 0.552), R156 CH3 + O2 <=> CH2O + OH (S = -0.341), R155 CH3 + O2 <=> CH3O + O (S = -0.336). The numbering is GRI-Mech 3.0's, starting at 1 (Cantera's index plus one).
Most sensitivity projects instead call add_sensitivity_reaction for every reaction in a constant-pressure reactor at 1500 K, 1 atm, and keep the largest |d ln T / d ln k| over 0 to 2 ms. That is the sensitivity of the temperature at an instant, not of the delay. At this condition it happens to agree with the delay: 10 of its top 10 reactions are in the delay's top 10, both put R155 CH3 + O2 <=> CH3O + O first, and the signs are opposite (a reaction that heats the gas sooner shortens the delay). The values are not comparable: 16.8 against -0.454 for the top reaction, because near ignition the temperature is so steep that a small shift in timing moves it a lot. What changes the ranking is the condition. At the challenge's 1250 K and 5 atm, constant volume, R158 2 CH3 (+M) <=> C2H6 (+M) leads and H + O2 → O + OH (R38) falls to number 7; at 800 K and 20 atm, R119 CH3 + HO2 <=> CH3O + OH leads. So rank at the conditions you care about.
How do you write a mechanism in compact notation?
Number the species j and the reactions i. The stoichiometric coefficients of the reactants form the matrix ν′ and those of the products ν″, species by reactions. Their difference is the net coefficient:
The law of mass action gives each reaction's rate of progress, and each species changes by the sum over the reactions it takes part in:
For the course's four-reaction CO/H2/O2 mechanism (species in order CO, O2, CO2, O, H2O, OH, H):
| ν | R1 | R2 | R3 | R4 |
|---|---|---|---|---|
| CO | -1 | 0 | -1 | 0 |
| O2 | -1 | 0 | 0 | -1 |
| CO2 | 1 | 0 | 1 | 0 |
| O | 1 | -1 | 0 | 1 |
| H2O | 0 | -1 | 0 | 0 |
| OH | 0 | 2 | -1 | 1 |
| H | 0 | 0 | 1 | -1 |
The one that catches people is OH in R2: O + H2O ⇌ OH + OH makes two OH, so ν″ is 2, the reverse rate has [OH]2, and the OH equation carries 2q2. Written out:
Cantera does exactly this: for GRI-Mech 3.0 its net_production_rates equal ν·q from its own net_rates_of_progress and stoichiometric matrices (the verifier checks this). Third bodies: for + M the rate is multiplied by [M], the sum of all concentrations weighted by collision efficiencies; for (+M) the [M] dependence sits inside the fall-off rate constant.
Why are chemistry ODEs stiff, and why does explicit Euler blow up?
The course's Week 5.2 ODE has a fast and a slow part:
The e−1000t term is gone after a few milliseconds; the e−t term lasts seconds. Explicit (forward) Euler and implicit (backward) Euler step it as:
Each explicit step multiplies the error by 1 − aΔt. It stays bounded only if
With Δt = 1 ms the explicit result's largest error is 3.7e-4 and the implicit one's 1.3e-4. With Δt = 2.5 ms the explicit factor is 1.5 in size, the error grows every step and after 8 steps it is 2.6e-2; implicit Euler, at 2e-4, is fine. There is a second threshold at Δt = 1/a = 1 ms: between 1/a and 2/a the factor 1 − aΔt is negative, so the explicit result is stable but zig-zags around the exact curve; below 1/a it decays smoothly. So 1 ms is the largest step without oscillation and 2 ms the stability limit. Stability is not accuracy: implicit Euler never blows up, but with a large step it smears the fast transient.
Real chemistry is far stiffer. For the 1250 K, 5 atm methane case the eigenvalues of the reactor's Jacobian (56 × 56, finite differences in Cantera) reach |λ| = 9.0 × 108 s−1 at the start (a time scale of 1.1 ns) and 1.2 × 109 s−1 at ignition, against a delay of 4.98 ms. Explicit Euler would need
steps just to stay stable. Cantera's CVODES integrator covered the same run in 2,531 steps. The structural cousin of this, load stepping a nonlinear spring, is on the explicit vs implicit solver.
What did student reports do?
Skill-Lync read the text and pasted code of every public report of the four challenges this page covers. As of 23 Nov 2026, n = 277 public reports: 91 auto-ignition, 19 sensitivity, 83 compact notation and 84 ODE stability. Code shown only in screenshots is not counted (20 compact-notation reports have their maths only in images), so these are lower bounds.
- Auto-ignition (n = 91). At least 86 of 90 with readable code use
IdealGasReactor, as the challenge asks; 5 also run a constant-pressure reactor. 85 step time with a hand-writtensim.advance(time)loop and none usesim.step(); 76 of the 85 whose step is readable use exactly 1 ms, which flattens the hot end of the temperature sweep (table above), and only 1 goes down to 10 µs. 80 of 91 loadgri30.xmlor.cti, which Cantera 3.2.0 refuses. 16 definetime_in_ms = time * 1e-3, a million times too small for milliseconds (it should betime * 1e3). 9 record the last step at or below T0 + 400 K, one step early. None use max dT/dt or peak OH. For 500 K and 5 bar, 25 say plainly that the mixture does not ignite, while 7 share a sentence saying it ignites "very slowly"; in Cantera it stays at 500 K to within a billionth of a kelvin for 10 s. Examples: 1, 2, 3. - Sensitivity (n = 19). All 19 use a constant-pressure reactor at 1500 K and 1 atm with
add_sensitivity_reaction, so all compute temperature sensitivity; none compute the sensitivity of the ignition delay. The 5 that name the top reaction in text all name CH3 + O2 ⇌ CH3O + O, which is also first by delay sensitivity at that condition, but not at the challenge's 1250 K and 5 atm (section above). Examples: 1, 2, 3. - Compact notation (n = 83, 3 with little text). Every report that shows its reactions uses the same four (the calculator's default). Of 33 reports whose OH equation can be read, 8 miss the factor 2 from R2; 15 of 63 reports with readable matrices or equations carry at least one sign or coefficient error that a mechanical check finds. Examples: 1, 2, 3.
- ODE stability (n = 84). 64 use dy/dt = −1000y − e−t. At least 33 call implicit Euler unconditionally stable, which is right for backward Euler on this linear ODE with a > 0; 10 derive Δt < 2/λ for explicit Euler. 3 share a sentence that "dt of 0.001 is the biggest suitable dt": 1 ms is where the explicit solution stops oscillating, 2 ms is where it turns unstable. Examples: 1, 2, 3.
Reports that are near copies of each other are counted as separate reports. Examples are links to the public report pages.
How accurate is this calculator?
It is as good as GRI-Mech 3.0 and the grid. Every grid value is a Cantera 3.2.0 run with rtol 1e-9 and atol 1e-15, stepped with the solver's own steps to 10 s; 873 of the 4,410 grid runs do not ignite in that time. A separate script re-ran 40 grid points and matched them to 0.04 % (the stored values have 4 significant figures). Between grid points the delay is interpolated as ln τ, linear in 1/T, ln P and φ; on 20 test points away from the grid it is within 1.2 % of a direct run. Near the 10 s limit, where some neighbouring grid points do not ignite, the calculator says so instead of guessing.
What the mechanism does not do: GRI-Mech 3.0 is a high-temperature natural gas mechanism. It has no low-temperature (peroxy) chemistry, so it cannot show a negative temperature coefficient region (on this grid the delay falls with T0 at every pressure, φ and reactor), and for engine-like conditions below about 1000 K a mechanism with low-temperature chemistry gives different delays. Real shock tubes and RCMs also lose heat and are not perfectly homogeneous.
What this calculator does not cover
- Other fuels: methane-air only; hydrogen, n-heptane or ammonia need their own mechanisms.
- Heat loss and facility effects: the reactor is adiabatic and homogeneous.
- Flame speed and flame temperature: see the adiabatic flame temperature calculator for equilibrium temperatures and preheating.
- Mechanism reduction: the sensitivity tab ranks reactions but does not build a reduced mechanism.
Running reactors in Cantera, reading a mechanism and knowing which reactions control ignition is the base of engine and gas-turbine combustion CFD. These challenges are part of Skill-Lync's combustion courses.
Frequently asked questions
What is the ignition delay of methane at 1250 K and 5 atm?
About 4.98 ms for stoichiometric methane-air in a closed constant-volume reactor, with GRI-Mech 3.0 in Cantera and ignition taken as the moment the temperature passes T0 + 400 K. At 1 atm it is 21.5 ms; in a constant-pressure reactor at 5 atm, 5.25 ms. Taking the steepest temperature or OH rise instead moves it by 0.2 %.
How do you define ignition delay?
As the time from the start until the mixture ignites, marked by one event: the temperature passing a threshold such as T0 + 400 K, the steepest temperature rise, or the steepest rise of OH. In a homogeneous reactor these markers sit within 6.4 % of each other here, so the choice matters less than the mixture, pressure and reactor.
Why does methane not ignite at 500 K?
At 500 K the chain-branching reactions that make radicals are far too slow. Over 10 s in the challenge's 5 bar constant-volume reactor the temperature rises by less than a billionth of a kelvin and the OH mole fraction stays below 10^-20. With GRI-Mech 3.0, the lowest start temperature that ignites within 10 s at 5 atm is 825 K.
What is the difference between autoignition temperature and ignition delay?
The autoignition temperature is the lowest temperature at which a mixture ignites on its own in a given test, so it depends on how long the test waits. Ignition delay is the waiting time at a chosen temperature. On this page, 10 s at 5 atm puts the threshold for methane-air between 800 and 825 K.
How do you do a sensitivity analysis of ignition delay in Cantera?
Scale one reaction rate with gas.set_multiplier, rerun the reactor and compare ln τ. A central difference with 1.01 and 0.99 gives S = d ln τ / d ln k for each of GRI-Mech 3.0's 325 reactions. Negative S speeds ignition. Cantera's add_sensitivity_reaction gives d ln T / d ln k, the temperature at an instant, instead.
Why is explicit Euler unstable for stiff ODEs?
Each explicit Euler step multiplies the error by 1 − aΔt. When Δt is above 2/a that factor is below −1, so the error flips sign and grows every step. For dy/dt = −1000y − e^(−t) the limit is 2 ms. Implicit Euler divides by 1 + aΔt instead, which stays below 1 for any step.
What is compact notation for a reaction mechanism?
A way to write every rate equation of a mechanism from two tables of stoichiometric coefficients: ν′ for reactants and ν″ for products, species by reactions. The rate of progress of reaction i is q_i = k_f ∏[X]^ν′ − k_r ∏[X]^ν″, and each species changes at d[X_j]/dt = Σ (ν″ − ν′) q_i.
Related on Skill-Lync
- Adiabatic flame temperature calculator: equilibrium flame temperature of 13 fuels, with preheating
- Natural gas combustion calculator: mixture fraction, water in the fuel and thermal NO for Fluent
- NASA polynomial calculator: the cp, h and s the reactor's energy equation uses
- Gas mixture calculator: building the fuel-air mixture, mole vs mass fractions and Cantera's Quantity units
- Explicit vs implicit solver: forward Euler and Newton-Raphson on a nonlinear spring
- Newton-Raphson method calculator: Robertson's stiff kinetics by implicit Euler
- Otto and diesel cycle calculator and engine performance calculator
- Combustion phasing calculator: CA10, CA50, CA90 and heat release from a cylinder pressure trace
- CFD courses compared
- All free engineering tools
Sources
- Cantera 3.2.0 (cantera.org) and its reference pages for the ideal gas reactor ("a reactor where the volume is prescribed by the motion of the reactor's walls") and the ideal gas constant pressure reactor ("a reactor where the pressure is held constant"); reaction rates (forward rate as concentrations raised to their coefficients times kf, [M] with a default collision efficiency of 1.0) and rate constants (modified Arrhenius). Solver: CVODES through ReactorNet, rtol 1e-9, atol 1e-15.
- GRI-Mech 3.0 (version of 30 July 1999) as shipped with Cantera in gri30.yaml (converted from the CHEMKIN files, 53 species, 325 reactions). The Cantera example sensitivity1.py (GRI-Mech 3.0, constant-pressure reactor, 1500 K, 1 atm, 0 to 2 ms in 5 µs steps) is the set-up the sensitivity reports follow.
- Wikipedia, "Stiff equation": explicit Euler needs |1 + hλ| ≤ 1, "since λ is real and negative, this implies −2 ≤ hλ ≤ 0"; for backward Euler the requirement "is satisfied for all h > 0 when Re λ < 0". Hairer and Wanner as quoted there: "Stiff equations are problems for which explicit methods don't work."
- The challenge statements of Skill-Lync's Computational Combustion using Python and Cantera course as quoted in the public reports (Week 7 auto-ignition cases, the Week 5.1 mechanism, the Week 5.2 ODE).
- scripts/precompute/ignition_delay.py builds the data (4,410 grid runs, 5 traces, 2,600 sensitivity runs, the Jacobian). scripts/verify/ignition_delay.py recomputes 626 cases another way (Cantera re-runs with its own code, the interpolation, the compact-notation parser against Cantera's stoichiometric matrices, both Euler schemes against their closed-form sums, the 1250 K sensitivity); the page compares its own numbers with them at build time (1,632 checks).