474 research outputs found
The cosmological simulation code GADGET-2
We discuss the cosmological simulation code GADGET-2, a new massively
parallel TreeSPH code, capable of following a collisionless fluid with the
N-body method, and an ideal gas by means of smoothed particle hydrodynamics
(SPH). Our implementation of SPH manifestly conserves energy and entropy in
regions free of dissipation, while allowing for fully adaptive smoothing
lengths. Gravitational forces are computed with a hierarchical multipole
expansion, which can optionally be applied in the form of a TreePM algorithm,
where only short-range forces are computed with the `tree'-method while
long-range forces are determined with Fourier techniques. Time integration is
based on a quasi-symplectic scheme where long-range and short-range forces can
be integrated with different timesteps. Individual and adaptive short-range
timesteps may also be employed. The domain decomposition used in the
parallelisation algorithm is based on a space-filling curve, resulting in high
flexibility and tree force errors that do not depend on the way the domains are
cut. The code is efficient in terms of memory consumption and required
communication bandwidth. It has been used to compute the first cosmological
N-body simulation with more than 10^10 dark matter particles, reaching a
homogeneous spatial dynamic range of 10^5 per dimension in a 3D box. It has
also been used to carry out very large cosmological SPH simulations that
account for radiative cooling and star formation, reaching total particle
numbers of more than 250 million. We present the algorithms used by the code
and discuss their accuracy and performance using a number of test problems.
GADGET-2 is publicly released to the research community.Comment: submitted to MNRAS, 31 pages, 20 figures (reduced resolution), code
available at http://www.mpa-garching.mpg.de/gadge
GADGET: A code for collisionless and gasdynamical cosmological simulations
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.Comment: 32 pages, 14 figures, replaced to match published version in New
Astronomy. For download of the code, see
http://www.mpa-garching.mpg.de/gadget (new version 1.1 available
Three Dimensional Numerical General Relativistic Hydrodynamics I: Formulations, Methods, and Code Tests
This is the first in a series of papers on the construction and validation of
a three-dimensional code for general relativistic hydrodynamics, and its
application to general relativistic astrophysics. This paper studies the
consistency and convergence of our general relativistic hydrodynamic treatment
and its coupling to the spacetime evolutions described by the full set of
Einstein equations with a perfect fluid source. The numerical treatment of the
general relativistic hydrodynamic equations is based on high resolution shock
capturing schemes. These schemes rely on the characteristic information of the
system. A spectral decomposition for general relativistic hydrodynamics
suitable for a general spacetime metric is presented. Evolutions based on three
different approximate Riemann solvers coupled to four different discretizations
of the Einstein equations are studied and compared. The coupling between the
hydrodynamics and the spacetime (the right and left hand side of the Einstein
equations) is carried out in a treatment which is second order accurate in {\it
both} space and time. Convergence tests for all twelve combinations with a
variety of test beds are studied, showing consistency with the differential
equations and correct convergence properties. The test-beds examined include
shocktubes, Friedmann-Robertson-Walker cosmology tests, evolutions of
self-gravitating compact (TOV) stars, and evolutions of relativistically
boosted TOV stars. Special attention is paid to the numerical evolution of
strongly gravitating objects, e.g., neutron stars, in the full theory of
general relativity, including a simple, yet effective treatment for the surface
region of the star (where the rest mass density is abruptly dropping to zero).Comment: 45 pages RevTeX, 34 figure
Direct N-body Simulations
Special high-accuracy direct force summation N-body algorithms and their
relevance for the simulation of the dynamical evolution of star clusters and
other gravitating N-body systems in astrophysics are presented, explained and
compared with other methods. Other methods means here approximate physical
models based on the Fokker-Planck equation as well as other, approximate
algorithms to compute the gravitational potential in N-body systems. Questions
regarding the parallel implementation of direct ``brute force'' N-body codes
are discussed. The astrophysical application of the models to the theory of
relaxing rotating and non-rotating collisional star clusters is presented,
briefly mentioning the questions of the validity of the Fokker-Planck
approximation, the existence of gravothermal oscillations and of rotation and
primordial binaries.Comment: 32 pages, 13 figures, in press in Riffert, H., Werner K. (eds),
Computational Astrophysics, The Journal of Computational and Applied
Mathematics (JCAM), Elsevier Press, Amsterdam, 199
- …