ilovematter / nbody_jl

A simple gravitational n-body simulation routine written in Julia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

A simple gravitational n-body simulation routine written in Julia

License:Apache License 2.0


Languages

Language:Julia 100.0%