You are on page 1of 14

1D Flame Speed Analysis

You are required to perform the following tasks,

1. What type of analysis is this, steady-state or transient?


2. Why do we need a separate file to simulate Hydrogen Mechanism can't it
be done using GRI3.0?
3. What do you infer from the graphs, explain in detail for both the graphs,
so if you had to state one value as the 1D Flame which one would you
say it is and why?? What does the sudden increase in velocity or
temperature tell us??
4. Substantiate your answer for the previous question by plotting variation in
the concentration for "CO2" and explain what you infer from it (to find a
function to find the change in concentration of CO2 find it using the help()
command)
5. Does the "width" parameter have an effect on the solution, if so or not so,
please explain why?

Aim --> 1D Flame Speed Analysis Steady-State

Theory -->

In this project, we are solving for Premixed flame combustion of Methane-


Air and Hydrogen-Air Mixtures at atmospheric conditions. The flame is a
freely propagating flame, It is a transient case using an Inertial frame of
reference. We convert this problem from transient to steady-state by
transforming the frame of reference from Inertial to flame-fixed. The flow is
predominantly in 1 dimension [1-D] and we are using a flame front coordinate
system so the flow is steady-state. The unburnt gases are moving into the
flame front (with a velocity) where combustion takes place and we have
products on the other side. The calculations are performed using a flame fixed
coordinate system and the origin is located at the flame-front. The Velocity
with which reactants are flowing towards the flame-front is the speed of
propagation of the flame.
Flame speed

The flame speed is the measured rate of expansion of the flame front in


a combustion reaction. The flame is generally propagated spherically and the
radial flame propagation velocity is defined as the flame speed. In other
words, flame speed represents how rapidly the flame travels from an absolute
reference point while burning velocity presents the moving rate of chemical
reactants (unburned gases) into the reaction sheet (flame front) from a local
reference point located on the flame front.

In an internal combustion engine, the flame speed of fuel is a property that


determines its ability to undergo controlled combustion without detonation.
Flame speed is used along with adiabatic flame temperature to help determine
the engine's efficiency.
--> The Flame Speed analysis is done on 2 cases, [CH4-Air Mixture]
Methane-Air and [H2-Air Mixture] Hydrogen-Air Mixture. In this analysis, we
are going to use 2 different Mechanisms. We are also using FreeFlame class
in Cantera, it is used in cases where we have a 1-D premixed free-flowing
laminar flame of a given fuel-air mixture. For solving coupled Partial
Differential Equations it uses Newton-Raphson Solver. In Some situations,
Newton-Raphson may not converge to a value, so the solver does a pseudo
transient stepping to converge the solutions. The solver also uses a course
grid initially and does the refinement based on ratio, slope and
curve parameters. We provide the tolerance values for these parameters and
the solver refines the mesh until these criteria are met. 

Following is the python code -->


'''
GRI 3.0 for Methane-Air Combustion and H2_mech.cti for Hydrogen-Air
Combustion
'''
import cantera as ct
import numpy as np
import matplotlib.pyplot as plt

# Simulation Parameters
P=ct.one_atm
Tin = 300.0
reactants = {'CH4':0.45, 'O2':1.0, 'N2':3.76}
reactants1 = {'H2':1.8, 'O2':1, 'N2':3.76}
width = 0.03

gas =ct.Solution('gri30.xml','gri30_mix')
gas1 = ct.Solution('H2_mech.cti')
gas.TPX = Tin, P, reactants
gas1.TPX = Tin, P, reactants1

# Flame Object
f = ct.FreeFlame(gas,width=width)
g = ct.FreeFlame(gas1,width=width)

#Set refine criteria helps refine the grid


f.set_refine_criteria(ratio=3, slope=0.07, curve=0.14)
g.set_refine_criteria(ratio=3, slope=0.07, curve=0.14)

# Solve
f.solve(loglevel=1, refine_grid=True, auto=False)
g.solve(loglevel=1, refine_grid=True, auto=False)

