From 7d2e0e482a17540f7f5920503d0ba48d1194a566 Mon Sep 17 00:00:00 2001 From: Daniel Thomas Date: Wed, 30 Jun 2021 16:39:43 -0500 Subject: [PATCH] Fix extinction temperature definition in Python example Assign extinction temperature based on inlet temperatures, for consistency with the use of np.isclose() for the extinction criteria. --- .../cantera/examples/onedim/diffusion_flame_extinction.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interfaces/cython/cantera/examples/onedim/diffusion_flame_extinction.py b/interfaces/cython/cantera/examples/onedim/diffusion_flame_extinction.py index ac168b0d7b..bff9ccaf63 100644 --- a/interfaces/cython/cantera/examples/onedim/diffusion_flame_extinction.py +++ b/interfaces/cython/cantera/examples/onedim/diffusion_flame_extinction.py @@ -53,7 +53,7 @@ # Define a limit for the maximum temperature below which the flame is # considered as extinguished and the computation is aborted -temperature_limit_extinction = 500 # K +temperature_limit_extinction = max(f.oxidizer_inlet.T, f.fuel_inlet.T) # Initialize and solve print('Creating the initial solution') @@ -114,6 +114,7 @@ strain_factor = alpha[-1] / alpha[n_last_burning] # Create an initial guess based on the previous solution # Update grid + # Note that grid scaling changes the diffusion flame width f.flame.grid *= strain_factor ** exp_d_a normalized_grid = f.grid / (f.grid[-1] - f.grid[0]) # Update mass fluxes