Week 4 - Handling Mixtures with Cantera
1. We know that for proper combustion of fuel and oxidiser, the combustion should take place in following given below chemical equation or Stoichiometric chemical equation:-
CH4 + 2(O2 + 3.76N2) = CO2 + 2H2O + 7.52N2
But since we have reactants of chemical equation in following format :-
CH4 + (0.21O2 + 0.79N2) .
So as to convert chemical equation into stoichiometric equation for proper reaction, moles for reactants will be as :-
CH4 + ((100*2)/21)[0.21O2 + 0.79N2].
2.
""""
Sample code to vary the temperature of air and oxidizer individually.
"""
import cantera as ct
import matplotlib.pyplot as plt
import numpy as np
gas=ct.Solution('gri30.cti')
A=ct.Quantity(gas)
A.TPX=298.15,ct.one_atm,{'O2':0.21,'N2':0.79}
A.moles=200/21
print(A.mass_fraction_dict())
B=ct.Quantity(gas)
B.TPX=298.15,101325,{'Ch4':1546}
B.moles=1
M=A + B
M.equilibrate('HP','auto')
aft=(M.T)
print(aft)
2. When we use print(A.mass_fraction_dict()) , basically it shown the output for mass fraction of species of class "A".
We got value of N2: 0.76708299 and O2: 0.23291700 as an output in terms of mass fraction for which we have predefined value as 0.79 and 0.21 respectively.
The reason could be higher formation of Nitrogen in the form of Nitrogen oxides at higher temperature as by-product due to which the nitrogen concentration become less hence mass fraction also become less.
3. In line 15 and 16, we have basically defined an object of name "A" derived from class having name "quantity" where we have provided temperature , pressure and moles for the object "A".
There while assigning values to the given parameters, the moles of methane was 1546 . On the next line 16, we have defined moles of object "A" equal to 1.
In this way, the moles provided in line 15 is overuled by moles provided in line 16 and hence the value of object "A' becomes '1' whatever the moles have provided in previous line.
As a conclusion, there is no effect of moles for adiabatic flame temperature provided in line 15 as a parameter when moles have been defined separately in next as an attribute for class "A".
4. In order to get the right answer of adiabatic flame temperature, We have to provide value of 200/21 as a mole number to class "A" like this: A.moles=200/21.