Timestep Controls for 1D Flame Solvers#

This example demonstrates four solver controls that affect pseudo-transient convergence in one-dimensional flame calculations:

  1. time_step_growth_strategy, which controls when the timestep grows after a successful transient step.

  2. time_step_growth_factor, which controls how much the timestep grows when growth is triggered.

  3. time_step_regrid, which controls how many times the solver may refine the grid and retry after timestepping is exhausted.

  4. max_time_step_count, which controls the number of transient steps allowed before a timestep attempt gives up.

The first comparison uses a burner-stabilized premixed flame. The following two comparisons use a high-pressure counterflow diffusion flame, where solver convergence can depend on both regridding and the transient-step budget.

Requires: cantera >= 4.0; matplotlib >= 2.0

Tags: Python combustion 1D flow premixed flame diffusion flame strained flame plotting

from __future__ import annotations

import time

import matplotlib.pyplot as plt
plt.rcParams['figure.constrained_layout.use'] = True
import numpy as np

import cantera as ct

Timestep Growth Strategies#

The one-dimensional solver falls back to pseudo-transient timestepping when the Newton solver cannot converge directly to steady state. After a successful transient step, Cantera can either grow the timestep by a fixed factor or apply one of several heuristics that wait for evidence that the larger step is helpful.

This first problem uses a premixed methane / air burner-stabilized flame. The physical solution is the same for each case, so the differences in the table are from the timestep-growth rule. We test several combinations of growth strategies and growth factors.

growth_strategies = (
    ("fixed-growth", 1.5),  # default growth strategy and factor
    ("fixed-growth", 2.0),
    ("steady-norm", 2.0),
    ("transient-residual", 2.0),
    ("residual-ratio", 2.0),
    ("newton-iterations", 2.0),
    ("steady-norm", 6.0),
    ("newton-iterations", 6.0),
)

def make_growth_flame() -> ct.BurnerFlame:
    gas = ct.Solution("gri30.yaml")
    gas.set_equivalence_ratio(0.8, "CH4", {"O2": 1.0, "N2": 3.76})
    gas.TP = 300.0, ct.one_atm

    flame = ct.BurnerFlame(gas, width=0.02)
    flame.burner.mdot = 0.09
    flame.set_refine_criteria(ratio=3.0, slope=0.25, curve=0.35, prune=0.05)
    return flame


def run_growth_strategy(strategy: str, growth_factor: float) -> dict[str, object]:
    flame = make_growth_flame()
    timesteps = []
    flame.set_time_step_callback(
        lambda dt: timesteps.append(float(dt)) or 0
    )
    flame.time_step_growth_factor = growth_factor
    flame.time_step_growth_strategy = strategy

    tic = time.perf_counter()
    print("** Running growth strategy:", strategy)
    flame.solve(loglevel=1, refine_grid=True)
    elapsed = time.perf_counter() - tic

    return {
        "strategy": f"{strategy} (growth factor = {growth_factor:.1f})",
        "n_steps": len(timesteps),
        "dt_sum": float(np.sum(timesteps)),
        "dt_min": float(np.min(timesteps)),
        "dt_max": float(np.max(timesteps)),
        "jacobians": int(sum(flame.jacobian_count_stats)),
        "T_max": float(np.max(flame.T)),
        "wall_time": elapsed,
        "dts": np.asarray(timesteps, dtype=float),
    }


growth_results = [run_growth_strategy(strategy, growth_factor)
                  for strategy, growth_factor in growth_strategies]
