Skip to content

A Differentiable Reacting Flow Simulation Package powered by PyTorch

License

Notifications You must be signed in to change notification settings

jiweiqi/reactorch

 
 

Repository files navigation

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 [email protected]: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.

About

A Differentiable Reacting Flow Simulation Package powered by PyTorch

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 87.4%
  • Jupyter Notebook 12.6%