GADGET: A code for collisionless and gasdynamical cosmological simulations
Volker Springel, Naoki Yoshida, Simon D. M. White
TL;DR
GADGET introduces a versatile code for collisionless N-body and SPH cosmological simulations, combining a Barnes–Hut tree gravity solver with adaptive, individual timesteps and, optionally, GRAPE hardware. It provides SPH hydrodynamics with adaptive smoothing, cooling, and comoving coordinate integration, together with dynamic tree updates to maintain efficiency. The parallel MPI implementation uses ORB domain decomposition and a force-assembly scheme that achieves near-linear scaling for gravity and well-balanced SPH communication, enabling very large simulations. Extensive tests—including timestepping, force accuracy, galaxy mergers, gas collapse, and parallel performance—demonstrate accuracy, efficiency, and scalability, and the code is publicly released for community use and development.
Abstract
We describe the newly written code GADGET which is suitable both for cosmological simulations of structure formation and for the simulation of interacting galaxies. GADGET evolves self-gravitating collisionless fluids with the traditional N-body approach, and a collisional gas by smoothed particle hydrodynamics. Along with the serial version of the code, we discuss a parallel version that has been designed to run on massively parallel supercomputers with distributed memory. While both versions use a tree algorithm to compute gravitational forces, the serial version of GADGET can optionally employ the special-purpose hardware GRAPE instead of the tree. Periodic boundary conditions are supported by means of an Ewald summation technique. The code uses individual and adaptive timesteps for all particles, and it combines this with a scheme for dynamic tree updates. Due to its Lagrangian nature, GADGET thus allows a very large dynamic range to be bridged, both in space and time. So far, GADGET has been successfully used to run simulations with up to 7.5e7 particles, including cosmological studies of large-scale structure formation, high-resolution simulations of the formation of clusters of galaxies, as well as workstation-sized problems of interacting galaxies. In this study, we detail the numerical algorithms employed, and show various tests of the code. We publically release both the serial and the massively parallel version of the code.