** Running growth strategy: fixed-growth

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 4.271e-05  log(ss)= 5.239

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.0007298  log(ss)= 4.703

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.008313   log(ss)= 3.507

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [7] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3
    to resolve C2H2 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCNO HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.0001709  log(ss)= 4.337

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 3.421e-05  log(ss)= 6.192

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.0001948  log(ss)= 5.057

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.002219   log(ss)= 4.208

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.0002222  log(ss)= 5.224

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 1.483e-05  log(ss)= 6.29

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [11] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3
    to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.0002563  log(ss)= 4.605

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 5.132e-05  log(ss)= 6.052

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [15] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4
    to resolve 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 HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.0001139  log(ss)= 5.434

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.0004325  log(ss)= 5.026

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [20] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6
    to resolve 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 HCO HNCO HO2 N2 NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [27] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6 7 8 9
    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 HCN HCO HNCO HO2 N2 NO2 O OH
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [37] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 3 4 5 9 10 11 12 13 14 15 16
    to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH2 CH2(S) CH2CHO CH2CO CH2OH CH3 CH3CHO CH3O HCCO HCO
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [48] point grid(s).
no new points needed in flame
** Running growth strategy: fixed-growth

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00016    log(ss)= 5.061

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.01024    log(ss)= 3.572

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 5.243      log(ss)= -4.145

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [7] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3
    to resolve C2H2 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCNO HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00032    log(ss)= 5.017

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 4e-05      log(ss)= 5.941

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00256    log(ss)= 4.439

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00016    log(ss)= 5.428

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 4e-05      log(ss)= 5.979

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [11] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3
    to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00064    log(ss)= 4.895

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00032    log(ss)= 5.315

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [15] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4
    to resolve 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 HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00032    log(ss)= 5.135

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00256    log(ss)= 4.309

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [20] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6
    to resolve 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 HCO HNCO HO2 N2 NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [27] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6 7 8 9
    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 HCN HCO HNCO HO2 N2 NO2 O OH
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [37] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 3 4 5 9 10 11 12 13 14 15 16
    to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH2 CH2(S) CH2CHO CH2CO CH2OH CH3 CH3CHO CH3O HCCO HCO
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [48] point grid(s).
no new points needed in flame
** Running growth strategy: steady-norm

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00016    log(ss)= 5.061

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.01024    log(ss)= 3.572

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 5.243      log(ss)= -4.145

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [7] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3
    to resolve C2H2 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCNO HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00016    log(ss)= 5.017

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 8e-05      log(ss)= 5.888

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00256    log(ss)= 4.234

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 8e-05      log(ss)= 5.272

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 8e-05      log(ss)= 5.811

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [11] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3
    to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00032    log(ss)= 4.703

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 8e-05      log(ss)= 5.524

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [15] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4
    to resolve 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 HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00032    log(ss)= 5.135

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00256    log(ss)= 4.309

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [20] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6
    to resolve 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 HCO HNCO HO2 N2 NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [27] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6 7 8 9
    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 HCN HCO HNCO HO2 N2 NO2 O OH
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [37] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 3 4 5 9 10 11 12 13 14 15 16
    to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH2 CH2(S) CH2CHO CH2CO CH2OH CH3 CH3CHO CH3O HCCO HCO
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [48] point grid(s).
no new points needed in flame
** Running growth strategy: transient-residual

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00016    log(ss)= 5.061

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.01024    log(ss)= 3.572

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 5.243      log(ss)= -4.145

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [7] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3
    to resolve C2H2 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCNO HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00032    log(ss)= 5.017

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 4e-05      log(ss)= 5.941

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00256    log(ss)= 4.439

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00016    log(ss)= 5.428

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 4e-05      log(ss)= 5.979

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [11] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3
    to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00064    log(ss)= 4.895

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00032    log(ss)= 5.315

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [15] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4
    to resolve 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 HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00032    log(ss)= 5.135

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00256    log(ss)= 4.309

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [20] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6
    to resolve 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 HCO HNCO HO2 N2 NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [27] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6 7 8 9
    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 HCN HCO HNCO HO2 N2 NO2 O OH
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [37] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 3 4 5 9 10 11 12 13 14 15 16
    to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH2 CH2(S) CH2CHO CH2CO CH2OH CH3 CH3CHO CH3O HCCO HCO
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [48] point grid(s).
no new points needed in flame
** Running growth strategy: residual-ratio

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00016    log(ss)= 5.061

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.01024    log(ss)= 3.572

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 1.221      log(ss)= -4.526

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [7] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3
    to resolve C2H2 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCNO HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00032    log(ss)= 5.017

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 4e-05      log(ss)= 5.941

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00256    log(ss)= 4.439

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00016    log(ss)= 5.428

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 4e-05      log(ss)= 5.979

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [11] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3
    to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00064    log(ss)= 4.895

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00032    log(ss)= 5.315

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [15] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4
    to resolve 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 HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00032    log(ss)= 5.135

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00256    log(ss)= 4.309

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [20] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6
    to resolve 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 HCO HNCO HO2 N2 NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [27] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6 7 8 9
    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 HCN HCO HNCO HO2 N2 NO2 O OH
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [37] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 3 4 5 9 10 11 12 13 14 15 16
    to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH2 CH2(S) CH2CHO CH2CO CH2OH CH3 CH3CHO CH3O HCCO HCO
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [48] point grid(s).
no new points needed in flame
** Running growth strategy: newton-iterations

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 1e-05      log(ss)= 5.332

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 8e-05      log(ss)= 5.02

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00128    log(ss)= 4.521

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00128    log(ss)= 3.673

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00512    log(ss)= 2.995

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [7] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3
    to resolve C2H2 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCNO HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 2e-05      log(ss)= 4.536

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00016    log(ss)= 5.322

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 4e-05      log(ss)= 5.891

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00016    log(ss)= 4.966

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00064    log(ss)= 4.325

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00128    log(ss)= 4.187

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 2e-05      log(ss)= 5.834

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 4e-05      log(ss)= 5.464

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [11] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3
    to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00016    log(ss)= 4.626

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 4e-05      log(ss)= 5.701

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00016    log(ss)= 5.18

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [15] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4
    to resolve 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 HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 4e-05      log(ss)= 5.625

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00016    log(ss)= 5.085

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 8e-05      log(ss)= 5.201

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [20] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6
    to resolve 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 HCO HNCO HO2 N2 NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [27] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6 7 8 9
    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 HCN HCO HNCO HO2 N2 NO2 O OH
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [37] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 3 4 5 9 10 11 12 13 14 15 16
    to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH2 CH2(S) CH2CHO CH2CO CH2OH CH3 CH3CHO CH3O HCCO HCO
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [48] point grid(s).
no new points needed in flame
** Running growth strategy: steady-norm

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00972    log(ss)= 4.12

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 2721       log(ss)= -3.628

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [7] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3
    to resolve C2H2 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCNO HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 3.375e-05  log(ss)= 5.707

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.003645   log(ss)= 4.633

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 8.543e-05  log(ss)= 5.706

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.002307   log(ss)= 4.779

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [11] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3
    to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 6.75e-05   log(ss)= 5.275

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00729    log(ss)= 4.547

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [15] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4
    to resolve 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 HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00243    log(ss)= 5.071

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [20] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6
    to resolve 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 HCO HNCO HO2 N2 NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [27] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6 7 8 9
    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 HCN HCO HNCO HO2 N2 NO2 O OH
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [37] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 3 4 5 9 10 11 12 13 14 15 16
    to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH2 CH2(S) CH2CHO CH2CO CH2OH CH3 CH3CHO CH3O HCCO HCO
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [48] point grid(s).
no new points needed in flame
** Running growth strategy: newton-iterations

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 1.5e-05    log(ss)= 5.26

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00324    log(ss)= 4.496

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00972    log(ss)= 3.622

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 453.5      log(ss)= -3.913

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [7] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3
    to resolve C2H2 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCNO HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 6e-05      log(ss)= 4.361

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 1.125e-05  log(ss)= 6.325

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 6.75e-05   log(ss)= 5.521

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00243    log(ss)= 4.56

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.0006075  log(ss)= 4.51

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 9.492e-06  log(ss)= 6.336

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.0003417  log(ss)= 5.026

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [11] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3
    to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH CH2 CH2(S) CH2CHO CH2CO CH2O CH2OH CH3 CH3CHO CH3O CH3OH CH4 CO CO2 H H2 H2O H2O2 HCCO HCN HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00036    log(ss)= 4.602

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 2.25e-05   log(ss)= 5.97

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [15] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4
    to resolve 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 HCO HNCO HO2 N2 N2O NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00036    log(ss)= 5.399

