[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:
parent
d2793c07a1
commit
85c3bf5ba6
1 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue