/nbody_jl

A simple gravitational n-body simulation routine written in Julia

Primary LanguageJuliaApache License 2.0Apache-2.0

nbody_jl

This is a simple gravitational n-body simulation routine written in Julia. It uses Velocity Verlet integration to compute trajectories of n bodies. It outputs the body positions to a csv file (can be opened in almost all text editors or spreadsheet applications) and saves an svg image file of plotted trajectories. Simulations are set up with a simple text configuration file (an example "input.txt" is provided).

2-body example:

2_body_example

3-body example:

3_body_example