Attempt Newton solution of steady-state problem.
Newton steady-state solve failed.

Attempt 10 timesteps.
Final timestep info: dt= 0.00018    log(ss)= 5.002

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [20] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6
    to resolve 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 HCO HNCO HO2 N2 NO NO2 O O2 OH T velocity
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [27] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 0 1 2 3 4 5 6 7 8 9
    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 HCN HCO HNCO HO2 N2 NO2 O OH
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [37] point grid(s).
##############################################################################
Refining grid in flame.
    New points inserted after grid points 3 4 5 9 10 11 12 13 14 15 16
    to resolve C2H2 C2H3 C2H4 C2H5 C2H6 C3H8 CH2 CH2(S) CH2CHO CH2CO CH2OH CH3 CH3CHO CH3O HCCO HCO
##############################################################################

Attempt Newton solution of steady-state problem.
Newton steady-state solve succeeded.

Problem solved on [48] point grid(s).
no new points needed in flame

The timestep history is collected with set_time_step_callback. The columns below report the number of timesteps, the total transient time covered by those steps, the largest timestep, the number of Jacobian evaluations, and the maximum temperature of the converged flame.

growth_header = (
    f"{'Strategy':<42} {'Steps':>8} {'sum(dt) [s]':>12} "
    f"{'max(dt) [s]':>12} {'Jac':>5} {'T_max [K]':>12} {'Runtime [s]':>9}"
)
print(growth_header)
print("-" * len(growth_header))
for row in growth_results:
    print(
        f"{row['strategy']:<42} {row['n_steps']:>8d} "
        f"{row['dt_sum']:>12.4e} {row['dt_max']:>12.4e} "
        f"{row['jacobians']:>5d} {row['T_max']:>12.4f} {row['wall_time']:>9.2f}"
    )
