CAMELIA

CAMELIA (Current Advance Method Et cycLIc leApfrog) is a hybrid kinetic code where electrons are considered as a massless, charge neutralizing fluid, whereas ions are described by a particle-in-cell model and are advanced by the Boris scheme that requires the fields to be known at half time steps ahead of the particle velocities. This is achieved by advancing the current density to this time step with only one computational pass through the particle data at each time step. The code is based on the Current Advance Method and Cyclic Leapfrog (CAM-CL) code of Matthews (1994). The code is written in Fortran 77 (+extensions of Fortran 95). There are 1-D, 2-D, and 3-D versions of the code. The different versions of the code are parallelized via MPI using spatial and/or particle decompositions; the spatial decomposition could be in all spatial directions. A hybrid openMP/MPI parallelization is being tested (Marconi, Cineca supercomputing centre). The output files can be simple ASCII, binary or HDF5 files, including parallel binary (MPI-IO) and HDF5 outputs. The boundary conditions could be periodic in all directions; alternatively, in the x direction there could be reflecting boundary conditions on one side and open boundary conditions with a continuous injection of particles on the other side (for generation of shock waves).

Numerical scheme

Fields are defined a grid, the magnetic field B and the ion moments are on the main grid, (ixΔx, iyΔy, izΔz) (Δx, ...: the spatial resolution) whereas the electric field E is on the interlaced grid (ixΔx+Δx/2,...). As electrons are assumed as charge-neutralizing massless fluids, the electric field is a function of the magnetic field the proton charge and current densities ρ and J, respectively, and of the electron temperature (electrons are usually assumed to be isothermal or adiabatic). Ions are descibed as (macro)particles using the particle-in-cell scheme. The (bi/tri-)linear interpolation/weighting is used to determine the interaction of a particle with the grid and the deposition of the particle contribution to the moments on the grid.

Figure 1:Schematic diagram of the code (Matthews, 1994): The particle positions and velocities are taken at the different times separated by half the time step Δt. vn, xn+1/2 At the beginning there are the current density ρn+1/2= ρ(xn+1/2) and the "free-streaming" ionic current Jn * =J (xn+1/2,vn) as well as ρn= ρn(xn) and Jn =J(xn,vn). The magnetic field is advanced (using two copies via cyclic leapfrog) from Bn to Bn+1/2 with E(ρn,Jn,B). The current advance method advances Jn * to Jn+1/2. Using Bn+1/2 and En+1/2= E(ρn+1/2,Jn+1/2,Bn+1/2) the particles are advenced using the Boris scheme to vn+1 and xn+3/2 and moments are collected. ρn+3/2=ρ(xn+3/2); ρn+1is obtained as an average of ρn+1/2 and ρn+3/2. Forward and backward "free-streaming" ionic currents Jn+1 - =J (xn+1/2,vn+1) and Jn+1 + =J (xn+3/2,vn+1) are collected and by averaging give Jn+1. Finally, Bn+1/2 is advanced to Bn+1.

Extensions

The code has two major extensions:

Recent results

References

See also here for more publications.