From 22537b9493231c4c014e694bbf8ed64bad93343a Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 15 Feb 2016 17:04:46 -0500 Subject: [PATCH] [1D] Use fixed point temperature closer to unburned gas temperature This improves convergence in cases where the domain is too short to achieve full oxidation and the maximum temperature within the domain is significantly lower than the flame temperature computed from equilibrium. --- interfaces/cython/cantera/onedim.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/interfaces/cython/cantera/onedim.py b/interfaces/cython/cantera/onedim.py index 5b749795bd..11da4d2df6 100644 --- a/interfaces/cython/cantera/onedim.py +++ b/interfaces/cython/cantera/onedim.py @@ -422,14 +422,14 @@ def set_initial_guess(self): # Pick the location of the fixed temperature point, using an existing # point if a reasonable choice exists T = self.T - Tmid = 0.5 * (T0 + Teq) + Tmid = 0.75 * T0 + 0.25 * Teq i = np.flatnonzero(T < Tmid)[-1] # last point less than Tmid - if Tmid - T[i] < 0.5 * (Tmid - T0): + if Tmid - T[i] < 0.2 * (Tmid - T0): self.set_fixed_temperature(T[i]) - elif T[i+1] - Tmid < 0.5 * (Teq - Tmid): + elif T[i+1] - Tmid < 0.2 * (Teq - Tmid): self.set_fixed_temperature(T[i+1]) else: - self.set_fixed_temperature(0.5 * (T[i] + T[i+1])) + self.set_fixed_temperature(Tmid) for n in range(self.gas.n_species): self.set_profile(self.gas.species_name(n),