Week 3 - Adiabatic Flame Temperature calculation
AIM:
- Examining the Adiabatic Flame Temperature of Methane air mixture by different equivalence ratio in constant volume chamber. Further trhe results have to be validated with cantera.
- Examining the Adiabatic Flame Temperature of Methane Air Combustion in constant pressure including hewat loss.
- Examining the flame temperature of -ane, -ene, -yne with heat loss of 35%.
- Examining the flame temperature of alkanes with different number of carbon atoms.
Adiabatic Flame Temperature:
Combustion is a chemical process in which a substance reacts rapidly with oxygen and gives off heat. The substance being burned is called fuel and the source of oxygen is called oxidiser. The fuel can be solid, liquid or gas. Similarly the oxidiser can be solid, liquid or gas.
Adiabatic Flame Temperature is reffered as the maximum amount of heat that is generted when a air fuel mixture is burnt completely without loss of heat.
Theoritically, it can be calculated by the taking out the differences between the enthalpies of the products and the reactants side.
The enthalpies of a saubstance can be calculated with the help of the polynomial function provided by the NASA for a particular temperature,
`h(T)=(a1 +a2.(T/2) + a3.(frac{T^2}{3})+a4.(frac{T^3}{4})+a5.(frac{T^4}{5})+a6.(T/6)).R.T`
where,
h = enthalpy
a_i = coefficient of each species (http://combustion.berkeley.edu/gri-mech/version30/files30/thermo30.dat)
T = Temperature
R = Gas Constant
Here the coefficients are classified into high temperature coefficients and the low temperature coefficients. Her eit can be noticed that the enthaly is a polynomial function thus it will be solved wioth the help of the Newton Raphson scheme. With this method we will find out the roots of the function using the initial gues and iterate till we reach the given tolerance value. The scheme is defined as;
`Tunderset(New)() = Tunderset(Guess)()-alpha.[frac{f(Tunderset(Guess)())}{f'(Tunderset(Guess)())}]`
where,
T_new is the new T value after iteration,
T_guess id the guessed T value,
alpha is the relaxation factor
Case I
Equivalence ratio can be defined as the actual air fuel ratio to the stochiometric air fuel ratio. If the equivalence ratio is 1 then the combution is called as the stochiometric combution else if it is < 1 then the combution is called as the lean combustion where air is in excess else if the ratio is > 1 the combution is called as the rich combustion where fuel is in excess. The stotiometric combustion of the methane can be seen below:
`CHunderset(4)() + 2(Ounderset(2)()+3.76Nunderset(2)())rarr COunderset(2)() + 2Hunderset(2)()O + 7.52Nunderset(2)()`
For the case of equivalence ratio the reation changes to :
`CHunderset(4)() + (2/phi)(Ounderset(2)()+3.76Nunderset(2)())rarr xCOunderset(2)() + yHunderset(2)()O + other products`
Lean Mixture (phi<1)
`CHunderset(4)() + (2/phi)(Ounderset(2)()+3.76Nunderset(2)())rarr COunderset(2)() + 2Hunderset(2)()O + (7.52/phi)Nunderset(2)()+(2/phi-2)Ounderset(2)()`
Rich Mixture (phi>1)
`CHunderset(4)() + (2/phi)(Ounderset(2)()+3.76Nunderset(2)())rarr (4/phi-3)COunderset(2)() + 2Hunderset(2)()O + (7.52/phi)Nunderset(2)()+(4-4/phi)CO`
As we know that the reactions will be taking place at constant pressure the enthalpis balance equation will be as follows:
`(hunderset(Products)()-hunderset(Reactants)())-R(n underset(Products)().T-n underset(Reactants)().Tunderset(std)())`
The relaxation factor is taken as 0.2 and it can be increased upto 0.9 and the behaviour change of the solution can be verified. Further if we increase the ralaxation factor above 1 the solution may overshoot and diverge.
The program for the python can be seen below:
"""
adiabatic flame temperature using different cases
at different equivqlence ratios
ch4+2(o2+3.76n2)=co2+2h2o+7.52n2
"""
import matplotlib.pyplot as plt
import math
import numpy as np
R=8.314 #J/mol-K
def h(T, co_effs):
#enthalpy Function
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_h = [0.02926640E+02, 0.14879768E-02, -0.05684760E-05, 0.10097038E-09, -0.06753351E-13, -0.09227977E+04, 0.05980528E+02]
n2_coeffs_l = [0.03298677E+02, 0.14082404E-02, -0.03963222E-04, 0.05641515E-07, -0.02444854E-10, -0.10208999E+04, 0.03950372E+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]
o2_coeffs_h = [3.28253784E+00, 1.48308754E-03, -7.57966669E-07, 2.09470555E-10, -2.16717794E-14, -1.08845772E+03, 5.45323129E+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]
def f(T,phi):
# calculating enthalpies of products and reactants
if(phi<=1):
h_co2_p = h(T,co2_coeffs_h)
h_n2_p = h(T,n2_coeffs_h)
h_h2o_p = h(T,h2o_coeffs_h)
h_o2_p = h(T,o2_coeffs_h)
h_products = h_co2_p + 2*h_h2o_p + (7.52/phi)*h_n2_p + (2/phi-2)*h_o2_p
n_products = 1 + 2 + 3.76*(2/phi) + (2/phi - 2)
elif(phi>1):
h_co2_p = h(T,co2_coeffs_h)
h_n2_p = h(T,n2_coeffs_h)
h_h2o_p = h(T,h2o_coeffs_h)
h_co_p = h(T,co_coeffs_h)
h_products = (4/phi - 3)*h_co2_p + 2*h_h2o_p + (7.52/phi)*h_n2_p + (4 - 4/phi)*h_co_p
n_products = (4/phi - 3) + 2 + (4-4/phi) + (7.52/phi)
print(h_products)
T_std = 298.15
h_ch4_r = h(T_std,ch4_coeffs_l)
h_o2_r = h(T_std,o2_coeffs_l)
h_n2_r = h(T_std,n2_coeffs_l)
h_reactants = h_ch4_r + (2/phi)*h_o2_r + (7.52/phi)*h_n2_r
n_reactants = 1 + (2/phi) + 3.76*(2/phi)
print(h_reactants)
return(h_products-h_reactants)-R*(n_products*T-n_reactants*T_std)
def fprime(T,phi):
return (f(T+1e-6,phi) - f(T,phi))/1e-6
T_guess = 1500
tol = 1e-3
ct=0
alpha=0.2
phi = np.linspace(0.1,1.5,20)
for i in range (0,len(phi)):
while(abs(f(T_guess,phi[i])) > tol):
T_guess = T_guess - alpha*(f(T_guess,phi[i])/fprime(T_guess,phi[i]))
plt.plot(phi[i],T_guess,'*',color='blue')
ct=ct+1
print(T_guess,phi)
print(T_guess)
plt.xlabel('Equivalence Ratio')
plt.ylabel('Adiabatic Flame Temperature')
plt.title('Effect of Equivalnce Ratio on AFT')
plt.grid('on')
plt.show()

The result for the above program can be seen above. Here it can be noticed that the temperature increaes with increase in equivalence ratio until 1 and after that it starts to decrease. So it can concluded the AFT is maximum at stotiometric mixture and gets low as we increase the fuel or air quantity .i.e. make the mixture lean or rich. The maximum observed temperature for stotiometric mixture is 2800K.
Cantera:
Cantera is a collection of an object oriented tools for the problems involving chemical kinetics, thermodynamics and transport processes.
In cantera gas.TPX is an inbuilt function used to initialise the temperature, pressure and mole fraction for the species. gs.set_equivalence_ratio is used to give the equivalence ratio for the specie and gas.equiliberate is used to initialise the flame temperature. The catera plot can be seen below:
import matplotlib.pyplot as plt
import cantera as ct
# ch4+2(o2+3.76N2)=co2+2h2o+7.52n2
gas= ct.Solution('gri30.xml')
phi = 0.1
for i in range (0,15):
gas.TPX = 298.15,101325,{'CH4':1, 'O2':2/phi, 'N2':7.52/phi}
gas.set_equivalence_ratio(phi, 'CH4', 'O2:1, N2:3.76')
gas.equilibrate('UV','auto')
print(phi,gas.T)
plt.plot(phi,gas.T,'*',color='blue')
phi = phi+0.1
plt.xlabel('Equivalence Ratio')
plt.ylabel('Adiabatic Flame Temperature')
plt.title('Effect of Equivalence ratio on AFT using Cantera')
plt.grid('on')
plt.show()

The maximum temperature attained in cantera is 2600.523K.
The decrease in the temperature can be observed as compared to python, This is due to the process through which the cantera solves, it uses the Gibbs free energy to reach the equilibrium state.
Other than that many other species are formed in cantera those are not considered in Python program for different mixtures.
Case II:
In this case we have to consider the heat loss in constant pressure chamber, thus the reaction is not going to be adiabatic reaction.
The stochiometric reaction for methane air combustion can be seen below:
`CHunderset(4)() + 2(Ounderset(2)()+3.76Nunderset(2)())rarr COunderset(2)() + 2Hunderset(2)()O + 7.52Nunderset(2)()`
The heat loss in the program can be calculated from Lower heating value LHV. LHV can be obtained from the difference of products and reactants at STP condition
`LHV = Hunderset(CHunderset(4)())(overset(298.15)())+2Hunderset(Ounderset(2)())(overset(298.15)())-Hunderset(COunderset(2)())(overset(298.15)())-2Hunderset(Hunderset(2)()O)(overset(298.15)())`
The heat loss factor is varied from no heat loss to entire heat loss as a multiplier of LHV.
Further after the heat loss the enthalpy equation changes to:
`Hunderset(Products)()-Hunderset(Reactants)()+Hunderset(Loss)()=0`
The program in python can be seen below:
"""
adiabatic flame temperature with heat loss
ch4+2(o2+3.76n2)=co2+2h2o+7.52n2
"""
import matplotlib.pyplot as plt
import math
import numpy as np
R=8.314 #J/mol-K
def h(T, co_effs):
#enthalpy Function
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_h = [0.02926640E+02, 0.14879768E-02, -0.05684760E-05, 0.10097038E-09, -0.06753351E-13, -0.09227977E+04, 0.05980528E+02]
n2_coeffs_l = [0.03298677E+02, 0.14082404E-02, -0.03963222E-04, 0.05641515E-07, -0.02444854E-10, -0.10208999E+04, 0.03950372E+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]
#o2_coeffs_h = [3.28253784E+00, 1.48308754E-03, -7.57966669E-07, 2.09470555E-10, -2.16717794E-14, -1.08845772E+03, 5.45323129E+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]
def f(T,h_loss):
T_std = 298.15
LHV = 800950
h_co2_p = h(T,co2_coeffs_h)
h_n2_p = h(T,n2_coeffs_h)
h_h2o_p = h(T,h2o_coeffs_h)
h_ch4_r = h(T_std,ch4_coeffs_l)
h_o2_r = h(T_std,o2_coeffs_l)
h_n2_r = h(T_std,n2_coeffs_l)
h_products = h_co2_p + 2*h_h2o_p + 7.52*h_n2_p
h_reactants = h_ch4_r + 2*h_o2_r + 7.52*h_n2_r
loss = h_loss*LHV
return h_products - h_reactants + loss
def fprime(T,h_loss):
return (f(T+1e-6,h_loss) - f(T,h_loss))/1e-6
T_guess = 1500
tol = 1e-3
ct=0
alpha=0.2
h_loss = np.linspace(0,1,20)
T_aft = [] #required temp
for i in range (0,len(h_loss)):
while(abs(f(T_guess,h_loss[i])) > tol):
T_guess = T_guess - alpha*(f(T_guess,h_loss[i])/fprime(T_guess,h_loss[i]))
ct=ct+1
T_aft.append(T_guess)
print(T_aft)
#print(T_guess)
plt.plot(h_loss,T_aft,'*',color='blue')
plt.xlabel('Heat Loss Factor')
plt.ylabel('Flame Temperature (k)')
plt.title('Effect of Heat Loss on Flame Temperature')
plt.grid('on')
plt.show()

Here it can be noticed that with increase in heat loss the temperature of the flame decreases because heat is getting lost from the system. When heat loss is zero the flame temperature is 2325.59K and when the heat loss is 1 the flame temperature drops to 299.45K.
Case III
In this case we have to consider an alkame, alkene and an alkyne for the reactionincluing the heat loss of 35%.
The reactions can be seen below:
Alkane:
`Cunderset(2)()Hunderset(6)() + 3.5(Ounderset(2)()+3.76Nunderset(2)())rarr 2COunderset(2)() + 3Hunderset(2)()O + 13.16Nunderset(2)()`
Alkene:
`Cunderset(2)()Hunderset(4)() + 3(Ounderset(2)()+3.76Nunderset(2)())rarr 2COunderset(2)() + 2Hunderset(2)()O + 11.28Nunderset(2)()`
Alkyne:
`Cunderset(2)()Hunderset(2)() + 2.5(Ounderset(2)()+3.76Nunderset(2)())rarr 2COunderset(2)() + Hunderset(2)()O + 9.4Nunderset(2)()`
The program for the reaction can be seen below:
"""
adiabatic flame temperature using alkane alkene alkyne
with heat loss of 35%
ethane
c2h6+3.5(o2+3.76n2)=2co2+3h2o+3.5*3.76n2
ethene
c2h4+3(o2+3.76n2)=2co2+2h2o+3*3.76n2
ethyne
c2h2+2.5(o2+3.76n2)=2co2+h2o+2.5*3.76n2
"""
import matplotlib.pyplot as plt
import math
import numpy as np
R=8.314 #J/mol-K
def h(T, co_effs):
#enthalpy Function
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_h = [0.02926640E+02, 0.14879768E-02, -0.05684760E-05, 0.10097038E-09, -0.06753351E-13, -0.09227977E+04, 0.05980528E+02]
n2_coeffs_l = [0.03298677E+02, 0.14082404E-02, -0.03963222E-04, 0.05641515E-07, -0.02444854E-10, -0.10208999E+04, 0.03950372E+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]
#o2_coeffs_h = [3.28253784E+00, 1.48308754E-03, -7.57966669E-07, 2.09470555E-10, -2.16717794E-14, -1.08845772E+03, 5.45323129E+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]
"""
Ethane
"""
def f_ane(T):
# calculating enthalpies of products and reactants
T_std = 298.15
LHV = 1428275 #lower heating value
h_co2_p = h(T,co2_coeffs_h)
h_n2_p = h(T,n2_coeffs_h)
h_h2o_p = h(T,h2o_coeffs_h)
h_c2h6_r = h(T_std,c2h6_coeffs_l)
h_o2_r = h(T_std,o2_coeffs_l)
h_n2_r = h(T_std,n2_coeffs_l)
h_products = 2*h_co2_p + 3*h_h2o_p + (3.76*3.5*h_n2_p)
h_reactants = h_c2h6_r + 3.5*h_o2_r + (3.5*3.76*h_n2_r)
# print(h_reactants)
return h_products - h_reactants + (0.35*LHV)
def fprime_ane(T):
return (f_ane(T+1e-6) - f_ane(T))/1e-6
"""
Ethene
"""
def f_ene(T):
# calculating enthalpies of products and reactants
T_std = 298.15
LHV = 1323474 #lower heating value
h_co2_p = h(T,co2_coeffs_h)
h_n2_p = h(T,n2_coeffs_h)
h_h2o_p = h(T,h2o_coeffs_h)
h_c2h4_r = h(T_std,c2h4_coeffs_l)
h_o2_r = h(T_std,o2_coeffs_l)
h_n2_r = h(T_std,n2_coeffs_l)
h_products = 2*h_co2_p + 2*h_h2o_p + (3.76*3*h_n2_p)
h_reactants = h_c2h4_r + 3*h_o2_r + (3*3.76*h_n2_r)
# print(h_reactants)
return h_products - h_reactants + (0.35*LHV)
def fprime_ene(T):
return (f_ene(T+1e-6) - f_ene(T))/1e-6
"""
Ethyne
"""
def f_yne(T):
# calculating enthalpies of products and reactants
T_std = 298.15
LHV = 1258020 #lower heating value
h_co2_p = h(T,co2_coeffs_h)
h_n2_p = h(T,n2_coeffs_h)
h_h2o_p = h(T,h2o_coeffs_h)
h_c2h2_r = h(T_std,c2h2_coeffs_l)
h_o2_r = h(T_std,o2_coeffs_l)
h_n2_r = h(T_std,n2_coeffs_l)
h_products = 2*h_co2_p + h_h2o_p + (3.76*2.5*h_n2_p)
h_reactants = h_c2h2_r + 2.5*h_o2_r + (2.5*3.76*h_n2_r)
# print(h_reactants)
return h_products - h_reactants + (0.35*LHV)
def fprime_yne(T):
return (f_yne(T+1e-6) - f_yne(T))/1e-6
T_ane_guess = 1500
T_ene_guess = 1500
T_yne_guess = 1500
tol = 1e-3
#ct=0
alpha=0.2
T_aft = []
#phi = np.linspace(0.1,1.5,20)
#for i in range (0,length(phi)):
#ane
while(abs(f_ane(T_ane_guess)) > tol):
T_ane_guess = T_ane_guess - alpha*(f_ane(T_ane_guess)/fprime_ane(T_ane_guess))
T_aft.append(T_ane_guess)
#ene
while(abs(f_ene(T_ene_guess)) > tol):
T_ene_guess = T_ene_guess - alpha*(f_ene(T_ene_guess)/fprime_ene(T_ene_guess))
T_aft.append(T_ene_guess)
#yne
while(abs(f_yne(T_yne_guess)) > tol):
T_yne_guess = T_yne_guess - alpha*(f_yne(T_yne_guess)/fprime_yne(T_yne_guess))
T_aft.append(T_yne_guess)
fuel = ['Ethane', 'Ethene', 'Ethyne']
print(T_aft)
plt.bar(fuel,T_aft)
plt.xlabel('Type of hydrocarbon')
plt.ylabel('Adiabatic Flame Temperature')
plt.title('Changes in AFT with Respect to Hydrocarbon Type')
#plt.grid('on')
plt.show()

Here it can be noticed that the flame temperature is minimum for the alkane and maximum for an alkyne. This can be due to the higher bonds C-C bonds thus lewading to the higher energy generation.
The flame temperature for ethane is 1714.17 K, ethene is 1836.93 and for ethyne is 2064.78.
Case IV
In this case we will increase the carbon atoms in alkane and observe the change in the flame temperature. Thus the fuel used will be methane, ethane and propane. Th ereactions can be seen below:
Methane:
`CHunderset(4)() + 2(Ounderset(2)()+3.76Nunderset(2)())rarr COunderset(2)() + 2Hunderset(2)()O + 7.52Nunderset(2)()`
Ethane
`Cunderset(2)()Hunderset(6)() + 3.5(Ounderset(2)()+3.76Nunderset(2)())rarr 2COunderset(2)() + 3Hunderset(2)()O + 13.16Nunderset(2)()`
Propane:
`Cunderset(3)()Hunderset(8)() + 5(Ounderset(2)()+3.76Nunderset(2)())rarr 3COunderset(2)() + 4Hunderset(2)()O + 18.8Nunderset(2)()`
The program for this case can be seen below:
"""
adiabatic flame temperature wrt c= 1 to 3
with heat loss of 35%
methane
ch4+2(o2+3.76n2)=co2+2h2o+2*3.76n2
ethane
c2h6+3.5(o2+3.76n2)=2co2+3h2o+3.5*3.76n2
propane
c3h8+5(o2+3.76n2)=3co2+4h2o+5*3.76n2
"""
import matplotlib.pyplot as plt
import math
import numpy as np
R=8.314 #J/mol-K
def h(T,co_effs):
#enthalpy Function
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_h = [0.02926640E+02, 0.14879768E-02, -0.05684760E-05, 0.10097038E-09, -0.06753351E-13, -0.09227977E+04, 0.05980528E+02]
n2_coeffs_l = [0.03298677E+02, 0.14082404E-02, -0.03963222E-04, 0.05641515E-07, -0.02444854E-10, -0.10208999E+04, 0.03950372E+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]
#o2_coeffs_h = [3.28253784E+00, 1.48308754E-03, -7.57966669E-07, 2.09470555E-10, -2.16717794E-14, -1.08845772E+03, 5.45323129E+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]
"""
Methane
"""
def f_methane(T):
# calculating enthalpies of products and reactants
T_std = 298.15
h_co2_p = h(T,co2_coeffs_h)
h_n2_p = h(T,n2_coeffs_h)
h_h2o_p = h(T,h2o_coeffs_h)
h_ch4_r = h(T_std,ch4_coeffs_l)
h_o2_r = h(T_std,o2_coeffs_l)
h_n2_r = h(T_std,n2_coeffs_l)
h_products = h_co2_p + 2*h_h2o_p + (3.76*2*h_n2_p)
h_reactants = h_ch4_r + 2*h_o2_r + (2*3.76*h_n2_r)
# print(h_reactants)
return h_products - h_reactants
def fprime_methane(T):
return (f_methane(T+1e-6) - f_methane(T))/1e-6
"""
ethane
"""
def f_ethane(T):
# calculating enthalpies of products and reactants
T_std = 298.15
h_co2_p = h(T,co2_coeffs_h)
h_n2_p = h(T,n2_coeffs_h)
h_h2o_p = h(T,h2o_coeffs_h)
h_c2h6_r = h(T_std,c2h6_coeffs_l)
h_o2_r = h(T_std,o2_coeffs_l)
h_n2_r = h(T_std,n2_coeffs_l)
h_products = 2*h_co2_p + 3*h_h2o_p + (3.76*3.5*h_n2_p)
h_reactants = h_c2h6_r + 3.5*h_o2_r + (3.5*3.76*h_n2_r)
# print(h_reactants)
return h_products - h_reactants
def fprime_ethane(T):
return (f_ethane(T+1e-6) - f_ethane(T))/1e-6
"""
Propane
"""
def f_propane(T):
# calculating enthalpies of products and reactants
T_std = 298.15
# LHV = 1258020 #lower heating value
h_co2_p = h(T,co2_coeffs_h)
h_n2_p = h(T,n2_coeffs_h)
h_h2o_p = h(T,h2o_coeffs_h)
h_c3h8_r = h(T_std,c3h8_coeffs_l)
h_o2_r = h(T_std,o2_coeffs_l)
h_n2_r = h(T_std,n2_coeffs_l)
h_products = 3*h_co2_p + 4*h_h2o_p + (3.76*5*h_n2_p)
h_reactants = h_c3h8_r + 5*h_o2_r + (5*3.76*h_n2_r)
# print(h_reactants)
return h_products - h_reactants
def fprime_propane(T):
return (f_propane(T+1e-6) - f_propane(T))/1e-6
T_methane_guess = 1500
T_ethane_guess = 1500
T_propane_guess = 1500
tol = 1e-3
#ct=0
alpha=0.2
T_aft = []
#phi = np.linspace(0.1,1.5,20)
#for i in range (0,length(phi)):
#methane
while(abs(f_methane(T_methane_guess)) > tol):
T_methane_guess = T_methane_guess - alpha*(f_methane(T_methane_guess)/fprime_methane(T_methane_guess))
T_aft.append(T_methane_guess)
#ethane
while(abs(f_ethane(T_ethane_guess)) > tol):
T_ethane_guess = T_ethane_guess - alpha*(f_ethane(T_ethane_guess)/fprime_ethane(T_ethane_guess))
T_aft.append(T_ethane_guess)
#propane
while(abs(f_propane(T_propane_guess)) > tol):
T_propane_guess = T_propane_guess - alpha*(f_propane(T_propane_guess)/fprime_propane(T_propane_guess))
T_aft.append(T_propane_guess)
fuel = ['methane', 'Ethane', 'Propane']
print(T_aft)
plt.bar(fuel,T_aft)
plt.xlabel('Type of hydrocarbon')
plt.ylabel('Adiabatic Flame Temperature')
plt.title('Changes in AFT with Respect to number of carbon')
#plt.grid('on')
plt.show()

Here it can be observed that the temperature incresases in ascending order from methane to propane, this can be due to the increase in carbon atoms and the hydrogen atoms. The temperatures for the
methane: 2325.598K
ethane; 2379.84K
propane: 2392.09K
Conclusion:
- The maximum flame temperature for a mixture can be achieved if it is a stotiometric mixture. For rich and lean mixture the flame temperatures are always less than that of stotiometric mixture.
- There is a difference in results of Cantera and python, This is beacuse cantera solves by reducing the gibbs free energy of the equation. Also it produces more intermediate byproducts for the reaction mechanism than we produce manually.
- As the phenomenon is known the flame temperature decreases if their is heat loss.
- The flame temperature is more for an alkyne than that for an alkene and alkane (same number of carbon atoms) respectively. This is due to more carbon bonds in an alkyne as compared to other structures.
- The flame temperatrure is more if we increase the number of carbon atoms in an alkane, this is due to increase in hydrogen and carbon atoms.