Skip to main content

Plasma modelling

1. A glimpse of plasma modelling

Computer modelling of plasmas spans, with increasing complexity, from ideal magnetohydrodynamic (MHD) models, where the whole plamsa is reduced to a single fluid equation coupled with the electromagnetic fields, to particle-in-cell (PIC) simulations, where the electron and ion dynamics are evolved using the Lorentz force and the electromagnetic fields are solved using the full set of Maxwell's equations.

In-between PIC and MHD there exist several levels of description for the plasma, among the more used in fusion and space plasmas can be mentioned: Gyrokinetic models, where the guiding center position of each particle is followed in space and time instead of solving the whole gyromotion of particles. Hybrid model for the plasma, where usually electrons are treated as a neutralizing massless fluid while ions are treated as kinetic particles, and occasionally some ion species may be treated as a fluid, too. Multi-fluid models for the plasma, where different plasma species (or different populations of the same species) are treated as interactic fluids coupled with electromagnetic fields. Depending on the chosen level of description there may exits electrostatic fields only or full electromagnetic fields.

In the figure below it is schematically shown the relation between the number of physical degrees of freedom needed to describe the plasma dynamics with the different levels of description mentioned above. Also, it is shown how time and length scales involved in these models increase when going from the kinetic theory towards fluid models.

Levels of description for the plasma

2. Studying ion effects in fusion and space plasma dynamics

Since PIC simulations are very computationally expensive, mainly because they solve the dynamics of each particle (several million particles per simulation) in an up to 6D phase space (depending of the dimensionality of the simulations), and generally are limited to short time and length scales, it becomes difficult (if not impossible nowadays) to perform PIC simulations to study the effect of ion dynamics in the plasma for long times. On the other hand, gyrokinetic simulations offer the opportunity to include ion effects which occur on longer timescales than the inverse of the ion gyro-frequency and spatial scales larger than the gyro-radius. However, sometimes people is interested precisely in phenomena occurring under those scales. Then, how full kinetic effects of ions can be taken into account without being frustrated by the constraints of computational cost?

3. The hybrid model for the plasma

As mentioned above, the hybrid model for the plasma treats ions as kinetic particles (in the same fashion than PIC simulations) whilst electrons are treated as a massless neutralizing fluid, which means that the computational cost is roughly halved. These hybrid models have been widely used in the past for studying space plasmas, and more recently to study instabilities driven by fusion-born ions in fusion plasmas.

A new 1D3V hybrid code has been developed using C++ as part of my PhD project. Among the features of the hybrid code, the most important are:

  • Fully modular structure. This means that you can plug and unplug code (C++ libraries) to include new diagnostics, initial conditions, and other effects as particle injection.
  • Parallelized using openMP + openMPI. This means, it is fast, real fast!
  • Optimized algebra libraries. Armadillo C++ is used to provide both, optimized methods of linear algebra and fast development of the code.
  • Easy and simple interphase. All the simulation is set up using two text files with few parameters. Why things should be complicated?
  • Standardized outputs. The code uses HDF5 files, which provides a compressed and structurated format compatible with Matlab and Python for post-processing purposes.
  • Equilibrium initial condition for a thermalized plasma. This default initial condition can be easily modified to include more complicated configurations of the plasma.
  • Documentation. A fair documentation is available for users and developers.

4. How take part in the development of the hybrid code?

We have created a repository on Bitbucket base on Git in order to allow parallel and independent development of the code. Once you modify the code you can include those changes to the main repository by doing a pull request. We encourage the developers to keep the modular scheme for the code, given that this brings great flexibility for further developments in the future.

In order to get a copy of the code you have to fill in THIS FORM. Once we receive your details we will email you an invitation to have access to the repository.

You might also be interested in