[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.
This commit is contained in:
Ray Speth 2016-03-19 15:36:10 -04:00
parent d2793c07a1
commit 85c3bf5ba6

View file

@ -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