Skip to main content

ReacTorch: A Differentiable Reacting Flow Simulation Package in PyTorch

Documentation Status

ReacTorch is a package for simulating chemically reacting flows in PyTorch. The capability of auto-differentiation enables us to efficiently compute the derivatives of the solutions to all of the species concentrations (obtaining Jacobian matrix) as well as model parameters (performing sensitivity analysis) at almost no cost. It also natively supports GPU computation with PyTorch. In addition, the capability of differentiating the entire reacting model is the foundation of adopting many recent hybrid physics-neural network algorithms. This package is aimed at providing an easily accessible platform for implementing those emerging hardware and software infrastructures from the deep learning community in chemically reacting flow simulations.

In case you are wondering what is the relationshop between ReacTorch and Cantera/Chemkin.

Installation

git clone git@github.com:DENG-MIT/reactorch.git
cd reactorch
python setup.py install

Requirements

  • PyTorch
  • Cantera >= 2.5.0
  • ruamel.yaml

Detailed instructions on installing the dependent packages can be found in the wiki page.

Usage

import reactorch as rt

Sample code can be found in test/Solution_test.py and examples folder. For example, the autoignition case demonstrates that you can compute jacobian matrix with only couple lines of code!

Credit

If you use ReacTorch in a publication, we would appreciate if you cited ReacTorch. This helps to improve the reproducibility of your work, as well as giving credit to the many authors who have contributed their time to developing ReacTorch. The recommended citation for ReacTorch is as follows:

Weiqi Ji, Sili Deng. ReacTorch: A Differentiable Reacting Flow Simulation Package in PyTorch, https://github.com/DENG-MIT/reactorch, 2020.

ReacTorch was initially developed in Deng Energy and Nanotechnology Group lead by Prof. Sili Deng at MIT.

Metadata

Release files for reactorch 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reactorch 0.1.1
File Size Uploaded
reactorch-0.1.1.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for reactorch 0.1.1
File Interpreter ABI Platform
reactorch-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.1 kB

Release files / reactorch-0.1.1.tar.gz

Download URL reactorch-0.1.1.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
654f089fca9dc5f83b5089533a347cef659e59ee67ebda778c4a36e6d26b40c2
BLAKE2b-256 checksum
How to use checksums
6225a7e492e6ed63606b9088eabee409f9f67f1f78242e9226687113c454cb5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

Release files / reactorch-0.1.1-py3-none-any.whl

Download URL reactorch-0.1.1-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73d8400708fc9613cf42de552554855e547e1c73332507bc652119c103486dfe
BLAKE2b-256 checksum
How to use checksums
61224035147916c74b60bde91912f02a4a47a06e8665d6a428a25bdc9fe9911b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page