Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Installing Cantera 1.6 for Windows S. Browne and J.E. Shepherd Caltech January 2007.

Similar presentations


Presentation on theme: "1 Installing Cantera 1.6 for Windows S. Browne and J.E. Shepherd Caltech January 2007."— Presentation transcript:

1 1 Installing Cantera 1.6 for Windows S. Browne and J.E. Shepherd Caltech January 2007

2 2 System Requirements A PC running MS Windows 2000, or Windows XP Python 2.4 Download the Windows installer from http://www.python.org and run it Cantera uses Python to process input files, so it is required even if you will use Cantera from Matlab or another environment numarray site-package for Python Only needed if you plan to use Cantera from Python Adds fast array operations to Python Download the Windows installer from http://sourceforge.net/projects/numpy and run it The installer file is named numarray-1.5.2.win32-py2.4.exe and is located under File Releases > Old Numarray > 1.5.2 Optional Matlab 6.5 or higher MS Visual C++ 6.0 Compaq Visual Fortran Graphviz (Needed to use reaction networks in MixMaster) – http://graphviz.org/

3 3 Cantera 1.6 Installation Download the Cantera installer get Cantera160.msi and run it. http://sourceforge.net/projects/cantera This will create a folder that looks like the one shown here Run Cantera-1.6.0.win32-py2.4.exe This creates the interface between Cantera and Python

4 4 Add the Python Interpreter to the Path Cantera needs to know where to find the Python interpreter, since it uses Python to process ‘.cti’ input files To edit the system search path, select “System” on the Control Panel to pull up this dialogue box Press the ‘Environment Variables’ button

5 5 Edit the PATH environment variable Add C:\PYTHON24 to the PATH (user) environment variable Use a semicolon between paths Note: Check your paths Environment Variables are Case Sensitive Some installation locations may be different depending on the user’s choices.

6 6 Put the Cantera Toolbox on the Matlab path Add ‘Cantera’ folder to the Matlab path Use the “Add with Subfolders” option. More details on next slide

7 7 Setting the Path in Matlab choose ‘Set Path…’ on the File menu Cantera Toolbox Cantera Demos Cantera Tutorials NOTE: There will be many more directories than those shown in this screen-shot (to the right), but only those shown are necessary – Others may be removed.

8 8 Cantera Thermo/Reaction Data.cti Format Files – Thermo/Reaction Input Files for Cantera Contain Description of the Mixture Thermodynamic Data Reaction Mechanism (optional) Transport Data (optional) Files included with Cantera Distribution Limited to Low Temperatures (< 3000 K) For Methane and Oxygen. High Temperature (up to 6000 K) Files Available at http://www.galcit.caltech.edu/EDL/public/sdt/SD_Toolbox/Windows/cti.html http://www.galcit.caltech.edu/EDL/public/sdt/SD_Toolbox/Windows/cti.html Creating New/Converting CHEMKIN Style Files Documented at http://www.galcit.caltech.edu/EDL/public/sdt/SD_Toolbox/Windows/cti.html Save all Thermo/Reaction Data Files (.cti or.xml) in C:\Program Files\Common Files\Cantera\data NOTE: There is a link ('data‘) to this directory in your Cantera base directory.

9 9 Using MixMaster There is an error in the distribution of Cantera 1.6.0 – a shortcut to MixMaster does not appear It is convenient to add a shortcut to this application which is located at NOTE: in order to use MixMaster, install graphviz and numarray C:/Python24/Lib/site-packages/MixMaster/main.py

10 10 Matlab Cantera 1.6 Toolbox Bug The Cantera 1.6 Matlab Toolbox has a bug as well To Fix: Replace Cantera\MATLAB\toolbox\cantera\@ThermoPhase\gibbs_RT.m with http://www.galcit.caltech.edu/EDL/public/sdt/SD_Toolbox/Windows/gibbs_RT.m

11 11 Testing Installation Make sure to restart your computer for the environment variables to take effect. Two Options to Test Installation 1.Open Matlab and try starting the first tutorial ‘tut1.m’ 2.Go to: http://www.galcit.caltech.edu/EDL/public/sdt/SD_Toolbox/Windows/cantera_test.html and follow instructions Notes You must ‘set the current directory’ or ‘add the path’ of any m-file that you want to execute If you added the Cantera directory with the "Add with Subfolders" option (Slide 7) – the demos and tutorials will be in the Matlab path If you have difficulties – READ ON

12 12 Tips and hints 1. Version Compatibility – Check that Matlab and Cantera Versions are Compatible (i.e. Use Cantera 1.6 with Matlab 6.5 or Matlab 7.1) 2. numarray – Be sure to install numarray NOT numpy or Numeric 3. Python Version – Make sure you have Python 2.4 and numarray 1.5.2 (numarray-1.5.2.win32-py2.4.exe) 4. Environment Variables a)Case Sensitivity – Make sure that all paths specified truly exist. b)USER Environment Variables NOT SYSTEM Environment Variables c)Cantera 1.6.0 – Modified PATH Variable – Check that the directory of Python Interpreter is in the USER PATH Variable – Different for Cantera 1.7.0

13 13 Tips and hints 5. Test Cantera/Python Interface Run tut1.py (python tutorial file) Located in Cantera\tutorials\Python To Run: Right click on ‘tut1.py’ and left click on ‘Edit with Idle’ In the tut1.py window enter "F5" (shortcut for Run > RunModule) Results Correct – the comments of the tutorial print in the Python Shell window If NOT – Python or Cantera install is incorrect. This must be fixed before even trying Matlab.

14 14 Tips and hints 6. Persistent Matlab Trouble  Check Matlab Path – Be sure that BOTH Cantera Toolbox & Program you are Running are in the Matlab Path  Check Slide 7 – Does Your Path Match the Blue Box? You should see Cantera Cantera\MATLAB Cantera\MATLAB\toolbox Cantera\MATLAB\toolbox\cantera Cantera\MATLAB\toolbox\cantera\1D Cantera\demos\MATLAB Cantera\tutorials\MATLAB at the top of the path list if you did this properly 7. Data Directory – Are the.cti or.xml files in the data directory (Slide 8)

15 15 Tips and hints – External Documentation 8. Cantera Documentation  Cantera Web Site (Currently No Windows Documentation) http://www.cantera.org/ref/index.html Shock & Detonation Toolbox Site http://www.galcit.caltech.edu/EDL/public/sdt/SD_Toolbox/ 9. Yahoo Cantera User Forum http://groups.yahoo.com/group/cantera/


Download ppt "1 Installing Cantera 1.6 for Windows S. Browne and J.E. Shepherd Caltech January 2007."

Similar presentations


Ads by Google