with dark matter and gas
A code for cosmological simulations of structure
GADGET is a freely
available code for cosmological N-body/SPH simulations on massively
parallel computers with distributed memory. GADGET
uses an explicit communication model that is implemented with the
standardized MPI communication interface. The code can be run on
essentially all supercomputer systems presently in use, including
clusters of workstations or individual PCs.
computes gravitational forces with a hierarchical tree algorithm
(optionally in combination with a particle-mesh
scheme for long-range gravitational forces) and represents fluids by
means of smoothed particle hydrodynamics (SPH). The code can be used
for studies of isolated systems, or for simulations that include the
cosmological expansion of space, both with or without periodic boundary
conditions. In all these types of simulations, GADGET
follows the evolution of a self-gravitating collisionless N-body
allows gas dynamics to be optionally included. Both the force
computation and the time stepping of GADGET
are fully adaptive, with a dynamic range which is, in principle,
therefore be used to address a wide array of astrophysically
interesting problems, ranging from colliding and merging galaxies, to
the formation of large-scale structure in the Universe. With the
inclusion of additional physical processes such as radiative cooling
and heating, GADGET can also be used to
study the dynamics of the gaseous intergalactic medium, or to address
star formation and its regulation by feedback processes.
- Hierarchical multipole expansion (based on a geometrical oct-tree) for gravitational forces.
- Optional TreePM method, where the tree
is used for short-range gravitational forces only while long-range
forces are computed with a FFT-based particle-mesh (PM) scheme. A second PM
layer can be placed on a high-resolution region in ‘zoom’-simulations.
boundary conditions, either by means of the Ewald summation technique
or based on the FFT algorithm used in the TreePM scheme. Simulations
that only follow gas dynamics without self-gravity can be run in
periodic boxes with arbitrary aspect ratios,
and also in 2D, if desired.
- Smoothed particle hydrodynamics with fully adaptive smoothing lengths and a novel entropy conserving formulation of SPH.
- Signal-velocity parameterisation of the artificial viscosity, as
suggested by Monaghan.
- Individual timesteps for
all particles. In the TreePM scheme, long-range and short-range forces
are integrated with different timesteps.
- Work-load balanced domain decomposition
and dynamic tree updates.
- Efficient cell-opening criteria for the
- Support for parallel I/O and a number
of different output formats, including the HDF5 format.
- Flexible control of all code options by
a free-format parameterfile.
- Portable, well documented and easily
extendible code, relying only on standard ANSI C language features and
- High raw computational speed and
comparatively low memory consumption. In particular, significant
improvements in resource consumption compared with GADGET-1
- have been achieved.
- The code may be run on an arbitrary
number of processors, with a restriction to powers of two. It may also
be run on a single CPU in serial mode.
- Fast method for the generation of a
- SPH simulations can be run in periodic
boxes of arbitrary aspect ratio, or in 2D, if desired.
There have also been older versions of the
code that supported the special-purpose hardware
GRAPE, in the form of GRAPE-3 and GRAPE-6. However,
this functionality is not included in the current version at the moment.
Authors and History
GADGET has been
written by Volker Springel over the last couple of years. The
first public version (GADGET-1, released in March
2000), was created as part of Volker’s
PhD project at the
Astrophysics, Garching, Germany, under the supervision of Simon
White. Later, the code was continuously impoved during postdocs
of Volker Springel at the CfA and the MPA, in collaboration with Simon
White and Lars Hernquist. The second public version (GADGET-2, released in May 2005), contains most of
these improvements, except the numerous physics modules developed for
the code that go beyond
gravity and ordinary gas-dynamics.
The first versions of the code in 1998 were originally designed for
serial machines only, targeting primarily problems of galaxy collisions
and interactions, which explains GADGET‘s
somewhat contrived acronym. The parallel
tree code was also developed during the year 1998, with the first
parallel version of SPH added during the end of
1999. For the latter part, Naoki Yoshida (at the time another
MPA) joined Volker Springel’s efforts, and helped developing and
the parallel SPH algorithms.
2001-2003, GADGET-2 was created. The new code forms a nearly complete
of GADGET-1, including a replacement of all core algorithms with
new methods. The most important changes lie in a new time integration
model, a new tree-code module, a new communication scheme for
gravitational and SPH forces, a new domain decomposition strategy, a
SPH formulation based on entropy as indepedent variable, and finally,
addition of the TreePM functionality.
The author acknowledges many helpful discussions
he had with Simon White, Lars Hernquist, Naoki Yoshida, Klaus Dolag,
Liang Gao, Martin Jubelgas, Debora Sijacki, Christoph Pfrommer,
Stefano Borgani, Martin White, Adrian Jenkins, Jasjeet Bagla, Matthias
Steinmetz, and Julio Navarro. Note that this list is incomplete – my
due apologies to everyone I forgot to mention here. Lots of thanks
also to many users of GADGET for their
patience with the daily moods of the code, and their continued
encouragement to work towards a public release of GADGET-2.
1 May 2005: Version 2.0 of GADGET released
1 June 2005: GADGET updated to version 1.1
16 March 2000: The initial distribution contained a
wrong version of the file `forcetree.c’ of the serial version of
GADGET. Please download the serial code again!
15 March 2000: Version 1.0 of GADGET released.
1 January 2000: GADGET‘s Y2K compliance established.
You may download the software of GADGET as a compressed tar-file.
Please use the commands `gunzip gadget2.tar.gz’ and `tar -xvf gadget2.tar’ to
unpack the files. You will obtain a directory `Gadget2/‘ , and various
subdirectories containing the actual source code, the code
documentation, as well as a number of simulation examples and
very basic analysis scripts. Please refer to the README file, and GADGET‘s
User’s Guide for
further directions about installation and usage. A brief guide to
parameters in the Makefile and the parameterfile, as well as a
cross-referenced source code documentation is accessible with a
web-browser in the `html/‘-subdirectory (open the `index.html‘ file). Note that the
large size of the download is caused by the included example
GADGET is written
in standard ANSI C, and uses the standardized MPI-1.0
communication interface in its parallel version. The provided makefile
is compatible with GNU make. The code should thus compile and run on
most, if not all, massively parallel computers that support MPI.
The new version GADGET-2, also needs the
GNU Scientific Library GSL, and the FFTW library (Fastest Fourier Transform in the West)
for the PM
functionality. If usage of the Hierarchical
Data Format (HDF) is desired, the corresponding
HDF5 library needs to be compiled as well. These three libraries are
available as fully portable open-source software.
GADGET is free
software, distributed under the GNU General Public License.
This implies that you may freely distribute and copy the software. You
may also modify it as you wish, and distribute these modified versions
as long as you indicate prominently any changes you
made in the original code, and as long as you leave the copyright
notices, and the no-warranty notice intact. Please read the General
Public License for more details. Note that the authors retain their
copyright on the code.
If you use GADGET-2 for scientific work, we kindly ask you to reference
code paper(s) on GADGET, i.e.
Springel V., Yoshida N., White S. D. M., 2001, New Astronomy, 6, 51
There is a mailing list for GADGET-related discussions, which you may join if you
like. The emails exchanged via this list are also archived on the web. In case you encounter
trouble with the code, please check this forum first for a possible
answer to your question or problem, before contacting the author.
To join the mailing-list, please send an email to [email protected]
with the subject “subscribe gadget-list”. You can unsubscribe in the
using “unsubscribe gadget-list” for the subject line . Once
you have subscribed, you can also post to the mailing list.
If you would like to be informed about future releases of the
code, or about bug fixes, please send an e-mail to [email protected]
with the subject line “subscribe gadget-announce”. Only the author of GADGET can post
to this list, so the traffic on this list will be very low. A
web-archive of messages sent to this list is also available; it
also serves as change-log of the public version of the code. To unsubscribe from this
list, send a message with the word “unsubscribe gadget-announce” in the
subject-line. (Note that already for GADGET-1 an informal
mailing list existed, but it wasn’t automized
like it is now. If you had
subscribed to it with an email to Volker Springel, please register
again to the automated gadget-announce mailing list.)
Please check the web-archive of the
mailing list gadget-announce (see above) for a list of problems that
fixed since the public release of GADGET-2.
At this point, it is worth noting
that the author and his direct
collaborators change and adapt
GADGET for their own purposes constantly.
Unfortunately, we don’t have the time to incorporate all these changes
and features into public versions of the code. However, we will try to
correct any bugs or problems that come to our attention in this public
release of the code. If in doubt about specific aspects of the code, or
if you think you found a bug, please contact the author.
GADGET comes with a number of small examples (the same ones as for GADGET-1) that can be run to
develop a feel for working with the simulation code. We provide initial
conditions for the following systems:
- A pair of colliding disk galaxies (collisionless)
- A spherical collapse of a self-gravitating sphere of gas
- Cosmological formation of a cluster of galaxies (collisionless, vacuum
- Cosmological structure formation in a periodic box with adiabatic
Please refer to the User’s Guide for detailed information on how you
can run these examples with GADGET. We also provide a few IDL-scripts
for a simple analysis of some of GADGET‘s output.
The main reference for the implemented physics,
and for algorithmic and numerical aspects of GADGET-2
is the paper “The cosmological
simulation code GADGET-2”, Springel V., 2005, MNRAS,
submitted, and references therein. A copy of
the paper is also
contained in the ‘Documentation’ subdirectory
of GADGET‘s distribution.
Additional information about the
previous version of GADGET
is contained in the paper “GADGET:
A code for collisionless and
gasdynamical cosmological simulations“, Springel V., Yoshida N.,
White S. D. M., 2001, New Astronomy, 6, 51.
A detailed description of GADGET‘s
compilation and usage may be found in theUser’s Guide, which is also contained in the Documentation-subdirectory
of the distribution. The User’s Guide also explains the various
examples accompanying this distribution, and the output produced by GADGET. A brief description of the compilation and
usage of the code is also contained in the html-subdirectory
code distribution, which also contains a cross-referenced guide to the
the source code itself.
A cross-referenced documentation of the source
code can be accessed
here. It also contains a short description of compilation
of the code, and the various options of makefike and parameterfile
A number of scientific papers in the referenced
literature have used GADGET for
numerical work. A rough list may be obtained from ADS by
papers that cite the code paper of GADGET-1. Note
however that the returned list will also contain a number of papers
that have not
used GADGET themselves but referenced it for other reasons.
From the author’s efforts to visualize simulation
results obtained with
few `nice pictures’ resulted. Below we provide a small sample of those.
You may click on any of the following links to see a larger
version of the image, and a brief explanation of it.
Further visual material can be
obtained from the data
visualization web-site of MPA’s galaxy formation group.
Simulations done with GADGET
have also been visualized in a number of movies. Some of these movies
have been used for a
multimedia presentation explaining research topics that are
currently addressed at MPA.
We here just provide a few examples of these
animations in the form of heavily size-reduced and compressed movies in
MPEG1 or MPEG4 formats. Playing these movies in
proper quality requires a reasonably fast computer. Some of the movies
are encoded using “divx”, a flavour of the MPEG4 movie compression
algorithms. On Linux
computers, you can use the mplayer
application to play them, on Apple
or Windows computers you may have to install the free version of the divx-codec first.
The Local Universe (Constrained
Realization project) (7.4 MB)
Two colliding and merging
spiral galaxies (4.8 MB)
Dark matter substructure in a
cluster of galaxies (7.5 MB)
A forming cluster of galaxies
(112 MB, divx)
galaxies with supermassive black holes
(22 MB, divx)
into the Millennium Simulation
(49 MB, divx)
Further visual material can be
obtained from the data
We here provide a few links to software by other people that
can be used together with GADGET.
Note that this list is likely not
complete, and does not mean that we specifically endorse a
certain type of software.
Visualization software SPLASH (by Daniel
Visualization software IRFIT (by Nick Gnedin)
Volker Springel [email protected]
Max-Planck-Institute for Astrophysics
Comments to: Volker Springel [email protected]