Strategy                                      Steps  sum(dt) [s]  max(dt) [s]   Jac    T_max [K] Runtime [s]
------------------------------------------------------------------------------------------------------------
fixed-growth (growth factor = 1.5)              130   7.4413e-02   8.3131e-03   190    1694.7603     13.67
fixed-growth (growth factor = 2.0)              120   1.0626e+01   5.2429e+00   215    1694.7603     15.69
steady-norm (growth factor = 2.0)               120   1.0622e+01   5.2429e+00   146    1694.7603     11.09
transient-residual (growth factor = 2.0)        120   1.0626e+01   5.2429e+00   215    1694.7603     15.69
residual-ratio (growth factor = 2.0)            120   3.1080e+00   1.2214e+00   215    1694.7603     15.68
newton-iterations (growth factor = 2.0)         190   8.5223e-02   5.1200e-03   140    1694.7603     10.95
steady-norm (growth factor = 6.0)                90   5.9863e+03   2.7210e+03   164    1694.7603     12.76
newton-iterations (growth factor = 6.0)         150   5.4444e+02   4.5350e+02   132    1694.7603      9.69

In short, fixed-growth always applies time_step_growth_factor after a successful step. steady-norm and transient-residual require the corresponding residual norm to decrease. residual-ratio scales the growth using the transient residual improvement, capped by time_step_growth_factor. newton-iterations grows the step only after a low-iteration Newton solve. Setting time_step_growth_factor = 1.0 disables growth.

Timestep Histories#

The timestep histories show how the strategy changes the sequence of transient steps even when all cases reach the same steady fixed-temperature solution.

cmap = plt.get_cmap('Dark2')

fig, ax = plt.subplots()
for i,row in enumerate(growth_results):
    steps = np.arange(1, row["n_steps"] + 1)
    ax.semilogy(
        steps + 0.1*i, row["dts"], "o-", linewidth=1.6, markersize=4,
        color=cmap(i), label=row["strategy"]
    )
ax.set_xlabel("timestep number")
ax.set_ylabel("dt [s]")
ax.grid(True, which="both", alpha=0.3)
ax.legend(fontsize=8)
plt.show()
flame solver timestep controls

