Partial Equilibrium Assumption - Correction of 2-step schemes in the rich zone

If you want some more explanation about PEA, go and check the following article.

Careful : The pea_coeff keyword in the mixture database should be unique and every coefficients should appear on one line.

1. Useful importations

In [1]:
import cantera as ct
import matplotlib.pyplot as plt
import numpy as np

2. Exercise

The objective of this exercice is to illustrate the impact of the PEA assumption on the laminar flame speed depending on the equivalence ratio.

For that purpose, we will study a methane-air flame at atmospheric pressure, 300K and different equivalence ratios (np.arange(0.6,1.7,0.2)).

The BFER mechanism for methane with and without PEA will be compared to a detailed mechanism for methane, the gri30. The BFER mechanism with or without PEA share the same yaml file, only the transport properties will differ (as PEA are only included for AVBP transport). Gas behaviors have already been defined in the yaml, you can switch from one another by calling their name:

gas = ct.solution('BFER_methane.yaml,name)

Then, we will use 2 names for BFER : "CH4_BFER_mix" and "CH4_BFER_avbp7". The mixture called "CH4_BFER_avbp7" will look for the mixture_database.dat file where the parameters for the pea assumption are given.

The parameters for the flame solver can be set as the following:

tol_ss    = [1.0e-5, 1.0e-8]        # [rtol atol] for steady-state problem
tol_ts    = [1.0e-5, 1.0e-8]        # [rtol atol] for time stepping
loglevel  = 1                      # amount of diagnostic output (0 to 5)
refine_grid = "refine"
f = FreeFlame(gas, width=0.02)
f.flame.set_steady_tolerances(default=tol_ss)
f.flame.set_transient_tolerances(default=tol_ts)
f.set_max_jac_age(50, 50)
f.set_time_step(5.e-08, [10, 20, 80]) #s
f.energy_enabled = True
f.set_refine_criteria(ratio = 2.0, slope = 0.05, curve = 0.05)

Plot the laminar flame speed as a function of the equivalence ratio for the 3 mechanisms.

In [2]:
p          =   101325.0           # pressure
tin        =   300.0              # unburned gas temperature
phis = np.arange(0.6,1.7,0.2)     # range of equivalence ratio

3. Mechanisms tested

In [3]:
mechanisms = ['gri30.yaml','BFER_methane.yaml','BFER_methane.yaml']
gazes = ['gri30_mix','CH4_BFER_mix', 'CH4_BFER_avbp7']
fuel_species = 'CH4'

4. Parameters for the computation

In [4]:
tol_ss    = [1.0e-5, 1.0e-8]        # [rtol atol] for steady-state problem
tol_ts    = [1.0e-5, 1.0e-8]        # [rtol atol] for time stepping
loglevel  = 1                      # amount of diagnostic output (0 to 5)
refine_grid = "refine" 
In [ ]:
%%capture
Uall = [[] for mech in range(len(mechanisms))]
for nb in range(len(mechanisms)):
    for phi in phis:
        print(phi, nb)
        gas = ct.Solution(mechanisms[nb], gazes[nb])
        m = gas.n_species
        ifuel = gas.species_index(fuel_species)
        io2 = gas.species_index('O2')
        in2 = gas.species_index('N2')
        gas.set_equivalence_ratio(phi, 'CH4:1', 'O2:1.0, N2:3.76')
        gas.TP = tin, p

        f = ct.FreeFlame(gas, width=0.02)
        f.flame.set_steady_tolerances(default=tol_ss)
        f.flame.set_transient_tolerances(default=tol_ts)
        f.inlet.X = gas.X
        f.inlet.T = tin
        f.set_max_jac_age(50, 50)
        f.set_time_step(5.e-08, [10, 20, 80]) #s
        f.energy_enabled = True
        f.set_refine_criteria(ratio = 2.0, slope = 0.05, curve = 0.05)
        f.solve(loglevel, refine_grid)

        Uall[nb].append(f.velocity[0])
In [ ]:
fig=plt.figure(figsize=(18,16))
a=fig.add_subplot(111)

labellist = ['detailed', 'without PEA', 'with PEA']
for label, sL in zip(labellist, Uall):
    a.plot(phis, sL, label=label)
    
plt.title(r'Laminar flame speed vs. Equivalence ratio')
plt.xlabel(r'Equivalence ratio [m]', fontsize=15)
plt.ylabel("Laminar flame speed")
plt.legend()