1D Flame Speed Analysis of Methane and Hydrogen Mechanism.
Objective:
To perform 1D flame speed analysis for a methane and hydrogen mechanism using python and cantera.
1D Laminar Premixed Flame Speed Analysis(Deflagration)
Premixed Flame:
A premixed flame is a flame formed under certain conditions during the combustion of a premixed charge (also called pre-mixture) of fuel and oxidizer. These flames ignited by the source at one end which results in flame propagating in all the direction at the same rate. The premixed flame always has two phases burned(products) and unburned (reactants) regions. The unburnt region is referred to the upstream and downstream as the burnt region.
Here, we can treat it as the 1D flame because characteristics are oriented in 1D.
The general structure of the premixed flame is given by
Generally, they are three zones 1) preheat zone. 2)reaction zone. 3) recombination zone
At the reaction zone most of the chemical energy is released in the form of heat Decomposition of fuel takes place, leading to the intermediate radical formation Reaction zone is very thin as compared to the preheat zone. Temperature gradient and concentration gradient are high.
Here, we are more concerned about the reaction zone to calculate the flame speed.
Flame speed:
Flame speed is defined as the speed at which flame propagate. The flame propagates because all the heat that produced get conducted and heats the upstream(reactants) of the flame. Generally, flame speed is represented as `S_L` means laminar flame speed (Here, we are considering only laminar flow). If the flame speed(velocity) is calculated we can stabilize the flame.
What type of analysis is this, steady-state or transient?
- By nature, flame speed analysis is transient(unstable) but we are stabilizing it by using "flame reference co-ordinates".
- We fix the origin at the flame front so when the flame is moving co-ordinates also moves and concerning the origin, the flame becomes the steady-state.
- Hence, The 1D flame speed analysis is the steady-state analysis. Steady-state analysis numerically simulates faster compare to an unsteady state analysis.
Why do we need a separate file to simulate Hydrogen mechanism can't we do in GR3.0?
-
GRI-Mech 3.0 is an optimized mechanism designed to model natural gas combustion, which doesn't include the Hydrogen mechanism. So, we need to use the separate Hydrogen mechanism file (H2_mech.cti).
Does the "width" parameter affect the solution, If so or not so, please explain why?
- Width parameters define a grid on the interval [0, width] with internal points determined automatically by the solver, The domain in the flame going to travel i.e by using the width parameter we can refine finer.
- The difference between the solutions obtained with and without width parameter is illustrated below.
- Without width Parameter:
- With the width Parameter:
- Hence, the Width parameter has an effect on the solution n
Solution Procedure:
We solve the governing equations at every grid and if the gradient between any two is higher than we add another grid point and solve the governing equation at the new point. This process continues until the fine mesh is obtained and satisfies certain conditions. This method is called "finite difference discretization".
These are the following solution approach that is followed by the cantera
- Finite difference discretization
- Successive grid refine strategy is used to get the solution. These solution obtained by using the Newton Raphson method (y_new = y_guess - α*J^-1*F)
- The solution is monitored for gradient (slope and curvature) and location with the large gradient is refined(the new grid is created).
- New slope and the curvature is computed.
- After solving every grid point and we have velocities at each point. The velocity at the colder boundary (unburnt region ) is called as flame speed.
Code:
- Define the initial parameters (Temperature and pressure) and create two instant gas objects in the solution class for the methane mechanism and hydrogen mechanism
- gri30_mix are used to compute the mixture properties. These contain the diffusion coefficient that is illustrated in the governing equation. 'H2_mech.cti' contain the hydrogen mechanism.
- Create a flame object for the methane and the hydrogen mechanism and set the refine criteria (ratio, slope, curvature).
- Solve the problem by using the solve command. It solves all the flame parameters at each grid by using the newton raphson iterative method.
- Plot command is used to plot the graphs between the grid, temperature, velocity, and concentration of CO2.
"""
Program for the 1D flame speed analysis of methane and hydrogen mechanism
"""
import cantera as ct
import matplotlib.pyplot as plt
import numpy as np
#simulation parameters
Tin = 300 # unburned gas temperature(initial temperature)
P = ct.one_atm
width = 0.03 # Defines a grid on the interval [0, width] with internal points determined automatically by the solver.
reactants = 'CH4:0.45,O2:1,N2:3.76' #reactant compostion of the methane mechanism
# create a gas instant object of solution class
gas = ct.Solution('gri30.xml','gri30_mix')
gas.TPX = Tin,P,reactants
reactants_H = 'H2:0.45,O2:1,N2:3.76' #reactant compostion of the hydrogen mechanism
# create a gas_H (Hydogen mechanism) instant object of solution class
gas_H = ct.Solution('H2_mech.cti')
gas_H.TPX = Tin,P,reactants_H
#flame object for the methane mechanism
f = ct.FreeFlame(gas,width=width)
f.set_refine_criteria(ratio=3 ,slope =0.07 ,curve= 0.14)
#help(f)
#print(f.grid)
# flame object for the hydrogen mechanism
g = ct.FreeFlame(gas_H,width = width)
g.set_refine_criteria(ratio = 3, slope=0.07,curve=0.14)
f.solve(loglevel = 1,auto = True)
g.solve(loglevel=1,auto=True)
# Plotting for the Methane Mechanism
plt.figure(1)
plt.subplot(211)
plt.xlabel('grid')
plt.ylabel('Temperature')
plt.plot(f.grid,f.T)
plt.subplot(212)
plt.xlabel('grid')
plt.ylabel('Velocity or speed')
plt.plot(f.grid,f.u)
plt.figure(2)
plt.xlabel('grid')
plt.ylabel('Concentration Of CO2')
plt.plot(f.grid,f.X[gas_H.species_index('CO2')])
#Plotting for the Hydrogen Mechanism
plt.figure(3)
plt.subplot(211)
plt.xlabel('grid')
plt.ylabel('Temperature')
plt.plot(g.grid,g.T)
plt.subplot(212)
plt.xlabel('grid')
plt.ylabel('Velocity or speed')
plt.plot(g.grid,g.u)
plt.figure(4)
plt.xlabel('grid')
plt.ylabel('Concentration Of CO2')
plt.plot(g.grid,g.X[gas_H.species_index('CO2')])
plt.show()
Results:
For the Methane Mechanism:
From the above graphs, It is clear that the temperature has risen suddenly and reaches to the Adiabatic Flame temperature. As mentioned in the structure of the flame the preheat zone has a negligibly small amount of heat release. At the reaction zone, most of the chemical reactions take place. Hence, there is a sudden rise in temperature. At the recombustion zone, no heat is released. Similarly, the speed of the flame is computed and the final flame speed is calculated at colder region(recombustion zone).
The second plot clearly illustrated that the concentration of CO2 in the methane mechanism is concentrated at the grid of 0.02, i.e at the reaction zone, where the production of CO2 is formed.
For the Hydrogen Mechanism:
From the above graphs, It is clear that the temperature has risen suddenly and reaches to the Adiabatic Flame temperature. As mentioned in the structure of the flame the preheat zone has a negligibly small amount of heat release. At the reaction zone, most of the chemical reactions take place. Hence, there is a sudden rise in temperature. At the recombustion zone, no heat is released. Similarly, the speed of the flame is computed and the final flame speed is calculated at colder region(recombustion zone).
Conclusion:
By observing both graphs it is clear that the flame speed and temperature of the Methane mechanism is higher than the Hydrogen mechanism.