All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
STUDY OF AUTO-IGNITION TIME OF METHANE USING CANTERA l. OBJECTIVES 1. Simulate the combustion of methane and calculate its Auto-Ignition time using a reactor network code.…
Himanshu Chavan
updated on 02 Jul 2021
STUDY OF AUTO-IGNITION TIME OF METHANE USING CANTERA
l. OBJECTIVES
1. Simulate the combustion of methane and calculate its Auto-Ignition time using a reactor network code.
2. Study the variation of Auto-Ignition time of methane at constant temperature and varying pressure.
3. Study the variation of Auto-Ignition time of methane at constant pressure and varying temperature.
4. Study the rate of change in the mole fractions of H2O,O2and OH.
ll. INTRODUCTION
1. Auto-Ignition
The minimum temperature at which the products of combustion when placed in a reactor chamber, spontaneously ignites is called the Auto-Ignition temperature.
However, even when the temperature in the chamber is above the auto-ignition temperature, the combustion process does not ignite immediately and there is a small delay called the Ignition-Delay.
The auto-ignition time is the time when the temperature of the reactor is the initial temperature plus 400K
The stoichiometric equation of the combustion of methane can be represented as follows -
2. Cantera Reactor Network
A Cantera reactor network represents the simplest form of a chemical reacting system. It corresponds to an extensive thermodynamic control volume V, in which all state variables are homogeneously distributed. Transient state changes due to chemical reactions are possible, however, thermodynamic (and not chemical) equilibrium is assumed to be model the reactor class. The advance(time) function is used to advance the reactor to the specified time. This thermodynamic state of the reactor can then be extracted at each time step to study the transient behavior of the reactor. A reactor network must be created in Cantera even for a single reaction to visualize the transient behavior. For this problem, we are defining a reactor network for an ideal gas reactor whose state variables are:
The governing equations for the reactor are modeled as:
1. Mass Conservation
dmdt=∑in.min−∑in.mout+.mwall
2. Species Conservation
.mk,gen=V.ωkWk+.mwall
d(mYk)dt=∑in.minYk,in−∑out.moutYk+.mk,gen
3. Energy Conservation
U=m∑kYkuk(T)
dUdt=udmdt+mcvdTdt+m∑kukdYkdt
lll. METHODOLOGY
The auto-ignition study of methane is performed as per the following steps:
lV. EFFECT OF VARIATION IN PRESSURE AND TEMPERATURE ON THE IGNITION DELAY
CASE 1 - VARIATION IN PRESSURE AT A CONSTANT TEMPERATURE
1. PROBLEM STATEMENT
1. The temperature in the Combustion chamber is 1250 K.
2. The pressure in the combustion chamber varies from 1 atm to 5 atm.
3. The combustion process is simulated for 10 seconds.
2. CODE
import sys
import numpy as np
import matplotlib.pyplot as plt
import cantera as ct
def ign_delay(T, P, t_sim):
gas = ct.Solution('gri30.xml')
gas.TPX = T, P, {'CH4':1, 'O2': 2, 'N2': 7.52}
r = ct.IdealGasReactor(gas)
sim = ct.ReactorNet([r])
time = 0.0
T_combustion_start = T + 400
states = ct.SolutionArray(gas, extra = ['time_in_ms','t'])
for n in range(t_sim):
time += 1e-3
sim.advance(time)
states.append(r.thermo.state, time_in_ms = time*1e3, t = time)
if (states.T[n] <= T_combustion_start):
t_id = states.time_in_ms[n]
plt.figure(1)
plt.plot(states.t, states.T)
plt.figure(2)
plt.plot(states.time_in_ms, states.T)
return t_id
# Variation of Auto-Ignition time with Pressure at constant Temperature
T = 1250 # k
p_i = 101325*np.linspace(1,5,9)
t_sim = 10000 # ms
time_delay = []
iter = 1
for i in range(len(p_i)):
p = p_i[i]
ignition_delay = ign_delay(T, p, t_sim)
time_delay.append(ignition_delay)
log_message = 'iteration # = {0}, Initial pressure = {1} atm, Initial Temperature = {2} k, Ignition Delay = {3} ms'.format(iter, p/101325, T, round(ignition_delay,2))
print(log_message)
iter = iter+1
plt.figure(1)
plt.title(" Variation Of Temperature at different instances of Time")
plt.xlabel("Time (s)")
plt.ylabel("Temperature (k)")
plt.grid(which ='major')
plt.minorticks_on()
plt.grid(which='minor', alpha = 0.2)
plt.legend(['Initial pressure ='+str(p)+ 'atm' for p in p_i/101325])
plt.figure(2)
plt.xlim(0, 25)
plt.title("Variation of Temperature at different instances of Time")
plt.xlabel("Time (ms)")
plt.ylabel("Temperature (k)")
plt.grid(which='major')
plt.minorticks_on()
plt.grid(which='minor', alpha=0.2)
plt.legend(['Initial Pressure ='+str(p)+' atm' for p in p_i])
plt.figure(3)
plt.plot(p_i,time_delay)
plt.title("Effeect of variation of initial pressure on the Ignition Delay")
plt.xlabel("Pressure (atm)")
plt.ylabel("Ignition Delay (ms)")
plt.grid(which='major')
plt.minorticks_on()
plt.grid(which='minor', alpha=0.2)
plt.show()
3.OUTPUTS
iteration # = 1, Initial pressure = 1.0 atm, Initial Temperature = 1250 k, Ignition Delay = 21.0 ms
iteration # = 2, Initial pressure = 1.5 atm, Initial Temperature = 1250 k, Ignition Delay = 15.0 ms
iteration # = 3, Initial pressure = 2.0 atm, Initial Temperature = 1250 k, Ignition Delay = 11.0 ms
iteration # = 4, Initial pressure = 2.5 atm, Initial Temperature = 1250 k, Ignition Delay = 9.0 ms
iteration # = 5, Initial pressure = 3.0 atm, Initial Temperature = 1250 k, Ignition Delay = 8.0 ms
iteration # = 6, Initial pressure = 3.5 atm, Initial Temperature = 1250 k, Ignition Delay = 7.0 ms
iteration # = 7, Initial pressure = 4.0 atm, Initial Temperature = 1250 k, Ignition Delay = 6.0 ms
iteration # = 8, Initial pressure = 4.5 atm, Initial Temperature = 1250 k, Ignition Delay = 5.0 ms
iteration # = 9, Initial pressure = 5.0 atm, Initial Temperature = 1250 k, Ignition Delay = 4.0 ms
3.1 Figure 1 -
The plot shows that as the initial pressure increases, the maximum temperature attained by the system increases.
3.2 Figure 2 -
In Figure 1, we can see that there is a sudden increase in the temperature as soon as the simulation starts. To properly observe the behavior of ignition delay at different pressures, we need to limit the x-axis to 25 milliseconds.
The plot shows that as the pressure of the system increases, the maximum temperature of the system is attained more quickly.
3.3 Figure 3 -
The plot shows that as the initial pressure of the system increases, there is a decrease in the ignition delay of the system.
CASE 2 - VARIATION IN TEMPERATURE AT A CONSTANT PRESSURE
1. PROBLEM STATEMENT
1. The pressure in the combustion chamber is 5 atm.
2. The temperature in the combustion chamber varies from 950 K to 1450 K.
3. The combustion process is simulated from 10 seconds.
2. CODE
import sys
import numpy as np
import cantera as ct
import matplotlib.pyplot as plt
def reac(T,P,t_sim):
gas=ct.Solution('gri30.xml')
gas.TPX=T,P,{'CH4':1,'O2':2,'N2':7.52}
r=ct.IdealGasConstPressureReactor(gas)
sim=ct.ReactorNet([r])
time=0.0
T_combustion_start=T+400
states=ct.SolutionArray(gas, extra = ['time_in_ms','t'])
for n in range(t_sim):
time+=1e-3
sim.advance(time)
states.append(r.thermo.state, time_in_ms = time*1e3, t = time)
if (states.T[n] <= T_combustion_start):
t_id=states.time_in_ms[n]
plt.figure(1)
plt.plot(states.time_in_ms,states.T)
return (t_id)
# Variation of Auto-Ignition time with Pressure at constant Temperature
P=5*ct.one_atm
T_start=950
T_stop=1450
dT=100
T_init=np.arange(T_start,T_stop,dT)
t_sim=10000
time_delay = []
iter = 1
for i in range (len(T_init)):
T = T_init[i]
temp=reac(T,P,t_sim)
time_delay.append(temp)
log_message = 'iteration # = {0}, Initial Pressure = {1} atm, Initial Temperature = {2} K, Ignition Delay = {3} ms'.format(iter, P/101325, T, round(temp, 2))
print(log_message)
iter = iter + 1
plt.figure(1)
plt.title(" Variation of Temperature at different instances of Time")
plt.xlim(0,450)
plt.xlabel('Time(ms)')
plt.ylabel('Temperature(K)')
plt.grid(which ='major')
plt.minorticks_on()
plt.grid(which='minor', alpha = 0.2)
plt.legend(['T_initial ='+str(T)+ '[K]' for T in T_init])
plt.figure(2)
plt.plot(T_init,time_delay)
plt.title("Variation of Temperature at different instances of Time")
plt.xlabel('Initial Temperature(K)')
plt.ylabel('Ignition Delay(ms)')
plt.grid(which='major')
plt.minorticks_on()
plt.grid(which='minor', alpha=0.2)
plt.show()
3. Output
iteration # = 1, Initial Pressure = 5.0 atm, Initial Temperature = 950 K, Ignition Delay = 435.0 ms
iteration # = 2, Initial Pressure = 5.0 atm, Initial Temperature = 1050 K, Ignition Delay = 80.0 ms
iteration # = 3, Initial Pressure = 5.0 atm, Initial Temperature = 1150 K, Ignition Delay = 19.0 ms
iteration # = 4, Initial Pressure = 5.0 atm, Initial Temperature = 1250 K, Ignition Delay = 5.0 ms
iteration # = 5, Initial Pressure = 5.0 atm, Initial Temperature = 1350 K, Ignition Delay = 1.0 ms
3.1 Figure 1
we can see that there is a sudden increase in the temperature as soon as the simulation starts. to properly observes the behavior of ignition delay at different pressures, we need to limit the x-axis to 450 milliseconds.
The plot shows that as the initial temperature of the system increases, the maximum temperature of the system is attained more quickly
3.2 Figure 2
The plot shows that as the initial temperature of the system increases, there is a decrease in the ignition delay of the system.
V. EFFECT OF VARIATION IN MOLE FRACTIONS OF DIFFERENT SPECIES AT DIFFERENT TEMPERATURES
CASE 1 - MOLE FRACTIONS OF SPECIES AT T = 1000 K
1. PROBLEM STATEMENT
1. The temperature in the combustion chamber is 1000 k
2. The pressure in the combustion chamber is 5 bar.
3. The combustion process is simulated for 10 seconds.
2. CODE
import sys
import numpy as numpy
import matplotlib.pyplot as plt
import cantera as ct
P = 5*1e5 # bar
T = 1000 # k
t_sim = 10000 # ms
time_delay = []
gas =ct.Solution('gri30.xml')
gas.TPX = T, P, {'CH4': 1, 'O2':2,'N2':7.52}
r = ct.IdealGasReactor(gas)
sim = ct.ReactorNet([r])
time = 0.0
T_combustion_start = T + 400
states = ct.SolutionArray(gas, extra = ['time_in_ms','t'])
for n in range (t_sim):
time += 1e-3
sim.advance(time)
states.append(r.thermo.state, time_in_ms = time*1e3, t = time)
if (states.T[n] <= T_combustion_start):
t_id = states.time_in_ms[n]
species_H2O = states.X[:, gas.species_index('H2O')]
species_O2 = states.X[:, gas.species_index('O2')]
species_OH = states.X[:, gas.species_index('OH')]
plt.subplot(3,1,1)
plt.plot(states.t, species_H2O, color = 'b')
plt.title("Effect of Variation Of Mole Fraction Of Species n" +"at different instances of time")
plt.xlabel("Time (s)")
plt.ylabel("Mole Fraction of Species")
plt.grid(which='major')
plt.minorticks_on()
plt.grid(which='minor', alpha=0.2)
plt.legend(['$H_2O$'])
plt.subplot(3,1,2)
plt.plot(states.t, species_O2, color = 'k')
plt.xlabel("Time (s)")
plt.ylabel("Mole Fraction of Species")
plt.grid(which='major')
plt.minorticks_on()
plt.grid(which='minor', alpha=0.2)
plt.legend(['$O_2$'])
plt.subplot(3,1,3)
plt.plot(states.t, species_OH, color = 'y')
plt.xlabel("Time (s)")
plt.ylabel("Mole Fraction of Species")
plt.grid(which='major')
plt.minorticks_on()
plt.grid(which='minor', alpha=0.2)
plt.legend(['$OH$'])
plt.show()
3. OUTPUTS
Figure 1 -
There is a sudden decrease in the mole fraction of O2 and a sudden increase in the mole fractions of H2OandOH at the start of the combustion process. This is because the Oxygen present in the system is consumed to initiate the combustion process to give H2OandOH as products.
Also, as H2O is the major species in the combustion process, it has a higher mole fraction than O2andOH, which corresponds to the minor species.
CASE 2 - MOLE FRACTION OF SPECIES AT T = 500 K
1. PROBLEM STATEMENT
1. The temperature in the combustion chamber is 500 k
2. The pressure in the combustion chamber is 5 bar.
3. The combustion process is simulated for 10 seconds.
2. CODE
import sys
import numpy as numpy
import matplotlib.pyplot as plt
import cantera as ct
P = 5*1e5 # bar
T = 500 # k
t_sim = 10000 # ms
time_delay = []
gas =ct.Solution('gri30.xml')
gas.TPX = T, P, {'CH4': 1, 'O2':2,'N2':7.52}
r = ct.IdealGasReactor(gas)
sim = ct.ReactorNet([r])
time = 0.0
T_combustion_start = T + 400
states = ct.SolutionArray(gas, extra = ['time_in_ms','t'])
for n in range (t_sim):
time += 1e-3
sim.advance(time)
states.append(r.thermo.state, time_in_ms = time*1e3, t = time)
if (states.T[n] <= T_combustion_start):
t_id = states.time_in_ms[n]
species_H2O = states.X[:, gas.species_index('H2O')]
species_O2 = states.X[:, gas.species_index('O2')]
species_OH = states.X[:, gas.species_index('OH')]
plt.figure(1)
plt.plot(states.t, species_H2O, color = 'b')
plt.plot(states.t, species_O2, color = 'k')
plt.plot(states.t, species_OH, color = 'y')
plt.title("Effect of Variation Of Mole Fraction Of Species n" +"at different instances of time")
plt.xlabel("Time (s)")
plt.ylabel("Mole Fraction of Species")
plt.grid(which='major')
plt.minorticks_on()
plt.grid(which='minor', alpha=0.2)
plt.legend(['$H_2O$','$O_2$', '$OH$'])
plt.show()
3. OUTPUTS
Figure 1 -
In any combustion process, the initial temperature of the system should be high enough to auto-ignite the reactants. This temperature is called the auto-ignition temperature.
It can be seen in the plot, that the mole fractions of the species remain the same until the end of the process. It occurs as the temperature of the system is lower than the auto-ignition temperature, and hence the combustion of the system is not initiated.
Vl. RESULTS
1. Increasing the initial pressure of the system causes an increase in the maximum temperature attained by the system and decreases the ignition delay.
2. Increasing the initial temperature of the system causes an increase in the maximum temperature attained by the system and a decrease in the ignition delay.
3.The combustion reaction is a spontaneous process, and the change in mole fraction of reactants and products take place almost instantaneously within a few milliseconds.
4.The temperature of the system needs to be higher than the auto-ignition temperature for the combustion process to be initiated.
Vll. CONCLUSIONS
The combustion of methane has been successfully simulated and the effect of change in the initial pressure and temperature on the ignition delay has been studied. Also, the mole fractions of different species are analyzed at temperatures both higher and lower than the auto-ignition temperature
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Simulation Of A 1D Super-sonic Nozzle Using Macormack Method
AIM: To simulate the isentropic flow through a Quasi 1D subsonic - supersinic nozzle by deriving both the conservation and non-conservation forms of the governing equations and solve them by implementing Macormacks's technique using MATLAB. Objective: Determine the steady-state temperature distribution for the flow field…
19 Oct 2021 11:02 AM IST
Project 1 : CFD Meshing for Tesla Cyber Truck
ADVANCED CFD MESHING OF THE TESLA CYBER TRUCK l. OBJECTIVE 1. Geometry Clean-up of the model 2. Generation of surface mesh on the model. 3. Analyze and correct the quality of the mesh. 4. Setting…
08 Oct 2021 10:34 PM IST
Week 4 Challenge : CFD Meshing for BMW car
ADVANCED CFD MESHING OF THE BMW M6 MODEL USING ANSA l. OBJECTIVE 1. Detailed geometry clean-up of the BMW M6 Model. 2. Generation of a surface mesh on the model. 3. Analyze and correct the quality of the mesh. 4. Setting up a wind…
29 Sep 2021 10:51 PM IST
Related Courses
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.