Project

Auto Ignition Using Cantera

AUTO-IGNITION:-

  • Auto-Ignition or spontaneous ignition is of practical interest not only in relation to hazard, but also in combination system such as gas turbine.
  • Auto-Ignition though simple in concept, need careful defination which defined as the state that if the temperature of an infinite volume of reactant at constant pressure is raised instantaneously and homogenously above critical value and maintained there, an explosion will occur homogenously throughout the volume, thus the forestalling flame propogation.
  • Auto-Ignition occur when a mixture of gases or vapour ignites spontaneously with no external ignition source and ofter reaching a certain temperature, the auto ignition temperature .
  • The Auto-Ignition temperature is not an intrinsic property of the gases or vapour but it is lowest temperature in a system where the rate of heat evolved from the gases or vapour increase beyond the rate of heat loss to the surrounding resulting in ignition.
  • The Auto-Ignition temperature of a mixture of gases or vapour is affected by pressure vessels, shape and volume, surface activity, contaminants. flow rate, reaction rate, droplet and mist formation, gravity and reaction concentration.
  • In general, decreased pressure leads to an increased Auto-Ignition temperature whereas increased vessels size lead to a decreased Auto-Ignition temperature to fuel concentration except at near limiting concentration, however with hydrazine show that off stiochiometric mixture lead to increased Auto-Ignition temperature.

Part 1:-

Case 1:- Auto Ignition time of Methane with a constant temperature of 1250K and pressure varying from 1 to 5 atm.

Code:-

\"\"\" Auto ignition delay time with variation of pressure from
1 atm to 5 atm with constant Temperature of 1250 K \"\"\"

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