Regridding After Timestep Failure#

The next comparison uses a high-pressure hydrogen / oxygen counterflow diffusion flame. The initial grid has only 20 points across a 30 mm domain, which is too coarse for the steady-state solver to converge. The time_step_regrid option lets the solver refine the grid and retry when a timestepping sequence has reached max_time_step_count.

diffusion_width = 30e-3
diffusion_initial_points = 20
diffusion_fuel_mdot = 0.3
diffusion_oxidizer_mdot_factor = 3.0


def make_regrid_flame(
    pressure: float,
    regrid_max: int,
    max_time_step_count: int = 200,
    growth_strategy: str = "fixed-growth",
    growth_factor: float = 1.5,
) -> ct.CounterflowDiffusionFlame:
    gas = ct.Solution("h2o2.yaml")
    flame = ct.CounterflowDiffusionFlame(
        gas, grid=np.linspace(0.0, diffusion_width, diffusion_initial_points)
    )
    flame.max_time_step_count = max_time_step_count
    flame.set_refine_criteria(ratio=2.0, slope=0.06, curve=0.08, prune=0.02)
    flame.time_step_regrid = regrid_max
    flame.time_step_growth_strategy = growth_strategy
    flame.time_step_growth_factor = growth_factor

    flame.P = pressure
    flame.fuel_inlet.X = "H2:1.0"
    flame.fuel_inlet.T = 800.0
    flame.oxidizer_inlet.X = "O2:1.0"
    flame.oxidizer_inlet.T = 711.0

    rho_fuel = flame.fuel_inlet.phase.density
    rho_oxidizer = flame.oxidizer_inlet.phase.density
    flame.fuel_inlet.mdot = diffusion_fuel_mdot
    flame.oxidizer_inlet.mdot = (
        diffusion_fuel_mdot / rho_fuel * rho_oxidizer * diffusion_oxidizer_mdot_factor
    )
    return flame


def run_regrid_case(case: dict[str, object]) -> dict[str, object]:
    flame = make_regrid_flame(
        pressure=case["pressure"],
        regrid_max=case["regrid_max"],
        max_time_step_count=case["max_time_step_count"],
        growth_strategy=case["growth_strategy"],
        growth_factor=case["growth_factor"],
    )
    flame.clear_stats()

    tic = time.perf_counter()
    try:
        flame.solve(loglevel=0, auto=False)
        success = True
    except ct.CanteraError as err:
        success = False
    elapsed = time.perf_counter() - tic

    return {
        "label": case["label"],
        "plot_label": case["plot_label"],
        "pressure": case["pressure"],
        "success": success,
        "grid_points": len(flame.grid),
        "timesteps": int(sum(flame.time_step_stats)),
        "jacobians": int(sum(flame.jacobian_count_stats)),
        "peak_temperature": float(np.max(flame.T)) if success else None,
        "grid": np.array(flame.grid, copy=True),
        "temperature": np.array(flame.T, copy=True),
        "wall_time": elapsed,
        "max_time_step_count": case["max_time_step_count"],
        "regrid_max": case["regrid_max"],
        "growth_strategy": case["growth_strategy"],
        "growth_factor": case["growth_factor"],
    }


def print_regrid_rows(results: list[dict[str, object]], label_width: int = 28) -> None:
    header = (
        f"{'Mode':<{label_width}} {'Success':>7} {'Grid':>6} "
        f"{'Steps':>7} {'Jac':>5} {'Tmax [K]':>10} {'Wall [s]':>9}"
    )
    print(header)
    print("-" * len(header))
    for row in results:
        peak_temperature = (
            f"{row['peak_temperature']:>10.1f}"
            if row["peak_temperature"] is not None else f"{'--':>10}"
        )
        print(
            f"{row['label']:<{label_width}} {str(row['success']):>7} "
            f"{row['grid_points']:>6d} {row['timesteps']:>7d} "
            f"{row['jacobians']:>5d} {peak_temperature} {row['wall_time']:>9.2f}"
        )


