pretentiousUsername / nBodySimulator

A basic n-body simulator written in Julia.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An $n$-body simulator

The current state of this program.

This program isn't anything special, just an attempt at writing a generic $n$-body simulation in Julia. This doesn't really do much differently from other similar projects. There's still much to do, so check back later. This program can perform simulations in any arbitrary number of dimensions, which is quite cool, but I'm not sure if it's really important—if you're really into, say, gravity in 6 dimensions, you might really enjoy this program. Also, it's pretty easy to define any arbitrary force you might want, though I'm not sure if that's a feature in most other programs like this.

I think it's worth noting this is a hobby project to improve my lackluster programming skills—if you're looking for serious software, I would highly suggest you check out SciML's NBodySimulator.jl, or the excellent DynamicalSystems.jl package. This software is inefficient, it will likely be buggy, and may go without decent documentation—I'm also writing this program under a considerable creative restraint, using as little outside code as possible. (It sucks being separated from all of those really nice SciML packages.)

In the future, I might implement a routine for solving the Heisenberg equations of motion for particles, rather than Hamilton's equations, but that's a big maybe. There would be a lot of linear algebra involved, and I don't see a point in getting that involved for a hobby project. Programming this has already been a lot of effort, in particular, it's been tempting to just use a library, instead of solving differential equations with my own code—it turns out, programming and physics are both quite hard.

This program uses the MIT license.

About

A basic n-body simulator written in Julia.

License:MIT License


Languages

Language:Julia 100.0%