-
TORAX: A Fast and Differentiable Tokamak Transport Simulator in JAX
Authors:
Jonathan Citrin,
Ian Goodfellow,
Akhil Raju,
Jeremy Chen,
Jonas Degrave,
Craig Donner,
Federico Felici,
Philippe Hamel,
Andrea Huber,
Dmitry Nikulin,
David Pfau,
Brendan Tracey,
Martin Riedmiller,
Pushmeet Kohli
Abstract:
We present TORAX, a new, open-source, differentiable tokamak core transport simulator implemented in Python using the JAX framework. TORAX solves the coupled equations for ion heat transport, electron heat transport, particle transport, and current diffusion, incorporating modular physics-based and ML models. JAX's just-in-time compilation ensures fast runtimes, while its automatic differentiation…
▽ More
We present TORAX, a new, open-source, differentiable tokamak core transport simulator implemented in Python using the JAX framework. TORAX solves the coupled equations for ion heat transport, electron heat transport, particle transport, and current diffusion, incorporating modular physics-based and ML models. JAX's just-in-time compilation ensures fast runtimes, while its automatic differentiation capability enables gradient-based optimization workflows and simplifies the use of Jacobian-based PDE solvers. Coupling to ML-surrogates of physics models is greatly facilitated by JAX's intrinsic support for neural network development and inference. TORAX is verified against the established RAPTOR code, demonstrating agreement in simulated plasma profiles. TORAX provides a powerful and versatile tool for accelerating research in tokamak scenario modeling, pulse design, and control.
△ Less
Submitted 7 December, 2024; v1 submitted 10 June, 2024;
originally announced June 2024.
-
Towards practical reinforcement learning for tokamak magnetic control
Authors:
Brendan D. Tracey,
Andrea Michi,
Yuri Chervonyi,
Ian Davies,
Cosmin Paduraru,
Nevena Lazic,
Federico Felici,
Timo Ewalds,
Craig Donner,
Cristian Galperti,
Jonas Buchli,
Michael Neunert,
Andrea Huber,
Jonathan Evens,
Paula Kurylowicz,
Daniel J. Mankowitz,
Martin Riedmiller,
The TCV Team
Abstract:
Reinforcement learning (RL) has shown promising results for real-time control systems, including the domain of plasma magnetic control. However, there are still significant drawbacks compared to traditional feedback control approaches for magnetic confinement. In this work, we address key drawbacks of the RL method; achieving higher control accuracy for desired plasma properties, reducing the stea…
▽ More
Reinforcement learning (RL) has shown promising results for real-time control systems, including the domain of plasma magnetic control. However, there are still significant drawbacks compared to traditional feedback control approaches for magnetic confinement. In this work, we address key drawbacks of the RL method; achieving higher control accuracy for desired plasma properties, reducing the steady-state error, and decreasing the required time to learn new tasks. We build on top of \cite{degrave2022magnetic}, and present algorithmic improvements to the agent architecture and training procedure. We present simulation results that show up to 65\% improvement in shape accuracy, achieve substantial reduction in the long-term bias of the plasma current, and additionally reduce the training time required to learn new tasks by a factor of 3 or more. We present new experiments using the upgraded RL-based controllers on the TCV tokamak, which validate the simulation results achieved, and point the way towards routinely achieving accurate discharges using the RL approach.
△ Less
Submitted 5 October, 2023; v1 submitted 21 July, 2023;
originally announced July 2023.
-
Fast modeling of turbulent transport in fusion plasmas using neural networks
Authors:
Karel Lucas van de Plassche,
Jonathan Citrin,
Clarisse Bourdelle,
Yann Camenen,
Francis J. Casson,
Victor I. Dagnelie,
Federico Felici,
Aaron Ho,
Simon Van Mulders,
JET Contributors
Abstract:
We present an ultrafast neural network (NN) model, QLKNN, which predicts core tokamak transport heat and particle fluxes. QLKNN is a surrogate model based on a database of 300 million flux calculations of the quasilinear gyrokinetic transport model QuaLiKiz. The database covers a wide range of realistic tokamak core parameters. Physical features such as the existence of a critical gradient for the…
▽ More
We present an ultrafast neural network (NN) model, QLKNN, which predicts core tokamak transport heat and particle fluxes. QLKNN is a surrogate model based on a database of 300 million flux calculations of the quasilinear gyrokinetic transport model QuaLiKiz. The database covers a wide range of realistic tokamak core parameters. Physical features such as the existence of a critical gradient for the onset of turbulent transport were integrated into the neural network training methodology. We have coupled QLKNN to the tokamak modelling framework JINTRAC and rapid control-oriented tokamak transport solver RAPTOR. The coupled frameworks are demonstrated and validated through application to three JET shots covering a representative spread of H-mode operating space, predicting turbulent transport of energy and particles in the plasma core. JINTRAC-QLKNN and RAPTOR-QLKNN are able to accurately reproduce JINTRAC-QuaLiKiz T i,e and n e profiles, but 3 to 5 orders of magnitude faster. Simulations which take hours are reduced down to only a few tens of seconds. The discrepancy in the final source-driven predicted profiles between QLKNN and QuaLiKiz is on the order 1%-15%. Also the dynamic behaviour was well captured by QLKNN, with differences of only 4%-10% compared to JINTRAC-QuaLiKiz observed at mid-radius, for a study of density buildup following the L-H transition. Deployment of neural network surrogate models in multi-physics integrated tokamak modelling is a promising route towards enabling accurate and fast tokamak scenario optimization, Uncertainty Quantification, and control applications.
△ Less
Submitted 1 April, 2020; v1 submitted 13 November, 2019;
originally announced November 2019.
-
Classification of tokamak plasma confinement states with convolutional recurrent neural networks
Authors:
F. Matos,
V. Menkovski,
F. Felici,
A. Pau,
F. Jenko
Abstract:
During a tokamak discharge, the plasma can vary between different confinement regimes: Low (L), High (H) and, in some cases, a temporary (intermediate state), called Dithering (D). In addition, while the plasma is in H mode, Edge Localized Modes (ELMs) can occur. The automatic detection of changes between these states, and of ELMs, is important for tokamak operation. Motivated by this, and by rece…
▽ More
During a tokamak discharge, the plasma can vary between different confinement regimes: Low (L), High (H) and, in some cases, a temporary (intermediate state), called Dithering (D). In addition, while the plasma is in H mode, Edge Localized Modes (ELMs) can occur. The automatic detection of changes between these states, and of ELMs, is important for tokamak operation. Motivated by this, and by recent developments in Deep Learning (DL), we developed and compared two methods for automatic detection of the occurrence of L-D-H transitions and ELMs, applied on data from the TCV tokamak. These methods consist in a Convolutional Neural Network (CNN) and a Convolutional Long Short Term Memory Neural Network (Conv-LSTM). We measured our results with regards to ELMs using ROC curves and Youden's score index, and regarding state detection using Cohen's Kappa Index.
△ Less
Submitted 11 November, 2019;
originally announced November 2019.
-
A mimetic spectral element solver for the Grad-Shafranov equation
Authors:
Artur Palha,
Barry Koren,
Federico Felici
Abstract:
In this work we present a robust and accurate arbitrary order solver for the fixed-boundary plasma equilibria in toroidally axisymmetric geometries. To achieve this we apply the mimetic spectral element formulation presented in [56] to the solution of the Grad-Shafranov equation. This approach combines a finite volume discretization with the mixed finite element method. In this way the discrete di…
▽ More
In this work we present a robust and accurate arbitrary order solver for the fixed-boundary plasma equilibria in toroidally axisymmetric geometries. To achieve this we apply the mimetic spectral element formulation presented in [56] to the solution of the Grad-Shafranov equation. This approach combines a finite volume discretization with the mixed finite element method. In this way the discrete differential operators ($\nabla$, $\nabla\times$, $\nabla\cdot$) can be represented exactly and metric and all approximation errors are present in the constitutive relations. The result of this formulation is an arbitrary order method even on highly curved meshes. Additionally, the integral of the \reviewerone{toroidal current $J_φ$} is exactly equal to the boundary integral of the poloidal field over the plasma boundary. This property can play an important role in the coupling between equilibrium and transport solvers. The proposed solver is tested on a varied set of plasma cross-sections (smooth and with an X-point) and also for a wide range of pressure and \reviewertwo{toroidal magnetic flux profiles}. Equilibria accurate up to machine precision are obtained. Optimal algebraic convergence rates of order $(p+1)$ and geometric convergence rates are shown for Soloviev solutions (including high Shafranov shifts), field-reversed configuration (FRC) solutions and spheromak analytical solutions. The robustness of the method is demonstrated for non-linear test cases, in particular on an equilibrium solution with a pressure pedestal.
△ Less
Submitted 7 April, 2016; v1 submitted 18 December, 2015;
originally announced December 2015.
-
Measurement and comparison of individual external doses of high-school students living in Japan, France, Poland and Belarus -- the "D-shuttle" project --
Authors:
N. Adachi,
V. Adamovitch,
Y. Adjovi,
K. Aida,
H. Akamatsu,
S. Akiyama,
A. Akli,
A. Ando,
T. Andrault,
H. Antonietti,
S. Anzai,
G. Arkoun,
C. Avenoso,
D. Ayrault,
M. Banasiewicz,
M. Banaśkiewicz,
L. Bernandini,
E. Bernard,
E. Berthet,
M. Blanchard,
D. Boreyko,
K. Boros,
S. Charron,
P. Cornette,
K. Czerkas
, et al. (208 additional authors not shown)
Abstract:
Twelve high schools in Japan (of which six are in Fukushima Prefecture), four in France, eight in Poland and two in Belarus cooperated in the measurement and comparison of individual external doses in 2014. In total 216 high-school students and teachers participated in the study. Each participant wore an electronic personal dosimeter "D-shuttle" for two weeks, and kept a journal of his/her whereab…
▽ More
Twelve high schools in Japan (of which six are in Fukushima Prefecture), four in France, eight in Poland and two in Belarus cooperated in the measurement and comparison of individual external doses in 2014. In total 216 high-school students and teachers participated in the study. Each participant wore an electronic personal dosimeter "D-shuttle" for two weeks, and kept a journal of his/her whereabouts and activities. The distributions of annual external doses estimated for each region overlap with each other, demonstrating that the personal external individual doses in locations where residence is currently allowed in Fukushima Prefecture and in Belarus are well within the range of estimated annual doses due to the background radiation level of other regions/countries.
△ Less
Submitted 18 November, 2015; v1 submitted 21 June, 2015;
originally announced June 2015.
-
Real-time capable first principle based modelling of tokamak turbulent transport
Authors:
J. Citrin,
S. Breton,
F. Felici,
F. Imbeaux,
T. Aniel,
J. F. Artaud,
B. Baiocchi,
C. Bourdelle,
Y. Camenen,
J. Garcia
Abstract:
A real-time capable core turbulence tokamak transport model is developed. This model is constructed from the regularized nonlinear regression of quasilinear gyrokinetic transport code output. The regression is performed with a multilayer perceptron neural network. The transport code input for the neural network training set consists of five dimensions, and is limited to adiabatic electrons. The ne…
▽ More
A real-time capable core turbulence tokamak transport model is developed. This model is constructed from the regularized nonlinear regression of quasilinear gyrokinetic transport code output. The regression is performed with a multilayer perceptron neural network. The transport code input for the neural network training set consists of five dimensions, and is limited to adiabatic electrons. The neural network model successfully reproduces transport fluxes predicted by the original quasilinear model, while gaining five orders of magnitude in computation time. The model is implemented in a real-time capable tokamak simulator, and simulates a 300s ITER discharge in 10s. This proof-of-principle for regression based transport models anticipates a significant widening of input space dimensionality and physics realism for future training sets. This aims to provide unprecedented computational speed coupled with first-principle based physics for real-time control and integrated modelling applications.
△ Less
Submitted 15 June, 2015; v1 submitted 25 February, 2015;
originally announced February 2015.
-
Development and Validation of a Tokamak Skin Effect Transformer model
Authors:
J. A. Romero,
J. -M. Moret,
S. Coda,
F. Felici,
I. Garrido
Abstract:
A control oriented, lumped parameter model for the tokamak transformer including the slow flux penetration in the plasma (skin effect transformer model) is presented. The model does not require detailed or explicit information about plasma profiles or geometry. Instead, this information is lumped in system variables, parameters and inputs. The model has an exact mathematical structure built from e…
▽ More
A control oriented, lumped parameter model for the tokamak transformer including the slow flux penetration in the plasma (skin effect transformer model) is presented. The model does not require detailed or explicit information about plasma profiles or geometry. Instead, this information is lumped in system variables, parameters and inputs. The model has an exact mathematical structure built from energy and flux conservation theorems, predicting the evolution and non linear interaction of the plasma current and internal inductance as functions of the primary coil currents, plasma resistance, non-inductive current drive and the loop voltage at a specific location inside the plasma (equilibrium loop voltage). Loop voltage profile in the plasma is substituted by a three-point discretization, and ordinary differential equations are used to predict the equilibrium loop voltage as function of the boundary and resistive loop voltages. This provides a model for equilibrium loop voltage evolution, which is reminiscent of the skin effect. The order and parameters of this differential equation are determined empirically using system identification techniques. Fast plasma current modulation experiments with Random Binary Signals (RBS) have been conducted in the TCV tokamak to generate the required data for the analysis. Plasma current was modulated in Ohmic conditions between 200kA and 300kA with 30ms rise time, several times faster than its time constant L/R\approx200ms. The model explains the most salient features of the plasma current transients without requiring detailed or explicit information about resistivity profiles. This proves that lumped parameter modeling approach can be used to predict the time evolution of bulk plasma properties such as plasma inductance or current with reasonable accuracy; at least in Ohmic conditions without external heating and current drive sources.
△ Less
Submitted 5 January, 2012;
originally announced January 2012.