regrid_pressure = 7e6
regrid_cases = (
    {
        "label": "time_step_regrid = 0",
        "plot_label": "0",
        "pressure": regrid_pressure,
        "regrid_max": 0,
        "max_time_step_count": 200,
        "growth_strategy": "fixed-growth",
        "growth_factor": 1.5,
    },
    {
        "label": "time_step_regrid = 1",
        "plot_label": "1",
        "pressure": regrid_pressure,
        "regrid_max": 1,
        "max_time_step_count": 200,
        "growth_strategy": "fixed-growth",
        "growth_factor": 1.5,
    },
    {
        "label": "time_step_regrid = 3",
        "plot_label": "3",
        "pressure": regrid_pressure,
        "regrid_max": 3,
        "max_time_step_count": 200,
        "growth_strategy": "fixed-growth",
        "growth_factor": 1.5,
    },
)

regrid_results = [run_regrid_case(case) for case in regrid_cases]
/home/runner/work/cantera/cantera/build/python/cantera/onedim.py:1002: UserWarning: ChemEquil::equilibrate: Temperature (3781.5508300517395 K) outside valid range of 300 K to 3500 K
  self.gas.equilibrate('HP')

Here the growth-factor and growth-strategy settings are held at their defaults. Only the number of regrid retries changes.

print("Regrid retries after timestep failure")
print(
    f"Case: H2/O2 counterflow diffusion flame at {regrid_pressure / 1e6:.1f} MPa "
    f"on an initial {diffusion_initial_points}-point grid"
)
print("Varied option: time_step_regrid")
print()
print_regrid_rows(regrid_results, label_width=43)
Regrid retries after timestep failure
Case: H2/O2 counterflow diffusion flame at 7.0 MPa on an initial 20-point grid
Varied option: time_step_regrid

Mode                                        Success   Grid   Steps   Jac   Tmax [K]  Wall [s]
---------------------------------------------------------------------------------------------
time_step_regrid = 0                          False     20     200   290         --      1.20
time_step_regrid = 1                          False     38     400   549         --      3.10
time_step_regrid = 3                           True    186     800  1044     3787.1     11.12

time_step_regrid = 0 disables retry-after-regrid. Positive values allow up to that many grid-refinement retries after timestep failure. If the refinement criteria do not change the grid, the retry path aborts because there is no new discretization to try.

Regrid Retry Comparison#

The first two cases exit before reaching a steady solution. With three regrid retries, the solver has enough opportunities to add points and continue.

colors = ["#ae2012" if not row["success"] else "#0a9396" for row in regrid_results]
fig, ax = plt.subplots()
bars = ax.bar(
    [row["plot_label"] for row in regrid_results],
    [row["timesteps"] for row in regrid_results],
    color=colors,
)
ax.set_xlabel("time_step_regrid")
ax.set_ylabel("timesteps before exit")
ax.grid(True, axis="y", alpha=0.3)
for bar, row in zip(bars, regrid_results):
    status = "ok" if row["success"] else "fail"
    ax.text(
        bar.get_x() + bar.get_width() / 2,
        bar.get_height() + 10,
        f"grid={row['grid_points']}\n{status}",
        ha="center",
        va="bottom",
        fontsize=8,
    )
plt.show()
flame solver timestep controls

Flame Profile#

The successful 7 MPa case is not just a solver-status change: after regridding, the solver finds a steady-state solution for a resolved diffusion flame with a hot reaction zone in the counterflow domain.

regrid_result = next(
    row for row in regrid_results if row["success"] and row["regrid_max"] == 3
)

fig, ax = plt.subplots()
ax.plot(
    1e3 * regrid_result["grid"],
    regrid_result["temperature"],
    ".-",
)
ax.set_xlabel("distance from fuel inlet [mm]")
ax.set_ylabel("temperature [K]")
ax.grid(True, alpha=0.3)
plt.show()
flame solver timestep controls

A More Difficult Pressure#

At 15 MPa, the same coarse counterflow problem is more demanding. Regridding is enabled for all cases in this section, but a 200-step timestep budget is still insufficient. The first comparison shows the effect of increasing max_time_step_count while leaving the growth strategy fixed.

