Gas1 = importPhase('gri30.cti', 'gri30'); Function importPhase constructs an object representing a phase of matter by reading in attributes of the phase from a file, which in this case is 'gri30.cti'. This file contains several phase specifications; the one we want here is 'gri30', which is specified by the second argument. This file contains a complete specification of the GRI-Mech 3.0 reaction mechanism, including element data (name, atomic weight), species data (name, elemental composition, coefficients to compute thermodynamic and transport properties), and reaction data (stoichiometry, rate coefficient parameters). The file is written in a format understood by Cantera, which is described in the document 'Defining Phases and Interfaces.'
On some systems, processing long CTI files like gri30.cti can be a little slow. For example, using a typical laptop computer running Windows 2000, the statement above takes more than 4 s, while on a Mac Powerbook G4 of similar CPU speed it takes only 0.3 s. In any case, running it again takes much less time, because Cantera 'remembers' files it has already processed and doesn't need to read them in again. See also: Input File Examples Several reaction mechanism files in this format are included in the Cantera distribution, including ones that model high-temperature air, a hydrogen/oxygen reaction mechanism, and a few surface reaction mechanisms. Under Windows, these files may be located in 'C: Files Files', or in 'C:', depending on how you installed Cantera and the options you specified.
Matlab Interface User’s Guide¶. Tutorial: Working with input files. CTI files; CTI files distributed with Cantera.
Cantera Matlab User Guide
On a unix/linux/Mac OSX machine, they are usually kept in the 'data' subdirectory within the Cantera installation directory. If for some reason Cantera has difficulty finding where these files are on your system, set environment variable CANTERADATA to the directory where they are located. Alternatively, you can call function addDirectory to add a directory to the Cantera search path. Gas2 = importPhase('diamond.cti', 'gas'); a gas diamond = importPhase('diamond.cti','diamond'); bulk diamond diamonndsurf = importInterface('diamond.cti','diamond100'.
Gas2, diamond); Note that the bulk (i.e., 3D) phases that participate in the surface reactions must also be passed as arguments to importInterface. Note that when Cantera reads a.cti input file, wherever it is located, it always writes a file of the same name but with extension.xml.in the local directory.
Cantera Matlab User Guide
If you happen to have some other file by that name, it will be overwritten. Once the XML file is created, you can use it instead of the.cti file, which will result in somewhat faster startup. Diamonndsurf2 = importInterface('diamond.xml','diamond100'. Gas2, diamond); Many existing reaction mechanism files are in 'CK format,' by which we mean the input file format developed for use with the Chemkin-II software package. Rupley, and J. Miller, Sandia National Laboratories Report SAND89-8009 (1989).
Cantera comes with a converter utility program 'ck2cti' (or 'ck2cti.exe') that converts CK format into Cantera format. This program should be run from the command line first to convert any CK files you plan to use into Cantera format.
This utility program can also be downloaded from the Cantera User's Group web site. Here's an example of how to use it.
The Matlab documentation for ck2cti is definitely out of date. The help provided by just running ck2cti.py is perhaps a bit terse, but it's at least complete. It's also mentioned in the. Maybe it would be worth adding a section about ck2cti to the CTI guide ( doc/sphinx/cti/input-files.rst) as well.
On the issue of the LLNL mechanisms, I was at one point working on a list of issues to send to the people there to see if we could get them fixed upstream, but since then they appear to have updated the mechanisms and added some different bugs (like the truncated transport database that's shown up on the mailing list a couple of times). The Matlab documentation for ck2cti is definitely out of date.
The help provided by just running ck2cti.py is perhaps a bit terse, but it's at least complete. It's also mentioned in the. Maybe it would be worth adding a section about ck2cti to the CTI guide ( doc/sphinx/cti/input-files.rst) as well. On the issue of the LLNL mechanisms, I was at one point working on a list of issues to send to the people there to see if we could get them fixed upstream, but since then they appear to have updated the mechanisms and added some different bugs (like the truncated transport database that's shown up on the mailing list a couple of times).