Elsevier Science Home
Computer Physics Communications Program Library
Full text online from Science Direct
Programs in Physics & Physical Chemistry
CPC Home

[Licence| Download | New Version Template] afav_v1_0.tar.gz(3827 Kbytes)
Authors: K. A. S. Croker
Program title: Gadget-2.0.7-ngravs
Catalogue identifier: AFAV_v1_0
Distribution format: tar.gz
Journal reference: Comput. Phys. Commun. 207(2016)478
Programming language: C.
Computer: Commodity.
Operating system: Unix.
RAM: 256MB+
Keywords: Numerical methods, Gravitation, Cosmology, N-body.
Classification: 1.9, 4.12.

External routines: GSL, FFTW3, HDF5 (optional)

Nature of problem:
N-body cosmological codes are traditionally designed to investigate a single gravitating species interacting via the Newtonian force law. There exist viable extensions to General Relativity [1], however, which predict weakfield, slow-motion limits featuring distinct gravitational force laws between distinct particle species. To enable investigation and constraint of these theories with available astrophysical data, a necessary first step is to extend an N-body simulator to handle distinct gravitating species.

Solution method:
The massively parallel Barnes-Hut tree, Fast Fourier Transform, and sorting routines of the versatile and well-vetted N-body simulator [2] gadget-2 were extended to support D distinct gravitationally interacting species. The tree implementation now vectorizes over each species' monopole masses and positions, the Fourier routines now handle active and passive gravitational masses separately, and the sorting routines now group all particle data by type. An additional file was introduced allowing the user to specify all D2 gravitational interactions: real space, Fourier space, and lattice summation corrections. To improve monopole approximations in scenarios where the scale of the gravitational interaction depends on the mass itself, an optional tracking of the number of bodies contributing to any particular monopole approximation has been written.

Force laws with mass-dependent scale lengths are not amenable to the implemented Fourier methods (or even the traditional [3] Fourier approach). Nodes containing highly heterogeneous collections of particles with different mass-dependent scale lengths may not be well-approximated, even with the additional tracking introduced. The collisional "gas" species can only interact via a single gravitational force law.

Unusual features:
The extension allows consideration of quite general and exotic interactions between bodies, and will serve as a common platform for model-dependent adjustments to the cosmological background evolution.

Additional comments:
Data file format is identical to that of gadget-2. Configuration file format is unchanged, save for the addition of required bindings between particle species and gravitational type.

Running time:
Typical running times are ≤ 2Dx those of gadget-2, where D is an integer between 1 and 6.

[1] V. Springel, The cosmological simulation code GADGET-2, MNRAS 364 (2005) 1105-1134. arXiv:astro-ph/0505010, doi:10.1111/j.1365-2966.2005.09655.x.
[2] M. Hohmann, M. N. R. Wohlfarth, Repulsive gravity model for dark energy, Phys. Rev. D81 (10) (2010) 104006. arXiv:1003.1379, doi:10.1103/PhysRevD.81.104006. Reference 2
[3] R. W. Hockney, J. W. Eastwood, Computer Simulation Using Particles, IOP Pub- lishing Ltd, 1988.