banner

The site's hierarchy



Home page :: Private area :: Site Map :: Credits
Science / Conditions Initiales / Conditions Initiales Idéalisées / Initial conditions for isolated galaxies / Density distributions using cumulative functions

Navigation

Mar 2009
MTWTFSS
2324252627281
2345678
9101112131415
16171819202122
23242526272829
303112345
News
  • Les premiers zoom de galaxies sont accessibles
  • Le halo FOF 6133 de la boite Horizon L et le halo FOF 544 de Horizon S ont été resimulés avec plusieurs techniques de zoom. Il est important que chaque "zoomer" valide sa méthode, avant de lancer une campagne de zoom sur un plus grand cataloque.
  • Les données de la simulation Mare Nostrum sont disponibles
  • 34 snapshots jusqu’à z=4 sont accessibles sur horizon3 et sur le serveur de fichiers de l’IDRIS à la collaboration Horizon.
  • Méso Machine HPC1 opérationnelle
  • Depuis le 23 Octobre 2005, la Méso machine du site horizon est operationnelle. Elle correspond à 3 quadriprocesseurs avec chacun 64 Giga de RAM reliés par infiniband, ainsi qu’un access conséquent (sur une base de projet dédié) au reste de la ferme). Son acces est ouvert a toute personne de la collaboration ayant acces à la minigrille et qui en fait la demande a admin-minigrille
  • http://
  • Workshop Horizon le 14 et 15 novembre 2005
  • Il aura lieu à Paris les 14 et 15 novembre 2005 (prévoir une nuit sur place). L’enregistrement est ouvert dans la rubrique "meeting!"
  • http://

Density distributions using cumulative functions


by Emsellem Eric (Tuesday 15 November 2005)

The simplest and most efficient way of generating a set of N particles following some a priori density distribution (or corresponding gravitational potential) is to make use of cumulative functions.

Imagine you wish to generate positions for N particles following some arbitrary spherical density profile rho(r). The density does only depend on the radius, but not on the other 2 spherical coordinates Phi and Theta. So because of this simple geometry, you already know that each particle, for a fixed radius, has a uniform probability to be at an angle Phi, and Theta (in spherical coordinates). This means that if you already know the radius of each particle, you could then easily distribute them using spherical coordinates by randomly choosing a number between 0 and 2*Pi for Phi, and again one draw for Theta. You are then left with chosing the radius of each particle. This is where the cumulative function enters.

You can easily calculate the integrated mass M(r) for the model you wish to generate. M(r) is the mass within the sphere of radius r. So that if your model has a finite mass Mt (and only when this condition is satisfied), Mn(r) = M(r) / Mt is the normalized integrated mass, which is 0 for r=0, and 1 for r=infinity. Then one particle has a probability Mn(r) to be between a radius of 0 and r. You can then easily reverse the argument and generate N radius for N particles so that they follow the right density profile: you randomly choose a number X between 0 and 1, and set up the radius r such as Mn(r) = X. You then associate the corresponding radius r to that particle. This guarantees that after generating N particles, the integrated mass of your model will be consistent with M(r), so that the density profile of your model will naturally be consistent with rho(r).

The process to generate the positions for N particles is then easily described:
- you first derive Mn(r) for your favorite rho(r)
- you then randomly draw numbers X_i between 0 and 1 for your N particles (using a uniform distribution), where i goes from 1 to N.
- you associate the corresponding radii to each of them (Mn(r_i) = X_i).
- you then draw N times a random number between 0 and 2*Pi for Phi, and the same for Theta.
- you end up with r, Theta, Phi for your N particles, consistently with the initially given density distribution rho(r).

This illustrates how to generate a set of N bodies for a spherical distribution. This can obviously be translated for any other distribution where the density distribution has a form which allow coordinates to be independent from each others. For example: you can easily generate N particles in a Toomre disk by first assuming a two-dimensional distribution (zero thickness), and using the cumulative function for such a radial profile, and then thicken the disk using some random distribution in along the vertical axis (uniform, gaussian, etc...). You should also have a look at the detailed explanation provided in the Appendix of the original paper by Aarseth, Henon, Wielen 1974, A&A 37, 183, or in the dialog set up by Piet Hut and Jun Makino (Kali).

Many examples exist to illustrate this, but the best is to have a look at codes available on the web. You can for instance have a look at the software distributed by Joshua Barnes (e.g. The Zeno programs at Zeno, or his latest tree code at Treecode).