Skip to content

Cantera examples in the form of Jupyter notebooks

License

Notifications You must be signed in to change notification settings

Cantera/cantera-jupyter

Repository files navigation

cantera-jupyter

Cantera examples in the form of Jupyter notebooks. To see the rendered notebooks, browse the directories above or visit the links in the list of examples below. If you want to execute the examples on your own computer, please see the installation instructions below. If you would only like to run the examples in the cloud, click the MyBinder link below (note that your changes on MyBinder won't be saved unless you download the changed files from there).

MyBinder

🚨 This repository is deprecated 🚨

While the examples here are still valid for Cantera 3.0, for Cantera 3.1, all of these examples have been migrated into the main repository as pure Python scripts that are then rendered by Sphinx Gallery. You can see the gallery of Python examples for the current development version of Cantera at https://cantera.org/dev/examples/python/index.html.

If you would like to contribute a new Cantera example, please write it as a pure Python example like those in https://github.com/Cantera/cantera/tree/main/samples/python and open a Pull Request to the main Cantera repository. This repository will be archived after the release of Cantera 3.1.

Examples


Freely Propagating Flame

Strained Flames

Continuous Stirred Tank Reactor

Batch Reactor

Li+ Battery OCV Calculation

Installation Instructions

1. Install Cantera

If you don't already have Cantera installed, refer to the instructions on the Cantera website.

2. Install Jupyter Notebook

If you used Conda to install Cantera (the recommended method), you will need to install Jupyter Lab into the same environment where you installed Cantera.

  1. Activate the environment with the Cantera package (called cantera here):

    conda activate cantera
  2. Install Jupyter Notebook into that environment

    conda install jupyterlab
  3. Run Jupyter Lab, which will open a browser window

    jupyter lab

Otherwise, use pip to install the Jupyter Notebook:

python -m pip install jupyterlab

3. Download the Cantera Jupyter Examples

Option 1: Download the zip file from GitHub and extract it to a convenient location on your computer.

Option 2: Use Git to clone this repository to a convenient location on your computer

git clone https://github.com/Cantera/cantera-jupyter.git

Code of Conduct

This repository follows the same code of conduct as the main Cantera repository. Cantera adheres to a code of conduct adapted from the Contributor Covenant code of conduct.

Frequently Asked Questions

How do I use Cantera with Python?

An introduction to the Cantera Python interface is available here. For more advanced uses of Cantera, the complete documentation can be found here.

Can I forgo installing Cantera locally and just use Cantera in the cloud every time?

The problem with using Cantera with MyBinder is that there is no way for you to save your work. You can upload/download files in a session, but once the session is over (you close your browser window), you lose all your work. You thus cannot save your modified Jupyter notebooks.

I still can't figure something out. Who do I ask?

If you have more questions, need help with something, or have any suggestions, please visit the Cantera Google Groups Page and create a post.

About

Cantera examples in the form of Jupyter notebooks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published