Week 7 - Auto ignition using Cantera
Aim:- To simulate Auto-ignition time for methane and Calculate Auto-ignition temperature.
Introduction:-
As we know that when a fuel is compressed or exposed to high temperature, it gets automatically ignited without any external source for ignition. So, when a fuel gets auto-ignited it takes some time commonly known as ignition delay in order to take whole combustion. But here we may some questions like how this ignition time delay takes place and why ignition not take place at exact time as fuel is compressed or exposed to high temperature. So keeping this all in mind, here I have develop a code which numerically calculates and simulates the ignition time delay and auto-ignition temperature. And using this output and desired plot result, I have find out and shown the impact of temperature and pressure on ignition delay and Auto-ignition temperature.
Some of the prime objective of aim are in the following way :-
(i) Plot the variation of Auto Ignition time of Methane with a constant temperature of 1250K and pressure varying from 1 to 5 atm.
(ii) Plot the variation of Auto Ignition time of Methane with a constant pressure of 5 atm and temperature varying from 950K to 1450K.
(iii) Understanding the behaviour of Auto-ignition for constant temperature of 500K and 1000K at constant pressure of 5 bar.
Theory:-
Auto-ignition:-
Auto-ignition occurs when a mixture of gases or vapors ignites spontaneously with no external ignition source and after reaching a certain temperature, the autoignition temperature. The autoignition temperature is not an intrinsic property of the gases or vapors but is the lowest temperature in a system where the rate of heat evolved from the gases or vapors increases beyond the rate of heat loss to the surroundings, resulting in ignition. The auto-ignition temperature of a mixture of gases or vapors is affected by pressure, vessel shape and volume, surface activity, contaminants, flow rate, reaction rate, droplet and mist formation, gravity, and reactant concentration.
Auto-ignition temperature:-
Autoignition or the kindling point is described as the lowest temperatures at which a material will spontaneously ignite under normal ambient condition without an external initiator such as a flame or a spark. These temperatures are critical especially for the shipping, storage, and use of various plastic objects and the associated fire hazards. Autoignition temperatures are of more prominence for liquid materials and gases than solid materials.
Here I have assumed methane fuel in order to calculate Auto-ignition temperature and it's effect. For methane fuel, we have preassumed equivalence ratio to be stiochiometric i.e the moles of reactants has been taken stiochiometric cofficients. Hence, the program is written down for Methane fuel at Air-fuel ratio of stiochiometric.
"""
Program to calculate Auto-ignition temperature and plot the Effect of Pressure at constant temperature of 1250K.
Program written by:-
SHYAM RAI, 19-06-2020
"""
import sys
import numpy as np
import cantera as ct
import matplotlib.pyplot as plt
gas=ct.Solution('gri30.xml')
T=1250 # Temperature.
P=np.linspace(101325,5*101325,6) # list of different Pressure.
time=np.zeros(5) # list of intial values of time.
# different variables to store a list of values for pressure.
states_pressure_1=[]
states_pressure_2=[]
states_pressure_3=[]
states_pressure_4=[]
states_pressure_5=[]
for i in range(5): # loop counter for different pressure.
gas.TPX=T,P[i],{'CH4':1,'O2':2,'N2':7.52} # defining temperature, pressure and mole fractions.
r=ct.IdealGasReactor(gas) # intialisation of a reactor.
sim=ct.ReactorNet([r]) # intialisation of a reactor network.
states=ct.SolutionArray(gas, extra=['time_in_ms','t']) # storage of solution array .
for n in range(100): # loop counter for ms (milliseconds).
time[i]+=1e-3 # Time interval in milliseconds.
sim.advance(time[i]) # increment of time step value.
states.append(r.thermo.state, time_in_ms=time[i]*1e3,t=time[i]) # storing solution of network reactor.
# condition defined for storage of different value of pressure.
if i==0:
states_pressure_1=states.T
if i==1:
states_pressure_2=states.T
if i==2:
states_pressure_3=states.T
if i==3:
states_pressure_4=states.T
if i==4:
states_pressure_5=states.T
plt.plot(states.t,states_pressure_1)
plt.plot(states.t,states_pressure_2)
plt.plot(states.t,states_pressure_3)
plt.plot(states.t,states_pressure_4)
plt.plot(states.t,states_pressure_5)
plt.title('Effect of Temperature at constant Pressure of 5 Bar',weight='bold')
plt.xlabel('Ignition Delay (Seconds)',weight='bold')
plt.ylabel('Auto-ignition Temperature',weight='bold')
plt.legend(['1 bar','2 bar','3 bar','4 bar','5 bar'],loc="lower right",fontsize=12.5)
plt.show()
"""
Program to calculate Auto-ignition temperature and plot the Effect of Temperature at constant Pressure of 5 Bar.
Program written by:-
SHYAM RAI, 19-06-2020
"""
import sys
import numpy as np
import cantera as ct
import matplotlib.pyplot as plt
gas=ct.Solution('gri30.xml')
T=np.linspace(950,1450,6) # list of different Temperature.
P=5*101325 # Pressure
time=np.zeros(5) # list of intial values of time.
# different variables to store a list of values for temperature.
states_temperature_T1=[]
states_temperature_T2=[]
states_temperature_T3=[]
states_temperature_T4=[]
states_temperature_T5=[]
for i in range(5): # loop counter for different pressure.
gas.TPX=T[i],P,{'CH4':1,'O2':2,'N2':7.52} # defining temperature, pressure and mole fractions.
r=ct.IdealGasReactor(gas) # intialisation of a reactor.
sim=ct.ReactorNet([r]) # intialisation of a network reactor.
states=ct.SolutionArray(gas, extra=['time_in_ms','t']) # storage of solution array.
for n in range(600): # loop counter for ms (milliseconds).
time[i]+=1e-3 # Time interval in milliseconds.
sim.advance(time[i]) # increment of time step.
states.append(r.thermo.state, time_in_ms=time[i]*1e3,t=time[i]) # storing solution of network reactor.
# condition defined for storage of different value of temperature.
if i==0:
states_temperature_T1=states.T
if i==1:
states_temperature_T2=states.T
if i==2:
states_temperature_T3=states.T
if i==3:
states_temperature_T4=states.T
if i==4:
states_temperature_T5=states.T
plt.plot(states.t,states_temperature_T1)
plt.plot(states.t,states_temperature_T2)
plt.plot(states.t,states_temperature_T3)
plt.plot(states.t,states_temperature_T4)
plt.plot(states.t,states_temperature_T5)
plt.title('Effect of Pressure at constant Temperature of 1250K',weight='bold')
plt.xlabel('Ignition Delay (Seconds)',weight='bold')
plt.ylabel('Auto-ignition Temperature',weight='bold')
plt.legend(['Temperature=950K','Temperature=1050K','Temperature=1150K','Temperature=1250K','Temperature=1350K','Temperature=1450K',],loc="lower right",fontsize='10')
plt.show()
"""
Program to calculate Auto-ignition temperature and understanding behaviour at constant Temperature of 500K and 1000K for constant Pressure of 5 Bar.
Program written by:-
SHYAM RAI, 19-06-2020
"""
import sys
import numpy as np
import cantera as ct
import matplotlib.pyplot as plt
gas=ct.Solution('gri30.xml')
T=[500,1000] # Temperature.
P=5*101325 # Pressure
states_temperature_T=[] # variable to store time dependent temperature.
for i in range(2): # loop counter for different temperature.
gas.TPX=T[i],P,{'CH4':1,'O2':2,'N2':7.52} # defining temperature, pressure and mole fractions.
time=0.0
r=ct.IdealGasReactor(gas) # intialisation of a reactor.
sim=ct.ReactorNet([r]) # intialisation of a network reactor.
states=ct.SolutionArray(gas, extra=['time_in_ms','t']) # storage of solution array.
for n in range(500): # loop counter for ms (milliseconds).
time+=1e-3 # Time interval in milliseconds.
sim.advance(time) # increment of time step.
states.append(r.thermo.state, time_in_ms=time*1e3,t=time) # storing solution of network reactor.
states_temperature_T=states.T
plt.plot(states.t,states_temperature_T)
plt.title('When Temperature is 1000K and Pressure is 5 Bar',weight='bold')
plt.xlabel('Ignition Delay (Seconds)',weight='bold')
plt.ylabel('Auto-ignition Temperature',weight='bold')
plt.show()
# printing output of mole fraction of H2O,O2 and OH.
print("Mole fraction of H2O:\n",states.X[:,gas.species_index('H2O')])
print("Mole fraction of O2 :\n ",states.X[:,gas.species_index('O2')])
print("Mole fraction of OH :\n",states.X[:,gas.species_index('OH')])
Result:-
Here I observed that Ignition delay was decreasing as I was increasing the predefined pressure. Apart from it, I also observed that Auto-ignition temperature however was less compared to the subsequent higher pressure values.
The ignition delay of Auto-ignition for different predefined pressure are in the following way:-
for 1 bar, ignition delay is 21 ms.
for 2 bar, ignition delay is 13 ms.
for 3 bar, ignition delay is 09 ms.
for 4 bar, ignition delay is 07 ms.
for 5 bar, ignition delay is 05 ms.
Here in temperature based plot, I observed that the Ignition delay was significantly decreasing as predefined temperature was increasing. Although, the Auto-ignition temperature is higher for higher predefined temperature.
The ignition delay of Auto-ignition for different predefined temperature are in the following way:-
for 950 K, ignition delay is 425 ms.
for 1050 K, ignition delay is 77 ms.
for 1150 K, ignition delay is 17.5 ms.
for 1250 K, ignition delay is 04 ms.
for 1350 K, ignition delay is 01 ms.
Comparing above two plots of Auto-ignition temperature for predefined temperature at 500K and 1000K, I observed that when predefined temperature was 500K, Auto-ignition temperature was remain unchanged or constant And when temperature was 1000K, Auto-ignition temperature increased rapidly after some milliseconds of time.
The difference between both plot gave us information that the threshold predefined temperature is still there inspite of having higher pressure. So, I get information that for Auto-ignition, we require threshold predefined temperature inspite of any pressure.
Printed output results :-
At Temperature 500K.
At Temperature 1000K.
Conclusion:-
For Pressure, we concluded that as Pressure increases, Auto-ignition Temperature and ignition-delay decreases.
For Temperature, we concluded that as Temperature increases, Auto-ignition Temperature and ignition-delay decreases.
For Auto-ignition of fuel, there is threshold Temperature value for which auto-ignition takes place even for high pressure.