From 85c3bf5ba67f6b6103ce98ef2e3b9a238b214c44 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Sat, 19 Mar 2016 15:36:10 -0400 Subject: [PATCH] [1D] Improve initial guess for FreeFlame velocity profile If mdot is not specified, use the estimated mdot value when providing the initial guess for the velocity. --- interfaces/cython/cantera/onedim.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/interfaces/cython/cantera/onedim.py b/interfaces/cython/cantera/onedim.py index 06a5b4818..7d3129e5d 100644 --- a/interfaces/cython/cantera/onedim.py +++ b/interfaces/cython/cantera/onedim.py @@ -402,14 +402,15 @@ class FreeFlame(FlameBase): """ super(FreeFlame, self).set_initial_guess() self.gas.TPY = self.inlet.T, self.P, self.inlet.Y - Y0 = self.inlet.Y - 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 * self.gas.density + Y0 = self.inlet.Y + u0 = self.inlet.mdot/self.gas.density + T0 = self.inlet.T + # get adiabatic flame temperature and composition self.gas.equilibrate('HP') Teq = self.gas.T