Table of Contents
Fetching ...

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.

GADGET: A code for collisionless and gasdynamical cosmological simulations

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.

Paper Structure

This paper contains 32 sections, 79 equations, 14 figures, 1 table.

Figures (14)

  • Figure 1: Schematic illustration of the Barnes & Hut oct-tree in two dimensions. The particles are first enclosed in a square (root node). This square is then iteratively subdivided in four squares of half the size, until exactly one particle is left in each final square (leaves of the tree). In the resulting tree structure, each square can be progenitor of up to four siblings. Note that empty squares need not to be stored.
  • Figure 2: Schematic representation of the domain decomposition in two dimensions, and for four processors. Here, the first split occurs along the y-axis, separating the processors into two groups. They then independently carry out a second split along the x-axis. After completion of the domain decomposition, each processor element (PE) can construct its own BH tree just for the particles in its part of the computational domain.
  • Figure 3: Schematic illustration of the parallelization scheme of GADGET for the force computation. In the first step, each PE identifies the active particles, and puts their coordinates in a communication buffer. In a communication phase, a single and identical list of all these coordinates is then established on all processors. Then each PE walks its local tree for this list, thereby obtaining a list of partial forces. These are then communicated in a collective process back to the original PE that hosts the corresponding particle coordinate. Each processor then sums up the incoming force contributions, and finally arrives at the required total forces for its active particles.
  • Figure 4: NFW density profiles used in the test of time integration criteria. The solid line gives the shape of the normal (unsoftened) NFW profile, dashed lines are softened according to $\epsilon= 0.0004$, 0.004, and 0.04, respectively (see equation \ref{['eqnfw']}).
  • Figure 5: Radii enclosing a fixed mass ($7.1\times 10^{-5}$, $3.6\times 10^{-4}$, $1.8\times 10^{-3}$, $7.1\times 10^{-3}$, $3.6\times 10^{-2}$, $2.1\times 10^{-1}$, and $7.1\times 10^{-1}$ in units of the virial mass) after integrating the particle population of a NFW halo in a fixed potential for one Hubble time with various timestep criteria. Solid lines are for fixed timesteps for all particles, dashed lines for timesteps based on $\Delta t\propto | {\bf a} |^{-1}$, dotted lines for $\Delta t \propto | {\bf a} |^{-1/2}$, and dot-dashed for timesteps based on the local dynamical time, i.e. $\Delta t\propto \rho^{-1/2}$. The three panels are for softened forms of the NFW potential according to equation (\ref{['eqnfw']}). Note that the fluctuations of the lowest radial shell are caused by the low sampling of the halo in the core and are not significant. The horizontal axis gives the mean number of force evaluation per particle required to advance the particle set for one Hubble time.
  • ...and 9 more figures