SearcharxivSearch

arXiv subjects

Laurent Villard

Publications and source records attributed to Laurent Villard.

18 recordsLinked to original sources

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

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.

physics.plasm-ph

Verification of the PICLS electromagnetic upgrade in mixed variables

The gyrokinetic particle-in-cell code PICLS is a full-f finite element tool to simulate turbulence in the tokamak scrape-off layer. During the previous year, the capability of PICLS was extended to encompass electromagnetic effects. Successful tests using the method of manufactured solutions were conducted on the freshly added Ampère's-law-solver, and shear Alfvén waves were simulated to verify the new electromagnetic time step. However, as a code based on the $p_{||}$-formulation of the gyrokinetic equations, PICLS is affected by the Ampère-cancellation problem. In order to bring higher-beta simulations within reach of our computational capacity, we implemented the mixed-variable formulation with pullback-scheme in a similar fashion to, e.g., EUTERPE, ORB5, or XGC. Here, we present the successful verification of the different electromagnetic formulations of PICLS by simulating shear-Alfvén waves in a test setup designed to minimize kinetic effects.

physics.plasm-ph

Global electromagnetic gyrokinetic simulations of internal transport barriers in reversed-shear tokamaks

This work aims at improving our understanding of the conditions enabling the development of an Internal transport barriers (ITB), using a more comprehensive physical model, including low-$β$ electromagnetic flux-driven simulations. Our key findings are that electron dynamics is crucial for ITB formation even in an ITG scenario and that having $q_{\text{min}}$ close to a lowest order rational value (2 in our simulations) to allow for eddies self-interaction is a necessary ingredient. Electron dynamics has two critical effects. First, it leads to a structure formation characterized by strong zonal flows shearing rate, reduction of turbulence and profile corrugation. Second, it leads to zonal current sheets that result in a broadening of the minimum-q region, qualitatively consistent with the flux-tube simulations of Volčokas et al. [1]. Flux-driven simulations performed with $q_{\text{min}}=2$ reveal the development of the transport barrier in the ion channel, forming at inner and outer radial positions with respect to the $q_{\text{min}}$ position. The ITB formation in flux-driven setup is not recovered if $q_{\text{min}} = 2.03$. Additionally, a simulation at higher $ρ^*$ indicates that the extent of the flattened region of the q-profile due to turbulent self-interaction does not change proportionally to $ρ^*$ or to $ρ_i$, but somewhere in between. On the other hand, the input power required to achieve similar on-axis temperatures appears to exhibit almost GyroBohm scaling (for the two considered $ρ^*$ values). Furthermore, considering an initial q-profile with $q_{\text{min}} = 2.01$, flux-driven simulations show that partial self-interaction can evolve to complete self-interaction. This occurs due to turbulent-driven zonal currents that lower and flatten the q-profile down to $q_{\text{min}} = 2.0$, in line with what is reported in Volčokas et al.[1].

physics.plasm-ph

Particle-in-cell methods in edge plasma physics: the PICLS code

Over the past decades, multiple gyrokinetic codes have shown to be able to simulate turbulence and associated transport in the core of Tokamak devices. However, their application to the edge and scrape-off layer (SOL) region presents significant challenges. To date, only few codes and models have been adapted to SOL/edge conditions. To further study the SOL region in particular, with its steep temperature and density gradients as well as large fluctuation amplitudes, the full-f particle-in-cell code PICLS has been developed. PICLS is based on a full-f gyrokinetic model with linearised field equations, considers kinetic electrons and uses logical sheath boundary conditions. In the past, PICLS was verified by applying it to a well-studied 1D parallel transport problem during an edge-localized mode in the SOL under both collisionless and collisional conditions, for which a Lenard-Bernstein collision operator was implemented. PICLS recently was extended towards three spatial dimensions to study turbulence in open-field-line regions in slab and closed-field-line toroidal geometries. In this work, we will focus on the models and methods we used for extending the code towards three spatial dimensions, including validation efforts and comparisons with other existing codes in closed-field-line geometry

physics.plasm-ph

Gyrokinetic flux-driven simulations in mixed TEM/ITG regime using a delta-f PIC scheme with evolving background

