MagIC is a numerical code that can simulate fluid dynamics in a spherical shell. MagIC solves for the Navier-Stokes equation including Coriolis force, optionally coupled with an induction equation for Magneto-Hydro Dynamics (MHD), a temperature (or entropy) equation and an equation for chemical composition under both the anelastic and the Boussinesq approximations.

MagIC uses Chebyshev polynomials in the radial direction and spherical harmonic decomposition in the azimuthal and latitudinal directions. The time-stepping scheme relies on a semi-implicit Crank-Nicolson for the linear terms of the MHD equations and a Adams-Bashforth scheme for the non-linear terms and the Coriolis force.

MagIC is written in Fortran and designed to be used on supercomputing clusters. It thus relies on a hybrid parallelisation scheme using both OpenMP and MPI. Postprocessing functions written in python (requiring matplotlib and scipy) are also provided to allow a useful data analysis.


Walltime of MagIC on stampede versus number of CPUs for a dynamo model computed at three different numerical resolutions \((N_\phi,N_\theta,N_r)\).

MagIC is a free software. It can be used, modified and redistributed under the terms of the GNU GPL v3 licence.

Quickly starting using MagIC


You can also download a PDF version of this documentation generated from LaTeX Sphinx.

Contributing to the code

If you want to contribute to MagIC, the contributor guide might be helpful for you.

Giving credit

In case you intend to publish scientific results obtained with MagIC or present them in a conference, we (the developers of MagIC) kindly ask to be acknowledged with a reference to the website https://magic-sph.github.io/ or https://github.com/magic-sph/magic.

We also suggest to give appropriate reference to one or several of the following papers:

See also

A (tentative) comprehensive list of the publications that have been produced to date (june 2017) using MagIC is accessible here. To date, more than 90 publications have been-accepted in more than 10 different peer-reviewed journals: PEPI (20), Icarus (11), E&PSL (7), GJI (8), A&A (4), GRL (4), JFM (4), GAFD (3), Nature (2), etc.


Number of peer-reviewed publications produced using MagIC