difficult_pressure = 15e6
difficult_budget_cases = (
    {
        "label": "max_time_step_count = 200",
        "plot_label": "200",
        "pressure": difficult_pressure,
        "max_time_step_count": 200,
        "regrid_max": 3,
        "growth_strategy": "fixed-growth",
        "growth_factor": 1.5,
    },
    {
        "label": "max_time_step_count = 1250",
        "plot_label": "1250",
        "pressure": difficult_pressure,
        "max_time_step_count": 1250,
        "regrid_max": 3,
        "growth_strategy": "fixed-growth",
        "growth_factor": 1.5,
    },
)

difficult_budget_results = [run_regrid_case(case) for case in difficult_budget_cases]

print("Solving with a larger timestep budget")
print(
    f"Case: H2/O2 counterflow diffusion flame at "
    f"{difficult_pressure / 1e6:.1f} MPa"
)
print("Fixed settings: time_step_regrid = 3, time_step_growth_strategy = fixed-growth")
print()
print_regrid_rows(difficult_budget_results, label_width=28)
/home/runner/work/cantera/cantera/build/python/cantera/onedim.py:1002: UserWarning: ChemEquil::equilibrate: Temperature (3908.657324085196 K) outside valid range of 300 K to 3500 K
  self.gas.equilibrate('HP')
Solving with a larger timestep budget
Case: H2/O2 counterflow diffusion flame at 15.0 MPa
Fixed settings: time_step_regrid = 3, time_step_growth_strategy = fixed-growth

Mode                         Success   Grid   Steps   Jac   Tmax [K]  Wall [s]
------------------------------------------------------------------------------
max_time_step_count = 200      False     95     800  1155         --     11.90
max_time_step_count = 1250      True    175    3850  5060     3926.3     59.78

Once the timestep budget is large enough enable solution of the steady-state problem, the growth strategy can still affect the work required to reach the converged steady solution. The fixed-growth row below reuses the successful result from the previous table, and the remaining rows rerun the same problem with adaptive growth strategies.

timestep_budget_result = next(
    row for row in difficult_budget_results if row["max_time_step_count"] == 1250
)
difficult_strategy_cases = (
    {
        "label": "residual-ratio",
        "plot_label": "ratio",
        "pressure": difficult_pressure,
        "max_time_step_count": 1250,
        "regrid_max": 3,
        "growth_strategy": "residual-ratio",
        "growth_factor": 1.5,
    },
    {
        "label": "newton-iterations",
        "plot_label": "newton",
        "pressure": difficult_pressure,
        "max_time_step_count": 1250,
        "regrid_max": 3,
        "growth_strategy": "newton-iterations",
        "growth_factor": 1.5,
    },
)

difficult_strategy_results = [
    {
        **timestep_budget_result,
        "label": "fixed-growth",
        "plot_label": "fixed",
    },
    *[run_regrid_case(case) for case in difficult_strategy_cases],
]

print("Growth-strategy sensitivity after recovery")
print(
    "Fixed settings: max_time_step_count = 1250, time_step_regrid = 3, "
    "time_step_growth_factor = 1.5"
)
print()
print_regrid_rows(difficult_strategy_results, label_width=18)
Growth-strategy sensitivity after recovery
Fixed settings: max_time_step_count = 1250, time_step_regrid = 3, time_step_growth_factor = 1.5

Mode               Success   Grid   Steps   Jac   Tmax [K]  Wall [s]
--------------------------------------------------------------------
fixed-growth          True    175    3850  5060     3926.3     59.78
residual-ratio        True    178    5570  3345     3926.1     43.72
newton-iterations     True    178    4210  3224     3926.4     41.17

max_time_step_count limits the number of transient steps before a timestep attempt gives up. Larger values can allow harder cases to converge, but solving these cases will be slow. On this 15 MPa case, adaptive growth strategies can reduce wall time once the timestep budget is large enough.

Total running time of the script: (4 minutes 38.699 seconds)

Gallery generated by Sphinx-Gallery