Astrophysics Source Code Library

Making codes discoverable since 1999

Searching for 'nbody'

[ascl:1102.006] NBODY Codes: Numerical Simulations of Many-body (N-body) Gravitational Interactions

I review the development of direct N-body codes at Cambridge over nearly 40 years, highlighting the main stepping stones. The first code (NBODY1) was based on the simple concepts of a force polynomial combined with individual time steps, where numerical problems due to close encounters were avoided by a softened potential. Fortuitously, the elegant Kustaanheimo-Stiefel two-body regularization soon permitted small star clusters to be studied (NBODY3). Subsequent extensions to unperturbed three-body and four-body regularization proved beneficial in dealing with multiple interactions. Investigations of larger systems became possible with the Ahmad-Cohen neighbor scheme which was used more than 20 years ago for expanding universe models of 4000 galaxies (NBODY2). Combining the neighbor scheme with the regularization procedures enabled more realistic star clusters to be considered (NBODY5). After a period of simulations with no apparent technical progress, chain regularization replaced the treatment of compact subsystems (NBODY3, NBODY5). More recently, the Hermite integration method provided a major advance and has been implemented on the special-purpose HARP computers (NBODY4) together with an alternative version for workstations and supercomputers (NBODY6). These codes also include a variety of algorithms for stellar evolution based on fast lookup functions. The treatment of primordial binaries contains efficient procedures for chaotic two-body motion as well as tidal circularization, and special attention is paid to hierarchical systems and their stability. This family of N-body codes constitutes a powerful tool for dynamical simulations which is freely available to the astronomical community, and the massive effort owes much to collaborators.

[ascl:1110.008] Glnemo2: Interactive Visualization 3D Program

Glnemo2 is an interactive 3D visualization program developed in C++ using the OpenGL library and Nokia QT 4.X API. It displays in 3D the particles positions of the different components of an nbody snapshot. It quickly gives a lot of information about the data (shape, density area, formation of structures such as spirals, bars, or peanuts). It allows for in/out zooms, rotations, changes of scale, translations, selection of different groups of particles and plots in different blending colors. It can color particles according to their density or temperature, play with the density threshold, trace orbits, display different time steps, take automatic screenshots to make movies, select particles using the mouse, and fly over a simulation using a given camera path. All these features are accessible from a very intuitive graphic user interface.

Glnemo2 supports a wide range of input file formats (Nemo, Gadget 1 and 2, phiGrape, Ramses, list of files, realtime gyrfalcON simulation) which are automatically detected at loading time without user intervention. Glnemo2 uses a plugin mechanism to load the data, so that it is easy to add a new file reader. It's powered by a 3D engine which uses the latest OpenGL technology, such as shaders (glsl), vertex buffer object, frame buffer object, and takes in account the power of the graphic card used in order to accelerate the rendering. With a fast GPU, millions of particles can be rendered in real time. Glnemo2 runs on Linux, Windows (using minGW compiler), and MaxOSX, thanks to the QT4API.

[ascl:1201.010] HNBody: Hierarchical N-Body Symplectic Integration Package

HNBody is a new set of software utilities geared to the integration of hierarchical (nearly-Keplerian) N-body systems. Our focus is on symplectic methods, and we have included explicit support for three classes of particles (heavy, light, and massless), second and fourth order methods, post-Newtonian corrections, and the use of a symplectic corrector (among other things). For testing purposes, we also provide support for more general integration schemes (Bulirsch-Stoer & Runge-Kutta). Configuration files employing an intuitive syntax allow for easy problem setup, and many simple simulations can be done without the user compiling any code. Low-level interfaces are also available, enabling extensive customization.

[ascl:1206.007] Plumix: Generating mass segregated star clusters

Plumix is a small package for generating mass segregated star clusters. Its output can be directly used as input initial conditions for NBODY4 or NBODY6 code. Mass segregation stands as one of the most robust features of the dynamical evolution of self-gravitating star clusters. We formulate parametrized models of mass segregated star clusters in virial equilibrium. To this purpose we introduce mean inter-particle potentials for statistically described unsegregated systems and suggest a single-parameter generalization of its form which gives a mass-segregated state. Plumix is a numerical C-code generating the cluster according the algorithm given for construction of appropriate star cluster models. Their stability over several crossing-times is verified by following the evolution by means of direct N-body integration.

[ascl:1302.004] pNbody: A python parallelized N-body reduction toolbox

pNbody is a parallelized python module toolbox designed to manipulate and interactively display very large N-body systems. It allows the user to perform complicated manipulations with only very few commands and to load an N-body system and explore it interactively using the python interpreter. pNbody may also be used in python scripts. pNbody contains graphical facilities for creating maps of physical values of the system, such as density, temperature, and velocities maps. Stereo capabilities are also implemented. pNbody is not limited by file format; the user may use a parameter file to redefine how to read a preferred format.

[ascl:1305.002] pynbody: N-Body/SPH analysis for python

Pynbody is a lightweight, portable, format-transparent analysis package for astrophysical N-body and smooth particle hydrodynamic simulations supporting PKDGRAV/Gasoline, Gadget, N-Chilada, and RAMSES AMR outputs. Written in python, the core tools are accompanied by a library of publication-level analysis routines.

