1.
Objective :
Our primary objective here is to compare results between Python & Cantera for the following cases :
- Variation of AFT with Equivalence Ratio (during a Constant Volume Process)
- Variation of AFT with Heat Loss Factor (during a Constant Pressure Process)
- Variation of AFT with Number of Bonds between Carbon Atoms in 2 Carbon Chian Fuels as well as the Number of Carbon Atoms in a Fuel Molecule (during a Constant Pressure Process)
Introduction :
Adiabatic Flame Temparature :
This is the maximum attainable temparature during a combustion process, for a given set of reactants & initial conditions. In order to achieve this temparature, there must not be any kind of losses (ranging from heat & work exchange with the enviroment to incomplete combustion & dissociation). This usually occurs when a Stoichiometric Reactant Mixture is used. There can be 2 types of AFTs, depending on the nature of the process :
- AFT at Constant Volume (Internal Energy remains constant)
- AFT at Constant pressure (Enthalpy remains constant)
The former is always higher than the latter as, in order to mantain constant pressure, the volume must change, resulting in work exchange, thus lowering the maximum attainable temparature.
Combustion Stoichiometry :
The idea of stoichiometry derives from the concept of Conservation of Mass, as applied to chemical reactions. This occurs when exactly enough air is available for the complete combustion of the fuel. The Equivalence Ratio phi may be defined as follows :
phi = (F:A)_actual / (F:A)_stoichiometric
phi > 1 : Rich Mixture
phi = 1 : Stoichiometric Mixture
phi < 1 : Lean Mixture
General form of Stoichiometric Hydro-Carbon Combustion Reaction with a single Fuel Species :
CxHyOz + (1/phi)*(x + (y/4) - (z/2))(O2 + 3.76N2)
------->
xCO2 + (y/2)H2O + (3.76/phi)*(x + (y/4) - (z/2))N2 + (x + (y/4) - (z/2))*((1/phi)-1)O2
***************************************************************************************************
Case 1 : Variation of AFT with Equivalence Ratio (during a Constant Volume Process)
Background :
Here, we choose Methane as fuel, the reactions for which are as follows :
Stoichiometric Combustion : CH4 + 2(O2 + 3.76N2) -> CO2 + 2H2O + 7.52N2
Lean Combustion : CH4 + (2/phi)(O2 + 3.76N2) -> CO2 + 2H2O + (7.52/phi)N2 + ((2/phi)-2)O2
Rich Combustion : CH4 + (2/phi)(O2 + 3.76N2) -> ((4/phi)-3)CO2 + 2H2O + (7.52/phi)N2 + (4-(4/phi))CO
We shall vary the Equivalence Ratio & plot the subsequent variation of AFT.
Solution using Python :
- Use NASA Polynomials to calculate Enthalpy of all Species involved.
- Define a function f(T, phi) = (H_products - H_reactants) - (N_products - N_reactants) , which represents the Constant Volume Process, as both Enthalpy & Number of Moles must be conserved.
- Define the Numerical Derivative of the above function as f_dash(T, phi) using Forward Differencing.
- Minimize f(T, phi) using a Newton-Raphson Iterator.
- For each value of phi, the value of Temparature at which the iterator converges is our Adiabatic Flame Temparature for that phi.
Solution using Cantera :
- Create a Gas Object, of the Solution Class & specify gri30.xml as the input file.
- Set properties like Temparature, Pressure, Mole Fraction, Equivalence Ratios etc.
- Use the Equilibrate function to automatically compute Equillibrium Conditions.
Code : Please see the attached file : AFT_vs_EquivalenceRatio.py
Results :
Observations :
Python gives us a Linear plot which peaks at phi = 1, whereas Cantera results in a curve that peaks at phi slightly greater than 1. Moreover, Cantera gives lower values of AFT untill phi = 1, after which it plateaus & descends gradually. Near phi = 1.3, the two curves intersect before diverging once again, however, this time, Python under-predicts the AFT. These can be attributed to the fact that, in real world combustion, there exist a lot of different other species in the mixture (in very small quantities), which are taken into account by Cantera. Python, however simply solves the mathematical problem as specified by us (and we completely ignore the minor species). For values of phi<0.3, both give very simillar results as there is enough oxygen to burn off the minor species. As phi increases, these affects cause the two solutions to differ. Furthermore, the Python code was far more lengthy & cumbersome as compared to Cantera. To conclude, it is most efficient to combust using a Stiochiometric Mixture (maybe slightly rich), as it will result in the best utilization of the available Chemical Energy within the fuel.
***************************************************************************************************
Case 2 : Variation of AFT with Heat Loss Factor (during a Constant Pressure Process)
Background :
Here, we choose Methane as fuel, the reaction for which are as follows :
Stoichiometric Combustion : CH4 + 2(O2 + 3.76N2) -> CO2 + 2H2O + 7.52N2
We shall assume the Equivalence Ratio to be unity & try to account for Heat Exchange with the enviroment.
Heat Loss Factor = H_loss * Lower Heating Value
Lower Heating Value is essentially the maximum amount of Heat that can be lost during the process, whereas, H_Loss is a generic coefficient that can be varied from 0 to 1, which we shall use to vary LHV.
Solution using Python :
- Use NASA Polynomials to calculate Enthalpy of all Species involved.
- Define a function f(T, H_loss) = (H_products - H_reactants + (H_loss*LHV)), which represents the Constant Pressure Process.
- Define the Numerical Derivative of the above function as f_dash(T, H_loss) using Forward Differencing.
- Minimize f(T, H_loss) using a Newton-Raphson Iterator.
- For each value of H_loss, the value of Temparature at which the iterator converges is our Adiabatic Flame Temparature for that H_loss.
Code : Please see the attached file : FlameTemp_vs_HeatLossFactor.py
Results :
Observations :
It can be observed that the Flame Temparature drops drastically with the increase of the Heat Loss Factor (however, the descent is not linear). With an increase of H_loss, more and more energy is lost to the enviroment, thus reducing the maximum attained Temparature.
***************************************************************************************************
Case 3 & 4 : Variation of AFT with Number of Bonds between Carbon Atoms as well as the Number of Carbon Atoms in a Fuel Molecule (during a Constant Pressure Process)
Background :
Here, we choose Methane, Ethane, Ethene & Ethyne & Propane as fuel, the reactions for which are as follows :
Methane (1 C atom, no bonds) : CH4 + 2(O2 + 3.76N2) -> CO2 + 2H2O + 7.52N2
Ethane (2 C atoms, single bond) : C2H6 + 3.5(O2 + 3.76N2) --> 2CO2 + 3H2O + 13.16N2
Ethene (2 C atoms, double bond) : C2H4 + 3(O2 + 3.76N2) --> 2CO2 + 2H2O + 11.28N2
Ethyne (2 C atoms, tripe bond) : C2H2 + 2.5(O2 + 3.76N2) --> 2CO2 + H2O + 9.4 N2
Propane (3 C atoms, single bond) : C3H8 + 5(O2 + 3.76N2) --> 3CO2 + 4H2O + 18.8N2
We shall assume the Equivalence Ratio to be unity & 0 Heat Loss, thereby trying to study the effect of the number of bonds between 2 Carbon Atoms on the AFT.
Solution using Python :
- Use NASA Polynomials to calculate Enthalpy of all Species involved.
- Define a function f(T, n_bonds, n_carbons) = (H_products - H_reactants), which represents the Constant Pressure Process.
- Define the Numerical Derivative of the above function as f_dash(T, n_bonds, n_carbons) using Forward Differencing.
- Minimize f(T, n_bonds, n_carbons) using a Newton-Raphson Iterator.
- For each value of n_bonds & n_carbons, the value of Temparature at which the iterator converges is our Adiabatic Flame Temparature for that n_bonds & n_carbons.
Solution using Cantera :
- Create a Gas Object, of the Solution Class & specify gri30.xml as the input file.
- For each n_bonds, specify the different Fuel Species.
- Compute the Mole Fractions of all Reactants.
- Specify Temparature & Pressure.
- Use the Equilibrate function to automatically compute Equillibrium Conditions.
Code : Please see the attached file : AFT_vs_numberofBonds&Carbons.py
Results :
Observations :
As is evident, Python over-estimates all the values. It is, however interesting to note that the AFT is swayed more by the number of bonds between 2 Carbon atoms, than the number of Carbon atoms in the molecule itself. Ethyne has the highest AFT, as a result of the Triple Bond between the 2 carbons, which releases a lot of energy when broken, followed by Ethene, which has a Double Bond. This is also because these molecules contain less Hydrogen atoms, which will lead to a decrease in formation of Water, thus reaching increased Temparatures. Comparing Methane & Ethane, we can conclude that AFT increases with the number of Carbon atoms in a chain. Propane, despite having 1 more Carbon than Ethane, gives simillar results as the effect of increase of Carbon atoms is counter-acted by the effect of increase of Hydrogen atoms.
***************************************************************************************************
Conclusion :
This sheds light on the efficiency & efficacy of Cantera as a Chemical Kinetics Package.