Week 3 - Adiabatic Flame Temperature calculation
#Aim-1.To calculate Adiabatic flame temperature of a system at Constant Volume and Constant Pressure
2.To analyse the trend of variation of AFT(Adiabatic flame temperature) with Equivalence ratio.
3.To analyse the trend of variation of AFT with Alkane,Alkene,Alkyne series having 2 carbon atom
4.To analyse the trend of variation of AFT with change in carbon atom of Alkane series CxHy (from 1 to 3)
Introduction:
The temperature of the products in an adiabatic combustion of fuel without applying any shaft work, is
defined as the “Adiabatic Flame Temperature”. In a combustion process the heat produced during the
exothermic chemical reaction is released to their product and the temperature of the products is raised.
There is no possibility for dissipation of the heat to the surrounding and the process will be adiabatic as
there is no heat loss to the surrounding. As a result, the temperature of the products suddenly increases
and it produces a flame. This will heat up the product gases in flame region and the temperature rise will
be maximum. This highest temperature is known as the adiabatic flame temperature. The temperature
rise depends on the amount of excess air used or the air-fuel ratio. The flame temperature has the
highest value for using pure oxygen gas and it decreases by using air. So, the exact stoichiometric air is
to be supplied for better result. With too large amount of excess air the flame temperature will be
reduced. When the heat lose to the environment or diluted by the inert gases and there is an incomplete
combustion. So, the temperature of the products will be less. The flame temperature is determined from
the energy balance of the reaction at equilibrium. There are two type of adiabatic flame temperature:
constant pressure adiabatic flame temperature and constant volume adiabatic flame temperature.


Importance in Practical Applications:
The calculation of adiabatic flame temperature is important to people in fields that deal with combustion
and explosions. These fields include most material production industries, and also chemical industries.
The adiabatic flame temperature is the temperature of the products of a combustion reaction if no heat
is lost to the external environment. By being able to calculate the adiabatic flame temperature, these
fields can maximize the starting ratio of their reactions in order to get an ideal combustion result.
The objective for this project is to determine the adiabatic flame temperatures for different molar ratios
of a mixture of methane and oxygen that combusts and thus get an idea othe ideal conditions for this
reaction.
Part-1:
Methane is contained in a constant volume chamber:
So general reaction would be

#Coding Approach:
Newton raphson method:
If you've ever tried to find a root of a complicated function algebraically, you may have had some
difficulty. Using some basic concepts of calculus, we have ways of numerically evaluating roots of
complicated functions. Commonly, we use the Newton-Raphson method. This iterative process follows a
set guideline to approximate one root, considering the function, its derivative, and an initial x-value.
You may remember from algebra that a root of a function is a zero of the function. This means that at
the "root" the function equals zero. We can find these roots of a simple function such as: f(x) = x2-4
simply by setting the function to zero, and solving:
(x+2)(x-2) = 0
x = 2 or x = -2
The Newton-Raphson method uses an iterative process to approach one root of a function. The specific root that the process locates depends on the initial, arbitrarily chosen x-value.
Here, xn is the current known x-value, f(xn) represents the value of the function at xn, and f'(xn) is the derivative (slope) at xn. xn+1 represents the next x-value that you are trying to find.
#Brief description of coding procedure:
1.Newton raphson method used with initial T_guess =1500 kelvin.
2.For finding Next T_guess,funtion f(T) and its derivative fprie(T) is prepared.
3.f(T) function calculating roots of the problem.
4.One more function h(T,coeffs) is also defined,it is used to calculate Enthalpy of each species taking value from coefficients list created and putting it into formula given below:
`H_k=(a_(1k)+a_(2k)*T_k/2+a_(3k)*(T_k)^2/3+a_(4k)*(T_k)^3/4+a_(5k)*(T_k)^4/5+a_(6k)/T_k)*R*T_k`
R=Universal Gas constant
a1,a2....=Temperature coefficients taken from gri mech therm dat file.
5.This program is for isualising variation of AFT with Equivalence ratio.So we varied equivalence ratio between range 0.5 to 1.5.
##Link to the Python program without and with using cantera
https://drive.google.com/file/d/13WFEgG0odXfvt3e7dAP9ErGKKnON7BpI/view?usp=sharing

#Conclusion:
The plots shown above indicates that,when we found out results using Python program only ,we got higher AFT temperature values for different Equivalence ratio ,as compared to values of AFT obtained using Cantera.
Reason behind it is ---
In Python program on the product side,we consider only 3 to 4 species.(Co2,H20,N2,O2,H2)
But actually this is not the case,in real combustion lot of intermediate reaction happen to produce many species,though there concentration can be very small but they are present in combustion products.
So Cantera results include all of that into account.The reason behind less temperature is that heat produced in combustion is utilized to heat up the other gases produced during combustion.
-----------------------------------*******************************--------------------------------------
#Part-2
1).Methane is contained in a constant pressure chamber with heat loss equal 35 % of Maximum possible heat loss.
2.AFT variation with Alkane,Alkene,Alkyne having 2 carbon atoms
3.AFT variation with incraese in carbon atom from 1 to 3 in Alkane series.
#Coding Approach-
1.Approach is same as above in Constant volume
Here only Heat loss is included that is 35 % of Max Heat loss.
So Lower heating value calculated(LHV).
##Link to the Python program without and with using cantera:
https://drive.google.com/file/d/1HSQif7c_7Qh54ac5dECxFW4x2QxAWl7-/view?usp=sharing
Results:
For case-1

For case-2

#Observation:
From the plot above we can see that,AFT temperature increases for same mole of hydrocarbon as we move from C2H6 to C2H2.
For case-3

#Observation:
We can see from the plot,for C3H8 AFT temperature is maximum.More number of C-C bond,more will be the heat it can generate by combustion
----------------------------------------*************************---------------------------------