Skip to content

Commit

Permalink
[1D] Use nonzero initial guess for FreeFlame mass flow rate
Browse files Browse the repository at this point in the history
This helps avoids timestepping errors in the first timestep
  • Loading branch information
speth committed Mar 25, 2016
1 parent de8348e commit a9293c3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions interfaces/cython/cantera/onedim.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,10 @@ def set_initial_guess(self):
u0 = self.inlet.mdot/self.gas.density
T0 = self.inlet.T

if not self.inlet.mdot:
# nonzero initial guess increases likelihood of convergence
self.inlet.mdot = 1.0

# get adiabatic flame temperature and composition
self.gas.equilibrate('HP')
Teq = self.gas.T
Expand Down

0 comments on commit a9293c3

Please sign in to comment.