gas = ct.Solution(\'gri30.xml\')
Pressure = np.linspace(1,5,9) # Variation of Pressure from 1 atm to 5 atm
T = 1250 # K Constant Temperature
time_start = 0  # start time in second
time_end = 10 # End time in seconds
dt = 1e-3 # time step size
n = int((time_end - time_start)/dt) # Number of Iteration
auto_ignition_delay_P = [] # store the value of ignition delay with change in pressure
temp_diff_pressure = [] # store the value of Temperature difference with change in pressure


for P in Pressure:
	gas.TPX = T, P*ct.one_atm,{\'CH4\':1,\'O2\':2,\'N2\':7.52}
	temperature_auto_ignition = 0
	time_auto_ignition = 0
	time = 0
	r = ct.IdealGasReactor(gas)
	sim = ct.ReactorNet([r])
	states = ct.SolutionArray(gas, extra = [\'time_in_ms\',\'t\'])
	print(\'  {:10s}    {:10s}   {:10s}\'.format(\'t[s]\',\'T[K]\',\'P[Pa]\')) # [Time, Temperature, Pressure] Heading

	for n in range (n):
		time +=1e-3 # time = time + 1e-3
		sim.advance(time) # reactor is advancing to next time step
		states.append(r.thermo.state,time_in_ms = time*1e3, t = time)
		print(\'{:10.3e}{:10.3f}    {:10.3f}\'.format(sim.time, r.T, r.thermo.P)) # Display the value of time , temperature and pressure
	temp_diff_pressure.append(states.T)

	for i in range (n):
		T_error = states.T[i] - T - 400
		if T_error>0:
			temperature_auto_ignition = states.T[i]
			time_auto_ignition = states.time_in_ms[i]
			break
	auto_ignition_delay_P.append(time_auto_ignition)

temp_diff_pressure = np.array(temp_diff_pressure)

for k in range(len(Pressure)):
	plt.figure(1) 
	plt.plot(temp_diff_pressure[k])
	plt.xlabel(\'Number of Iteration\')
	plt.ylabel(\'Temperature\')
	plt.grid(\'on\')
	plt.title(\'Variation of Auto Ignition Temperature with change in Pressure\')
	plt.legend([\'1 Bar\',\'1.5 Bar\',\'2 Bar\',\'2.5 Bar\',\'3 Bar\',\'3.5 Bar\',\'4 Bar\',\'4.5 Bar\',\'5 Bar\'])

plt.figure(2)
plt.plot(Pressure,auto_ignition_delay_P,\'-*\')
plt.xlabel(\'Pressure [bar]\')
plt.ylabel(\'Time [ms]\')
plt.grid(\'on\')
plt.title(\'Ignition delay with change in Pressure\')

print(\'{:10s} {:10s}\'.format(\'ignition_delay[ms]\',\'Pressure[Pa]\'))

for j in range(len(Pressure)):
	print(\'{:10.2f}    {:10.2f}\'.format(auto_ignition_delay_P[j],Pressure[j]))
	#print(auto_ignition_delay_P[j],Pressure[j])

#print(auto_ignition_delay_P)
#print(Pressure)

plt.show()

  • From the above plot and table is Auto-Ignition delay for Methane and Air reaction at constant Temperature 1250 K and variation in Pressure from 1 atm to 5 atm.
  • The simulation is run for 10000 milliseconds.
  • From the above table and plot, we can conclude that lower the pressure higher will be the ignition delay and higher the pressure lower will be ignition delay.
  • Hence in order to achieve the lower ignition delay, we need to have higher pressure at constant temperature.

  • The above plot is time change with repect to change in inlet pressure.
  • From the graph, we can there is exponential decrease in time with respect change in pressure from 1 atm to 2.5 atm that is decrease in ignition delay about 22.5 milliseconds to 10 milliseconds repectively. Means we can say that this pressure is not good for combustion.
  • From the graph, we can there is linear decrease in time with respect change in pressure from 2.5 to 5 atm that is decrease in ignition delay about 10 milliseconds to 5 milliseconds repectively. Means we can say that this pressure is suitable for combustion.

Case 2:-Auto Ignition time of Methane with a constant pressure of 5 atm and temperature varying from 950K to 1450K.

Code:-

\"\"\" Auto ignition delay time with variation of temperature
from 950K to 1450 K with constant pressure at 5 atm \"\"\"

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

gas = ct.Solution(\'gri30.xml\')
Temperature = np.linspace(950,1450,11) # Variation of Temperature from 950 K to 1450 K
P = 5 # atm  Constant Pressure
time_start = 0  # start time in second
time_end = 10 # End time in seconds
dt = 1e-3 # time step size
n = int((time_end - time_start)/dt) # Number of Iteration
auto_ignition_delay_T = [] # store the value of ignition delay with change in temperature
temp_diff_pressure = [] # store the value of pressure difference with change in temperature


for T in Temperature:
	gas.TPX = T, P*ct.one_atm,{\'CH4\':1,\'O2\':2,\'N2\':7.52}
	temperature_auto_ignition = 0
	time_auto_ignition = 0
	time = 0
	r = ct.IdealGasReactor(gas)
	sim = ct.ReactorNet([r])
	states = ct.SolutionArray(gas, extra = [\'time_in_ms\',\'t\'])
	print(\'  {:10s}    {:10s}   {:10s}\'.format(\'t[s]\',\'T[K]\',\'P[Pa]\')) # [Time, Temperature, Pressure] Heading

	for n in range (n):
		time +=1e-3 # time = time + 1e-3
		sim.advance(time) # reactor is advancing to next time step
		states.append(r.thermo.state,time_in_ms = time*1e3, t = time)
		print(\'{:10.3e}{:10.3f}    {:10.3f}\'.format(sim.time, r.T, r.thermo.P)) # Display the value of time , temperature and pressure
	temp_diff_pressure.append(states.T)

	for i in range (n):
		T_error = states.T[i] - T - 400
		if T_error>0:
			temperature_auto_ignition = states.T[i]
			time_auto_ignition = states.time_in_ms[i]
			break
	auto_ignition_delay_T.append(time_auto_ignition)

temp_diff_pressure = np.array(temp_diff_pressure)

for k in range(len(Temperature)):
	plt.figure(1) 
	plt.plot(temp_diff_pressure[k])
	plt.xlabel(\'Number of Iteration\')
	plt.ylabel(\'Temperature\')
	plt.grid(\'on\')
	plt.title(\'Variation of Auto Ignition Temperature with change in inlet Temperature\')
	plt.legend([\'950 K\',\'1000 K\',\'1050 K\',\'1200 K\',\'1250 K\',\'1300 K\',\'1350 K\',\'1400 K\',\'1450 K\'])

plt.figure(2)
plt.plot(Temperature,auto_ignition_delay_T,\'-*\')
plt.xlabel(\'Temperature [K]\')
plt.ylabel(\'Time [ms]\')
plt.grid(\'on\')
plt.title(\'Ignition delay with change in inlet Temperature\')

print(\'{:10s} {:10s}\'.format(\'ignition_delay[ms]\',\'Temperature[K]\'))

for j in range(len(Temperature)):
	print(\'{:10.2f}    {:10.2f}\'.format(auto_ignition_delay_T[j],Temperature[j]))
	#print(auto_ignition_delay_P[j],Pressure[j])

#print(auto_ignition_delay_P)
#print(Pressure)

plt.show()

  • The above plot and table is for Methane react with air at constant pressure 5 atm with change in temperature from 950 K to 1450 K.
  • The simulation is run for 10000 milliseconds.
  • From the above table, we can say that at lower temperature higher will be the ignition delay and at higher temperature lower ignition delay and vice-versa.
  • So, in order to achieve lower ignition we required higher temperature.

  • From plot, is variation in time with repect to temperature.
  • From the plot, we can see there is huge exponential fall in ignition delay time with change in temperature that is from 950 K to 1100 K the decrease time from 426 millisecond to 37 milliseconds. This range is temperature at constant pressure is not suitable for combustion.
  • From the plot, we can see that from 1100 K to 1400 K there is slight decrease in temperature and it almost turn into a constant in time. So, this range is suitable for combustion

Discussion:-

  1. Comparing the both case we can say that is variation in Temperature at constant pressure so more combustion efficiency than the variation in pressure at constant temperature.
  2. Due to it required less time to reach equilibrium state and the graph is for Case 2 reach at constant state where in Case 1 the graph is still linearly decreasing
  3. We can also say that the temperature is sensitive to time.

Part 2:-

Case 1:- Rate of change of molar concentrations of the given elements \"H2O, O2, OH\" with respect to the time, (simulation time = 10 secs)

Code:-

\"\"\" Auto ignition delay rate of molar concentration with respect to time \"\"\"

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

gas = ct.Solution(\'gri30.xml\')
Temperature = np.linspace(950,1450,11) # Variation of Temperature from 950 K to 1450 K
P = 5 # atm  Constant Pressure
time_start = 0  # start time in second
time_end = 10 # End time in seconds
dt = 1e-3 # time step size
n = int((time_end - time_start)/dt) # Number of Iteration
auto_ignition_delay_T = [] # store the value of ignition delay with change in temperature
temp_diff_pressure = [] # store the value of pressure difference with change in temperature


for T in Temperature:
	gas.TPX = T, P*ct.one_atm,{\'CH4\':1,\'O2\':2,\'N2\':7.52}
	temperature_auto_ignition = 0
	time_auto_ignition = 0
	time = 0
	r = ct.IdealGasReactor(gas)
	sim = ct.ReactorNet([r])
	states = ct.SolutionArray(gas, extra = [\'time_in_ms\',\'t\'])
	print(\'  {:10s}    {:10s}   {:10s}\'.format(\'t[s]\',\'T[K]\',\'P[Pa]\')) # [Time, Temperature, Pressure] Heading

	for n in range (n):
		time +=1e-3 # time = time + 1e-3
		sim.advance(time) # reactor is advancing to next time step
		states.append(r.thermo.state,time_in_ms = time*1e3, t = time)
		print(\'{:10.3e}{:10.3f}    {:10.3f}\'.format(sim.time, r.T, r.thermo.P)) # Display the value of time , temperature and pressure
	temp_diff_pressure.append(states.T)

	for i in range (n):
		T_error = states.T[i] - T - 400
		if T_error>0:
			temperature_auto_ignition = states.T[i]
			time_auto_ignition = states.time_in_ms[i]
			break
	auto_ignition_delay_T.append(time_auto_ignition)

plt.figure(1)

plt.subplot(3,1,1)
plt.plot(states.t,states.X[:,gas.species_index(\'H2O\')])
plt.xlabel(\'Time (ms)\')
plt.ylabel(\'H2O Mole Fraction\')
plt.title(\'Mole Concentration of H2O for 10 sec of simulation\')

plt.subplot(3,1,2)
plt.plot(states.t,states.X[:,gas.species_index(\'O2\')])
plt.xlabel(\'Time (ms)\')
plt.ylabel(\'O2 Mole Fraction\')
plt.title(\'Mole Concentration of O2 for 10 sec of simulation\')

plt.subplot(3,1,3)
plt.plot(states.t,states.X[:,gas.species_index(\'OH\')])
plt.xlabel(\'Time (ms)\')
plt.ylabel(\'OH Mole Fraction\')
plt.title(\'Mole Concentration of OH for 10 sec of simulation\')

plt.tight_layout()
plt.show()

a) When temperature change from 950 K to 1450 K at constant pressure 5 atm

b) When Pressure change from 1 atm to 5 atm at constant temperature 1250 K

Result:-

  • Comparing to the above plot, there is no variation in the mole fraction of oxygen elements, where OH and H2O element have a very low variation. This phenomenon is because of the structure of their bonds. This are single bond molecule and apparently required less temperature to break the bond where as oxygen required is double bond and required more energy or temperature to break the bond.
  • Coming to the water moles fraction, it is increased and stabled throughout the simulation time. This is beacause in Methane combustion water is the product.
  • The OH mole fraction is also the same as the Water, it is increase and maintain stability, it is also the product of Methane in combustion.
  • Above three moles fraction plotted are examined with repect to the change in simulation time (millisecond)

Case 4:- Compartion of Auto-Ignition Temperature from 500 K to 1000 K for 10000 milliseconds

Code:-

\"\"\" Auto ignition with change in temperature 
from 500 K to 1000 K with 5 bar constant pressure \"\"\"

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

gas = ct.Solution(\'gri30.xml\')
Temperature = [500,1000]
temp_diff_pressure = []

for T in Temperature:
	gas.TPX = T, 5*ct.one_atm, {\'CH4\':1, \'O2\':2, \'N2\':7.52}
	r= ct.IdealGasReactor(gas)
	sim = ct.ReactorNet([r])
	time = 0
	states = ct.SolutionArray(gas)

	for n in range(1000):
		time += 1e-3
		sim.advance(time)
		states.append(r.thermo.state)
	temp_diff_pressure = np.array(states.T)
	#print(temp_diff_pressure)
	plt.figure(1)
	print(temp_diff_pressure)
	plt.plot(temp_diff_pressure)
for T in Temperature:
	plt.plot(temp_diff_pressure,color=\'orange\')
	plt.xlabel(\'Number of Time Step\')
	plt.ylabel(\'Temperature\')
	plt.title(\'Temperature variation at 500 K and 1000 K at 5 bar pressure\')
	plt.legend([\'500 K\',\'1000 K\'])
	plt.show()

Result:-

  • From above, we can say that at 500 K there is no ignition takes place
  • Where at 1000 K, ignition take at 1000 K for about 0.2 sec and there is certain rise in temperature upto 2877 K and it reach to equilibrium state.
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.