Nbody2D

Documentation for Nbody2D. This package is particle mesh code in Julia that is inspired by Johan Hidding's nbody2d Python code (see jhidding.github.io/nbody2d for more details). It serves as a quick environment to learn and experiment with cosmological $N$-body simulations in the two-dimensional setting. This enables one to quickly develop intuition.

Using the package:

  • We create initial conditions by sampling both unconstrained and constrained Gaussian random fields.
  • We evolve the initial perturbations to the current epoch.
  • We estimate the density, velocity and number of stream fields using the Phase-Space Delaunay Tessellation Field Estimator.

Density and number of stream fields of the Zel'dovich approximation and an \$N\$-body simulation.

Installation

The Nbody2D package can be installed with the Julia package manager. From the Julia REPL, type ] to enter the Pkg REPL mode and run:

pkg> add Nbody2D

Or, equivalently, via the Pkg API:

julia> import Pkg; Pkg.add("Nbody2D")

Usage

Please have a look at the Tutorial page for details on how to use this package.

Contributors

This code was written by: