cles is more hazardous than splitting as it generally
does not preserve the local structure of the distri-
bution function [34], the very reason why kinetic
simulations are done in the first place.
The Multi-Level-Multi-Domain (MLMD)
method has later been proposed as a way to pre-
vent previous issues [35, 36, 37, 38, 39]. Contrary
to other AMR codes, the MLMD method solves
all equations on all grid levels, as in a patch-based
AMR approach. This means that not only elec-
tromagnetic fields and moments are defined on
all nodes of all levels, but also macroparticles.
While this may appear as an overhead to deal with
macroparticles in coarse regions where there is
also a fine mesh and its associated macroparticles,
it comes with several advantages. First, the
macroparticles only see one mesh resolution, their
shape is thus perfectly constant in time. Then,
merging macroparticles is not required anymore
since macroparticles can simply be deleted as they
exit a refined level because their is a self-consistent
kinetic flux in the overlapped region of the next
coarser level. As in other AMR PIC codes, refined
levels are fed with macroparticles from splitting
those from coarser levels at level boundaries. And
once the fine solution is obtained, the electromag-
netic field is coarsened onto the next coarser level,
and in practice it either overwrites the coarser
solution in the overlapped region, or is averaged
with it.
To our knowledge, existing AMR PIC codes use
in-house developed code for the adaptive meshing
mechanism and evolve the system with a time step
uniform across all mesh levels [19, 21]. In such a
case, the time step is thus constrained by the finest
grid of the model, which leads to much heavier sim-
ulations than necessary. The MLMD method was
also originally proposed with uniform time stepping
across grid levels. It was then updated to consider
a proper stepping per level [39]. Coarser levels can
evolve much fewer cycles than refined ones, which,
considering the dispersive nature of kinetic plasma
waves, is much more advantageous than codes based
on a uniform and fixed time stepping. Published
results[35, 36, 37, 38, 39] however only demonstrate
the method with only one refined level, consisting
in a single refined patch with a predefined position
which is fixed in time. Such a code is thus useful
when the region in which to enhance the resolution
is known in advance and does not evolve with time.
In complex systems, where critical small scale re-
gions are moving, appear and disappear, the lack of
adaptivity imposes the refinement of a substantial
part of the domain, which may become prohibitive.
Contrary to MHD codes, AMR kinetic codes can-
not have arbitrarily large mesh spacing. Kinetic
plasmas include intrinsic particle scales that need to
be correctly resolved even in regions where ”noth-
ing” happens. Solving explicit fully kinetic equa-
tions on a mesh much coarser than the electron De-
bye length is unstable. Solving hybrid equations
with a mesh and time step much coarser than the
local ion scales is irrelevant, if not wrong. Such an
upper bound to the coarsest mesh resolution make
modeling very large domains expensive even with
AMR. It thus appears interesting to not only con-
sider refining the mesh and the time step, but also
the physical formalism that is resolved. The MLMD
method also appears promising in that regard since
each refinement level, having its own macroparti-
cles, could in principle be coupled to levels evolving
different equations, given that one knows how to
transfer information from one to the other.
Coupling a kinetic solver, operating on critical
regions, with a fluid solver, evolving less impor-
tant regions of the domain, has been an important
goal over the last decade. The first coupling be-
tween MHD and fully kinetic PIC equations was
achieved for local simulations of magnetic reconnec-
tion [40, 41, 42] along the inflow direction. A 2D
coupling was later achieved using anisotropic MHD
and Hall MHD and implicit fully kinetic equations
using the codes BATS-R-US and iPIC 3D [43]. This
method was then extended to 3D [44]. Simula-
tions embedding one or several rectangular full-
PIC regions in a global MHD domain were then
performed for modeling the Earth’s magnetosphere
[45], Ganymede’s magnetosphere [46, 47], the Mars’
magnetosphere [48], or Mercury’s magnetosphere
[49]. The method has later been implemented be-
tween iPIC3D and MPI-AMRVAC [50, 51].
These works provided for the first time a large
scale context to otherwise and until then isolated
kinetic boxes. However, the choice of using fully
kinetic equations, even through an implicit scheme,
forces the resolution of some electron particle scales
which prevents a kinetic treatment of ions over large
scales. Coupling fluid equations to hybrid ones
would instead allow to cover much broader regions
with kinetic ions.
In this paper we present the design and imple-
mentation of a new hybrid kinetic PIC code with
adaptive mesh refinement inspired from the MLMD
method. AMR will make high resolution more af-
3