next previous
Up: SPH simulations of clumps


  
Appendix D: Monte Carlo generation of spherical distributions

Each spherical cloud was obtained from the traditional Monte Carlo scheme: three normalized random sequences $(\xi_1,\xi_2,\xi_3)$ are transformed to spherical coordinates $(r,\theta,\phi)$ according to the known one-particle distribution function, or to the density law $\rho(r)$. Regarding the spherical symmetry, the angular coordinates do not dependent on the radial coordinate. Thus, we had the radial position calculated from:


 \begin{displaymath}\frac{4\pi}{M}
{\int_0}^{r}\rho(r)r^2{\rm d}r=\xi_1,
\end{displaymath} (D1)

which must be solved for r.

The angular coordinates, $\theta$ and $\phi$, are respectively given by


\begin{displaymath}\frac{1}{2}{\int_0}^\theta\sin\theta {\rm d}\theta
=\frac{1-\cos\theta}{2}=\xi_2
\end{displaymath} (D2)

and


\begin{displaymath}\frac{1}{2\pi}{\int_0}^{\phi}{\rm d}\phi
=\frac{\phi}{2\pi}=\xi_3.
\end{displaymath} (D3)


next previous
Up: SPH simulations of clumps

Copyright The European Southern Observatory (ESO)