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 time-steps. Individual and adaptive short-range time-steps may also be employed. The domain decomposition used in the parallelization 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 three-dimensional 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. Ke yw ords: methods: numerical ‐ galaxies: interactions ‐ dark matter.

[1]  J. Monaghan Smoothed particle hydrodynamics , 2005 .

[2]  J. Peacock,et al.  Simulations of the formation, evolution and clustering of galaxies and quasars , 2005, Nature.

[3]  S. White,et al.  Feedback and metal enrichment in cosmological smoothed particle hydrodynamics simulations ¿ I. A model for chemical enrichment , 2005, astro-ph/0505440.

[4]  S. White,et al.  Early structure in ΛCDM , 2005, astro-ph/0503003.

[5]  T. D. Matteo,et al.  Energy input from quasars regulates the growth and activity of black holes and their host galaxies , 2005, Nature.

[6]  J. Cuadra,et al.  Accretion of cool stellar winds on to Sgr A*: another puzzle of the Galactic Centre? , 2005, astro-ph/0502044.

[7]  D. Nagai,et al.  Effects of Cooling and Star Formation on the Baryon Fractions in Clusters , 2005, astro-ph/0501227.

[8]  Michael S. Warren,et al.  Robustness of Cosmological Simulations. I. Large-Scale Structure , 2004, astro-ph/0411795.

[9]  R. Cen,et al.  Shock-heated Gas in the Large-Scale Structure of the Universe , 2004, astro-ph/0410477.

[10]  V. Quilis A new multidimensional adaptive mesh refinement hydro + gravity cosmological code , 2004, astro-ph/0405389.

[11]  R. Somerville,et al.  Generating Hot Gas in Simulations of Disk-Galaxy Major Mergers , 2004, astro-ph/0402675.

[12]  S. Borgani,et al.  Simulating the metal enrichment of the intracluster medium , 2004, astro-ph/0401576.

[13]  V. Springel,et al.  Thermal conduction in cosmological SPH simulations , 2004, astro-ph/0401456.

[14]  S. Borgani,et al.  Thermal Conduction in Simulated Galaxy Clusters , 2004, astro-ph/0401470.

[15]  Lars Hernquist,et al.  Comparing AMR and SPH Cosmological Simulations. I. Dark Matter and Adiabatic Simulations , 2003, astro-ph/0312651.

[16]  J. Makino,et al.  GRAPE-6: Massively-Parallel Special-Purpose Computer for Astrophysical Particle Simulations , 2003, astro-ph/0310702.

[17]  M. Meneghetti,et al.  Numerical study of halo concentrations in dark-energy cosmologies , 2003, astro-ph/0309771.

[18]  S. Kay The entropy distribution in clusters: evidence of feedback? , 2003, astro-ph/0309435.

[19]  T. Abel,et al.  The angular momentum of gas in protogalaxies — II. The impact of pre-heating , 2003, astro-ph/0308117.

[20]  R. Domínguez-tenreiro,et al.  Conservation Laws in Smooth Particle Hydrodynamics: The DEVA Code , 2003, astro-ph/0307312.

[21]  U. A. D. Madrid,et al.  The radial structure of galaxy groups and clusters , 2003, astro-ph/0306264.

[22]  E. Linder,et al.  Cosmic structure and dark energy , 2003, astro-ph/0305286.

[23]  Changbom Park,et al.  GOTPM: A Parallel Hybrid Particle-Mesh Treecode , 2003, astro-ph/0304467.

[24]  T. Quinn,et al.  Gasoline: a flexible, parallel implementation of TreeSPH , 2003, astro-ph/0303521.

[25]  Garching,et al.  Cooling and heating the intracluster medium in hydrodynamical simulations , 2003, astro-ph/0302575.

[26]  G. Bryan,et al.  Formation of Cool Cores in Galaxy Clusters via Hierarchical Mergers , 2003, astro-ph/0302427.

[27]  J. Ostriker,et al.  Tree Particle-Mesh: An Adaptive, Efficient, and Parallel Code for Collisionless Cosmological Simulation , 2003, astro-ph/0302065.

[28]  N. Yoshida,et al.  Simulations of Early Structure Formation: Primordial Gas Clouds , 2003, astro-ph/0301645.

[29]  J. Bagla,et al.  Performance Characteristics of TreePM codes , 2002, astro-ph/0212129.

[30]  Garching,et al.  Smoothed particle hydrodynamics for galaxy‐formation simulations: improved treatments of multiphase gas, of star formation and of supernovae feedback , 2002, astro-ph/0207448.

[31]  M. White The Mass Function , 2002, astro-ph/0207185.

[32]  V. Springel,et al.  Cosmological smoothed particle hydrodynamics simulations: the entropy equation , 2001, astro-ph/0111016.

[33]  V. Springel,et al.  The history of star formation in a lcdm universe , 2002, astro-ph/0206395.

[34]  V. Springel,et al.  Cosmological smoothed particle hydrodynamics simulations: a hybrid multiphase model for star formation , 2002, astro-ph/0206393.

[35]  J. Prochaska,et al.  Metallicity Evolution of Damped Lyα Systems in ΛCDM Cosmology , 2002, astro-ph/0203524.

