This repository contains the materials for the Spring 2019 US National Combustion Meeting Cantera Workshop.
Please choose from the following list:
- I do not have Python installed on my computer
- I already have Python installed on my computer
If you do not have Python or Cantera installed on your computer, we recommend that you use Anaconda or Miniconda to install Python. Anaconda and Miniconda are Python distributions that include the cross-platform conda
package manager. This provides a consistent interface to install Python packages (including Cantera) whether you're running Windows, macOS, or Linux. The difference between Anaconda and Miniconda is that Anaconda includes a few hundred of the most commonly used Python packages in the installer along with Python and conda
, while Miniconda includes just Python and conda
. However, all the packages included with Anaconda are available to be installed within Miniconda.
Make sure to download the Python 3 version of the installer! Once you've installed Anaconda or Miniconda, open a terminal (on Linux or macOS) or the Anaconda Prompt (on Windows) and type
conda update -n base conda
If this updates your version of conda, restart your terminal so that changes to your environment can take effect. Then, follow the instructions directly below ("I installed Python with Anaconda or Miniconda") to install Cantera.
Great! Now, you need to get the materials for the workshop. Head to https://github.com/Cantera/ncm-2019-materials (you might already be reading this on that site) and find the "Clone or Download" button. If you have git installed on your computer, you can clone the repository. If you don't, or don't know what cloning means, don't worry! Click the green button, then click "Download ZIP", as shown in the picture below:
Once the zip file finishes downloading, unzip it and remember where the files are.
Open your terminal (Linux or macOS) or the Anaconda Prompt (Windows) and use the cd
command to change into the directory with the files you just cloned/unzipped. For instance, if you unzipped the files into your Downloads
folder, then the command will look like:
cd Downloads/ncm-2019-materials
Now you need to create a conda environment with all of the Python packages you will need. The repository has 3 OS-specific files to help conda do this, named env-osname.yml
. For instance, on Windows, you would type (in the same Anaconda Prompt or terminal window as before!)
conda env create -f env-windows.yml
The same command would apply for Linux or macOS, just substituting the osname
part of the .yml
file.
Finally, to run the files for the Workshop, in the same Anaconda Prompt or terminal window, activate the newly created environment and start a Jupyter notebook by typing
conda activate cantera-workshop
jupyter notebook
This should automatically open a page in your web browser that shows you the files for the Workshop. Go ahead and click the 01_cantera_basics.ipynb
file to open it. Then click the "Kernel" menu and select the "Restart & Run All" option to make sure that everything works properly!
Hooray! You're all set! See you on Sunday!
If you installed Python from https://python.org, you will need to follow the operating system-specific instructions for your platform. If you're on macOS, the instructions have you use Miniconda to install Cantera anyways, so you should head on up to the I do not have Python installed on my computer instructions.
If you're on Windows, we do have a separate installer for the python.org version of Python. Head over to the Cantera website and check out the appropriate instructions: Windows
Once you've got Cantera installed, you'll need to install a few other dependencies. Open a command prompt where you have access to pip
and type
pip install pandas matplotlib notebook
Great! Now, you need to get the materials for the workshop. Head to https://github.com/Cantera/ncm-2019-materials (you might already be reading this on that site) and find the "Clone or Download" button. If you have git installed on your computer, you can clone the repository. If you don't, or don't know what cloning means, don't worry! Click the green button, then click "Download ZIP", as shown in the picture below:
Once the zip file finishes downloading, unzip it and remember where the files are.
Open your command prompt and use the cd
command to change into the directory with the files you just cloned/unzipped. For instance, if you unzipped the files into your Downloads
folder, then the command will look like:
cd Downloads/ncm-2019-materials
Finally, to run the files for the Workshop, in the same Anaconda Prompt or terminal window, activate the newly created environment and start a Jupyter notebook by typing
conda activate cantera-workshop
jupyter notebook
This should automatically open a page in your web browser that shows you the files for the Workshop. Go ahead and click the 01_cantera_basics.ipynb
file to open it. Then click the "Kernel" menu and select the "Restart & Run All" option to make sure that everything works properly!
Hooray! You're all set! See you on Sunday!
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.