[ascl:1502.010] nbody6tt: Tidal tensors in N-body simulations

nbody6tt, based on Aarseth's nbody6 (ascl:1102.006) code, includes the treatment of complex galactic tides in a direct N-body simulation of a star cluster through the use of tidal tensors (tt) and offers two complementary methods. The first allows consideration of any kind of galaxy and orbit, thus offering versatility; this method cannot be used to study tidal debris, as it relies on the tidal approximation (linearization of the tidal force). The second method is not limited by this and does not require a galaxy simulation; the user defines a numerical function which takes position and time as arguments, and the galactic potential is returned. The space and time derivatives of the potential are used to (i) integrate the motion of the cluster on its orbit in the galaxy (starting from user-defined initial position and velocity vector), and (ii) compute the tidal acceleration on the stars.

[ascl:1703.012] ICICLE: Initial Conditions for Isolated CoLlisionless systEms

ICICLE (Initial Conditions for Isolated CoLlisionless systEms) generates stable initial conditions for isolated collisionless systems that can then be used in NBody simulations. It supports the Navarro-Frenk-White, Hernquist, King and Einasto density profiles.

[ascl:1703.007] sidm-nbody: Monte Carlo N-body Simulation for Self-Interacting Dark Matter

Self-Interacting Dark Matter (SIDM) is a hypothetical model for cold dark matter in the Universe. A strong interaction between dark matter particles introduce a different physics inside dark-matter haloes, making the density profile cored, reduce the number of subhaloes, and trigger gravothermal collapse. sidm-nbody is an N-body simulation code with Direct Simulation Monte Carlo scattering for self interaction, and some codes to analyse gravothermal collapse of isolated haloes. The N-body simulation is based on GADGET 1.1.

[ascl:2205.010] pyICs: Initial Conditions creator for isolated galaxy formation simulations

pyICs creates initial condition (IC) files for N-body simulations of the formation of isolated galaxies. It uses the pynbody analysis package (ascl:1305.002) to create the actual IC files. pyICs generates dark matter halos (DM) in dynamical equilibrium which host a rotating gas sphere. The DM particle velocities are drawn from the equilibrium distribution function and the gas sphere has an angular momentum profile. The DM and the gas share the same 3D radial density profile. The code natively supports the αβγ-models: ρ ~ (r/a)-γ[1+(r/a)α](γ-β)/α. If γ <= 3, the profiles are smoothly truncated outside the virial radius. The radial profile can be arbitrary as long as python functions for the profile itself and its first and second derivative with radius are given.

[ascl:1806.008] gsf: galactic structure finder

gsf applies Gaussian Mixture Models in the stellar kinematic space of normalized angular momentum and binding energy on NIHAO high resolution galaxies to separate the stars into multiple components. The gsf analysis package assumes that the simulation snapshot has been pre-processed with a halo finder. It is based on pynbody (ascl:1305.002) and the scikit-learnpython package for Machine Learning; after loading, orienting, and transforming a simulation snapshot to physical units, it runs the clustering algorithm and performs the direct N-body gravity force using all the particles in the given halo.

[ascl:1904.027] nbodykit: Massively parallel, large-scale structure toolkit

nbodykit provides algorithms for analyzing cosmological datasets from N-body simulations and large-scale structure surveys, and takes advantage of the abundance and availability of large-scale computing resources. The package provides a unified treatment of simulation and observational datasets by insulating algorithms from data containers, and reduces wall-clock time by scaling to thousands of cores. All algorithms are parallel and run with Message Passing Interface (MPI); the code is designed to be deployed on large super-computing facilities. nbodykit offers an interactive user interface that performs as well in a Jupyter notebook as on super-computing machines.

[ascl:1912.018] Tangos: Framework and web interface for database-driven analysis of numerical structure formation simulations

Tangos builds databases (along the lines of Eagle or MultiDark) for cosmological and zoom simulations. Its modular system generates and queries databases. It is designed to store and manage results from a user's own analysis code, provides web and python interfaces, and allows users to construct science-focused queries, including across entire merger trees, without requiring knowledge of SQL. Tangos manages the process of populating the database with science data, including auto-parallelizing the analysis. It can be customized to work with multiple python modules such as pynbody (ascl:1305.002) or yt (ascl:1011.022) to process raw simulation data; it defaults to using SQLite, but allows use of other databases as the underlying store through the use of SQLAlchemy.

[ascl:2007.005] PeTar: ParticlE Tree & particle-particle & Algorithmic Regularization code for simulating massive star clusters

The N-body code PETAR (ParticlE Tree & particle-particle & Algorithmic Regularization) combines the methods of Barnes-Hut tree, Hermite integrator and slow-down algorithmic regularization (SDAR). It accurately handles an arbitrary fraction of multiple systems (e.g. binaries, triples) while keeping a high performance by using the hybrid parallelization methods with MPI, OpenMP, SIMD instructions and GPU. PETAR has very good agreement with NBODY6++GPU results on the long-term evolution of the global structure, binary orbits and escapers and is significantly faster when used on a highly configured GPU desktop computer. PETAR scales well when the number of cores increase on the Cray XC50 supercomputer, allowing a solution to the ten million-body problem which covers the region of ultra compact dwarfs and nuclear star clusters.