Chemical Equilibrium for Selected Species

244 views
Skip to first unread message

Carlo Di Giovine

unread,
Oct 17, 2016, 11:15:44 AM10/17/16
to Cantera Users' Group
Hi everyone!
My first Cantera assignment I have to calculate the adiabatic flame temperature (Taf) and the equilibrium composition of a methane/air mixture initially at 300K and at a constant pressure of 1 atm for eight equivalence ratios: φ= 0.6, 0.8, 0.9, 0.95, 1.0, 1.05. 1.1, and 1.2. In the equilibrium calculations I have to consider three different cases:

Case A. Frozen equilibrium, species: CH4, O2, N2, CO2, H2O,
Case B. Incomplete product formation, species: CH4, O2, N2, CO2, CO, H2, H2O, and
Case C. Product dissociation, species: CH4, O2, O, CH2OH, H2O, CO, HO2, H2O2, H2, H, CO2, CH2O, CHO, OH, CH3OH, CH3, CH3O, N2, NO, and NO2.
 


I managed to plot Tad with equivalent ratio variation for the all 53 species included in gri30 but I couldn't figure out a way to select only some species for the equilibrium, as asked in the assignment. Any suggestion??


Cheers,

Carlo

homework1.m

Santosh Shanbhogue

unread,
Oct 18, 2016, 9:03:02 AM10/18/16
to Cantera Users' Group
Every university in NA has honor codes specifically for these sorts of things, but I'm going to assume that you are having trouble creating gas mixtures (a Cantera question), and my answer would be for you to refer to the example here:

Bryan W. Weber

unread,
Oct 18, 2016, 10:12:06 AM10/18/16
to Cantera Users' Group
Hi Carlo,

Although the answer Santosh suggests will work in Python, in Matlab, I think you'll have to edit the CTI file and define a new phase. You can find the documentation for that here: http://cantera.github.io/docs/sphinx/html/cti/phases.html#phase-attributes

Essentially, you need to obtain a copy of gri30.cti and open it in a text editor. Then you can copy/paste the definition of the original phase and remove any species you do not want to consider and change the phase name. Then, when you create your Solution, you have to supply the phase name that you created, i.e. if you create a phase like so:

ideal_gas(name='gri-one-species',
               elements=...,
               species='CH4',
               ...)

then you'd create your Solution like

gas = Solution('gri30.cti', 'gri-one-species');

Also, make sure that your copy of gri30.cti is in your current working directory.

Good luck!
Bryan

Ray Speth

unread,
Oct 18, 2016, 10:44:49 AM10/18/16
to Cantera Users' Group
Carlo,

On top of what Bryan has suggested, I would also recommend renaming the file to something other than "gri30.cti" to avoid any confusion with the original file included with Cantera.

Regards,
Ray
Reply all
Reply to author
Forward
0 new messages