Comparing AMR and SPH Cosmological Simulations. I. Dark Matter and Adiabatic Simulations

We compare two cosmological hydrodynamic simulation codes in the context of hierarchical galaxy formation: the Lagrangian smoothed particle hydrodynamics (SPH) code GADGET, and the Eulerian adaptive mesh refinement (AMR) code Enzo. Both codes represent dark matter with the N-body method but use different gravity solvers and fundamentally different approaches for baryonic hydrodynamics. The SPH method in GADGET uses a recently developed "entropy conserving" formulation of SPH, while for the mesh-based Enzo two different formulations of Eulerian hydrodynamics are employed: the piecewise parabolic method (PPM) extended with a dual energy formulation for cosmology, and the artificial viscosity-based scheme used in the magnetohydrodynamics code ZEUS. In this paper we focus on a comparison of cosmological simulations that follow either only dark matter, or also a nonradiative ("adiabatic") hydrodynamic gaseous component. We perform multiple simulations using both codes with varying spatial and mass resolution with identical initial conditions. The dark matter-only runs agree generally quite well provided Enzo is run with a comparatively fine root grid and a low overdensity threshold for mesh refinement, otherwise the abundance of low-mass halos is suppressed. This can be readily understood as a consequence of the hierarchical particle-mesh algorithm used by Enzo to compute gravitational forces, which tends to deliver lower force resolution than the tree-algorithm of GADGET at early times before any adaptive mesh refinement takes place. At comparable force resolution we find that the latter offers substantially better performance and lower memory consumption than the present gravity solver in Enzo. In simulations that include adiabatic gasdynamics we find general agreement in the distribution functions of temperature, entropy, and density for gas of moderate to high overdensity, as found inside dark matter halos. However, there are also some significant differences in the same quantities for gas of lower overdensity. For example, at z = 3 the fraction of cosmic gas that has temperature log T > 0.5 is ~80% for both Enzo ZEUS and GADGET, while it is 40%-60% for Enzo PPM. We argue that these discrepancies are due to differences in the shock-capturing abilities of the different methods. In particular, we find that the ZEUS implementation of artificial viscosity in Enzo leads to some unphysical heating at early times in preshock regions. While this is apparently a significantly weaker effect in GADGET, its use of an artificial viscosity technique may also make it prone to some excess generation of entropy that should be absent in Enzo PPM. Overall, the hydrodynamical results for GADGET are bracketed by those for Enzo ZEUS and Enzo PPM but are closer to Enzo ZEUS.

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

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

[3]  M. Norman,et al.  ZEUS-2D : a radiation magnetohydrodynamics code for astrophysical flows in two space dimensions. II : The magnetohydrodynamic algorithms and tests , 1992 .

[4]  M. Norman,et al.  ZEUS-2D: A radiation magnetohydrodynamics code for astrophysical flows in two space dimensions. I - The hydrodynamic algorithms and tests. II - The magnetohydrodynamic algorithms and tests , 1992 .

[5]  Volker Springel,et al.  Cosmological SPH simulations: The entropy equation , 2001 .

[6]  U. Pen A Linear Moving Adaptive Particle-Mesh N-Body Algorithm , 1995 .

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

[8]  Matthias Steinmetz Grapesph: cosmological smoothed particle hydrodynamics simulations with the special-purpose hardware GRAPE , 1996 .

[9]  D. Eisenstein,et al.  HOP: A New Group-finding Algorithm for N-Body Simulations , 1997, astro-ph/9712200.

[10]  Jeremiah P. Ostriker,et al.  The Tree-particle-mesh N-body gravity solver , 1999 .

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

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

[13]  Performance Characteristics of TreePM codes , 2002, astro-ph/0212129.

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

[15]  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.

[16]  John Dubinski,et al.  Parallel TreeSPH , 1997 .

[17]  J Korea,et al.  Cosmological Shock Waves and Their Role in the Large-Scale Structure of the Universe , 2003, astro-ph/0305164.

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

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

[20]  S. J. Dodds,et al.  Non-linear evolution of cosmological power spectra , 1996 .

[21]  P. Woodward,et al.  The numerical simulation of two-dimensional fluid flow with strong shocks , 1984 .

[22]  The Astrophysical Journal, submitted Preprint typeset using L ATEX style emulateapj v. 6/22/04 EFFECTS OF COOLING AND STAR FORMATION ON THE BARYON FRACTIONS IN CLUSTERS , 2005 .

[23]  P. Colella,et al.  Local adaptive mesh refinement for shock hydrodynamics , 1989 .

[24]  Wayne Hu,et al.  Power Spectra for Cold Dark Matter and Its Variants , 1997, astro-ph/9710252.

[25]  M. Norman,et al.  Nonlinear hydrodynamics of cosmological sheets. 1: Numerical techniques and tests , 1994 .

[26]  The radial structure of galaxy groups and clusters , 2003, astro-ph/0306264.

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

[28]  G. Bryan,et al.  A Hybrid AMR Application for Cosmology and Astrophysics , 1997, astro-ph/9710187.

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

[30]  Jeremiah P. Ostriker,et al.  A piecewise parabolic method for cosmological hydrodynamics , 1995 .

[31]  B. V. Leer,et al.  Towards the ultimate conservative difference scheme. IV. A new approach to numerical convection , 1977 .

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

[33]  E. Bertschinger Self-similar secondary infall and accretion in an Einstein-de Sitter universe , 1985 .

[34]  A. Evrard,et al.  A comparison of cosmological hydrodynamic codes , 1994, astro-ph/9404014.

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

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

[37]  Ravi K. Sheth Giuseppe Tormen Large scale bias and the peak background split , 1999 .

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

[39]  Abraham Loeb,et al.  In the Beginning: The First Sources of Light and the Reionization of the Universe , 2000 .

[40]  L. Hernquist,et al.  Some cautionary remarks about smoothed particle hydrodynamics , 1993 .

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

[42]  V. Springel,et al.  Cosmological smoothed particle hydrodynamics simulations: the entropy equation , 2002 .

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