Week 3 - Adiabatic Flame Temperature calculation
AIM:-
1. Adiabatic flame temperature variation with Equivalence ratio (In constant volume-chamber)
2. Adiabatic flame temperature variation with Heat loss (In constant pressure-chamber)
3. Adiabatic flame temperature variation with respect to Alkane, Alkene, Alkyne
4. Adiabatic flame temperature variation with respect to a number of Carbon atom chains.
DESCRIPTION:-
Adiabatic Flame Temperature is nothing but the highest temperature achieved by the system at constant pressure and constant volume.
Before defining equivalence ratio let us discuss about stoichiometric equation.
Stoichiometric Combustion:-
Stoichiometry is the calculation of reactants and products in chemical reactions in chemistry.
Stoichiometry is founded on the law of conservation of mass where the total mass of the reactants equals the total mass of the products
For mathane air combustion, the balanced stoichiometric equations is
CH4+2(O2+3.76N2)= CO2+2H2O+7.52N2
If we formulate we can write it as
CxHy+(x+y/4)(02+3.76N2)=xCO2+(y/2)H20+(x+y/4)N2
Now, the equivalance ratio (phi) is defined as the ratio of actual air-fuel ratio to the stoichiometric air fuel ratio.
For lean mixture phi<1
For stoichiometric mixture phi=1
For rich mixture phi>1
Constant-pressure combustion:-
If a fuel-air mixture burns adibatically at constant pressure, the absoute enthalpy of the reactant at the initial state will be equal to th enthalpy of the products at the final state
H_reactants(T,P)=H_products(T_ad,P) -------->Eq_1
Above equation can be written as
h_reactants(T,P)=h_products(T_ad,P)--------per mass of the mixture basis
The above equation is called constant-pressure adiabatic flame temperature. This eqn will help us to deal with a gas turbine combustor or a furnace
Constant Volume combustion:-
This equation is depend on otto cycle analysis
U_reactants(T_initial,P_initial)=U_products(T_ad,P_f)
Above equation is rearranged as
H_reactants=H_products-V(P_initial-P_f)=0 ---->quation 2
According to ideal gas law, PV=nRT
P_initial.V=N_reactants.R_U.T_initilal
P_f.V=N_products.R_u.T_ad
thus , en_2 will bw written as
H_react-H_prod-R_u.(N_react.T_init-N_prod.T_ad)=0
Equivalance ratio:-
The premixing of the fuel and air prior to the flame zone crates a mixture strength that is characterised by euivalance ratio designated by greek letter phi(`phi`). The equivalance ratio is defined as the ratio of the stoichiometric air/fuel rato to the actual air/fuel ratio. That is
`phi`=(Fuel/Air)_Actual condition/(Fuel/Air)_Stoichiometric condition
For lean mixture phi<1
For stoichiometric mixture phi=1
For rich mixture phi>1
CASE:-1
Adiabatic flame temperature variation with Equivalence ratio (In constant volume-chamber)
"""
In this program we are going to calculate thr AFT of Methane
at diifferent equivalance ratios
CH4+2(O2+3.76N2)=CO2+2H20+7.52N2
Prgram by Sadiq
"""
import cantera as ct
import math
import numpy
import matplotlib.pyplot as plt
# To define the range of equivalance ratio (0.1,0.2,0.3.....)
i=numpy.linspace(0.1,2.0,200)
e_r=i #e_r represents equivalance ratio
def h(T, co_effs):
"""
function to evaluate enthalpy
"""
R=8.314 #J/mol-k
a1=co_effs[0]
a2=co_effs[1]
a3=co_effs[2]
a4=co_effs[3]
a5=co_effs[4]
a6=co_effs[5]
return (a1+a2*T/2+a3*pow(T,2)/3+a4*pow(T,3)/4+a5*pow(T,4)/5+a6/T)*R*T
CH4_coeffs_L=[5.14987613E+00,-1.36709788E-02,4.91800599E-05,-4.84743026E-08,1.66693956E-11,-1.02466476E+04,-4.64130376E+00]
O2_coeffs_L=[3.78245636E+00,-2.99673416E-03,9.84730201E-06,-9.68129509E-09,3.24372837E-12,-1.06394356E+03,3.65767573E+00]
N2_coeffs_L=[0.03298677E+02,0.14082404E-02,-0.03963222E-04,0.05641515E-07,-0.02444854E-10,-0.10208999E+04,0.03950372E+02]
N2_coeffs_H=[0.02926640E+02, 0.14879768E-02,-0.05684760E-05,0.10097038E-09,-0.06753351E-13,-0.09227977E+04,0.05980528E+02]
CO2_coeffs_H=[3.85746029E+00,4.41437026E-03,-2.21481404E-06,5.23490188E-10,-4.72084164E-14,-4.87591660E+04,2.27163806E+00]
H20_coeffs_H=[3.03399249E+00,2.17691804E-03,-1.64072518E-07,-9.70419870E-11,1.68200992E-14,-3.00042971E+04,4.96677010E+00]
CO_coeffs_H=[2.71518561E+00,2.06252743E-03,-9.98825771E-07,2.30053008E-10,-2.03647716E-14,-1.41518724E+04,7.81868772E+00]
O2_coeffs_H=[3.28253784E+00,1.48308754E-03,-7.57966669E-07,2.09470555E-10,-2.16717794E-14,-1.08845772E+03,5.45323129E+00]
def f(T,e_r):
"""
Function that represents the root finding problem in J/Mol-K
for calculating enthalpy of products
"""
R=8.314
h_CO2_p=h(T,CO2_coeffs_H)
h_N2_p=h(T,N2_coeffs_H)
h_H20_p=h(T,H20_coeffs_H)
h_CO_p=h(T,CO2_coeffs_H)
h_O2_p=h(T,O2_coeffs_H)
if e_r>1:
H_products=(((4/e_r)-3)*h_CO2_p+(4-(4/e_r))*h_CO_p+2*h_H20_p+(7.52/e_r)*h_N2_p)
N_products=(((4/e_r)-3)+2+(4-4/e_r)+(7.52/e_r))*R*T
else:
H_products=h_CO2_p+((2/e_r)-2)*h_O2_p+2*h_H20_p+(7.52/e_r)*h_N2_p
N_products=(((2/e_r)-2)+3+(7.52/e_r))*R*T
print(H_products)
#for calculating of enthalpy of reactants in Jouls
Tstd=298.15
h_CH4_r=h(Tstd,CH4_coeffs_L)
h_O2_r=h(Tstd,O2_coeffs_L)
h_N2_r=h(Tstd,N2_coeffs_L)
H_reactants=h_CH4_r+(2/e_r)*h_O2_r+((2/e_r)*3.76)*h_N2_r
N_reactants=(1+(2/e_r)+((2/e_r)*3.76))*R*Tstd
print(H_reactants)
return (H_reactants - H_products) - (N_reactants-N_products)
def fprime(T,e_r):
#applying forward differencing
return (f(T+1e-6,e_r)-f(T,e_r))/1e-6
tol=1e-3
alpha=0.9
Temp=[]
for j in e_r:
T_guess=1500
while(abs(f(T_guess,j))>tol):
T_guess=T_guess-alpha*((f(T_guess,j)/fprime(T_guess,j)))
Temp.append(T_guess)
print(Temp)
plt.plot(e_r,Temp, '*',color='red')
plt.xlabel('Equivalance ratio(e_r)')
plt.ylabel('Adiabatic flame temperature(K)')
plt.title('Equivalance ratio vs Adiabatic Flame Temperature')
plt.grid('on')
###################################
#AFT calculation using cantera
gas = ct.Solution('gri30.xml')
n=200
phi = numpy.linspace(0.1,2.0,n)
tad = numpy.zeros(n)
for i in range(n):
gas.set_equivalence_ratio(phi[i], 'CH4', 'O2:1.0, N2:3.76')
gas.TP=298.15,101325
gas.equilibrate('UV','auto') #UV where we have fixed volume
tad[i]=gas.T
print('At phi={0:12.4g}, tad={1:12.4g}'.format(phi[i], tad[i]))
print(phi,tad)
plt.plot(phi,tad)
plt.legend(('python','cantera'))
plt.show()

