Week 4.1- Handling Mixtures with Cantera
AIM:
- To use 'moles' method in cantera and explain the calculation performed for the same.
- Using mass_fraction_dict() method/function for A object and explain the obtained results.
- Explaining ehat 1546 in 'CH4:1546" mean and whether or not it is reasonable.
- To make necessary change in the program to obtain the correct AFT which is 2224K
REACTION ASSUMED:
`CH_4`+ 2(`O_2`+ 3.76`N_2`) = `CO_2` + 2`H_2O` + 7.52`N_2`
THEORY:
What is Mass Fraction and Mole Fraction?
=>The mass fraction of a substance within a mixture is the ratio of the mass of that substance to the total mass of the mixture. Its formula is as shown below:

=> The mole fraction of a substance within a mixture is the number of molecules of a constituent `N_i` divided by the total number of all molecules `N_(total)`.

The Relation between mass fraction and mole fraction can be given as:

Here in this assignment, we are required to calculate the number of moles of gas A. This can be done using the mole fractions of the individual species provided as the input in the sample code. The calculations performed are given below:
Since, `x_(O2)` = 0.21 and `x_(N2)` = 0.79 is provided in the TPX method itself. To calculate the number of moles of A gas i.e. the oxidizer or the air, the combustion of methane is considered to be stoichiometric reaction.
Thus,
`x_(O2)` = `2/(N_(air))` = 0.21
`therefore` `N_(air)` = 9.52
Defining this amount of moles for gas A, we acctually get the correct AFT for the reaction i.e. 2224K.
Further, by using the mass_fraction_dict() method, we obtained the mass fraction of individual species i.e. the mass fraction of `O_2` and `N_2` individually. We can even confirm the obtained results by manual calculations. This is given below:
Using the above relation between mass and mole fractions, we ccan calculate the individual mass fractions of the species in A as,
Here, the molecular weight of the mixture is 64 + 210.56 = 274.56
where, molecular weight of O2 in this reaction is : 2*32 = 64
and molecular weight of N2 in this reaction is : 7.52*28 = 210.56
`therefore` `Y_(O2)` = `64/274.56` = 0.2331
and `Y_(N2)` = `210.56/274.56` = 0.7668
These values are similar to the ones calculated via cantera program.
As for the number '1546' in line 15 of the sample code is nothing but an arbitrary number which we cannnot pass as zero. It is actually the density of the gas phase under study and has nothing much to do with our tasks at hand.
PROGRAM/CODE:
https://drive.google.com/file/d/1yjPz2v5udiqVe8t26cS-oVu-DyWAJvUf/view?usp=sharing
RESULTS/OUTPUT:
