Reactix

Simulating 1-D reactive transport with differentiable models in JAX

Reactix is a Python package for simulating reactive transport of chemical species suitable for one-dimensional systems with advection, dispersion and kinetic reactions.

Reaction kinetics can be defined flexibly in plain Python. The package combines a finite volume discretization in space with advanced ODE solvers from diffrax for efficient time integration.

Reactix is built on the JAX ecosystem which provides automatic differentiation, making the models fully differentiable. This enables the use of gradient-based methods for sensitivity analysis and uncertainty quantification. The package integrates seamlessly with PyMC for Bayesian modeling and parameter estimation.

What Reactix is for

Use Reactix when you:

  • want to easily implement models with custom reaction kinetics,
  • can reasonably simplify the system to one spatial dimension (e.g., column experiment, groundwater transport along a flow line),
  • want to quantify parameter uncertainty with Bayesian methods,
  • like to script your model in Python instead of using graphical interfaces or input files.

Reactix might not be the right choice if…

  • your model needs to be 2-D or 3-D,
  • the system involves a lot of equilibrium chemical reactions (like in PHREEQC),
  • you want to couple groundwater flow and transport simulations.

Main components

The library is organized around three concepts: a transport system, chemical species, and reactions. All components are documented in the API reference.

Start here

  1. Go to Installation to set up Reactix.
  2. Continue to Quickstart for a brief introduction to Reactix.
  3. Browse Examples for longer workflows.
  4. Use the API reference for the full docstring-based reference.
  5. Check out the Developer Guide and Contributing if you want to contribute to the project.
Back to top