0

I coded an $N$-Body tree algorithm. Now I want to test the code for a particle configuration which represents at the beginning a sphere with radius $R=1$. All $N$ particles are randomly distributed inside the sphere. For the mass I chose $m_i=\frac{1}{N}$.

Now the difficult part to me, the right velocity: I want the sphere to rotate around its own axis in such a way that the sphere neither explodes (centrifugal force > gravitational force) nor implodes (centrifugal force < gravitational force). As a result for large simulation time $T_{MAX}$ I would expect a formation as known from a spiral galaxy.

So, I know what I have to consider, but I do not know how to get the right velocities for such a particle distribution. How should I possibly start? I would really appreciate any help.

Gilfoyle
  • 223

0 Answers0