Search arXivSearch

arXiv · 2607.17363

ORB5X: a performance-portable global electromagnetic gyrokinetic PIC code in C++/Kokkos built using Agentic AI

Abstract

ORB5X is a C++17/Kokkos AI-assisted translation of ORB5, a global electromagnetic gyrokinetic particle-in-cell code for toroidal confined plasmas. The translation preserves the mathematical model and the main numerical algorithms of the Fortran implementation, i.e. a Lagrangian gyrokinetic formulation, marker-particle representation of the distribution functions, finite-element B-spline representation of the fields, Fourier filtering in the angular directions, MPI domain decomposition and cloning, and HDF5 diagnostic output. The main software change is the replacement of Fortran modules and allocatable arrays by typed C++ classes, structs, namespaces, and Kokkos Views and kernels for performance portability across multicore CPU and GPU backends. This paper summarizes the physical models, the numerical scheme, the distributed and shared-memory parallel design, the AI-assisted code translation workflow, and the validation path used to compare ORB5X against the original Fortran reference codebase. The initial tests for ITG, ITPA, and chirping show an agreement of almost machine accuracy between ORB5X and ORB5 for the electrostatic and electromagnetic field components. Furthermore, we demonstrate that with the modern CMake and Kokkos, ORB5X can be easily compiled and efficiently run on personal Linux and Mac laptops, as well as on high-performance computing clusters such as LUMI-G, Daint-ALPS, CINECA, and Discoverer.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Mohsen Sadr, Emmanuel Lanti, Alexey Mishchenko, Xin Wang, Laurent Villard. 2026-09-08. ORB5X: a performance-portable global electromagnetic gyrokinetic PIC code in C++/Kokkos built using Agentic AI. https://arxiv.org/abs/2607.17363

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