Challenge

Week 7 - Auto ignition using Cantera

JORGE LOZANO

Computational Combustion using Python and Cantera

Auto ignition using Cantera

Objective

PART I

Use the same reactor network code as shown in the video to simulate the Auto Ignition Time for Methane under the following conditions, (simulation time = 10 secs)

  • Plot the variation of Auto Ignition time of Methane with a constant temperature of 1250K and pressure varying from 1 to 5 atm.
  • Plot the variation of Auto Ignition time of Methane with a constant pressure of 5 atm and temperature varying from 950K to 1450K.

NOTE:

Auto Ignition time is the time when the temperature of the reactor is Initial Temperature plus 400K.

PART II

Further, observe and print the rate of change of molar concentrations of the given elements "H2O, O2, OH" with respect to the time, (simulation time = 10 secs)

Explain the behavior of the graph for 2 cases,

  • When Temperature is 1000K and pressure 5 bar
  • When Temperature is 500K and pressure 5 bar

NOTE:

The command to extract mole fractions of a given 'species' is,

states.X[:gas.species_index('species')])

Documentation

Factors that Effect Ignition Delay in Diesel Engine [1]

Factors that influence ignition delay in diesel engine (Compression Ignition or ‘CI’ engine) are

  1. Compression ratio
  2. Inlet air temperature
  3. Coolant temperature
  4. Jacket water temperature
  5. Fuel temperature
  6. Intake pressure
  7. Air-fuel ratio and
  8. Engine size
  9. Compression ratio: With the increase in compression ratio reduces ignition lag, a higher pressure increases density resulting in closer contact of the molecules which reduce the time of action when fuel is injected.
  10. Inlet air temperature: With the increase in inlet temperature increases the air temperature after compression and hence decreases the ignition delay.
  11. Coolant temperature: Increase in engine speed increases cylinder air temperature and thus reduces ignition lag. The increase in engine speed increases turbulence and this reduces the ignition lag.
  12. Jacket water temperature: With the increase in jacket water temperature also increases compressed air temperature and hence delay period is reduced.
  13. Fuel temperature: Increase in fuel temperature would reduce both physical and chemical delay period.
  14. Intake pressure (supercharging): Increase in intake pressure or supercharging reduces the auto-ignition temperature and hence reduces delay period. Since the compression pressure will increase with intake pressure, the peak pressure will be higher. Also, the power output will be more air and hence more fuel can be injected per stroke.
  15. Air-fuel ratio (load): With the increase in air-fuel ratio (leaner mixture) the combustion temperatures are lowered and cylinder wall temperatures are reduced and hence the delay period increases, with an increase in load, the air-fuel ratio decreases, operating temperature increases and hence, delay period decreases.
  16. Engine size: The engine size has little effect on the delay period in milliseconds. As large engines operate at low revolutions per minute (rpm) because of inertia stress limitations, the delay period in terms of crank angle is smaller and hence less fuel enters the cylinder during the period. Thus combustion in large slow speed Compression Ignition engines is smooth.

An abstract and the conclusion of an international journal will be added, seeing the advances in the research of the auto-ignition delay characteristics in several experimental tests performed.

The methane oxy-fuel combustion highly diluted by CO2 at supercritical region has the best potential for its near-zero emission characteristics and high thermal efficiency, while its auto-ignition characteristic is still not clear. In current investigation, a model with detailed chemical kinetic mechanism was introduced to research its ignition delay times (IDs). Results showed that the fold points in low-temperature and high-pressure region is due to CH3O2 which only involved in Aramco-Mech 1.3. When temperature increases, the inhibition of the termination reactions plays a dominate role at low pressure, while the promotion of the branching reactions contributes more to the acceleration of ignition at high pressure. Five dominant pathways and their variations were clarified to depict the inhibition effect of the ratio of CO2/O2. Based on the newly proposed combustion mode, it was found that temperature dependence of the nonnegligible CO2 collision effect is opposite under low and high pressure with full-oxy combustion mode. This investigation extended the research region to higher pressure and comprehensively studied the relevant factors on the auto-ignition which not only provides theoretical reference for the chemical kinetics study of methane, but also contributes to the further researches of EGR, SCF and near-zero emissions technologies.(Xie et al. 2020)

In current investigation, the auto-ignition characteristics of methane oxy-fuel combustion highly diluted by CO2 were deeply studied with the simulation region close to the operating conditions of a real sCO2 turbine. The selected model was calibrated by four typical chemical kinetic mechanisms, and the IDs validation results of Aramco-Mech 1.3 showed great agreement with the experimental data. Based on sensitivity analysis, mole fraction analysis, ROP analysis, pathway analysis and third-body efficiency analysis, the effects of temperature, pressure, ratio of CO2/O2 and CO2 collision were obtained to explain the characteristics of IDs when those factors varying.(Xie et al. 2020)

F.1 Mole fraction of important radicals. (Xie et al. 2020)

F.2 IDs with doubled and halved third-body efficiency. (Xie et al. 2020)

And another abstract and conclusion will be discussed to obtain other perception and general behaviors of the analysis performed.

