I'm interested in doing simulations with large numbers of particles and need a good n-body code. Are there any out there in the public domain that are open-source and what are their strengths and weaknesses. I'm interested in all types of codes, ones that can be run on a multi-core desktop for basic simulations and also ones that can be run on large parallel clusters (I have access to both).

For each entry please provide a link and a brief summary of the nature of the code and strengths of the software. The goal here is to provide a reference list for those interested in the topic.

  • $\begingroup$ You might want to look at en.wikipedia.org/wiki/Gravit in addition to the great suggestions below. $\endgroup$
    – user854
    Dec 25, 2015 at 16:25
  • $\begingroup$ I used the Gravit because it is full of options and the code is clear, but the integrator is simple and I'had implemented a Velocity Verlet one (and a Brook+ version to be aapted to opencl). It is Lua scriptable ! $\endgroup$ Mar 10, 2016 at 14:41

3 Answers 3


First of all, I do not have any experience with this, I am an Astronomy hobbyist at best. So I am just going to present what I found with minimal comment at this time. I found this web page that links to several programs: http://nbody.sourceforge.net/ They link to the University of Washington and their n-body shop. I don't know what your status must be to get that software (a student perhaps).

The first link also lists these sources:

Other Astrophysical N-body projects

Integration with work by others is very desirable. Here are some projects we know about. To let us know about others by submitting a new item to the SourceForge Bugs Tracker.

  • The Nbody Shop - The first software released here has come from this group. The TIPSY nbody visualization program is available from this group.
  • NChilada - a project to create a parallel visualization and analysis package.
  • Hubble in a Bottle - a High performance parallel visualization tool. Hosted on Sourceforge.
  • NEMO - a stellar dynamics toolbox.
  • GADGET - a freely available parallel code for cosmological N-body/SPH simulations.
  • SUNRISE - a GPL program to do radiative transfer imaging of cosmological or galactic SPH simulations.
  • AMIGA - a freely available (GPL) shared memory parallel adaptive mesh code that also includes a group finder.
  • astro-sim.org - a community site with pointers to astrophysical CFD and n-body codes.

Some additional links that I have found:



Gravity 6

I hope this series of links gives you what you want.



Some of those are open source and some not. You'll have to do some googling to get to the useful information, but it's somewhere to start, at least.


Amara Graps wrote a good overview of n-body simulation methods.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.