In the context of global gyrokinetic simulations of turbulence using a Particle-In-Cell framework, verifying the delta-f assumption with a fixed background distribution becomes challenging when determining quasi-steady state profiles corresponding to given sources over long time scales, where plasma profiles can evolve significantly. The advantage of low relative sampling noise afforded by the delta-f scheme is shown to be retained by considering the background as a time-evolving Maxwellian with time-dependent density and temperature profiles. Implementation of this adaptive scheme to simulate electrostatic collisionless flux-driven turbulence in tokamak plasmas show small and non-increasing sampling noise levels, which would otherwise increase indefinitely with a stationary background scheme. The adaptive scheme furthermore allows one to reach numerically converged results of quasi-steady state with much lower marker numbers.

physics.plasm-ph

System size scaling of triangularity effects on global temperature gradient-driven gyrokinetic simulations

In this work, we explore the triangularity effects on turbulent transport employing global gyrokinetic simulations performed with the ORB5 code. Numerous experiments on the Tokamak à Configuration Variable (TCV) and, more recently, on the DIII-D machine, have demonstrated superior confinement properties in L-mode of negative triangularity (NT) over positive triangularity (PT) configuration. This presents a particularly attractive scenario, as L-mode operation eliminates or significantly mitigates the presence of hazardous edge-localized modes (ELMs). However, a full theoretical understanding of all these observations remains elusive. Specifically, questions remain about how NT improvements can extend to the core where triangularity is very small, and whether these improvements can scale to larger devices. This paper addresses these two questions. Our analysis is divided into two parts: we first demonstrate that the confinement enhancement in NT configurations arises from the interdependent edge-core dynamics, and then we present the results of a system size scan. Crucially, we find that the relative turbulent transport reduction of NT over PT appears not to be contingent on machine dimensions or fluctuation scales and is moreover robust with respect to variations in plasma profiles. This insight underscores the fundamental nature of the NT confinement advantage and paves the way for its potential application in future fusion devices, regardless of their size.

physics.plasm-ph

Ion temperature gradient mode mitigation by energetic particles, mediated by forced-driven zonal flows

In this work, we use the global electromagnetic and electrostatic gyro kinetic approaches to investigate the effects of zonal flows forced-driven by Alfvén modes due to their excitation by energetic particles (EPs), on the dynamics of ITG (Ion temperature gradient) instabilities. The equilibrium of the 92416 JET tokamak shot is considered. The linear and nonlinear Alfvén modes dynamics, as well as the zonal flow dynamics, are investigated and their respective radial structures and saturation levels are reported. ITG dynamics in the presence of the zonal flows excited by these Alfvén modes are also investigated. We find that, the zonal flows forced-driven by Alfvén modes can significantly impact the ITG dynamics. A zonal flow amplitude scan reveals the existence of an inverse relation between the zonal flow amplitude and the ITG growth rate. These results show that, forced-driven zonal flows can be an important indirect part of turbulence mitigation due to the injection of energetic particles.

physics.plasm-ph

Verification of the Fourier-enhanced 3D finite element Poisson solver of the gyrokinetic full-f code PICLS

We introduce and derive the Fourier-enhanced 3D electrostatic field solver of the gyrokinetic full-f PIC code PICLS. The solver makes use of a Fourier representation in one periodic direction of the domain to make the solving of the system easily parallelizable and thus save run time. The presented solver is then verified using two different approaches of manufactured solutions. The test setup used for this effort is a pinch geometry with ITG-like electric potential, containing one non-periodic and two periodic directions, one of which will be discrete Fourier transformed. The results of these tests show that in all three dimensions the L2-error decreases with a constant rate close to the ideal prediction, depending on the degree of the chosen basis functions.

physics.plasm-ph

Gyrokinetic simulations of turbulence and zonal flows driven by steep profile gradients using a delta-f approach with an evolving background Maxwellian

Long global gyrokinetic turbulence simulations are particularly challenging in situations where the system deviates strongly from its initial state and when fluctuation level are high e.g. in strong gradient regions. For Particle-in-Cell simulations, statistical sampling noise accumulation from large marker weights due to large deviations from the control variate of a delta-f scheme make such simulations often impractical. An adaptive control variate in the form of a flux-surface-averaged Maxwellian with a time-dependent temperature profile is introduced in an attempt to alleviate the former problem. Under simplified collisionless physics, this adaptive delta-f scheme is shown to reduce noise accumulation in the zonal flows and the simulated heat flux in a quasi-steady turbulent state. The method also avoids the collapse of the signal-to-noise ratio which occurs in the standard non-adaptive scheme, and therefore, allows one to reach numerically converged results even with lower marker numbers.

physics.plasm-ph

Linear and nonlinear excitation of TAE modes by external electromagnetic perturbations using ORB5

