Skip to main content
Sandbox Physics

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.

Watch an N-body cloud collapse, segregate by mass and eject stars. Resolve a binary encounter and track the energy exchange.

Interactive modelN-Body Star Cluster

Follow the energy through a changing star cloud

BackgroundGravity makes a cold cloud contract and rebound. Different masses can exchange energy, and a bound pair can give energy to a passing star.

Why it mattersTrack those changes in actual pairwise three-dimensional motion, rather than assigning a separate collapse, segregation or heating curve.

Focus question
Where does the cloud’s energy go?
One-sentence intuition
Look at the energy exchange and the history of mass-group radii. A large radius, a single virial value or one close encounter cannot establish long-term equilibrium or permanent escape.

Core mathematical model

Every pair uses the same softened potential and force

Uϵ=−∑i<jGmimjrij2+ϵ2ai=∑j≠iGmj(rj−ri)(rij2+ϵ2)3/2\begin{aligned}U_\epsilon&=-\sum_{i<j}\frac{Gm_im_j}{\sqrt{r_{ij}^2+\epsilon^2}}\\\mathbf a_i&=\sum_{j\ne i}\frac{Gm_j(\mathbf r_j-\mathbf r_i)}{(r_{ij}^2+\epsilon^2)^{3/2}}\end{aligned}

Pair-symmetric forces preserve total momentum. Softening limits close forces; the particles have no physical surfaces and do not collide as stars.

The virial uses a force moment

W=−∑i<jGmimjrij2(rij2+ϵ2)3/2,Q=2K∣W∣W=-\sum_{i<j}\frac{Gm_im_jr_{ij}^2}{(r_{ij}^2+\epsilon^2)^{3/2}},\qquad Q=\frac{2K}{|W|}

With softening, this force moment differs from potential energy. An instantaneous ratio near one does not by itself establish equilibrium.

Compare fixed heavy and light groups

∑i∈g∣ri−Rcm∣≤rh,gmi≥12∑i∈gmi\sum_{\substack{i\in g\\|\mathbf r_i-\mathbf R_{\rm cm}|\leq r_{h,g}}}m_i\geq\frac12\sum_{i\in g}m_i

Use the smallest radius satisfying this condition. Group membership is fixed by initial mass; both groups use the same centre. Follow a time history because finite groups fluctuate.

A bound pair can supply energy

Eb=μ122∣v2−v1∣2−Gm1m2r122+ϵ2μ12=m1m2m1+m2\begin{aligned}E_b&=\frac{\mu_{12}}2|\mathbf v_2-\mathbf v_1|^2\\&\quad-\frac{Gm_1m_2}{\sqrt{r_{12}^2+\epsilon^2}}\\\mu_{12}&=\frac{m_1m_2}{m_1+m_2}\end{aligned}

In the controlled encounter, the same two particles become more tightly bound while the passing star gains kinetic energy. This one encounter is not a statistical heating rate for a cluster.

Keep the interaction energy and recoil

Etotal=Eb+Krel+U13+U23+KcmΔEext=−ΔEb\begin{aligned}E_{\rm total}&=E_b+K_{\rm rel}+U_{13}+U_{23}+K_{\rm cm}\\\Delta E_{\rm ext}&=-\Delta E_b\end{aligned}

The external energy contains relative encounter motion and the interaction potentials. Total centre-of-mass kinetic energy is constant, so the exchange identity retains pair recoil and finite-distance potential changes.

Escape needs more than a large radius

ei=12∣vi−Vcm∣2−∑j≠iGmjrij2+ϵ2>0ri>3rh(0),ri′⋅vi′>0\begin{aligned}e_i&=\frac12|\mathbf v_i-\mathbf V_{\rm cm}|^2\\&\quad-\sum_{j\ne i}\frac{Gm_j}{\sqrt{r_{ij}^2+\epsilon^2}}>0\\r_i&>3r_h(0),\quad \mathbf r_i'\cdot\mathbf v_i'>0\end{aligned}

All three tests use the cluster frame at a saved time. No particle is removed from the force calculation. Positive instantaneous energy can change later, so this is a finite-time candidate count.

Common difficulties

Virial balance is not an instant verdict

Typical misconceptionA ratio near one means the cloud is settled.

Better mental modelA collapsing or rebounding cloud can pass through that value. Follow the radius and force-virial histories.

Binding energy is not all passing-star kinetic energy

Typical misconceptionEvery unit lost by the pair immediately appears in the passing star's speed.

Better mental modelPair recoil and the changing interaction potential also carry energy. The plotted three-term balance keeps them.

A finite escape candidate may return

Typical misconceptionPositive instantaneous energy proves a star has permanently evaporated.

Better mental modelOther stars continue to exchange energy with it. The distance and outward-motion tests strengthen a finite classification, not an infinite-time proof.

Run the experiment

  1. 01

    Release a cold cloud

    Compare Cold collapse, Warm cloud and Fast expansion.

    What to observe: The same pair forces produce contraction, rebound or expansion as initial kinetic energy changes.
  2. 02

    Watch heavy stars concentrate

    Choose Heavy stars concentrate and compare the fixed heavy and light groups over the full 30-unit record.

    What to observe: The initially mixed finite cloud develops a smaller heavy-group half-mass radius. The radii fluctuate, so compare the history.
  3. 03

    Track candidates for escape

    Choose Relax and eject and inspect the candidate-count history.

    What to observe: Some integrated particles meet all three finite-time tests. They remain in the gravitational calculation.
  4. 04

    Resolve the energy exchange

    Choose A binary heats a passing star. Inspect the pair, then scrub the encounter and compare the energy curves.

    What to observe: The pair's orbital energy becomes more negative while the passing star gains kinetic energy. The relative kinetic and interaction-potential changes complete the balance.

Primary sources: Heggie · binary evolution · Pavlík, Kroupa & Šubr · mass segregation

Related experiments and articles

What this page links to directly

See every article series on the content map →

Continue exploring

How stars live and age

How do we weigh a star, look inside it and tell how far along its life it is?

  1. LabStellar Structure and EvolutionSwitch between main-sequence, helium-burning and white-dwarf interiors, then drag the shell.
  2. LabStellar Fusion: Hydrogen to IronChange the initial stellar mass and step through the stages to see how far fusion gets.
  3. LabStellar Oscillation ModesChange the core sound speed and watch the ladder of vibration frequencies shift.
  4. LabStellar Wind P Cygni LinesRaise the wind’s terminal speed and watch the blue absorption of the P Cygni line widen.
  5. LabRadial Velocities, Active Stars and Binary MassesOpen double-star masses, change the two masses and recover them from the velocity curves.
  6. LabLagrange Points & Three-Body ChannelsChange the donor-to-companion mass ratio and follow matter flowing between the stars.
  7. You are hereN-Body Star ClusterAdd more unresolved binaries and compare the colour–magnitude diagram with single stars.
  8. LabWhite Dwarf Cooling and CrystallizationDrag the probe through the core and watch freezing release latent heat as the star cools.

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
Something 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