You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating CounterflowPremixedFlame, CounterflowDiffusionFlame, CounterflowTwinPremixedFlame, or CounterflowPremixedFlame objects and attempting to solve them without setting appropriate boundary conditions leads to error messages that are difficult to interpret. I think this problem could be detected while generating initial guesses and used to provide more helpful error messages.
************ Solving on 5 point grid with energy equation enabled ************
..............................................................................
Attempt Newton solution of steady-state problem...
*******************************************************************************
CanteraError thrown by Phase::setTemperature:
temperature must be positive. T = nan
*******************************************************************************
******** Initial solve failed; Retrying with energy equation disabled ********
followed by many additional failures while trying different grids, ultimately raising the exception
RuntimeWarning: invalid value encountered in scalar divide
x0 = rhou*uu * dz / (rhou*uu + rhob*ub)
---------------------------------------------------------------------------
CanteraError Traceback (most recent call last)
Cell In[5], line 9
6 gas.set_equivalence_ratio(0.6, 'H2:1.0', 'O2:1.0, N2:3.76')
8 f = ct.CounterflowPremixedFlame(gas, width=0.03)
----> 9 f.solve(loglevel=1, auto=True)
File cantera/_onedim.pyx, in cantera._onedim.Sim1D.solve()
CanteraError: Could not find a solution for the 1D problem
************ Solving on 7 point grid with energy equation enabled ************
..............................................................................
Attempt Newton solution of steady-state problem... failure.
Take 10 timesteps 0.0005767 -11.22
Attempt Newton solution of steady-state problem...
*******************************************************************************
CanteraError thrown by Phase::setDensity:
density must be positive. density = -818939.2759868323
*******************************************************************************
******** Initial solve failed; Retrying with energy equation disabled ********
and ultimately failing with the exception:
CanteraError Traceback (most recent call last)
Cell In[13], line 9
6#gas.set_equivalence_ratio(0.0, 'H2:1.0', 'O2:0.0, N2:3.76')8 f = ct.CounterflowTwinPremixedFlame(gas, width=0.03)
----> 9 f.solve(loglevel=1, auto=True)
File cantera/_onedim.pyx:1181, in cantera._onedim.Sim1D.solve()
CanteraError: Could not find a solution for the 1D problem
************ Solving on 5 point grid with energy equation enabled ************
..............................................................................
Attempt Newton solution of steady-state problem...
*******************************************************************************
CanteraError thrown by Phase::setTemperature:
temperature must be positive. T = nan
*******************************************************************************
******** Initial solve failed; Retrying with energy equation disabled ********
and ultimately failing with the exception:
CanteraError Traceback (most recent call last)
Cell In[16], line 7
5 gas.set_equivalence_ratio(0.5, 'H2:1.0', 'O2:1.0, N2:3.76')
6 f = ct.CounterflowPremixedFlame(gas, width=0.03)
----> 7 f.solve(loglevel=1, auto=True)
File cantera/_onedim.pyx:1181, in cantera._onedim.Sim1D.solve()
CanteraError: Could not find a solution for the 1D problem
Problem description
Creating
CounterflowPremixedFlame
,CounterflowDiffusionFlame
,CounterflowTwinPremixedFlame
, orCounterflowPremixedFlame
objects and attempting to solve them without setting appropriate boundary conditions leads to error messages that are difficult to interpret. I think this problem could be detected while generating initial guesses and used to provide more helpful error messages.Steps to reproduce
For
CounterflowPremixedFlame
This starts by generating the output:
followed by many additional failures while trying different grids, ultimately raising the exception
For
CounterflowDiffusionFlame
Generates the error:
For
CounterflowTwinPremixedFlame
:Generates output that starts with
and ultimately failing with the exception:
For
CounterflowPremixedFlame
:Starts by generating the output:
and ultimately failing with the exception:
System information
main
at d37a76bAdditional context
Based on a question from the Users' Group: https://groups.google.com/g/cantera-users/c/XrjpRh47coY
The text was updated successfully, but these errors were encountered: