Learn R Programming

nbody (version 1.41)

Gravitational N-Body Simulation

Description

Run simple direct gravitational N-body simulations. The package can access different external N-body simulators (e.g. GADGET-4 by Springel et al. (2021) ), but also has a simple built-in simulator. This default simulator uses a variable block time step and lets the user choose between a range of integrators, including 4th and 6th order integrators for high-accuracy simulations. Basic top-hat smoothing is available as an option. The code also allows the definition of background particles that are fixed or in uniform motion, not subject to acceleration by other particles.

Copy Link

Version

Install

install.packages('nbody')

Monthly Downloads

175

Version

1.41

License

GPL-3

Maintainer

Danail Obreschkow

Last Published

August 20th, 2024

Functions in nbody (1.41)

default.code

Set a default external simulation code
energy

Mechanical energy of an N-body system
.nbody.env

Package environment
nbody-package

Gravitational N-Body Simulation
setup

Initialize N-body simulation
reset.cm

Move center of mass to the origin
plot.simulation

Visualize an N-body simulation
run.simulation

Run a direct N-body simulation