In addition, a richness of combustion regimes (slow combustion, pyrolysis, dynamic behavior, transitional combustion, combustion) was experimentally found. These unique behaviors as well as the dependence of ignition process on environmental parameters outline that modest temperature gradients due to high mixture dilution levels typical of MILD oxidation conditions, coupled with heat exchange to the surroundings, slow down the changeover among kinetic routes (namely oxidation and recombination channels) promoted by temperature thus stressing their competition. Such an aspect is generally hidden in traditional systems by a strong heat release that implies high temperature gradients. Finally, the data reported in this paper have an intrinsic value for the identification of stable operative conditions and for either tuning or reducing detailed kinetic schemes because few data are present in literature on methane ignition and oxidation in a simple reactor at atmospheric pressure.(Sabia et al. 2013)

These results extend the current database on auto-ignition times adding data at atmospheric pressure and moderate temperature. As matter of fact, in literature most of experimental data have been collected at elevated pressures and high temperatures by using shock tubes and RCM systems. As final consideration, the evaluation of auto-ignition delay times in diluted and pre-heated conditions leads to the conclusion that auto-ignition times are compatible with characteristic kinetic times of industrial systems operated at atmospheric pressure, which is a crucial aspect for the designing and dimensioning of industrial facilities.(Sabia et al. 2013)

Coding

The python code will be added and described as follows, using Cantera and numpy as an import object.

Initial conditions and general calculations are presented

import sys
import cantera as ct
import matplotlib.pyplot as plt
import numpy as np

u=5
ms=1e3
#PART I
S = {'CH4':1, 'O2':2, 'N2':7.52}#REACTION MECHANISM
t = np.linspace(0,u*2,10000)#TIME FROM 0-10 SECONDS
T = np.linspace(950,1450,u*2)#TEMPERATURE 950-1550 KELVIN
P = ct.one_atm*np.linspace(1,5,5)#PRESSURE 1-5 ATM

Tauto_ct_Temp = [[0 for time in t] for temp in T]
Tauto_ct_Pre = [[0 for time in t] for pres in P]

T_comp = [[0 for time in t] for m in range(0,2)]
tauto_ct_T = []
tauto_ct_P = []

def Auto_Ignition(T, P, S, t):
	gas = ct.Solution('gri30.xml')
	gas.TPX = T, P, S
	r = ct.IdealGasReactor(gas)
	sim = ct.ReactorNet([r])
	states = ct.SolutionArray(gas, extra=['time_in_ms'])
	for tp in t:
		sim.advance(tp)
		states.append(r.thermo.state, time_in_ms = tp*1e3)
	return states

for m in range(0,len(P)):
	states = Auto_Ignition(T[6], P[m], S, t)
	Tauto_ct_Pre[m] = states.T
	for n in range(0,len(states.T)):
		if states.T[n] >= states.T[0] + u*80:
			tauto_ct_P.append(states.time_in_ms[n])
			break

for m in range(0,len(T)):
	states = Auto_Ignition(T[m], P[-1], S, t)
	Tauto_ct_Temp[m] = states.T
	for n in range(0,len(states.T)):
		if states.T[n] >= states.T[0] + u*80:
			tauto_ct_T.append(states.time_in_ms[n])
			break
#PART II
x_1 = [[0 for time in t] for m in range(0,3)]
x_2 = [[0 for time in t] for m in range(0,3)]

Ss_H2O=states.species_index('H2O')
Ss_O2=states.species_index('O2')
Ss_OH=states.species_index('OH')
T_Pct_X1 = [u*200, u*100]

states = Auto_Ignition(T_Pct_X1[0], u*ct.one_atm, S, t)
x_1[0] = states.X[:,Ss_H2O]
x_1[1] = states.X[:,Ss_O2]
x_1[2] = states.X[:,Ss_OH]
T_comp[0] = states.T

states = Auto_Ignition(T_Pct_X1[1], u*ct.one_atm, S, t)
x_2[0] = states.X[:,Ss_H2O]
x_2[1] = states.X[:,Ss_O2]
x_2[2] = states.X[:,Ss_OH]
T_comp[1] = states.T

#POSTPROCESSING
plt.style.use('bmh')

figure1,(p1) = plt.subplots(1)
for m in range(0,len(P)):
	p1.plot(t*ms, Tauto_ct_Pre[m], linewidth=2.5, label=str(P[m]/ct.one_atm)+' Atmospheres')
p1.set_xlabel('Time: mili-seconds', fontsize=15)
p1.set_ylabel('Temperature: Kelvin', fontsize=15)
p1.set_title('1 to 5 Atmospheres Constant Temperature', fontsize=20)
plt.grid('TRUE')
plt.legend()
plt.show()

figure2,(p2) = plt.subplots(1)
p2.plot(P/ct.one_atm, tauto_ct_P, 'o-', linewidth=2.5, color='green')
p2.set_xlabel('Pressure: Atmospheres', fontsize=15)
p2.set_ylabel('Ignition Delay mili-seconds', fontsize=15)
p2.set_title('Ignition Delay: Pressure 1-5 Atmospheres', fontsize=20)
plt.grid('TRUE')
plt.show()

