Handling mixtures with Cantera
Objective:
To obtain the right value of Adiabatic Flame Temperature(AFT) by calculating the right number of moles performing the mixture calculations using the \'Quantity\' class in cantera.
To find:
- Moles method of object A as A.moles and explain the calculation involved.
- mass_fraction_ dict() method of object A and its results.
- Explain lines 15 & 16 and explanation of 1546
- Changes done to obtain right value for AFT
Solution:
Air consits of 79%Nitrogen and 21% oxygen by volume approximately .The volume fractions of Nitrogen and oxygen are 0.79 ,0.21 respectively.
1.Moles method:
object-A -Oxidizer
A.moles prints the number of moles in 1gram of air
Molecular weight of oxygen=2*16=32
Number of moles in 1 gram of O2=1/32=0.03125
Molecular weight of nitrogen=2*14=28
Number of moles in 1 gram of N2=1/28=0.0357142857
Total number of moles present in 1 mole of air= 0.21*0.03125 +0.79*0.0357142857=0.034776785703
Total number of moles = A.moles
`Y_i=(X_iw_i)/(sumX_iwi)`
Yi-Mass fraction
Xi-Mole fraction
|
Species |
Molecular weight Wi |
Xi*Wi |
Mole fraction
Xi |
Mass fraction
Yi |
|
Oxygen(O2) |
2*16=32 |
6.4 |
0.20 |
0.2269 |
|
Nitrogen(N2) |
2*14=28 |
22.12 |
0.79 |
0.77 |
2.mass_fraction_ dict():
Mass_fraction of O2 = 6.4/(6.4+21.8)=0.2269`~~`0.23
Mass_fraction of N2 = 21.8/(6.4+21.8)=0.773049`~~`0.77
3.lines 15 and 16:
B is the instance of quantity object which represents the fuel CH4
In line 15 we are setting the temperature,pressure and number of moles of the fuel CH4.
1546 represents the Mole fraction of species which is not considered.
In line 16 number of moles of CH4 is set to 1.0 or else the Adiabatic Flame Temperature value will be very low.To get the exact value we set the number of moles of fuel as 1.0.
4.Changes done to obtain right value for AFT
For methane the number of moles of air must be changed to obtain the the right value of Adiabatic Flame Temperature.The combustion of methane is given as
`CH_4+2(O_2+3.76N_2) -> CO_2+2H_2O+7.52N_2`
Reactants:
Number of moles of CH4 = 1
Number of moles of O2=2
Number of moles of N2=2*3.76=7.52
Number of moles of air/oxidizer=2+7.52=9.52
\"\"\"
Sample code to vary the temperature of air and oxidize individually
\"\"\"
import cantera as ct
gas=ct.Solution(\'gri30.cti\')
A=ct.Quantity(gas)
A.TPX=298.15,ct.one_atm,{\'O2\':0.21,\'N2\':0.79}
A.moles=9.52
B=ct.Quantity(gas)
B.TPX=298.15,ct.one_atm,\'CH4:1546\'
B.moles=1
M=A+B
M.equilibrate(\'HP\')
print(M.T)
Results:
Thus the right value of AFT is obtained by specifying right number of moles of air.