The excitation of toroidicity induced Alfv{é}n eigenmodes (TAEs) using prescribed external electromagnetic perturbations (hereafter ``antenna") acting on a confined toroidal plasma as well as its nonlinear couplings to other modes in the system is studied. The antenna is described by an electrostatic potential resembling the target TAE mode structure along with its corresponding parallel electromagnetic potential computed from Ohm's law. Numerically stable long-time linear simulations are achieved by integrating the antenna within the framework of a mixed representation and pullback scheme [A. Mishchenko, et al., Comput. Phys. Commun. \textbf{238} (2019) 194]. By decomposing the plasma electromagnetic potential into symplectic and Hamiltonian parts and using Ohm's law, the destabilizing contribution of the potential gradient parallel to the magnetic field is canceled in the equations of motion. Besides evaluating the frequencies as well as growth/damping rates of excited modes compared to referenced TAEs, we study the interaction of antenna-driven modes with fast particles and indicate their margins of instability. Furthermore, we show first nonlinear simulations in the presence of a TAE-like antenna exciting other TAE modes, as well as Global Alfvén Eigenmodes (GAE) having different toroidal wave numbers from that of the antenna.

physics.plasm-ph

Numerics and computation in gyrokinetic simulations of electromagnetic turbulence with global particle-in-cell codes

Electromagnetic turbulence is addressed in tokamak and stellarator plasmas with the global gyrokinetic particle-in-cell codes ORB5 [E. Lanti et al, Comp. Phys. Comm, vol. 251, 107072 (2020)] and EUTERPE [V. Kornilov et al, Phys. Plasmas, vol. 11, 3196 (2004)]. The large-aspect-ratio tokamak, down-scaled ITER, and Wendelstein 7-X geometries are considered. The main goal is to increase the plasma beta, the machine size, the ion-to-electron mass ratio, as well as to include realistic-geometry features in such simulations. The associated numerical requirements and the computational cost for the cases on computer systems with massive GPU deployments are investigated. These are necessary steps to enable electromagnetic turbulence simulations in future reactor plasmas.

physics.plasm-ph

Optimised allgatherv, reduce_scatter and allreduce communication in message-passing systems

Collective communications, namely the patterns allgatherv, reduce_scatter, and allreduce in message-passing systems are optimised based on measurements at the installation time of the library. The algorithms used are set up in an initialisation phase of the communication, similar to the method used in so-called persistent collective communication introduced in the literature. For allgatherv and reduce_scatter the existing algorithms, recursive multiply/divide and cyclic shift (Bruck's algorithm) are applied with a flexible number of communication ports per node. The algorithms for equal message sizes are used with non-equal message sizes together with a heuristic for rank reordering. The two communication patterns are applied in a plasma physics application that uses a specialised matrix-vector multiplication. For the allreduce pattern the cyclic shift algorithm is applied with a prefix operation. The data is gathered and scattered by the cores within the node and the communication algorithms are applied across the nodes. In general our routines outperform the non-persistent counterparts in established MPI libraries by up to one order of magnitude or show equal performance, with a few exceptions of number of nodes and message sizes.

cs.DC

Gyrokinetic Simulations on Many- and Multi-core Architectures with the Global Electromagnetic Particle-In-Cell Code ORB5

Gyrokinetic codes in plasma physics need outstanding computational resources to solve increasingly complex problems, requiring the effective exploitation of cutting-edge HPC architectures. This paper focuses on the enabling of ORB5, a state-of-the-art, first-principles-based gyrokinetic code, on modern parallel hybrid multi-core, multi-GPU systems. ORB5 is a Lagrangian, Particle-In-Cell (PIC), finite element, global, electromagnetic code, originally implementing distributed parallelism through MPI-based on domain decomposition and domain cloning. In order to support multi/many cores devices, the code has been completely refactored. Data structures have been re-designed to ensure efficient memory access, enhancing data locality. Multi-threading has been introduced through OpenMP on the CPU and adopting OpenACC to support GPU acceleration. MPI can still be used in combination with the two approaches. The performance results obtained using the full production ORB5 code on the Summit system at ORNL, on Piz Daint at CSCS and on the Marconi system at CINECA are presented, showing the effectiveness and performance portability of the adopted solutions: the same source code version was used to produce all results on all architectures.

physics.comp-ph

First principles gyrokinetic analysis of electromagnetic plasma instabilities

A two-fold analysis of electromagnetic core tokamak instabilities in the framework of the gyrokinetic theory is presented. First principle theoretical foundations of the gyrokinetic theory are used to explain and justify the numerical results obtained with the global electromagnetic particle-in-cell code Orb5 whose model is derived from the Lagrangian formalism. The energy conservation law corresponding to the Orb5 model is derived from the Noether theorem and implemented in the code as a diagnostics for energy balance and conservation verification. An additional Noether theorem based diagnostics is implemented in order to analyse destabilising mechanisms for the electrostatic and the electromagnetic Ion Temperature Gradient (ITG) instabilities in the core region of the tokamak. The transition towards the Kinetic Ballooning Modes (KBM) at high electromagnetic $β$ is also investigated.

physics.plasm-ph

Implementation of energy transfer technique in ORB5 to study collisionless wave-particle interactions in phase-space

A new diagnostic has been developed to investigate the wave-particle interaction in the phase-space in gyrokinetic particle-in-cell codes. Based on the projection of energy transfer terms onto the velocity space, the technique has been implemented and tested in the global code ORB5 and it gives an opportunity to localise velocity domains of maximum wave-plasma energy exchange for separate species. Moreover, contribution of different species and resonances can be estimated as well, by integrating the energy transfer terms in corresponding velocity domains. This Mode-Plasma-Resonance (MPR) diagnostic has been applied to study the dynamics of the Energetic-particle-induced Geodesic Acoustic Modes (EGAMs) in an ASDEX Upgrade shot, by analysing the influence of different species on the mode time evolution. Since the equations on which the diagnostic is based, are valid in both linear and nonlinear cases, this approach can be applied to study nonlinear plasma effects. As a possible future application, the technique can be used, for instance, to investigate the nonlinear EGAM frequency chirping, or the plasma heating due to the damping of the EGAMs.

physics.plasm-ph

Pullback scheme implementation in ORB5

The pullback scheme is implemented in the global gyrokinetic particle-in-cell code ORB5 [S. Jolliet et al, Comp. Phys. Comm., 177, 409 (2007)] to mitigate the cancellation problem in electromagnetic simulations. The equations and the discretisation used by the code are described. Numerical simulations of the Toroidal Alfven Eigenmodes are performed in linear and nonlinear regimes to verify the scheme. A considerable improvement in the code efficiency is observed. For the internal kink mode, it is shown that the pullback mitigation efficiently cures a numerical instability which would make the simulation more costly otherwise.

physics.plasm-ph

Verification of Gyrokinetic codes: theoretical background and applications

In fusion plasmas the strong magnetic field allows the fast gyro-motion to be systematically removed from the description of the dynamics, resulting in a considerable model simplification and gain of computational time. Nowadays, the gyrokinetic (GK) codes play a major role in the understanding of the development and the saturation of turbulence and in the prediction of the subsequent transport. Naturally, these codes require thorough verification and validation. Here we present a new and generic theoretical framework and specific numerical applications to test the faithfulness of the implemented models to theory and to verify the domain of applicability of existing GK codes. For a sound verification process, the underlying theoretical GK model and the numerical scheme must be considered at the same time, which has rarely been done and therefore makes this approach pioneering. At the analytical level, the main novelty consists in using advanced mathematical tools such as variational formulation of dynamics for systematization of basic GK code's equations to access the limits of their applicability. The verification of numerical scheme is proposed via the benchmark effort. In this work, specific examples of code verification are presented for two GK codes: the multi-species electromagnetic ORB5 (PIC) and the radially global version of GENE (Eulerian). The proposed methodology can be applied to any existing GK code. We establish a hierarchy of reduced GK Vlasov-Maxwell equations implemented in the ORB5 and GENE codes using the Lagrangian variational formulation. At the computational level, detailed verifications of global electromagnetic test cases developed from the CYCLONE Base Case are considered, including a parametric $β$-scan covering the transition from ITG to KBM and the spectral properties at the nominal $β$ value.

physics.plasm-ph

Locality properties of the free energy fluxes in gyrokinetic turbulence

The nature of the nonlinear interactions in gyrokinetic (GK) turbulence, driven by an ion-temperature gradient instability, is investigated using numerical simulations of single ion species plasma in three-dimensional flux tube geometry. To account for the level of separation existing between scales involved in an energetic interaction, the degree of locality of the free energy scale flux is analyzed employing Kraichnan's infrared (IR) and ultraviolet locality functions. Due to the nontrivial dissipative nature of GK turbulence, an asymptotic level for the locality exponents, indicative of a universal dynamical regime for GK's, is not recovered and an accentuated non-local behavior of the IR interactions is found instead, in spite of the local energy cascade observed.

physics.plasm-ph