Week 4 - Handling Mixtures with Cantera
Aim:To Simulate Handling Mixtures (O2 + N2 +CH4) in Cantera and calculating the Adiabatic Flame Temperature.
Apparatus or Given data:
1)O2 mole fraction =0.21
2)N2 mole fraction =0.79
Calculation:
Assuming The General equation for fuel(Hydro-Carbon) reaction with Air
CH4 + 2 (O2 + 3.72 N2)=CO2+2H2O+7.52N2
1.Use the "moles" method/function of the A object and explain how it was calculated. You need to use this after line number 9.
Ans. By considering From the above general equation and given conditions
Object A is air, which is a Mixture of O2 & N2 So Object A contains 2 moles
Mole Fraction=(no of moles of that species)/Total no of moles
(1)O2 molefraction =2/(2+2*3.72)=9.52
(2)N2 Molefraction=(2*3.72)/(2+2*3.72)=9.52
From above the mole fraction of O2 and N2 is equal We can use either
2. Use the method mole_fraction_dict() of the A object and explain the result that you get. Here is how you need to use it. print(A.mass_fraction_dict())
Ans.
From the obtained data in question (1) and given data
Cantera Code:
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} # Mole fraction in g
A.moles= (2/0.21) #mole fraction of O = 0.21, Number Moles Of O = 2
print(A.mass_fraction_dict())
B=ct.Quantity(gas)
B.TPX= 298.15, ct.one_atm,'CH4:1546'
B.moles=1
print(B.mass_fraction_dict())
'''
molar balance
'''
M=A+B
M.equilibrate('HP')
print(M.T)
Using mole_fraction_dict() of A which will give a mass fraction of air that contains O2 and N2.
Obtained output:
{'N2': 0.7670829987741036, 'O2': 0.23291700122589645}
{'CH4': 1.0}
2224.224370856459
[Finished in 16.1s]
3. What is happenging in lines 15 and 16? Make sure you explain what 1546 means? Is that reasonable?
Ans. Inline number 14 defined Temperature, pressure and mole fraction of CH4.
Inline number 15 defined Number moles.
CH4 1546, Here 1546 is defined as a Mole fraction of CH4.
4. What changes do you need to put in place to get the right value of AFT in line 22?.
Ans.We were getting AFT finally 2224.224 K when we adjust the moles of air, so finally we were put 9.52 that will give High-temperature .its depend on No.of moles were given.