![]() ![]() ![]() % % Keywords: combustion, equilibrium, plotting help equil if nargin = 1 gas = g else gas = Solution ( 'gri30.yaml' ) end nsp = nSpecies ( gas ) % find methane, nitrogen, and oxygen indices ich4 = speciesIndex ( gas, 'CH4' ) io2 = speciesIndex ( gas, 'O2' ) in2 = speciesIndex ( gas, 'N2' ) nPhis = 50 phi = linspace ( 0.2, 2.70, nPhis ) tad ( nPhis ) = 0 xeq ( nsp, nPhis ) = 0 for i = 1 : nPhis x = zeros ( nsp, 1 ) x ( ich4, 1 ) = phi ( i ) x ( io2, 1 ) = 2.0 x ( in2, 1 ) = 7.52 set ( gas, 'Temperature', 300.0, 'Pressure', 101325.0, 'MoleFractions', x ) equilibrate ( gas, 'HP' ) tad ( i ) = temperature ( gas ) xeq (:, i ) = moleFractions ( gas ) end % make plots clf subplot ( 1, 2, 1 ) plot ( phi, tad ) xlabel ( 'Equivalence Ratio' ) ylabel ( 'Temperature (K)' ) title ( 'Adiabatic Flame Temperature' ) subplot ( 1, 2, 2 ) semilogy ( phi, xeq ) axis () %legend(speciesName(gas,1:nsp),1) j = 10 for k = 1 : nsp text ( phi ( j ), 1. Many of these have been added to Pantera, a monkey-patch and convenience function library that wraps Cantera. the corresponding flame temperature and the strain rate at which the. This page contains gas mixing functions using Cantera, written in Python. mass flux hence the strain rates of fuel and air and then measuring. What I was doing until now was increasing the. compute the extinction strain rates for propane-air flames at. % % This example computes the adiabatic flame temperature and % equilibrium composition for a methane/air mixture as a function of % equivalence ratio. counterflow non-premixed flame problem (Matlab module). ![]() Heres an example of how to use it: ck2cti -i mech.inp -t therm.dat -tr tran.dat -id mymech > mech.cti. This utility program can also be downloaded from the Cantera Users Group web site. I'm not skilled using terminal commands and I'm having the same troubles you had. Given the recent release cadence of Cantera, the next major version of Cantera will probably be released very close to that date, so we have made the decision to drop Python 2.7 support. Hi I've been trying installing Cantera on my Mac just like you did agony2496. Support for Python 2.7 from the Python Software Foundation will end Janu. Function equil (g ) % EQUIL a chemical equilibrium example. This program should be run from the command line first to convert any CK files you plan to use into Cantera format. Cantera 2.4.0 is the last release that will be compatible with Python 2.7. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |