1D solver can fail when flames propagate too close to inlet boundary
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by running the provided Python reproducer with BurnerFlame and inspect the timestep history and boundary oscillations. Compare behavior for BurnerFlame, ImpingingJet, and possibly CounterflowPremixedFlame; done means the reproducer no longer gets stuck in non-decaying oscillations during timestepping.
Written by the indexing model from the issue text.
Description
Some simulations get stuck in a process where timestepping can continue successfully, either for some small/medium value of the timestep. One cause of this is when the adiabatic flame speed exceeds the inlet velocity and the flame pushes up against the inlet. This can generate simultaneous oscillations in the mixture composition and velocity at the boundary (but not the boundary temperature, which is fixed) which then translate into oscillations in the flame temperature and propagation speed which do not decay with time.
This failure mode has been observed for BurnerFlame and ImpingingJet flames (and presumably can occur for CounterflowPremixedFlame as well.)
An example:
import cantera as ct
import numpy as np
import os
from collections import defaultdict
import matplotlib.pyplot as plt
# parameter values
p = 50 * ct.one_atm # pressure
tburner = 300.0 # burner temperature
mdot = 0.22 # kg/m^2/s
width = 0.05 # m
# Set up the problem
gas = ct.Solution('h2o2.cti')
# set state to that of the unburned gas at the burner
gas.set_equivalence_ratio(0.4, 'H2', 'O2:1.0, AR:4')
gas.TP = tburner, p
# Create the stagnation flow object with a non-reactive surface.
sim = ct.BurnerFlame(gas=gas, width=width)
# Use callback function to collect data after each timestep
grids = {}
TT = defaultdict(list)
YY = defaultdict(list)
UU = defaultdict(list)
def callback(x):
N = len(sim.grid)
grids[N] = sim.grid
TT[N].append(sim.T)
YY[N].append(sim.Y[gas.species_index('O2')])
UU[N].append(sim.u)
return 0
sim.set_time_step_callback(callback)
# set the mass flow rate at the inlet
sim.burner.mdot = mdot
sim.set_refine_criteria(ratio=3, slope=0.1, curve=0.2, prune=0)
try:
sim.solve(loglevel=1, auto=False)
except ct.CanteraError as e:
print(e)
sim.show_stats()
# Get data from the last (failed) solution attempt
N = max(grids)
T = np.array(TT[N])
Y = np.array(YY[N])
U = np.array(UU[N])
f,ax = plt.subplots(3, figsize=(7,9))
ax[0].plot(T[:,1])
ax[1].plot(Y[:,0])
ax[2].plot(U[:,0])
ax[0].set_ylabel('Temperature at j=1')
ax[1].set_ylabel('O2 mass fraction at j=0')
ax[2].set_ylabel('Axial velocity at j=0')
ax[2].set_xlabel('time step')
f.tight_layout()
plt.show()
Results in the timestepping history:
Grid Timesteps Functions Time Jacobians Time
9 20 304 0.0055 14 0.0068
12 10 350 0.0093 8 0.0071
17 10 270 0.0118 7 0.0101
23 20 450 0.0288 13 0.0268
29 330 14168 1.1422 433 1.2063
33 20 474 0.0424 15 0.0470
38 500 20245 2.1994 674 2.5676
And the observed oscillations on the final grid where the failure occurs:

- Dominant language
- C++
- Stars
- 883
- Forks
- 436
- Avg merge
- 3h 41m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Cantera/cantera
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Incorrect reference state in some of the YAML files.Possibly taken @hazalkoom claimed this 54 days ago. OpenInput
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
-
[Bug]`ReactorNet.advance()` is not reproducible when an advance limit is set (root-finding arrays left uninitialized when `CVodeRootInit` is toggled per call)Possibly taken @kimurap claimed this 40 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
CI
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
arvidn/libtorrent#9149 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Niko1221/Strata#5560 · 2 comments ·
Maintainers usually reply within 4 days
-
NVIDIA windows
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
要トリアージ 辞書
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
yksr-melt/Meltype#1625 · 1 reaction ·
Maintainers usually reply within 1 day