google-deepmind/torax

TORAX: Tokamak transport simulation in JAX

What it solves

TORAX is a simulator designed to model the core transport of plasma within a tokamak, the device used in fusion energy research. It helps scientists perform fast forward modeling, pulse design, trajectory optimization, and controller design by providing a highly efficient, differentiable environment for these complex physics calculations.

How it works

Built using Python and JAX, TORAX leverages automatic differentiation to solve nonlinear partial differential equations (PDEs) quickly and accurately. Because it is differentiable, the simulator can calculate how sensitive its results are to different input parameters without needing manual derivation. This makes it easy to integrate machine learning surrogates, optimize trajectories, and identify parameters for semi-empirical models. It handles various physical processes—such as heat transport, current diffusion, and impurity radiation—using multiple solver options, including Newton-Raphson and optimization-based approaches.

Who it’s for

TORAX is intended for fusion researchers and engineers who need a fast, extensible, and modern simulation tool. It is particularly useful for those working on pulse design or controller development who want to incorporate machine learning models or perform gradient-based optimization within their physics workflows.

Highlights

  • Differentiable architecture allows for gradient-based optimization and sensitivity analysis.
  • Built-in support for machine learning surrogates, including QLKNN models for turbulent transport.
  • Flexible geometry support, allowing for the use of various equilibrium file formats.
  • High-performance execution via JAX compilation, with persistent caching to reduce runtime.
  • Verified against established tokamak simulators like RAPTOR.

Related

  • Project
  • Project
  • Project
  • Project
  • Project