#help(f.solve)
# Ploting the results
plt.figure(1)
plt.subplot(2,1,1)
plt.title('CH4 [methane-air] combustion using GRI 3.0
Mechanism',fontsize=12,fontweight='bold')
plt.grid('on')
plt.xlabel('Grid')
plt.ylabel('Temperature in k',fontsize=12,fontweight='bold')
plt.plot(f.grid,f.T,color='k',linewidth=2)
plt.subplot(2,1,2)
plt.xlabel('Grid')
plt.ylabel('Velocity in m/s',fontsize=12,fontweight='bold')
plt.plot(f.grid,f.velocity,color='r',linewidth=2)
plt.grid('on')

plt.figure(2)
plt.subplot(2,1,1)
plt.title('H2 [Hydrogen-air] combustion using H2_mech.cti
Mechanism',fontsize=12,fontweight='bold')
plt.plot(g.grid,g.T,color='k',linewidth=2)
plt.grid('on')
plt.xlabel('Grid')
plt.ylabel('Temperature in k',fontsize=12,fontweight='bold')
plt.subplot(2,1,2)
plt.plot(g.grid,g.velocity,color='r',linewidth=2)
plt.xlabel('Grid')
plt.ylabel('Velocity in m/s',fontsize=12,fontweight='bold')
plt.grid('on')
plt.figure(3)
plt.title('Variation of CO2 mole fraction in CH4-Air flame')
plt.plot(f.grid,f.X[gas.species_index('CO2')],linewidth=2,color='g'
)
plt.legend(['Methane[CH4-Air]'])
plt.xlabel('Grid Length',fontsize=12,fontweight='bold')
plt.ylabel('Concentration of CO2',fontsize=12,fontweight='bold')
plt.grid('on')

plt.figure(4)
plt.title('Variation of CO2 mole fraction in H2-Air flame')
plt.plot(g.grid,g.X[gas1.species_index('CO2')],linewidth=2,color='r
')
plt.legend(['Hydrogen[H2-Air]'])
plt.xlabel('Grid Length',fontsize=12,fontweight='bold')
plt.ylabel('Concentration of CO2',fontsize=12,fontweight='bold')
plt.grid('on')
plt.show()

Results:--
From the above graphs, we can infer that the flame front exists between
0.010-0.011. Unburnt reactants move from left to right and as they pass
through the flame front they are converted into products. It can also be seen
that H2 flame speed is higher than CH4 flame speed as H2 is more diffusive
gas than CH4. In the H2 flame, we are not using GRI 3.0 mechanism because
the mechanism has 325 chemical reactions and 53 species instead, we use
H2_mech.cti mechanism which has 268 reactions and 57 species and it is also
optimised for Hydrogen Oxidation. It gives faster and accurate results
compared to GRI 3.0 mechanism.
The following plot is based on the GRI 3.0 Mechanism.

The following plot is based on the H2_mech.cti Mechanism.


From the above plots of CO2 concentration, we can see that for CH4
combustion we have CO2 concentration in the product but for H2 combustion
we don't have CO2 as a product so CO2 concentration is negligible. CO2
concentration is 8e-15 in H2 combustion. H2 reacts with air to form products
and CO2 is not present. 
'''
Comparison of GRI 3.0 Mechanism with H2_mech.cti Mechanism for
Hydrogen-Air Combustion.
'''
import cantera as ct
import numpy as np
import matplotlib.pyplot as plt

# Simulation Parameters
P=ct.one_atm
Tin = 300.0

reactants = {'H2':2, 'O2':0.5, 'N2':3.76}


width = 0.03

gas1 =ct.Solution('gri30.xml','gri30_mix') # GRI 3.0 Mechanism


gas2 = ct.Solution('H2_mech.cti') # H2 Mechanism

gas1.TPX = Tin, P, reactants


gas2.TPX = Tin, P, reactants

# Flame Object
g1 = ct.FreeFlame(gas1,width=width)
g2 = ct.FreeFlame(gas2,width=width)

#Set refine criteria helps refine the grid


g1.set_refine_criteria(ratio=3, slope=0.07, curve=0.14)
g2.set_refine_criteria(ratio=3, slope=0.07, curve=0.14)

# Solve
g1.solve(loglevel=1, refine_grid=True, auto=False)
g2.solve(loglevel=1, refine_grid=True, auto=False)

#help(f.solve)
# Ploting the results
plt.figure(1)
plt.subplot(2,1,1)
plt.title('GRI 3.0 Mechanism VS H2_mech.cti Mechanism [Hydrogen-Air
Flame]',fontsize=12,fontweight='bold')
plt.plot(g1.grid,g1.T,color='r',linewidth=2)
plt.plot(g2.grid,g2.T,color='k',linewidth=2)
plt.legend(['GRI 3.0 Mechanism','H2_mech.cti Mechanism'])
plt.grid('on')
plt.xlabel('Grid Length')
plt.ylabel('Temperature in k',fontsize=12,fontweight='bold')
plt.subplot(2,1,2)
plt.plot(g1.grid,g1.velocity,color='r',linewidth=2)
plt.plot(g2.grid,g2.velocity,color='k',linewidth=2)
plt.legend(['GRI 3.0 Mechanism','H2_mech.cti Mechanism'])
plt.xlabel('Grid')
plt.ylabel('Velocity in m/s',fontsize=12,fontweight='bold')
plt.grid('on')

plt.figure(2)
plt.title('Hydrogen-Air H2
Combustion',fontsize=12,fontweight='bold')
plt.plot(g1.grid,g1.X[gas1.species_index('CO2')],linewidth=1.5)
plt.plot(g2.grid,g2.X[gas2.species_index('CO2')],linewidth=1.5)
plt.legend(['GRI 3.0 Mechanism','H2_mech.cti Mechanism'])
plt.xlabel('Grid Length',fontsize=12,fontweight='bold')
plt.ylabel('Concentration of CO2 variation along grid
length',fontsize=13,fontweight='bold')
plt.grid('on')
plt.show()
Results: --
--> The above plot compares GRI 3.0 mechanism with H2_mech.cti
Mechanism, we can see that velocity is slightly higher for the H2 mechanism
and the H2 mechanism gives a more accurate CO2 concentration (negative)
as we know that CO2 will not be formed in H2-Air combustion.
'''
The code shows the effect of width parameter on the solution of 1D
flame speed analysis. Result for Variation
in width is captured for both Methane-Air (GRI 3.0 Mechanism) and
Hydrogen-Air (H2 Mechanism) Combustion.
'''
import cantera as ct
import numpy as np
import matplotlib.pyplot as plt

def CH4_GRI30(width):
# Simulation Parameters
P=ct.one_atm
Tin = 300.0
reactants = {'CH4':0.45, 'O2':1.0, 'N2':3.76}
gas =ct.Solution('gri30.xml','gri30_mix')
gas.TPX = Tin, P, reactants
# Flame Object
f = ct.FreeFlame(gas,width=width)
f.set_refine_criteria(ratio=3, slope=0.07, curve=0.14)
f.solve(loglevel=1, refine_grid=True, auto=False)
return f, gas

def H2_MECH(width):
# Simulation Parameters
P=ct.one_atm
Tin = 300.0
reactants = {'H2':1.8, 'O2':1, 'N2':3.76}
gas =ct.Solution('H2_mech.cti')
gas.TPX = Tin, P, reactants
# Flame Object
g = ct.FreeFlame(gas,width=width)
g.set_refine_criteria(ratio=3, slope=0.07, curve=0.14)
g.solve(loglevel=1, refine_grid=True, auto=False)
return g, gas

f1, gas1 = CH4_GRI30(0.06)


f2, gas2 = CH4_GRI30(0.12)
f3, gas3 = CH4_GRI30(0.18)
f4, gas4 = H2_MECH(0.06)
f5, gas5 = H2_MECH(0.12)
f6, gas6 = H2_MECH(0.18)

# Ploting the results


plt.figure(1)
plt.subplot(2,1,1)
plt.title('CH4 [methane-air] combustion using GRI 3.0
Mechanism',fontsize=12,fontweight='bold')
plt.grid('on')
plt.xlabel('Grid',fontsize=12,fontweight='bold')
plt.ylabel('Temperature in k',fontsize=12,fontweight='bold')
plt.plot(f1.grid,f1.T,linewidth=2)
plt.plot(f2.grid,f2.T,linewidth=2)
plt.plot(f3.grid,f3.T,linewidth=2)
plt.legend(['Width = 0.6','Width = 0.12','Width = 0.18'])
plt.subplot(2,1,2)
plt.xlabel('Grid',fontsize=12,fontweight='bold')
plt.ylabel('Velocity in m/s',fontsize=12,fontweight='bold')
plt.grid('on')
plt.plot(f1.grid,f1.velocity,linewidth=2)
plt.plot(f2.grid,f2.velocity,linewidth=2)
plt.plot(f3.grid,f3.velocity,linewidth=2)
plt.legend(['Width = 0.6','Width = 0.12','Width = 0.18'])

plt.figure(2)
plt.subplot(2,1,1)
plt.title('H2 [Hydrogen-air] combustion using H2_mech.cti
Mechanism',fontsize=12,fontweight='bold')
plt.grid('on')
plt.xlabel('Grid',fontsize=12,fontweight='bold')
plt.ylabel('Temperature in k',fontsize=12,fontweight='bold')
plt.plot(f4.grid,f4.T,linewidth=2)
plt.plot(f5.grid,f5.T,linewidth=2)
plt.plot(f6.grid,f6.T,linewidth=2)
plt.legend(['Width = 0.6','Width = 0.12','Width = 0.18'])
plt.subplot(2,1,2)
plt.xlabel('Grid',fontsize=12,fontweight='bold')
plt.ylabel('Velocity in m/s',fontsize=12,fontweight='bold')
plt.grid('on')
plt.plot(f4.grid,f4.velocity,linewidth=2)
plt.plot(f5.grid,f5.velocity,linewidth=2)
plt.plot(f6.grid,f6.velocity,linewidth=2)
plt.legend(['Width = 0.6','Width = 0.12','Width = 0.18'])
plt.show()
Results: --
--> Width represents the length of the domain in 1D space. The above plots
show that width does not affect the profile curves only the flame position
changes with the width. Width must also be physically relevant for the
problem. We cannot use very small or large width as it will affect the physics of
the problem.

You might also like