Study of Auto Ignition Time using Cantera
Objectives:
- To study the variation of Auto Ignition time of Methane with a constant temperature for different Initial Pressures.
- To study the variation of Auto Ignition time of Methane with a constant pressure and different Initial Temperatures.
- To find the rate of change of molar concentrations of the elements \'H2O\', \'OH\' and \'O2\' at different initial temperatures.
Introduction:
Auto Ignition Temperature of a mixture is the lowest temperature at which the mixture would ignite.
The Air-Fuel mixture does not burn immediately and takes time for reaction to take place. Hence the Auto Ignition time is the time required for the chemical reaction to take place.
`Time_(Ignition Delay)=Time_(Initial Temperature+400K)`
The stoichiometric combustion of Methane is considered in this case.The combustion equation for methane:
`CH_4+2O_2+7.56N_2 rightarrow CO_2+2H_2O+7.56N_2`
(The products obtained in combustion are more than those defined in the above equation)
The above reaction takes place in various steps.
Method:
The cantera module in Python is used to solve the problem. The Reactor Object is used in a Reactor Network and the advance method is applied. The Network is advanced and the data is recorded at an interval of 1ms.
Variation of Auto Ignition Time with Initial Pressure:
The Initial Temperature is held constant at 1250K and the initial Pressure is varied from 1atm to 5 atm.
import sys
import numpy as np
import cantera as ct
import matplotlib.pyplot as plt
def reac(T,P,t_end):
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_aft=T+400
states=ct.SolutionArray(gas,extra=[\'time_in_ms\',\'t\'])
for n in range(t_end):
time+=1e-3
sim.advance(time)
states.append(r.thermo.state,time_in_ms=time*1e3,t=time)
if (states.T[n]<=T_aft):
t_d=states.time_in_ms[n]
plt.figure(1)
plt.plot(states.time_in_ms,states.T)
return (t_d)
P_start=1*101325
P_stop=5*101325
dP= 0.5*101325
t_end=10000
t_delay=[]
P_init=np.arange(P_start,P_stop,dP)
for i in range (len(P_init)):
P=P_init[i]
T=1250
temp=reac(T,P,t_end)
t_delay.append(temp)
plt.figure(2)
plt.plot(P_init[i]/ct.one_atm,temp,\'*\',color=\'blue\')
plt.figure(2)
plt.plot(P_init/ct.one_atm,t_delay)
plt.xlabel(\'Initial Pressure(atm)\')
plt.ylabel(\'Ignition Delay(ms)\')
plt.grid(True)
plt.figure(1)
plt.xlabel(\'Time(ms)\')
plt.ylabel(\'Temperature(K)\')
plt.grid(True)
plt.legend([\'P_initial=\'+str(P)+\'(atm)\' for P in P_init/ct.one_atm])
plt.show()
Variation of Auto Ignition Time with Initial Temperature:
The initial pressure is held constant at 5 atm and the initial temperature is varied from 950K to 1450K.
import sys
import numpy as np
import cantera as ct
import matplotlib.pyplot as plt
def reac(T,P,t_end):
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_aft=T+400
states=ct.SolutionArray(gas,extra=[\'time_in_ms\',\'t\'])
for n in range(t_end):
time+=1e-3
sim.advance(time)
states.append(r.thermo.state,time_in_ms=time*1e3,t=time)
if (states.T[n]<=T_aft):
t_d=states.time_in_ms[n]
plt.figure(1)
plt.plot(states.time_in_ms,states.T)
return (t_d)
T_start=950
T_stop=1450
dT=100
T_init=np.arange(T_start,T_stop,dT)
P=5*ct.one_atm
t_end=10000
t_delay=[]
for i in range (len(T_init)):
temp=reac(T_init[i],P,t_end)
t_delay.append(temp)
plt.figure(2)
plt.plot(T_init[i],temp,\'*\',color=\'blue\')
plt.figure(2)
plt.plot(T_init,t_delay)
plt.xlabel(\'Initial Temperature(K)\')
plt.ylabel(\'Ignition Delay(ms)\')
plt.grid(True)
plt.figure(1)
plt.xlabel(\'Time(ms)\')
plt.ylabel(\'Temperature(K)\')
plt.grid(True)
plt.legend([\'T_initial=\'+str(T)+\'[K]\' for T in T_init])
plt.show()
Concentration of elements with Time at different Temperatures:
The concentrations of the elements \'OH\',\'H2O\',\'O2\', changes throughout the reaction and the change in concentration with respect to time is plotted:
import sys
import numpy as np
import cantera as ct
import matplotlib.pyplot as plt
T_init=[500,1000]
P=5*ct.one_atm
t_end=10000
#states=reac(T,P,t_end)
for i in range (len(T_init)):
T=T_init[i]
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_aft=T+400
states=ct.SolutionArray(gas,extra=[\'time_in_ms\'])
for n in range(t_end):
time+=1e-3
sim.advance(time)
states.append(r.thermo.state,time_in_ms=time*1e3)
H2O_conc=states(\'H2O\').X
OH_conc=states(\'OH\').X
O2_conc=states(\'O2\').X
plt.figure(i+1)
plt.plot(states.time_in_ms,H2O_conc)
plt.plot(states.time_in_ms,OH_conc)
plt.plot(states.time_in_ms,O2_conc)
plt.legend([\'H2O\',\'OH\',\'O2\'])
plt.grid(True)
plt.xlabel(\'Time(ms)\')
plt.ylabel(\'Mole Fraction of Species\')
titl=\'Concentration of Species v/s Time \\n Initial Temperature:{}(K)\'.format(T)
plt.title(titl)
plt.show()
Results:
Variation of Auto Ignition Time with Initial Pressure:
The plot given below shows the Auto Ignition Temperature at different Initial Pressures
It can be observed from the above plot that as the initial pressure of the system is increased, the auto ignition temperature slightly changes.
Given below is a plot that shows the variation of the ignition delay with initial pressure.
The plot shows that as the initial pressure increases the delay time is reduced and the reaction begins faster.
Variation of Auto Ignition Time with Initial Temperature:
The above plot shows the Auto Ignition of methane at different initial temperatures.
From the two plots it can be implied that the delay in combustion reduces as the initial temperature is increased and the mixture ignites at higher initial temperatures.
Concentration of elements with Time at different Temperatures:
The plots below shows the rate of change of different species at temperatures 500K and 1000K
From the above two plots, it can be seen that at 500K no ignitionhas taken place and hence the concentration of the species has not changed with time. However at 1000K, the concentration of \'O2\' has reduces and that of \'OH\' and \'H2O\' has increased. the zoomed in plot below witll show that the change is concentration has suddenly happened for all the three species at the same instant. This is the ignition delay time of the mixture at 1000K
The concentration of oxygen reduces as the oxygen is used up in the combustion reaction.The species \'OH \' and \'H2O\' increase as the are the procucts of combustion.