18 May 2023 in Journal of Computational Physics
11 September 2024 in Nuclear Fusion
A reduced model for trapped electron mode stability has been developed, which incorporates the basic effects of magnetic surface shaping, in particular, elongation and triangularity. This model shows that while elongation is stabilising, though weakly, negative triangularity usually leads to a more unstable plasma. This is in marked contrast with the experimental evidence of a better confinement at negative triangularity, and with recent gyrokinetic linear simulations. This paradox is solved when finite orbit and/or finite mode extent along field lines (mode ballooning) effects are included. These effects give more weight to particles trapped at low bounce angles, which are those that exhibit lower precession frequencies at negative—compared to positive—triangularity. As a result, the interchange growth rate becomes lower at negative triangularity and large temperature gradients, so that negative triangularity appears to have an overall stabilising effect. Mode ballooning appears to play the most important role in this reversal of stability.
29 May 2023 in Journal of Computational Physics
9 March 2023 in Journal of Open Source Software
The Python programming language has gained significant popularity in scientific computing and data science, mainly because it is easy to learn and provides many scientific libraries, including parallel ones. While these libraries are very fast, they are usually written in compiled languages such as Fortran and C/C++. User code written in pure Python is usually much slower; because Python is a dynamically typed language which introduces overhead in many basic operations. Due to this limitation, one often needs to rewrite the computational parts of their Python code in a statically typed language to take full advantage of optimization and acceleration techniques. This expensive process happens naturally during the transition from a prototype to a production code, which is the principal bottleneck in scientific computing. We believe that such a bottleneck can be resolved, or at least drastically reduced, through the use of automatic code generation tools. In this work we present Pyccel, a Python library which acts as a transpiler by translating Python code to either Fortran or C code, and as an accelerator by making the generated code callable from Python once again. Not only is the Pyccel-generated Fortran or C code very fast, but it is human-readable; hence an expert programmer can easily profile the code on the target machine and further optimize it. Pyccel provides a variety of methods for the efficient usage of the available hardware resources, such as type annotations, function decorators, and OpenMP pragmas. Moreover, Pyccel allows the user to link their code to external libraries written in the target language.
23 June 2022 in Physical Review Letters
In absence of external torque, plasma rotation in tokamaks results from a balance between collisional magnetic braking and turbulent drive. The outcome of this competition and cooperation is essential to determine the plasma flow. A reduced model, supported by gyrokinetic simulations, is first used to explain and quantify the competition only. The ripple amplitude above which magnetic drag overcomes turbulent viscosity is obtained. The synergetic impact of ripple on the turbulent toroidal Reynolds stress is explored. Simulations show that the main effect comes from an enhancement of the radial electric field shear by the ripple, which in turn impacts the residual stress.
9 September 2025 in Journal of Open Source Software
Gyselalib++ provides the mathematical building blocks to construct kinetic or gyrokinetic plasma simulation codes in C++, simulating a distribution function discretised in phase space on a fixed grid. It relies on the Discrete Domain Computation (DDC) library (Padioleau et al., 2025) to statically type the discretisation dimensions, thus preventing many common sources of errors. Via DDC, Gyselalib++ also leverages the Kokkos framework (Trott et al., 2022), ensuring performance portability across various CPU and GPU architectures. The library provides a variety of tools including semi-Lagrangian advection operators, quadrature rules, and solvers for elliptic and hyperbolic partial differential equations (PDEs). The majority of the operators are designed to work on non-orthonormal coordinate systems; those that don't use the static typing to raise compiler errors preventing their misuse.