[36]  S. White,et al.  The inner structure of ΛCDM haloes – I. A numerical convergence study , 2002, astro-ph/0201544.

[37]  V. Springel,et al.  Cosmological SPH simulations: The entropy equation , 2001, astro-ph/0111016.

[38]  E. Blackman,et al.  Hydrodynamic Interaction of Strong Shocks with Inhomogeneous Media. I. Adiabatic Case , 2001, astro-ph/0109282.

[39]  Yehuda Hoffman,et al.  Constrained Simulations of the Real Universe. II. Observational Signatures of Intergalactic Gas in the Local Supercluster Region , 2001, astro-ph/0109077.

[40]  J. Binney,et al.  Multi‐level adaptive particle mesh (MLAPM): a c code for cosmological simulations , 2001, astro-ph/0103503.

[41]  R. Teyssier,et al.  Numerical and Analytical Predictions for the Large-Scale Sunyaev-Zel'dovich Effect , 2000, astro-ph/0012086.

[42]  B. Fryxell,et al.  FLASH: An Adaptive Mesh Hydrodynamics Code for Modeling Astrophysical Thermonuclear Flashes , 2000 .

[43]  M. White,et al.  Hydrodynamic Simulations of the Sunyaev-Zeldovich Effect(s) , 2000, astro-ph/0008133.

[44]  B. Wandelt,et al.  Halo Properties in Cosmological Simulations of Self-interacting Cold Dark Matter , 2000, astro-ph/0006218.

[45]  S. White,et al.  Weakly Self-interacting Dark Matter and the Structure of Dark Halos , 2000, astro-ph/0006134.

[46]  H. M. P. Couchman,et al.  The mass function of dark matter haloes , 2000, astro-ph/0005260.

[47]  W. Dehnen A Very Fast and Momentum-conserving Tree Code , 2000, The Astrophysical journal.

[48]  V. Springel,et al.  GADGET: a code for collisionless and gasdynamical cosmological simulations , 2000, astro-ph/0003162.

[49]  V. Springel Modelling star formation and feedback in simulations of interacting galaxies , 2000 .

[50]  Guohong Xu,et al.  The Tree Particle-Mesh N-Body Gravity Solver , 1999, astro-ph/9912541.

[51]  J. Bagla TreePM: A code for cosmological N-body simulations , 1999, astro-ph/9911025.

[52]  M. Steinmetz,et al.  The Santa Barbara Cluster Comparison Project: A Comparison of Cosmological Hydrodynamics Solutions , 1999, astro-ph/9906160.

[53]  Harold F. Levison,et al.  A Multiple Time Step Symplectic Algorithm for Integrating Close Encounters , 1998 .

[54]  G. Bryan,et al.  Cosmological Adaptive Mesh Refinement , 1998, astro-ph/9807121.

[55]  Joseph John Monaghan,et al.  SPH and Riemann Solvers , 1997 .

[56]  H. M. P. Couchman,et al.  Evolution of Structure in Cold Dark Matter Universes , 1997, astro-ph/9709010.

[57]  M. Bate,et al.  Resolution requirements for smoothed particle hydrodynamics calculations with self-gravity , 1997 .

[58]  Toshikazu Ebisuzaki,et al.  GRAPE-4: A Massively Parallel Special-Purpose Computer for Collisional N-Body Simulations , 1997 .

[59]  U. Pen A High-Resolution Adaptive Moving Mesh Hydrodynamic Algorithm , 1997, astro-ph/9704258.

[60]  D. Lambas,et al.  Analysis of galaxy formation with hydrodynamics , 1997 .

[61]  C. Clarke,et al.  Accretion and the stellar mass spectrum in small clusters , 1997 .

[62]  A. Klypin,et al.  Adaptive Refinement Tree: A New High-Resolution N-Body Code for Cosmological Simulations , 1997, astro-ph/9701195.

[63]  R. Davé,et al.  Parallel TreeSPH , 1997, astro-ph/9701113.

[64]  G. Tormen The rise and fall of satellites in galaxy clusters , 1996, astro-ph/9611078.

[65]  U. Hellsten,et al.  The Structure of Isothermal, Self-Gravitating, Stationary Gas Spheres for Softened Gravity , 1996, astro-ph/9610085.

[66]  J. Dubinski A parallel tree code , 1996, astro-ph/9603097.

[67]  R. Whitehurst,et al.  A free Lagrange method for gas dynamics , 1995 .

[68]  J. Owen,et al.  Adaptive Smoothed Particle Hydrodynamics: Methodology. II. , 1995, astro-ph/9512078.

[69]  J. Chièze,et al.  Adaptative Smooth Particle Hydrodynamics and Particle-Particle coupled codes: Energy and Entropy Conservation , 1995, astro-ph/9511116.

[70]  D. Balsara von Neumann stability analysis of smoothed particle hydrodynamics—suggestions for optimal algorithms , 1995 .

[71]  D. Weinberg,et al.  The Lyman-Alpha Forest in the Cold Dark Matter Model , 1995, astro-ph/9509105.

