Skip to main content
Sandbox Physics

M078 · Every star pulls every star

N-Body Star Cluster

What happens after a cold cloud collapses? It does not settle at once. The cloud falls inward, rebounds and partly expands again, while total energy and momentum stay fixed. A single moment when the virial ratio, the usual balance test between kinetic and potential energy, sits near one does not show the cluster has reached equilibrium; it may just be passing through.

Release a three-dimensional cloud of particles that all attract one another. Change their initial speeds, the spread of masses and the force softening, then follow the collapse, rebound and expansion while tracking total energy and momentum.

Interactive modelN-Body Star Cluster
Model timeReady\text{Ready}
Half-mass radiusReady\text{Ready}
Instantaneous virial ratioReady\text{Ready}
Total energyReady\text{Ready}
Energy error / initial binding scaleReady\text{Ready}
Total momentum magnitudeReady\text{Ready}

Physics tutorial

N-Body Star Cluster

BackgroundIn a star cluster every star pulls on every other, so the cloud's own gravity keeps reshaping the cloud.

Why it mattersFollowing every particle lets you test which quantities the motion of the whole cluster conserves.

Start with the essentials

Focus question
Does a cold cloud settle, rebound or escape?
One-sentence intuition
A virial ratio measured at one instant cannot show that the cluster is in equilibrium.

Core mathematical model

Softened gravity between each pair

U=−∑i<jGmimjrij2+ϵ2U=-\sum_{i<j}\frac{Gm_im_j}{\sqrt{r_{ij}^2+\epsilon^2}}

Force and potential use the same softening.

The virial uses the force moment

W=∑iri⋅Fi,Q=2K∣W∣W=\sum_i\mathbf r_i\cdot\mathbf F_i,\quad Q=\frac{2K}{|W|}

With softening, this force moment is not equal to the potential energy.

How the moment of inertia changes

12I¨=2K+W,I=∑imiri2\frac12\ddot I=2K+W,\quad I=\sum_i m_i r_i^2

When the radius stops shrinking and turns around, that alone does not prove equilibrium.

Energy and momentum conservation

E=K+U,P=∑imiviE=K+U,\quad\mathbf P=\sum_i m_i\mathbf v_i

Track the numerical drift in these totals separately from how the motion looks.

Common difficulties

What a particle represents

Typical misconceptionEach bright dot is an individual, resolved star.

Better mental modelThe markers show particle mass. Close encounters between stars need a different model.

Run the experiment

  1. 01

    Release a cold cloud

    Choose Cold collapse and play.

    What to observe: The cloud contracts and then rebounds, driven by gravity alone.
  2. 02

    Give the stars more speed

    Compare Warm cloud with Fast expansion.

    What to observe: Clouds with the same initial shape end up behaving differently.
  3. 03

    Halve the timestep

    Keep the same cloud seed and turn on Use half timestep.

    What to observe: Compare the energy drift of the two runs before reading anything into individual encounters.

Related experiments and articles

Star cluster colours and populations · Reading path

Star cluster colours and populations

Articles on this path that use this experiment, followed by the other experiments they suggest.

  1. ArticleSame birthday, different stars
  2. ArticleDraw masses before counting stars
  3. ArticleTwo stars, one point
  4. ArticleAn age comparison needs a model
  5. ArticleA fixed patch of M67
  6. ArticleA concentrated core is not a clock
FeedbackSomething broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy