Challenge

Week 4.1- Handling Mixtures with Cantera

The stoichiometric equation for CH4-Methane comnustion is

CH4+2(O2 +3.76N2) ---> CO2+ 2H2O +7.52N2

1. Using "moles" method requires us to input the mass fractions of the air (0.21 oxygen + 0.79 nitrogen) at STP. to arrive at the correct no. of moles of air

mass fraction, o2 = Moles, o2/( Moles, air)

0.21 = 2/Moles,air ; Moles,air =2/0.21 =9.52 (At stoichiometric)

2. Code:

"""
Week 4.1, Assignment Solution
Date: 05-June-2021
Author : Pratikshya Mohanty | GE GAS POWER
"""
import matplotlib.pyplot as plt
import numpy as np
import cantera as ct

gas = ct.Solution('gri30.cti')

air=ct.Quantity(gas)
air.TPX=298.15,ct.one_atm,'O2:0.21,N2:0.79'
air.moles =9.52
print(air.mole_fraction_dict()) # This prints the molar fractions of the components


print(air.mass_fraction_dict()) # This prints the mass fractions of the components


methane=ct.Quantity(gas)
methane.TPX=298.15,ct.one_atm,'CH4:1'
methane.moles = 1
mix =air + methane
mix.equilibrate('HP','auto') #Recuperator is a constant pressure system
#plt.plot(phi[i],mix.T,'-b*')
print(mix.T)

*********************************************************************************

Species Mole fraction Moles Mass Mass fraction

O2 0.21 * Mole,air = 0.21 *9.52 ~2 2*16*2 = 64 64/274.5 = ~0.23

N2 0.79 * Mole,air = 0.79 *9.52 ~7.52 7.52*14*2=210.5 210.5/274.5 = ~0.76

3. In line 15, the B.TPX, temperature in kelvin, pressure in Pascals, and there is only one species thus the mole fraction is 1. It can be any arbitrary number except zero. We don't need to use mole_fraction_dict() or mass_fraction_dict().

4. The right number of mole fraction of air =9.52 has to be entered to get the right value of AFT.

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.