Search arXivSearch

arXiv · 2512.12160

JAX-in-Cell: A Differentiable Particle-in-Cell Code for Plasma Physics Applications

Abstract

JAX-in-Cell is a fully electromagnetic, multispecies, and relativistic 1D3V Particle-in-Cell (PIC) framework implemented entirely in JAX. It provides a modern, Python-based alternative to traditional PIC frameworks. It leverages Just-In-Time compilation and automatic vectorization to achieve the performance of traditional compiled codes on CPUs, GPUs, and TPUs. The resulting framework bridges the gap between educational scripts and production codes, providing a testbed for differentiable physics and AI integration that enables end-to-end gradient-based optimization. The code solves the Vlasov-Maxwell system on a staggered Yee lattice with either periodic, reflective, or absorbing boundary conditions, allowing both an explicit Boris solver and an implicit Crank-Nicolson method via Picard iteration to ensure energy conservation. Here, we detail the numerical methods employed, validate against standard benchmarks, and showcase the use of its auto-differentiation capabilities.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Longyu Ma, Rogerio Jorge, Hongke Lu, Aaron Tran, Christopher Woolford. 2025-12-13. JAX-in-Cell: A Differentiable Particle-in-Cell Code for Plasma Physics Applications. https://arxiv.org/abs/2512.12160

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Mechanism of Ionization Avalanche in Tokamak Microwave Gas Breakdown

Microwave breakdown driven by electron cyclotron (EC) waves provides a non-inductive route to plasma initiation in reactor-scale tokamaks. We introduce a three-dimensional Monte Carlo simulation that, for the first time, self-consistently treats nonlinear wave-particle interactions, atomic collisions, and guiding-center transport. The Monte Carlo simulation unveils the key role of parallel Brownian motion in the ionization avalanche mechanism. The predicted breakdown boundary is validated against KSTAR experiments. This work concludes that microwave gas breakdown will be successful under ITER-relevant conditions at a D$_2$ prefill pressure near 2 mPa with 1 MW of injected EC power.

physics.plasm-ph

Augmented reality system for visualising magnetic field topology and charged-particle trajectories in magnetic fusion plasmas

A cost-effective augmented reality (AR) system is presented for visualising three-dimensional magnetic field structures and charged-particle trajectories in magnetically confined fusion plasmas. The system presented in this study integrates an orbit-following simulation code with a marker-based AR framework using a web camera and the OpenCV library. By synchronizing the time step of the simulation with the frame rate of the camera, the trajectories are continuously updated and superimposed in real time onto the camera image. Through the interactive operation of manipulating the web camera, users can observe three-dimensional structures, such as magnetic islands, from various positions and viewing angles. Such an AR environment supports an interactive means of exploring three-dimensional spatial structures that can be difficult to interpret from two-dimensional representations alone. It also provides a common visual representation that can be shared through a display by researchers and students with diverse backgrounds in physics, engineering, and related fields. The developed system has been used in practical exercises at the JT-60SA International Fusion School, with exploratory feedback from students.

physics.plasm-ph

Sensitivity of a low-shear heliotron configuration to localised ferrite-steel perturbations

The influence of ferritic steel on low-shear stellarator/heliotron magnetic configurations is investigated for the Heliotron J device using a point dipole magnetisation model. By numerically evaluating ferritic steel plates assumed at several locations inside the Heliotron J vacuum vessel, the changes in the rotational transform and magnetic island width are shown to be sensitive to the installation location. This location sensitivity arises from the toroidal variation of poloidal mode coupling between the background nonaxisymmetric field and ferritic-steel perturbation, rather than being determined solely by the perturbation amplitude. The resulting mode coupling can enhance the resonant vacuum magnetic perturbation at specific locations. Ferritic steel plates placed on the outer side of a straight section produce the most significant changes in the magnetic topology and exhibit the highest sensitivity to violations of the $M=4$ toroidal periodicity. Additionally, we show that appropriate arrangements of passive magnetic dipoles can reduce the effective helical ripple while preserving the vacuum magnetic well depth in Heliotron J, and can induce a stellarator-asymmetric boundary perturbation in low-field experiments.

physics.plasm-ph