Professional Documents
Culture Documents
November 5, 2021
1 Cantera Day 7
Author: Nikhil Verma
Research Scholar
Bangalore
1
3) R. J. Kee, M. E. Coltrin, P. Glarborg, and H. Zhu. Chemically Reacting Flow: Theory and
Practice. 2nd Ed. John Wiley and Sons, 2017.
[120]:
mixture-averaged Laminar flamespeed = 0.390061 m/s
plt.plot(f.grid,f.T,'-o')
2
plt.xlabel('Grid Location (m)')
plt.ylabel('Temperature (K)')
plt.show()
CH4i=gas.species_index('CH4')
O2i=gas.species_index('O2')
N2i=gas.species_index('N2')
CO2i=gas.species_index('CO2')
COi=gas.species_index('CO')
plt.plot(f.grid,f.X[CH4i],label='$CH_4$')
plt.plot(f.grid,f.X[O2i],label='$O_2$')
plt.plot(f.grid,f.X[COi],label='$CO$')
plt.plot(f.grid,f.X[CO2i],label='$CO_2$')
3
plt.xlabel('Grid Location (m)')
plt.ylabel('Temperature (K)')
plt.legend()
plt.show()
plt.plot(f.grid,f.X[OHi],label='$OH$')
plt.plot(f.grid,f.X[Oi],label='$O$')
plt.plot(f.grid,f.X[Hi],label='$H$')
4
2.5 Laminar Flame Thickness
Laminar flame thickness can be calculated as:
2.6
Tb − Tu
δf =
max( dT
dx
)
dTdx=derivative(f.T,f.grid)
ax2 = ax1.twinx()
ax1.plot(f.grid, f.T, 'g-')
ax2.plot(f.grid[0:-2], dTdx, 'b-')
5
ax1.set_xlabel('Grid Location (m)')
ax1.set_ylabel('Temperature (K)', color='g')
ax2.set_ylabel('Derivative of Temperature (K/m)', color='b')
plt.show()
indMax=np.argmax(dTdx)
deltaf=(f.T[points-1]-tin)/dTdx[indMax]
Markdown('**Laminar Flame Thickness: {}** '.format(deltaf))
[105]:
Laminar Flame Thickness: 0.0004522300385946724
6
#################################################################
# Prepare your run
#################################################################
def OneDFlame(phi,fuel,oxidizer):
#Import gas phases with mixture transport model
gas = ct.Solution('gri30.xml')
#Parameter values :
#General
p = 1e5 # pressure
tin = 300.0 # unburned gas temperature
#Stoechiometry :
#Set gas state to that of the unburned gas
gas.TP = tin, p
gas.set_equivalence_ratio(phi, fuel, oxidizer)
#Initial grid, chosen to be 0.02cm long :
# - Refined grid at inlet and outlet, 6 points in x-direction :
initial_grid = np.array([0.0, 0.001,0.01,0.015,0.02,0.025,0.03,0.035,0.04,0.
,→049,0.05],'d')/3
fuel='CH4'
oxidizer="O2:0.21,N2:0.79"
# print('\n **************************************************')
Vel=[]
Temp=[]
for phi in np.linspace(0.7,1.6,20,endpoint=True):
u,t=OneDFlame(phi,fuel,oxidizer)
Vel.append(u)
Temp.append(t)
[70]: phi=np.linspace(0.7,1.6,20,endpoint=True)
plt.plot(phi,Vel,'-^',color="g")
plt.xlabel('Equivalence ratio ($\phi$)')
plt.ylabel('Laminar Flame Speed (K)')
plt.show()
7
2.8 Variation of Laminar flame Temperature with Equivalence Ratio
[66]: plt.plot(phi,Temp,'-o', color="red")
plt.xlabel('Equivalence ratio ($\phi$)')
plt.ylabel('Temperature (K)')
plt.show()
8
9