1D Flame Speed analysis
Objective: The main objective of this project is to perform a 1D Flame speed analysis for a Methane-air and hydrogen-air system.
Solution:
The 1D Flame speed analysis is a steady-state analysis. The script presented here deals with a Methane-Air premixed free flame and Hydrogen-Air premixed flame, at stoichiometry, and under atmospheric conditions; but can easily be altered for other fuels or operating points. The mechanism used is GRIMech 3.0 with mixture transport properties for methane and H2_mech for hydrogen.
The flame speed analysis is considered as a steady-state analysis as the calculation is performed with respect to the flame front. The unburnt gases are assumed to move into the flame front, get combusted and move away from the flame front after combustion.
The code structure itself is pretty straight forward. An initial temperature of 300K is assigned with a pressure of 1 atm. The width of the system is 0.03 m(i.e the area which the flame will propagate through). Changing the width parameter will not have any effect on the profile of the solution. The profile curve stays the same irrespective of the width parameter. The flame under consideration is a freely propagating flame.
Two gas objects are created for methane and hydrogen and their respective mole fractions are assigned. In obtaining the solution, a successive grid refinement strategy is employed. If the gradients between 2 grid points are large, then they are further subdivided until the gradients fall within the tolerance values which are the ratio, slope, and curve. Slope and curve determine the slope and curve values for the profiles obtained. If these values fall above the tolerance slope and curve values then the grid is further refined.
""" In Python version less than 3, print exists as a print statement
but in order to implement print as a print function which is used
in Python 3 and above we use the future function to import print
function from later releases."""
from __future__ import print_function
import cantera as ct
import numpy as np
import matplotlib.pyplot as plt
#width to determine distance of flame travel
width = 0.05
gas = ct.Solution('gri30.cti')
gas1 = ct.Solution('H2_mech.cti')
gas.TPX = 300,101325,'CH4 : 0.45,O2 : 1.0, N2 : 3.76'
gas1.TPX = 300,101325,'H2 : 0.45, O2 : 1.0, N2 : 3.76'
#FreeFlame is used to calculate the flame properties for the given width
f = ct.FreeFlame(gas, width = width)
g = ct.FreeFlame(gas1, width = width)
#set_refine_criteria helps refine the grid points
f.set_refine_criteria(ratio =3, slope =0.07 , curve = 0.14)
g.set_refine_criteria(ratio =3, slope = 0.07, curve = 0.14)
f.solve(loglevel = 1, auto = True)
g.solve(loglevel = 1, auto = True)
plt.subplot(211)
plt.xlabel('grid')
plt.ylabel('Temperature in K')
plt.plot(f.grid,f.T)
plt.subplot(212)
plt.xlabel('grid')
plt.ylabel('velocity')
plt.plot(f.grid,f.u)
plt.tight_layout()
plt.figure(2)
plt.plot(f.grid,f.X[gas.species_index('CO2')])
plt.xlabel('grid')
plt.ylabel('concentration of CO2 in methane combustion')
plt.figure(3)
plt.subplot(211)
plt.xlabel('grid')
plt.ylabel('Temperature in K')
plt.plot(g.grid, g.T)
plt.subplot(212)
plt.xlabel('grid')
plt.ylabel('velocity')
plt.plot(g.grid, g.u)
plt.tight_layout()
plt.figure(4)
plt.plot(g.grid,g.X[gas1.species_index('CO2')])
plt.xlabel('grid')
plt.ylabel('concentration of CO2 in hydrogen combustion')
plt.show()
OUTPUT:
1. Temperature and velocity profiles for the methane-air mixture.
From the graph, it is visible that there is a sudden spike in the values of temperature and velocity. This indicates that the beginning of the combustion reaction. Here, we can observe that the change in temperature is directly proportional to change in velocity. The steady-state value of 1D flame, in this case, is 2000K because at this point the combustion process has completely begun.
The change in concentration of CO2 during the combustion of Methane-Air mixture
There is a notable change in the concentration of CO2 produced after the combustion process begins. This indicates that CO2 is formed during the combustion of Methane.
2. Temperature and velocity profiles of Hydrogen-Air mixture
From the graph, it is visible that there is a sudden spike in the values of temperature and velocity. This indicates that the beginning of the combustion reaction. Here, we can observe that the change in temperature is directly proportional to change in velocity. But compared to the Methane air combustion reaction, the hydrogen combustion reaction takes place a bit slowly. This is due to the slow diffusion rate of Hydrogen. The steady-state value of 1D flame, in this case, is 1000K because at this point the combustion process has completely begun.
The change in concentration of CO2 during the combustion of Hydrogen-Air mixture.
In this graph, it can be noted that the change in concentration of CO2 is very close to 0. In actuality, no CO2 is produced during the combustion of Hydrogen and air. This variation might be due to what is known as Numerical noise (Numerical error) that may arise during the simulation. Hence a very very small change in the value is observed.
Conclusion:
It can be concluded that for a given mole fraction of methane and hydrogen, the combustion reaction of methane proceeds faster than that of the combustion of hydrogen. This may be due to the faster diffusion rate of Methane. On the contrary, the production of CO2 is much more noticeable for methane than for hydrogen.