Challenge

Week 4.1- Handling Mixtures with Cantera

he object A is air. Consider any fuel(hydro-carbon) reaction with air. The equation is written in the following way :

- CxHy +b(O2+3.76N2) -> xCO2 +y/2H2O + 3.76bN2 So the mole-fraction for air is = b/(b+3.76b) = 0.21. One mole of air contains 0.21 moles of oxygen. Hence for methane at stoichiometric condition b=2 and 2/0.21 =9.52 moles of air takes part in the combustion.

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
print('Mole fraction in air=',A.mole_fraction_dict())
print('Mass fraction in air=',A.mass_fraction_dict())

B=ct.Quantity(gas)
B.TPX=298.15,ct.one_atm,'CH4:1546'
B.moles=1
print('Mole fraction of fuel=',B.mole_fraction_dict())

# The Following step is used to apply the right molar balance
M=A+B
M.equilibrate('HP')
print('Value of AFT=',M.T)
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.