Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
/ cantera-jupyter Public archive

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

🚨 This repository is obsolete! 🚨

Starting with 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 version of Cantera at https://cantera.org/stable/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 (https://github.com/Cantera/cantera).

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