N-body simulation • Available codes: http://nbody.sourceforge.net/ • MODEST: http://www.manybody.org/modest/ • Most often used for star cluster: AMUSE and NBODY6/7 • Moving stars around: http://www.artcompsci.org/kali/pub/msa/title.html • Dark Energy Universe (DEUS) Simulation http://www.deus-consortium.org/ • Complete overview: Sverre J. Aarseth, 2003, Gravitational N-Body Simulations, Cambridge University Press What is a N-body simulation?  Simulating the interaction of N objects in a system  No limitation of interpretation  Examples: – Movement of stars under the influence of gravity in a galaxy – Star cluster formation – Clusters of galaxies *Overview v1 v2 v3 v4 N-body problem  Masses  Locations  Velocities  Geometries  Other Properties Basic N-body Simulation • Start with the N bodies • Initial position and velocity • For each time step acceleration of each body is calculated, for example based on the influence of gravity • Velocity is updated based on acceleration • Position is updated based on velocity How to update the position and velocity • The simplest update step is a Forward Euler algorithm: • Not very accurate • For the time step dt, a body is moving in the vi direction • Only correct at time i Leap-Frog algorithm • Position defined on integer time steps • Velocity defined on integer + ½ time steps • Velocity updated by (ai + ai+1) / 2 • The approximate value of a halfway between time steps i and i + 1. Parallel N-body methods • Barnes-Hut algorithm (Barnes & Hut, 1986, Nature, 324, 446) • Fast Multipole Method (http://www.ics.uci.edu/~ihler/papers/ihler_area.pdf) • Parallel Multipole Tree algorithm