Observations:-
1. AFT is higher while using Python and when compared to cantera.
2. The effect is started from the equivalance ration 0.5 to 1.5.
CASE:- 2
Adiabatic flame temperature variation with Heat loss (In constant pressure-chamber)
import math
import numpy
import matplotlib.pyplot as plt
"""
maximum heat loss will be calculated as
Q = mass of fuel * LHV
Q = mf*LHV where mf - (g/mol)
mf = 16.04 g/mol
LHV = 50 MJ/kg
HHV = 55 MJ/kg
Q = 16.04e-3 * 50e+6
Q = 80200
"""
# To define the range of heat loss coefficient (0.1,0.2,0.3...)
H_loss =numpy.linspace(0.1,1.0,200)
Qmax = 80200 #max possible heat loss
e_r = 1 #equivalance ratio
def h(T,co_effs):
R=8.314 #J/mol-k
a1=co_effs[0]
a2=co_effs[1]
a3=co_effs[2]
a4=co_effs[3]
a5=co_effs[4]
a6=co_effs[5]
return (a1+a2*T/2+a3*pow(T,2)/3+a4*pow(T,3)/4+a5*pow(T,4)/5+a6/T)*R*T
CH4_coeffs_L=[5.14987613E+00,-1.36709788E-02,4.91800599E-05,-4.84743026E-08,1.66693956E-11,-1.02466476E+04,-4.64130376E+00]
O2_coeffs_L=[3.78245636E+00,-2.99673416E-03,9.84730201E-06,-9.68129509E-09,3.24372837E-12,-1.06394356E+03,3.65767573E+00]
N2_coeffs_L=[0.03298677E+02,0.14082404E-02,-0.03963222E-04,0.05641515E-07,-0.02444854E-10,-0.10208999E+04,0.03950372E+02]
N2_coeffs_H=[0.02926640E+02, 0.14879768E-02,-0.05684760E-05,0.10097038E-09,-0.06753351E-13,-0.09227977E+04,0.05980528E+02]
CO2_coeffs_H=[3.85746029E+00,4.41437026E-03,-2.21481404E-06,5.23490188E-10,-4.72084164E-14,-4.87591660E+04,2.27163806E+00]
H20_coeffs_H=[3.03399249E+00,2.17691804E-03,-1.64072518E-07,-9.70419870E-11,1.68200992E-14,-3.00042971E+04,4.96677010E+00]
CO_coeffs_H=[2.71518561E+00,2.06252743E-03,-9.98825771E-07,2.30053008E-10,-2.03647716E-14,-1.41518724E+04,7.81868772E+00]
O2_coeffs_H=[3.28253784E+00,1.48308754E-03,-7.57966669E-07,2.09470555E-10,-2.16717794E-14,-1.08845772E+03,5.45323129E+00]
def f(T,H_loss):
#To calculate the enthalpy of reactants and products
R=8.314
h_CO2_p=h(T,CO2_coeffs_H)
h_N2_p=h(T,N2_coeffs_H)
h_H20_p=h(T,H20_coeffs_H)
h_CO_p=h(T,CO2_coeffs_H)
h_O2_p=h(T,O2_coeffs_H)
if e_r>1:
H_products=(((4/e_r)-3)*h_CO2_p+(4-(4/e_r))*h_CO_p+2*h_H20_p+(7.52/e_r)*h_N2_p)
N_products=(((4/e_r)-3)+2+(4-4/e_r)+(7.52/e_r))*R*T
else:
H_products=h_CO2_p+((2/e_r)-2)*h_O2_p+2*h_H20_p+(7.52/e_r)*h_N2_p
N_products=(((2/e_r)-2)+3+(7.52/e_r))*R*T
print(H_products)
#for calculating of enthalpy of reactants in Jouls
Tstd=298.15
h_CH4_r=h(Tstd,CH4_coeffs_L)
h_O2_r=h(Tstd,O2_coeffs_L)
h_N2_r=h(Tstd,N2_coeffs_L)
H_reactants=h_CH4_r+(2/e_r)*h_O2_r+((2/e_r)*3.76)*h_N2_r
N_reactants=(1+(2/e_r)+((2/e_r)*3.76))*R*Tstd
print(H_reactants)
return (H_products - H_reactants) + (H_loss*Qmax)
def fprime(T,H_loss):
#forward differencing
return (f(T+1e-6,H_loss)-f(T,H_loss))/1e-6
#Newton rapson method
tol=1e-3
alpha=0.9
Temp=[]
for j in H_loss:
T_guess = 1500
while(abs(f(T_guess,j))>tol):
T_guess=T_guess-alpha*((f(T_guess,j)/fprime(T_guess,j)))
Temp.append(T_guess)
print(Temp)
#To find the AFT of VH4 with H_loss=0.35
h_1=numpy.searchsorted(H_loss,0.35)
print('Index value is:',h_1)
t=Temp[h_1]
print('the AFT of CH4 with H_loss @ 0.35 is:',t)
plt.plot(H_loss,Temp,color='red')
plt.xlabel('Heat Loss coefficients (H_loss)')
plt.ylabel('Adiabatic Flame Temperature(K)')
plt.title('heat Loss coefficients VS Adiabatic Flame Temperature for CH4')
plt.grid('on')
plt.show()