[72]  D. Weinberg,et al.  Cosmological Simulations with TreeSPH , 1995, astro-ph/9509107.

[73]  S. White,et al.  The Structure of cold dark matter halos , 1995, astro-ph/9508025.

[74]  Michael S. Warren,et al.  A portable parallel particle program , 1995 .

[75]  M. Steinmetz Grapesph: cosmological smoothed particle hydrodynamics simulations with the special-purpose hardware GRAPE , 1995, astro-ph/9504050.

[76]  P. Hut,et al.  Building a better leapfrog , 1995 .

[77]  Nickolay Y. Gnedin,et al.  Softened Lagrangian Hydrodynamics for Cosmology , 1995 .

[78]  F. Pearce,et al.  Hydra: An Adaptive--Mesh Implementation of PPPM--SPH , 1994, astro-ph/9409058.

[79]  Guohong Xu A new parallel N body gravity solver: TPM , 1994, astro-ph/9409021.

[80]  Michael S. Warren,et al.  Skeletons from the treecode closet , 1994 .

[81]  S. White,et al.  Simulations of dissipative galaxy formation in hierarchically clustering universes – I: Tests of the code , 1993 .

[82]  R. Cen,et al.  Cold Dark Matter Cosmology with Hydrodynamics and Galaxy Formation: The Evolution of the Intergalactic Medium and Background Radiation Fields , 1993 .

[83]  P. Bodenheimer,et al.  Multiple fragmentation in collapsing protostars , 1993 .

[84]  Junichiro Makino,et al.  Discreteness Noise versus Force Errors in N-Body Simulations: Erratum , 1993 .

[85]  R. Cen,et al.  Galaxy formation and physical bias , 1992 .

[86]  S. Tremaine,et al.  Symplectic integrators for solar system dynamics , 1992 .

[87]  Stuart L. Shapiro,et al.  Collisions of Giant Stars with Compact Objects: Hydrodynamical Calculations , 1991 .

[88]  F. Bouchet,et al.  Application of the Ewald method to cosmological N-body simulations , 1991 .

[89]  H. Couchman,et al.  Mesh-refined P3M - A fast adaptive N-body algorithm , 1991 .

[90]  A. Evrard Formation and Evolution of X-Ray Clusters: A Hydrodynamic Simulation of the Intracluster Medium , 1990 .

[91]  David H. Porter,et al.  A tree code with logarithmic reduction of force terms, hierarchical regularization of all variables, and explicit accuracy controls , 1989 .

[92]  L. Hernquist,et al.  TREESPH: A Unification of SPH with the Hierarchical Tree Method , 1989 .

[93]  Joshua E. Barnes,et al.  Error Analysis of a Tree Code , 1989 .

[94]  A. Evrard Beyond N-body: 3D cosmological gas dynamics , 1988 .

[95]  L. Hernquist,et al.  Performance characteristics of tree codes , 1987 .

[96]  Piet Hut,et al.  A hierarchical O(N log N) force-calculation algorithm , 1986, Nature.

[97]  G. Efstathiou,et al.  Numerical techniques for large cosmological N-body simulations , 1985 .

[98]  J. Monaghan,et al.  Shock simulation by the particle method SPH , 1983 .

[99]  Simon D. M. White,et al.  Clustering in a neutrino-dominated universe , 1983 .

[100]  A. Klypin,et al.  Three-dimensional numerical model of the formation of large-scale structure in the Universe , 1983 .

[101]  Andrew W. Appel,et al.  An Efficient Program for Many-Body Simulation , 1983 .

[102]  P. Bodenheimer,et al.  Fragmentation in a rotating protostar - A comparison of two three-dimensional computer codes , 1979 .

[103]  L. Lucy A numerical approach to the testing of the fission hypothesis. , 1977 .

[104]  J. Monaghan,et al.  Smoothed particle hydrodynamics: Theory and application to non-spherical stars , 1977 .

[105]  V. Springel,et al.  SUBMITTED TO THE ASTROPHYSICAL JOURNAL LETTERS Preprint typeset using LATEX style emulateapj v. 9/08/03 BLACK HOLES IN GALAXY MERGERS: THE FORMATION OF RED ELLIPTICAL GALAXIES , 2004 .

[106]  R. Teyssier c ○ ESO 2002 Astronomy Astrophysics , 2002 .

[107]  J. Silk,et al.  Cosmology and large scale structure , 1996 .

[108]  Cosmology and large scale structure , 1996 .

[109]  R. Klein,et al.  On the hydrodynamic interaction of shock waves with interstellar clouds. 1: Nonradiative shocks in small clouds , 1994 .

[110]  F. Lucchin CLUSTERING IN THE UNIVERSE , 1986 .

[111]  R W Hockney,et al.  Computer Simulation Using Particles , 1966 .

[112]  Tom Abel,et al.  An Electronic Publication Dedicated to Early Stellar Evolution and Molecular Clouds from the Editor the Formation of the First Star in the Universe , 2022 .

[113]  ournal of C osmology and A stroparticle hysics J Constrained simulations of the magnetic field in the local Universe and the propagation of ultrahigh energy cosmic rays , 2022 .