We present GRADSPMHD, a completely Lagrangian parallel magnetohydrodynamics code based on the SPH formalism. The implementation of the equations of SPMHD in the 鈥淕RAD-h鈥?formalism assembles known results, including the derivation of the discretized MHD equations from a variational principle, the inclusion of time-dependent artificial viscosity, resistivity and conductivity terms, as well as the inclusion of a mixed hyperbolic/parabolic correction scheme for satisfying the constraint on the magnetic field. The code uses a tree-based formalism for neighbor finding and can optionally use the tree code for computing the self-gravity of the plasma. The structure of the code closely follows the framework of our parallel GRADSPH FORTRAN 90 code which we added previously to the CPC program library. We demonstrate the capabilities of GRADSPMHD by running 1, 2, and 3 dimensional standard benchmark tests and we find good agreement with previous work done by other researchers. The code is also applied to the problem of simulating the magnetorotational instability in 2.5D shearing box tests as well as in global simulations of magnetized accretion disks. We find good agreement with available results on this subject in the literature. Finally, we discuss the performance of the code on a parallel supercomputer with distributed memory architecture.
Program summary
Program title: GRADSPMHD 1.0
Catalogue identifier: AERP_v1_0
Program summary URL:
Program obtainable from: CPC Program Library, Queen鈥檚 University, Belfast, N. Ireland
Licensing provisions: Standard CPC licence,
No. of lines in distributed program, including test data, etc.: 620503
No. of bytes in distributed program, including test data, etc.: 19837671
Distribution format: tar.gz
Programming language: FORTRAN 90/MPI.
Computer: HPC cluster.
Operating system: Unix.
Has the code been vectorized or parallelized?: Yes, parallelized using MPI.
RAM: 聽鈭?0 MB for a Sedov test including 15625 particles on a single CPU.
Classification: 12.
Nature of problem:
Evolution of a plasma in the ideal MHD approximation.
Solution method:
The equations of magnetohydrodynamics are solved using the SPH method.
Running time:
The test provided takes approximately 20聽min using 4 processors.