Observations:-
1. As you can see the AFT is coming down as the Heat loss coeff is getting increased.
2. 
AFT is 2261.5395 @0.35 from the program
CASE:-3
Adiabatic flame temperature variation with respect to Alkane, Alkene, Alkyne
Alkanes, alkenes and alkynes are simple hydrocarbon chains with no functional groups.
Alkanes have only single bonds between carbon atoms and are called saturated hydrocarbons.
Alkenes have at least one carbon-carbon double bond.
Alkynes have one or more carbon-carbon triple bonds.
"""
Program to calculate AFT of Alkane(CnH2n+2), Alkeke(CnH2n) & Alkyne (CnH2n-2) using python
Assuming carbon atoms are 2
"""
import cantera as ct
import numpy as np
import matplotlib.pyplot as plt
import math
def h(T,co_effs):
R=8.314 #J/mol-k
a1=co_effs[0]
a2=co_effs[1]
a3=co_effs[2]
a4=co_effs[3]
a5=co_effs[4]
a6=co_effs[5]
return (a1+a2*T/2+a3*pow(T,2)/3+a4*pow(T,3)/4+a5*pow(T,4)/5+a6/T)*R*T
C2H6_coeffs_L= (4.29142492E+00,-5.50154270E-03,5.99438288E-05,-7.08466285E-08,2.68685771E-11,-1.15222055E+04,2.66682316E+00)
C2H4_coeffs_L=(3.95920148E+00,-7.57052247E-03,5.70990292E-05,-6.91588753E-08,2.69884373E-11,5.08977593E+03,4.09733096E+00)
C2H2_coeffs_L=(8.08681094E-01, 2.33615629E-02,-3.55171815E-05, 2.80152437E-08,-8.50072974E-12 ,2.64289807E+04, 1.39397051E+01)
O2_coeffs_L=(3.78245636E+00,-2.99673416E-03,9.84730201E-06,-9.68129509E-09,3.24372837E-12,-1.06394356E+03,3.65767573E+00)
N2_coeffs_L=(0.03298677E+02,0.14082404E-02,-0.03963222E-04,0.05641515E-07,-0.02444854E-10,-0.10208999E+04,0.03950372E+02)
#high temeperature
N2_coeffs_H=( 0.02926640E+02,0.14879768E-02,-0.05684760E-05,0.10097038E-09,-0.06753351E-13,-0.09227977E+04,0.05980528E+02)
CO2_coeffs_H=(3.85746029E+00,4.41437026E-03,-2.21481404E-06,5.23490188E-10,-4.72084164E-14,-4.87591660E+04,2.27163806E+00)
H2O_coeffs_H=(3.03399249E+00,2.17691804E-03,-1.64072518E-07,-9.70419870E-11,1.68200992E-14,-3.00042971E+04,4.96677010E+00)
Tstd=298.15
h_C2H6_r=h(Tstd,C2H6_coeffs_L)
h_C2H4_r=h(Tstd,C2H4_coeffs_L)
h_C2H2_r=h(Tstd,C2H2_coeffs_L)
H_alkane = h_C2H6_r
H_alkene = h_C2H4_r
H_alkyne = h_C2H2_r
H = [H_alkane,H_alkene,H_alkyne]
def f(T,H):
#Enthalpy
#products
h_N2_p=h(T,N2_coeffs_H)
h_CO2_p=h(T,CO2_coeffs_H)
h_H2O_p=h(T,H2O_coeffs_H)
#reactants
h_O2_r=h(Tstd,O2_coeffs_L)
h_N2_r=h(Tstd,N2_coeffs_L)
if H==H_alkane: #if H==H_alkene:
x=2
y=6
a=x+y/4
b=y/2
H_reactants=H_alkane+a*h_O2_r+3.76*a*h_N2_r
print(H_reactants)
H_products=x*h_CO2_p+b*h_H2O_p+3.76*a*h_N2_p
print(H_products)
elif H==H_alkene:
x=2
y=4
a=x+y/4
b=y/2
H_reactants=H_alkene + a*h_O2_r+3.76*a*h_N2_r
print(H_reactants)
H_products=x*h_CO2_p+b*h_H2O_p+3.76*a*h_N2_p
print(H_products)
elif H== H_alkyne:
x=2
y=2
a=x+y/4
b=y/2
H_reactants=H_alkyne+a*h_O2_r+3.76*a*h_N2_r
print(H_reactants)
H_products=x*h_CO2_p+b*h_H2O_p+3.76*a*h_N2_p
print(H_products)
return (H_products-H_reactants)
def fprime(T,H):
return (f(T+1e-6,H)-f(T,H))/1e-6
T_guess = 1900
tol=1e-3
alpha=0.1
iter=0
Temp=[]
for i in H:
while(abs(f(T_guess,i))>tol):
T_guess=T_guess-alpha*((f(T_guess,i)/fprime(T_guess,i)))
Temp.append(T_guess)
print(Temp)
print('Nos of iterations=',iter)
print('AFT of CH4 is =',T_guess)
plt.ylabel('AFT in K')
plt.title('Effect of -ane,-ene & -yne on AFT using python')
plt.bar(['Alkane','Alkene','Alkyne'], Temp,color='red')
plt.show()
"""
Cantera program for Alkane,Alkene and Alkyne
"""
import cantera as ct
import numpy as np
import matplotlib.pyplot as plt
import math
gas=ct.Solution('gri30.xml')
gas.TPX=298.15,101325,{'C2H6':1,'O2':3,'N2':3*3.76}
gas.equilibrate('HP','auto')
T_alkane=gas.T
gas.TPX=298.15,101325,{'C2H4':1,'O2':3,'N2':3*3.76}
gas.equilibrate('HP', 'auto')
T_alkene=gas.T
gas.TPX=298.15,101325,{'C2H2':1,'O2':3,'N2':3*3.76}
gas.equilibrate('HP', 'auto')
T_alkyne=gas.T
T_alkyne=gas.T
T=(T_alkane,T_alkene,T_alkyne)
T=np.array(T)
print(T)
plt.bar(['Alkane','Alkene','Alkyne'],T,color='red')
plt.title('Effect of Alkane, alkene & alkyne on AFT using CANTERA')
plt.show()
Using Python
Using cantera