figure3,(p3) = plt.subplots(1)
for m in range(0,len(T)):
	p3.plot(t*ms, Tauto_ct_Temp[m], linewidth=2.5, label=str(int(T[m]))+'Kelvin')
p3.set_xlabel('Time: mili-seconds', fontsize=15)
p3.set_ylabel('Initial Temperature: Kelvin', fontsize=15)
p3.set_title('Reaction Temperature: Initial Temperature 950 to 1450 Kelvin', fontsize=20)
plt.grid('TRUE')
plt.legend()
plt.show()

figure4,(p4) = plt.subplots(1)
p4.plot(T, tauto_ct_T, 'o-', linewidth=2.5, color='green')
p4.set_xlabel('Initial Temperature: Kelvin', fontsize=15)
p4.set_ylabel('Ignition Delay mili-seconds', fontsize=15)
p4.set_title('Ignition Delay: Temperature 950 to 1450 Kelvin', fontsize=20)
plt.grid('TRUE')
plt.show()

figure5,(p5)= plt.subplots(3)
p5[0].set_title('Mole Fractions: 1000 Kelvin and 5 bar', fontsize=20)
p5[0].plot(t*ms, x_1[0], linewidth=2.5)
p5[1].plot(t*ms, x_1[1], linewidth=2.5)
p5[2].plot(t*ms, x_1[2], linewidth=2.5)
p5[2].set_xlabel('Time: mili-seconds', fontsize=15)
p5[0].set_ylabel('$X_{H_2O}$', fontsize=15)
p5[1].set_ylabel('$X_{O_2}$', fontsize=15)
p5[2].set_ylabel('$X_{OH}$', fontsize=15)
plt.grid('TRUE')
plt.show()

figure6,(p6) = plt.subplots(3)
p6[0].set_title('Mole Fractions: 500 Kelvin and 5 bar', fontsize=20)
p6[0].plot(t*ms, x_2[0], linewidth=2.5)
p6[1].plot(t*ms, x_2[1], linewidth=2.5)
p6[2].plot(t*ms, x_2[2], linewidth=2.5)
p6[2].set_xlabel('Time: mili-seconds', fontsize=15)
p6[0].set_ylabel('$X_{H_2O}$', fontsize=15)
p6[1].set_ylabel('$X_{O_2}$', fontsize=15)
p6[2].set_ylabel('$X_{OH}$', fontsize=15)
plt.grid('TRUE')
plt.show()

figure7,(p7) = plt.subplots(1)
for m in range(0,2):
	p7.plot(t*ms, T_comp[m], linewidth=2.5, label=str(T_Pct_X1[m])+'Kelvin')
p7.set_xlabel('Time: mili-seconds', fontsize=15)
p7.set_ylabel('Temperature: Kelvin', fontsize=15)
p7.set_title('Reaction Temperature: Initial Temperature 500 and 1000 Kelvin', fontsize=20)
plt.grid('TRUE')
plt.legend()
plt.show()

Postprocessing coding begins and images’ names are presented and give a general knowledge of the procedure and visual effect in the system.

F.3 1 to 5 Atmospheres Constant Temperature

F.4 1 to 5 Atmospheres Constant Temperature, close up.

F.5 Ignition Delay: Pressure 1-5 Atmosphere

F.6 Reaction Temperature: Initial Temperature 950 to 1450 Kelvin

F.7 Reaction Temperature: Initial Temperature 950 to 1450 Kelvin, close up.

F.8 Ignition Delay: Temperature 950 to 1450 Kelvin

F.9 Mole Fractions: 1000 Kelvin and 5 bars.

F.10 Mole Fractions: 1000 Kelvin and 5 bars, close up.

F.11 Mole Fractions: 500 Kelvin and 5 bars

F.12 Reaction Temperature: Initial Temperature 500 and 1000 Kelvin

Conclusion

Auto-ignition is a crucial aspect in combustion engines that depending in the working zones, the temperatures and pressures talking about internal combustion engines affect directly the performance of the system, by using CANTERA we were able to perform general species, temperature and pressure variations determining the auto-ignition of methane from different ranges and as seen in the papers of research added, are the more complex numerical and experimental validations for similar analysis.

Reference

  1. https://me-mechanicalengineering.com/factors-that-effect-ignition-delay-in-diesel-engine/

Sabia, Pino, Mariarosaria de Joannon, Antonio Picarelli, and Raffaele Ragucci. 2013. “Methane Auto-Ignition Delay Times and Oxidation Regimes in MILD Combustion at Atmospheric Pressure.” Combustion and Flame 160 (1): 47–55. https://doi.org/10.1016/j.combustflame.2012.09.015.

Xie, Mingke, Jianqin Fu, Yongxiang Zhang, Jingping Liu, and Banglin Deng. 2020. “Numerical Study on the Auto-Ignition Characteristics of Methane Oxy-Fuel Combustion Highly Diluted by CO2.” Journal of the Taiwan Institute of Chemical Engineers 114: 176–85. https://doi.org/10.1016/j.jtice.2020.09.005.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.