All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
INTRODUCTION Auto-ignition occurs when a mixture of gases or vapors ignites spontaneously in absence of any external ignition source such as a flame or a spark. The temperature at which auto-ignition occurs is called the auto-ignition temperature. It is the lowest temperature in a system where the rate of heat evolved…
Shouvik Bandopadhyay
updated on 10 Jan 2020
INTRODUCTION
BACKGROUND OF CANTERA REACTOR NETWORK
The following conservation laws are applicable for the reactor:
CORROSPONDING GOVERNING EQUATIONS FOR THE REACTOR AS DERRIVED FROM THE CONSERVATION LAWS
1. dmdt=∑in.min−∑out.mout+.mwall
2. d(mYk)dt=∑in.minYk,in−∑out.moutYk+.mk,gen
3. dUdt=udmdt+mCvdTdt+m∑kukdYkdt
STEPS TO BE FOLLOWED:
The auto-ignition temperature for this case is defined as:
Timeignitiondelay=Timeinitial+400K
The time at which this temperature is reached is called the ignition delay.
Part I
The auto-ignition of methane is studied under different initial conditions:
Part II
The rate of change of mole fractions of and is studied for cases:
A function is created to output the state of the reactor network for the specified initial conditions and time. This function is called through the main code which makes it easier to implement it for all the different cases.
PYTHON CODE
\"\"\"
Program to study the auto-ignition of methane under various conditions.
Program by: Shouvik Bandopadhyay
\"\"\"
import cantera as ct
import matplotlib.pyplot as plt
import numpy as np
# Defining the function to output the thermodynamic states at each time-step
def auto_ignition(T, P, species_dict, t):
gas = ct.Solution(\'gri30.xml\')
gas.TPX = T, P, species_dict
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
# Defining the various initial conditions
T = np.linspace(950,1450,11)
P = 101325*np.linspace(1,5,9)
species_dict = {\'CH4\':0.095, \'O2\':0.19, \'N2\':0.715}
t = np.linspace(0,10,10001)
# Initializing the output parameters
T_ai_T = [[0 for time in t] for temp in T]
T_ai_P = [[0 for time in t] for pres in P]
T_mole = [1000, 500]
T_comp = [[0 for time in t] for i in range(0,2)]
time_ai_T = []
time_ai_P = []
mole_frac1 = [[0 for time in t] for i in range(0,3)]
mole_frac2 = [[0 for time in t] for i in range(0,3)]
# Auto-ignition for constant temperature (1250 K)
for i in range(0,len(P)):
states = auto_ignition(T[6], P[i], species_dict, t)
T_ai_P[i] = states.T
for j in range(0,len(states.T)):
if states.T[j] >= states.T[0] + 400:
time_ai_P.append(states.time_in_ms[j])
break
# Auto-ignition for constant pressure (5 atm)
for i in range(0,len(T)):
states = auto_ignition(T[i], P[-1], species_dict, t)
T_ai_T[i] = states.T
for j in range(0,len(states.T)):
if states.T[j] >= states.T[0] + 400:
time_ai_T.append(states.time_in_ms[j])
break
# Mole Fractions for temperature of 1000 K
states = auto_ignition(T_mole[0], 5*100000, species_dict, t)
mole_frac1[0] = states.X[:, states.species_index(\'H2O\')]
mole_frac1[1] = states.X[:, states.species_index(\'O2\')]
mole_frac1[2] = states.X[:, states.species_index(\'OH\')]
T_comp[0] = states.T
# Mole Fractions for temperature of 500 K
states = auto_ignition(T_mole[1], 5*100000, species_dict, t)
mole_frac2[0] = states.X[:, states.species_index(\'H2O\')]
mole_frac2[1] = states.X[:, states.species_index(\'O2\')]
mole_frac2[2] = states.X[:, states.species_index(\'OH\')]
T_comp[1] = states.T
# Plotting all the results
fig1, ax1 = plt.subplots()
for i in range(0,len(P)):
plt.plot(t, T_ai_P[i], linewidth=2, label=str(P[i]/101325)+\' atm\')
plt.xlabel(\'Time [sec]\', fontsize=14)
plt.ylabel(\'Temperature [K]\', fontsize=14)
plt.title(\'Reaction Temperature with varying Pressure\', fontsize=14, fontweight=\'bold\')
plt.grid(\'both\', linestyle=\'--\', linewidth=0.8)
plt.legend(fontsize=12)
fig2, ax2 = plt.subplots()
plt.plot(P/101325, time_ai_P, \'o-\', linewidth=2, markersize=10)
plt.xlabel(\'Pressure [atm]\', fontsize=14)
plt.ylabel(\'Ignition Delay [ms]\', fontsize=14)
plt.title(\'Ignition Delay with varying Pressure\', fontsize=14, fontweight=\'bold\')
plt.grid(\'both\', linestyle=\'--\', linewidth=0.8)
fig3, ax3 = plt.subplots()
for i in range(0,len(T)):
plt.plot(t, T_ai_T[i], linewidth=2, label=str(int(T[i]))+\' K\')
plt.xlabel(\'Time [sec]\', fontsize=14)
plt.ylabel(\'Initial Temperature [K]\', fontsize=14)
plt.title(\'Reaction Temperature with varying Initial Temperature\', fontsize=14, fontweight=\'bold\')
plt.grid(\'both\', linestyle=\'--\', linewidth=0.8)
plt.legend(fontsize=12)
fig4, ax4 = plt.subplots()
plt.plot(T, time_ai_T, \'o-\', linewidth=2, markersize=10)
plt.xlabel(\'Initial Temperature [K]\', fontsize=14)
plt.ylabel(\'Ignition Delay [ms]\', fontsize=14)
plt.title(\'Ignition Delay with varying Initial Temperature\', fontsize=14, fontweight=\'bold\')
plt.grid(\'both\', linestyle=\'--\', linewidth=0.8)
fig5, ax5 = plt.subplots(3)
ax5[0].plot(t, mole_frac1[0], linewidth=2)
plt.suptitle(\'Mole Fractions for Reaction at 1000 K and 5 bar\', fontsize=14, fontweight=\'bold\')
ax5[0].grid(\'both\', linestyle=\'--\', linewidth=0.8)
ax5[0].set_xticklabels([])
ax5[1].plot(t, mole_frac1[1], linewidth=2)
ax5[1].grid(\'both\', linestyle=\'--\', linewidth=0.8)
ax5[1].set_xticklabels([])
ax5[2].plot(t, mole_frac1[2], linewidth=2)
ax5[0].set_ylabel(\'$X_{H_2O}$\', fontsize=14)
ax5[1].set_ylabel(\'$X_{O_2}$\', fontsize=14)
ax5[2].set_ylabel(\'$X_{OH}$\', fontsize=14)
ax5[2].set_xlabel(\'Time [sec]\', fontsize=14)
ax5[2].grid(\'both\', linestyle=\'--\', linewidth=0.8)
fig6, ax6 = plt.subplots(3)
plt.suptitle(\'Mole Fractions for Reaction at 500 K and 5 bar\', fontsize=14, fontweight=\'bold\')
ax6[0].plot(t, mole_frac2[0], linewidth=2)
ax6[0].grid(\'both\', linestyle=\'--\', linewidth=0.8)
ax6[0].set_xticklabels([])
ax6[1].plot(t, mole_frac2[1], linewidth=2)
ax6[1].grid(\'both\', linestyle=\'--\', linewidth=0.8)
ax6[1].set_xticklabels([])
ax6[2].plot(t, mole_frac2[2], linewidth=2)
ax6[0].set_ylabel(\'$X_{H_2O}$\', fontsize=14)
ax6[1].set_ylabel(\'$X_{O_2}$\', fontsize=14)
ax6[2].set_ylabel(\'$X_{OH}$\', fontsize=14)
ax6[2].set_xlabel(\'Time [sec]\', fontsize=14)
ax6[2].grid(\'both\', linestyle=\'--\', linewidth=0.8)
fig7, ax7 = plt.subplots()
for i in range(0,2):
plt.plot(t, T_comp[i], linewidth=2, label=str(T_mole[i])+\' K\')
plt.xlabel(\'Time [sec]\', fontsize=14)
plt.ylabel(\'Temperature [K]\', fontsize=14)
plt.title(\'Reaction Temperature with varying Initial Temperature\', fontsize=14, fontweight=\'bold\')
plt.grid(\'both\', linestyle=\'--\', linewidth=0.8)
plt.legend(fontsize=12)
plt.show()
RESULTS FOR PART I
PART I CONCLUSIONS
RESULTS FOR PART II
PART II CONCLUSIONS
FOR 1000 K
Auto ignition occurs with some amount of ignition delay which increases the mole fraction of the products namely wayer and hydroxyl and at the same time decreases the mole fraction of reactant namely oxygen.
Spike for the change in mole fraction is consistent for all 3 species which indicates a spontaneous ignition of methane.
FOR 500 K
Mole fraction of the products is nearly 0 compared to the 1000 K case while the reactant oxygen\'s mole fraction remains the same as 0.19 implying that no reaction has taken place.
500 K is too low temperature to ignite methane without an external spark or flame as demonstrated in the temperature VS time curve above.
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...
FULL SCALE COMBUSTION MODELLING OF A PORT FUEL INJECTION ENGINE
…
22 Jul 2020 08:09 AM IST
Week 7: Shock tube simulation project
…
24 May 2020 08:21 PM IST
Week 8: Literature review - RANS derivation and analysis
RANS LITERATURE REVIEW: DERIVATION OF RANS EQUATONS FOR TURBULENT FLUID FLOWS OBJECTIVE To apply Reynolds Decomposition to NS Equations and obtain the expression for Reynold's Stress …
21 May 2020 05:36 PM IST
Week 5 - Compact Notation Derivation for a simple Mechanism
Please Find the solution of the challenge attached.
20 May 2020 07:20 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.