Observations:-
1. The AFT is rising while using the Python as we get H20 in the products.
2.In cantera the AFT is decreasing as the species are increasedin the products side.
CASE:-3
Adiabatic flame temperature variation with respect to a number of Carbon atom chains.
"""
Program to calculate AFT of Alkane(CnH2n+2) by varing no of carbon atoms from 1 to 3using python
"""
import cantera as ct
import numpy as np
import matplotlib.pyplot as plt
import math
def h(T,co_effs): #Enthalpy calculatuon
R=8.314 #J/mol-k
a1=co_effs[0]
a2=co_effs[1]
a3=co_effs[2]
a4=co_effs[3]
a5=co_effs[4]
a6=co_effs[5]
return (a1+a2*T/2+a3*pow(T,2)/3+a4*pow(T,3)/4+a5*pow(T,4)/5+a6/T)*R*T
CH4_coeffs_L=[5.14987613E+00,-1.36709788E-02,4.91800599E-05,-4.84743026E-08,1.66693956E-11,-1.02466476E+04,-4.64130376E+00]
C2H6_coeffs_L=[4.29142492E+00,-5.50154270E-03,5.99438288E-05,-7.08466285E-08,2.68685771E-11,-1.15222055E+04,2.66682316E+00]
C3H8_coeffs_L=[0.93355381E+00,0.26424579E-01,0.61059727E-05,-0.21977499E-07,0.95149253E-11,-0.13958520E+05,0.19201691E+02]
O2_coeffs_L=(3.78245636E+00,-2.99673416E-03,9.84730201E-06,-9.68129509E-09,3.24372837E-12,-1.06394356E+03,3.65767573E+00)
N2_coeffs_L=(0.03298677E+02,0.14082404E-02,-0.03963222E-04,0.05641515E-07,-0.02444854E-10,-0.10208999E+04,0.03950372E+02)
#high temeperature
N2_coeffs_H=( 0.02926640E+02,0.14879768E-02,-0.05684760E-05,0.10097038E-09,-0.06753351E-13,-0.09227977E+04,0.05980528E+02)
CO2_coeffs_H=(3.85746029E+00,4.41437026E-03,-2.21481404E-06,5.23490188E-10,-4.72084164E-14,-4.87591660E+04,2.27163806E+00)
H2O_coeffs_H=(3.03399249E+00,2.17691804E-03,-1.64072518E-07,-9.70419870E-11,1.68200992E-14,-3.00042971E+04,4.96677010E+00)
Tstd=298.15
h_CH4_r=h(Tstd,CH4_coeffs_L)
h_C2H6_r=h(Tstd,C2H6_coeffs_L)
h_C3H8_r=h(Tstd,C3H8_coeffs_L)
C_1=h_CH4_r
C_2=h_C2H6_r
C_3=h_C3H8_r
C=[C_1,C_2,C_3]
def f(T,C):
#Enthalpy
#products
h_N2_p=h(T,N2_coeffs_H)
h_CO2_p=h(T,CO2_coeffs_H)
h_H2O_p=h(T,H2O_coeffs_H)
#reactants
h_O2_r=h(Tstd,O2_coeffs_L)
h_N2_r=h(Tstd,N2_coeffs_L)
if C==C_1:
x=1
y=2*(x+1)
a=x+y/4
b=y/2
H_reactants=C_1+a*h_O2_r+3.76*a*h_N2_r
print(H_reactants)
H_products=x*h_CO2_p+b*h_H2O_p+3.76*a*h_N2_p
print(H_products)
elif C==C_2:
x=2
y=2*(x+1)
a=x+y/4
b=y/2
H_reactants=C_2+a*h_O2_r+3.76*a*h_N2_r
print(H_reactants)
H_products=x*h_CO2_p+b*h_H2O_p+3.76*a*h_N2_p
print(H_products)
elif C==C_3:
x=3
y=2*(x+1)
a=x+y/4
b=y/2
H_reactants=C_1+a*h_O2_r+3.76*a*h_N2_r
print(H_reactants)
H_products=x*h_CO2_p+b*h_H2O_p+3.76*a*h_N2_p
print(H_products)
return (H_products-H_reactants)
def fprime(T,C):
return(f(T+1e-6,C)-f(T,C))/1e-6
T_guess = 1900
tol = 1e-3
alpha=0.1
Temp=[]
for i in C:
while(abs(f(T_guess,i))>tol):
T_guess=T_guess-alpha*((f(T_guess,i)/fprime(T_guess,i)))
Temp.append(T_guess)
print(Temp)
plt.ylabel('AFT in K')
plt.title('Effect of catrbon atoms of Alkane on AFT using python')
plt.bar(['1-carbon(CH4)','2-carbon(CH4)','3-carbon(CH4)'], Temp,color='blue')
plt.show()

Observations:-
1. As the carbon atoms are increased the AFT is increased because the fuel is burnt more.
2. When the fuel is burnt low, the AFT will decrease and the carbon atoms will be low.
So we have seen how the Adiabatic Flame Temperature is changed for all the four cases.