Institute of Astronomy

N-Body Simulation

Sverre Aarseth's research into numerical simulations of many-body (N-body) gravitational interactions spans over 40 years and is reported in several publications and his book. Sverre has developed a set of FORTRAN codes which describe the dynamics very closely, and these are regarded by many as the de facto standard.


Sverre Aarseth's codes are available freely for download from the N-Body directory at Your browser should present you with an FTP viewer window when you click on this link and you should be able to copy whole code group directories at a time.

Use the links below to identify and download the specific files that you need.

At any time if you would like further information, please contact Sverre Aarseth.

Code Group Filename Filesize (Kb) Notes
  CODES 2 General textual description of the codes.
nbody1 README 1 The version nbody1.tar.Z is in full REAL*8.
The file nbody1_real4.tar.Z is the old version with mixed REAL*4/*8 precision which is kept for historical reasons.
The recent file nbody1h.tar.gz is the Hermite block-step formulation for workstations and (micro-)GRAPE, developed with Jun Makino in 1991.
  nbody1.tar.Z 26
  nbody1_real4.tar.Z 26
  nbody1h.tar.gz 140
nbody2 nbody2.tar.Z 213 Directory nbody2 contains the code NBODY2 and an article describing it. The whole file is called nbody2.tar.Z. Inside is the code, the article chap9.tex and also The article may be produced in TeX using the enclosed macro
svnyp.sty (or see New Ast. 6, 277). The code NBODY2H is the Hermite block-step version of NBODY2.
  nbody2h.tar.Z 185
nbody3 nbody3.tar.Z 204 One force polynomial with full regularization.
nbody4 README 1 The public GRAPE-6 or micro-Grape code NBODY4
and the equivalent brute force code for workstations or laptops
called BRUT4.
The current versions were updated 12 March 2006.
Introduction to running simulations.
  nbody4.tar.gz 360
  brut4.tar.gz 340
  intro_nbody4.pdf 1
nbody5 README 1 The code NBODY5 has been heavily used but
is no longer updated. NBODY6 is recommended instead.
  nbody5.tar.Z 289
nbody6 README 1

README contains some past history of NBODY6.
Further practical info can be found in directory Docs.
nbody6.tar.gz holds the new standard code NBODY6.
The previous 2006 version has been renamed as old6.tar.gz.
The postscript file man6.pdf is the new manual.
The 2006 manual has been renamed as ps file
Rainer Spurzem's corresponding parallel code, nbody6++,
can be obtained here.
Introduction to running simulations.
README2 contains input file for using GPU with nbody6.
guide.pdf is guide for SSE and GPU with nbody6.

Tar file for the GPU directory and library.
Tar file for the new GPU2 directory and library.

pdf file of new NBODY6-GPU paper.


  nbody6.tar.gz 980
  old6.tar.gz 640
  man6.pdf 200 306
  intro_nbody6.pdf 1
  guide.pdf 30
  gpu.tar.gz 65
  gpu2.tar.gz 95
  nbody6-gpu.pdf 95
planet planet.tar.Z 16 PLANET is a Hermite code for planetesimals.
PLANET3 is a planetary code with fragmentation.
  planet3.tar.Z 30
triple triple.tar.Z 13 Basic version of three-body regularization.
TRIPLE movie code with X11 graphics.
  movie3.tar.Z 26
chain chain.tar.Z 20 Basic chain version. CHAIN2 includes the slow-down
procedure (Cel. Mech. 64, 197).
Other versions are available upon request.
movie.tar.Z holds X11 movie version of CHAIN.
  chain2.tar.Z 26
  movie.tar.Z 48
comove comove.tar.Z 28 Cosmological N-body code in comoving coordinates.
errata README 1 The file "errata" is a text file for book errata of 3/10/03
and "" is the corresponding postscript file.
The text file "errata2" contains subsequent mistakes.
  errata 2 54
  errata2 1
hermit hermit.tar.Z 16 HERMIT is a basic Hermite N-body code.
HERMIT2 uses time-symmetric Hermite method of Kokubo et al.
HERMIT4 is time-symmetric Hermite with Burdet-Heggie regularization.
The manual is described in the postscript file
  hermit2.tar.Z 16
  hermit4.tar.Z 43 133
toy README 15 Toy codes for unperturbed two-body motion.
Five different regularization methods are implemented.
A new version called hermit.tar.Z includes Post-Newtonian
perturbations derived from the 2005 paper of Mora and Will.
  toy.tar.Z 65
  hermit.tar.Z 22
multireg README 1  
  triple.tar.Z 22

triple.tar.Z holds the three-body regularization code described in the manual.
chain0.tar.Z contains the basic chain regularization code as described in the manual
chain.tar.Z gives the full version with many optional features and is described in the manual.
The postscript file is the manual for the three-body
and chain codes.
triple2.tar.Z contains the standard AZ method with an external
potential as well as optional movie facilities for PGPLOT and X11.
The code triple3.tar.Z contains GR example discussed in 2007 paper.
A version of standard TRIPLE called kozai.tar.Z was added 21/6/2012.

  chain0.tar.Z 14
  chain.tar.Z 45 220
  triple2.tar.Z 32
  triple3.tar.Z 50
  kozai.tar.Z 30
talks talks.tar.gz 600 N-body talks Nov 2006.
nbody0 nbody0.f 1 Compact fourth-order Hermite block-step code.


Page last updated: 25 June 2012 at 12:01