Hydra: an AdaptiveMesh Implementation of P 3MSPH
Abstract
We present an implementation of smoothed particle hydrodynamics (SPH) in an adaptive particleparticleparticlemesh (AP^{3}M) algorithm. The code evolves a mixture of purely gravitational particles and gas particles. SPH gas forces are calculated in the standard way from near neighbors. Gravitational forces are calculated using the mesh refinement scheme described by Couchman (1991). The AP^{3}M method used in the code gives rise to highly accurate forces. The maximum pairwise force error is set by an input parameter. For a maximum pairwise force error of 7.7%, the rms error in a distribution of particles is ≍0.3%. The refinedmesh approach significantly increases the efficiency with which the neighbor particles required for the SPH forces are located. The code, "Hydra," retains the principal desirable properties of previous P^{3}MSPH implementations; speed under light clustering, naturally periodic boundary conditions, and easy control of the accuracy of the pairwise interparticle forces. Under heavy clustering the cycle time of the new code is only 23 times slower than for a uniform particle distribution, overcoming the principle disadvantage of previous implementations a dramatic loss of efficiency as clustering develops. A 1000 step simulation with 65,536 particles (half dark, half gas) runs in one day on a Sun Sparc10 workstation.
The choice of time integration scheme is investigated in detail. We find that a simple singlestep predictorcorrector type integrator, which is equivalent to Leapfrog for velocityindependent forces, is the most efficient.
A method for generating an initial distribution of particles by allowing a uniform temperature gas of SPH particles to relax within a periodic box is presented. The average SPH density that results varies by ≍ ±1.3%. This is the fluctuation amplitude on roughly the Nyquist frequency; for smaller wavenumbers the fluctuations have lower amplitudes. We present a modified form of the LayzerIrvine equation which includes the thermal contribution of the gas together with radiative cooling.
The SPH and time integration schemes were tested and compared by running a series of tests of sound waves and shocks. These tests were also used to derive timestep constraints sufficient to ensure both energy and entropy conservation.
We have compared the results of simulations of spherical infall and collapse with varying numbers of particles. We show that many thousands of particles are necessary in a halo to correctly model the collapse.
As a further test, the cluster simulation of Thomas & Couchman (1992) has been rerun with the new code, which includes a number of improvements in the SPH implementation. We find close agreement except in the core properties of the cluster which are strongly affected by entropy scatter in the older simulation. This demonstrates the crucial importance of conserving entropy in SPH simulations.
 Publication:

The Astrophysical Journal
 Pub Date:
 October 1995
 DOI:
 10.1086/176348
 arXiv:
 arXiv:astroph/9409058
 Bibcode:
 1995ApJ...452..797C
 Keywords:

 HYDRODYNAMICS;
 METHODS: NUMERICAL;
 Astrophysics
 EPrint:
 29 pp, uuencoded Postscript