In order to fulfill the increasing demand, alternative energy sources have to be developed. Indeed, the current rate of fossil fuel usage and its serious adverse environmental impacts (pollution, greenhouse gas emissions, ...) lead to an energy crisis accompanied by potentially disastrous global climate changes.

Controlled fusion power is one of the most promising
alternatives to the use of fossil resources, potentially
with a unlimited source of fuel. France with the ITER
(http://

The other route for fusion plasma is inertial confinement. In this latter case, large scale hydrodynamical instabilities prevent a sufficiently large energy deposit and lower the return of the target. Therefore, for both magnetic and inertial confinement technologies, the success of the projects is deeply linked to the theoretical understanding of plasma turbulence and flow instabilities as well as to mathematical and numerical improvements enabling the development of predictive simulation tools.

Castor gathers the activities in numerical simulation
of fusion plasmas with the activities in control and optimisation done in the laboratory
Jean-Alexandre Dieudonné of Université Côte d'Azur.
The main objective of the Castor team is to contribute
to the development of innovative numerical tools to improve
the computer simulations of complex turbulent or unstable flows in plasma physics and to develop
methods allowing the real-time control of these flows or the optimisation of scenarios of plasma discharges in tokamaks.
Castor is a common project between Inria (http://

The main reseach topics are:

The magnetic equilibrium in tokamaks results from a balance between the Lorentz force and the pressure gradient. Using Ampère law, a convenient description of this equilibrium is provided by the Grad-Shafranov equation. Of course, the magnetic equilibrium solution of the Grad-Shafranov equation is required to be stable. Actually any loss of MHD stability can lead to the end of the existence of the plasma, the so-called disruptions that can affect negatively the integrity of the machine. The primary goal of MHD (Magneto-Hydro-Dynamics) studies is therefore to determine the stability domain that constraints the operational range of the machine.

A secondary goal of MHD studies is to evaluate the consequences of possible disruptions in term of heat loads and stresses on the plasma facing components. In modern machines in the so-called H-mode some mild instabilities leading to a near oscillatory behavior are also known to exist. In particular, the so-called ELMs ( Edge Localized Modes) are of particular importance since they can have large effects on the plasma facing components. The control and understanding of these instabilities is therefore of crucial importance for the design of future machines as ITER. Unfortunately, ELM occur in the edge plasma and their modeling requires to take in account not only the intricate magnetic topology of this region where co-exist both open and closed field lines but also the existence of molecular and atomic processes involving neutrals.

At present, the linear theory of MHD stability is relatively well understood. However, the description of the non-linear behavior is far from being complete. As a consequence and due to the intrinsic difficulty of the subject, only a few numerical codes worldwide have been developed and validated for non linear MHD in tokamaks. One of these codes is the JOREK code developped since 2006 from a collaborative work between CEA-Cadarache (main developer), LABRI Bordeaux, LJAD-UCA and Inria. A comprehensive description of JOREK is given in 17

The magnetic equilibrium evolves in time due to diffusion processes on the slow resistive diffusive time scale and moreover it has to be monitored with active and passive control based on external coils, current drive, heating system, particle or pellets injections. This set of control mechanism has to be modeled and this is the goal of real time codes or global evolution codes.

In the same order of ideas, the steering and control of the plasma from the beginning to the end of the discharge require the research of optimal trajectories through the space of operational parameters. This is usually performed in an empirical way in present Tokamaks, but the complexity of the problem requires today the use of optimization techniques for processes governed by MHD and diffusion-type equations.

The edge region of the plasma is characterized by low temperature and density leading to an increase of the collision frequency that makes the edge plasma nearly collisional. This combined with the intricate magnetic topology of this region makes the development of kinetic codes adapted to the edge regions a real long term adventure. Consequently the fluid approach remains a standard one to study edge plasma turbulence. The use of optimal control theory to derive simplified models matching data either experimental or derived from direct numerical simulations is part of the objectives of the team.

The considerable diversity of long-lived magnetic fields observed in the Universe raises fundamental questions regarding their origin. Although it is now widely accepted that such fields are sustained by a dynamo instability in the electrically conducting fluid layers of astrophysical bodies, in most cases the very nature of the flow motions powering the dynamo is essentially unknown, and the conditions required for amplifying large-scale magnetic fields in non-convective stellar systems are poorly understood. We claim that optimal control represents a powerful tool to investigate the nonlinear stability of fully 3D, unsteady magnetohydrodynamic flows with respect to the dynamo instability. Nonlinear optimisation can be also used as a physical diagnostic to gain novel understanding of the mechanisms that are most favorable to dynamo action in a natural system.

The code NICE (Newton direct and Inverse Computation for Equilibrium) enables to solve numerically several problems of plasma free-boundary equilibrium computations in a tokamak: plasma free-boundary only reconstruction and magnetic measurements interpolation, full free-boundary equilibrium reconstruction from magnetic measurements and possibly internal measurements (interferometry, classical linear approximation polarimetry or Stokes model polarimety, Motional Stark Effect and pressure), direct and inverse, static and quasi-static free-boundary equilibrium computations.

NICE unifies and upgrades 3 former codes VacTH, EQUINOX and CEDRES++. The strength of NICE is to gather in a single finite element framework different equilibrium computation modes. It makes intensive use of Newton method and Sequential Quadratic Programming method to solve non linear problems.

NICE is used routinely for WEST tokamak operation. It is also adapted to the IMAS (ITER Modelling and Analysis Suite) format which makes it usable on many different fusion tokamak reactors.

In this document we give a general overview of the numerical methods implemented in NICE as well as a number of computation examples 7.

The numerical simulation of the equilibrium of the plasma in a tokamak as well as its self-consistent coupling with resistive diffusion should benefit from higher regularity of the approximation of the magnetic flux map. In this work, we propose a finite element approach on a triangular mesh of the poloidal section, that couples piece-wise linear finite elements in a region that does not contain the plasma and reduced Hsieh-Clough-Tocher finite elements elsewhere. This approach gives the flexibility to achieve easily and at low cost higher order regularity for the approximation of the flux function in the domain covered by the plasma, while preserving accurate meshing of the geometric details in the rest of the computational domain. The continuity of the numerical solution at the coupling interface is weakly enforced by mortar projection. A new technique for the computation of the geometrical coefficients is also presented (15)

This work is based on an unpublished paper: A weak formulation of current diffusion in tokamak plasmas by H. Heumann, former member of the team. First numerical tests are encouraging and the method needs now to be further tested and validated.

The brand-new RAPTOR suite of codes is here presented. The suite has been developed for the JET tokamak to combine real-time model-based predictions of the plasma state with the available diagnostic measurements. The suite embeds: the upgraded equilibrium reconstruction EQUINOX code, the FLUXMAP algorithm, which maps the diagnostic measurements from geometric to normalized magnetic flux coordinates; the RABBIT code for the NBI reconstruction and eventually RAPTOR state observer, which combines the output from all these codes with the predictions of 1D control-oriented transport code. The suite is both implemented in MATLAB/Simulink and it is being integrated in the C++ real-time MARTe2 framework. Thanks to its user-friendly interfaces, which are based on the MDSplus I/O and visualization tools, the RAPTOR suite can be used both offline, for a fast reconstruction of the plasma state, and in integrated control algorithms once it will be deployed in the JET real-time data network.

Started last year, the coupling between the free boundary equilibrium code and the fast transport solver Metis (CEA) has been improved. In particular new outputs have been implemented in Nice in order to implement a version of the worklow using mixed boundary conditions in the diffusion equation sovled by Metis. This new version of the workflow has been tested on an ITER test case.

In order to use this workflow in the ITER IMAS framework, the static, evolutive and inverse static mode of Nice have also been adapted to IMAS.

In this work, a local complete fully discrete de Rham sequence on polygonal and polyhedric elements has been defined, in collaboration with Daniele Di Pietro (Univ. Montpellier, France) and Jerome Droniou (Monash Univ., Australia) 6. In collaboration with Ana Alonso Rodriguez (Univ. Trento, Italy), the definition of the Lebesgue constant to the case of field interpolation by high-order Whitney forms on simplices has been generalized 4.

JOREK has been a useful numerical tool to simulate Magneto-hydrodynamic (MHD) instabilities with reduced-MHD models in tokamaks. One of the assumptions behind reduced-MHD model is remove fast magneto-sonic waves from the model. In full-MHD model, these fast magneto-sonic waves are retained and hence its implementation in JOREK is thought to offer a more complete physics modeling. Preliminary simulations for full-MHD models have been performed in Haverkort et al. (2016 JCP). Further advancement is made in the context of full-MHD to demonstrate the capabilities of full-MHD at production level in JOREK

13. Additionally, extended physics terms are implemented in full-MHD model. The simulations of full-MHD model are validated and compared with reduced-MHD models and benchmark is performed.

The contributions are made from the point of view of modeling (reduced and full-MHD) and numerical aspects to the extensive review paper 17. This review paper includes some representative results obtain using reduced-MHD model with a wide range of physical scenarios. The next task is to be able to simulate such physical scenarios using full-MHD model and compare them with results of reduced-MHD model.

For most MHD simulations, JOREK uses polar grids with a singularity at the grid-center. The C1 continuity achieved in Finite Element Method of JOREK is lost at center of polar grid. This singular grid-center is known to be a source of spurious nonphysical waves that can pollute the simulation or even crash it. The strategy is developed to achieve regularity at the polar grid-center that reduces the noise in numerical simulations significantly.

In realistic JOREK simulations, time steps maybe increased or reduced depending upon numerical requirements. The second order backward difference method (BDF2 or Gears) for time integration in JOREK was not adapted for changing time steps. The correction to adapt Gears method in JOREK for changing time-steps is now done.

Validation of the Variable Multi-scale Stabilized (VMS) method in JOREK is an ongoing task.

The shear shallow water model provides an approximation for shallow water flows by including the effect of vertical shear in the model. This model can be derived from the depth averaging process by including the second order velocity fluctuations, which are neglected in the classical shallow water approximation. The resulting model has a non-conservative structure, which resembles the 10-moment equations from gas dynamics. This structure facilitates the development of path conservative schemes and we construct HLL, 3-wave and 5-wave HLLC-type solvers. An explicit and semi-implicit MUSCL-Hancock type second order scheme is proposed for the time integration. Several test cases including roll waves show the performance of the proposed modeling and numerical strategy 5.

Ongoing work will derive an exact solution when approximated jump conditions are assumed.

This project consists in the development of a first adjoint-based optimisation code for fully nonlinear, 3D, unsteady MHD flows (governed by the fully nonlinear Navier-Stokes equations and induction equation, subject to solenoidal constraints on both the velocity and magnetic fields). This code is currently in development, and partially builds on the open-source framework Dedalus (dedalus-project.org) for spectrally solving PDEs. It is aimed at optimizing initial magnetic fields perturbations leading to maximal field amplification by a given target time, in a cylindrical Taylor-Couette flow. This optimisation will be used as an intermediate step toward performing nonlinear stability analysis of the considered flow with respect to the dynamo instability, a study which we anticipate will be transposable to various kinds of MHD instabilities and geometries in the future (e.g. possible long-term application to the ELMs instabilities in fusion devices). The direct and adjoint solvers of the developed code have been validated and various optimization algorithms are currently being tested.

Temperature or chemical composition gradients play an important role in the dynamics of astrophysical plasmas. They are also associated with considerable spatial variations of the electrical conductivity, which are likely to impact on the development of magnetohydrodynamic instablities and the generation of long-lived astrophysical magnetic fields. This numerical study shows that finite-amplitude conductivity variations (with an amplitude of the same order as the mean value) can significantly lower the kinematic threshold for dynamo instability, allowing for large-scale magnetic fields to be exponentially amplified in a parameter regime where they would be entirely dissipated away otherwise. This work relies on a staggered-grid, semi-implicit, finite-differences solver for kinematic induction in 3D cylindrical geometry developed by F.Marcotte, and is to be submitted to Europhysics Letters in the weeks to come.

This work is a collaboration with Ludovic Petitdemange (LERMA, Observatoire de Paris) and Christophe Gissinger (Ecole Normale Supérieure, Paris).

Understanding the conditions of magnetic field generation in radiative (stably-stratified) stars is a long-lasting challenge, which has important implication for the reconstruction of stellar rotation profiles and evolution. So far, the only models that have been considered to parametrize the effect of magnetism in available stellar evolution codes are either fossil magnetic fields or Tayler-Spruit dynamo fields. Yet, direct numerical simulations have consistently failed so far in exhibiting Tayler-Spruit dynamos, or in fact any type of dynamo mechanism that could operate in a stratified, hydrodynamically stable stellar layer. We numerically demonstrate how a dynamo instability can build up and trigger MHD turbulence in a radiative star, and show that the dynamo mechanism actually bears striking similarities with the elusive Tayler-Spruit model. A first article is to be submitted soon; a second article is in preparation to present a parametric study of the dynamo transition in the presence of stable temperature stratification.

Non linear MHD simulations for tokamaks are now mature enough to be used for control, optimization or data assimilation purposes. The use of these tool can largely benefit from the possibility to compute gradients of the results of the simulations with respect to initial data or parameters. In collaboration with the ECUADOR team, we have begun to test the use of the automatic differentiation tool TAPENADE 16 to obtain the adjoint code of a reduced MHD model.

To participate in the answers to the pandemic issues, researchers from Inria and the French Aerospace Lab ONERA have conducted a joint project to assess the relevance of the advices for social distancing. Numerical simulations of airborne droplet dispersion have been realized and analyzed with sensitivity analysis tools. It was found that the variability of the results depends on a number of factors, including: physical variables (e.g. droplet size, ejection velocity), modelling methods used (e.g. turbulence model) and numerical aspects (mesh)

12The team collaborates with TUC (Technical University of Crete, Prof. Argyris Delis) on the modelling of acoustic streaming phenomena and the simulation of fast flood events.

Stanislas Pamela from UKAEA (UK Atomic Energy Authority) visited the team in January. The collaboration was centered on the development of the JOREK code.

CASTOR participates to the following EuroFusion consortium projects :

Member of the ANR SISTEM , Oct. 2019 - Sept. 2023 coordinated by the M2P2 Institute of Aix-Marseille Univ. "SImulations with high-order schemes of tranSport and TurbulencE in tokaMak" programme Modeles numeriques 2019, Contact : Francesca Rapetti

"Graines minimales de dynamos célestes" May 2020-2022, PI : Florence Marcotte.

F. Marcotte: Seminar in Rendez-vous des Jeunes Mathématiciennes et Informaticiennes, Nice, December 5th 2020, organized by Université Côte d’Azur, Animath, and Femmes & Mathémathiques