MakarovSuites
English
EnglishDeutschРусскийУкраїнськаFrançaisEspañolItalianoPolski
Contact & licences

Physics / Astronomy

Galaxy (Barnes-Hut N-body)

A spiral galaxy star by star: gravity alone winds up the arms.

Galaxy (Barnes-Hut N-body) — Actual application image
Actual application image

What happens

Tens of thousands of stars, each pulled by all the others. The disk starts cold and rotating; its own gravitational instabilities wind up into spiral arms - nobody draws them. Switch to the merger to watch two galaxies tear tidal tails off each other. The Barnes-Hut tree makes it real-time: distant groups of stars act as single point masses.

Equations used in the module
Equations
a_i = G Σ M_j (r_j − r_i)/(d² + ε²)^(3/2)
Φ_i = −G Σ M_j/√(d² + ε²)
s/d < θ; θ = 0.6
v(t+h/2) = v(t−h/2) + ah; r(t+h) = r(t) + hv(t+h/2)
halo: Φ_h = −G M_h/(r + a_h), a_h = R ;  v_c² = G (M_b + M_d (r/R)²)/r + G M_h r/(r + a_h)²
pair: v = √(2μ/D), v_t = √(2μp)/D ;  n = (sin i cos ω, cos i, sin i sin ω)

Related experiments

Back to catalogue
N-body problem — Actual application image

Physics / Astronomy

N-body problem

Gravitating many-body systems: from the Solar System to choreographies.

Kepler problem — Actual application image

Physics / Astronomy

Kepler problem

Motion in a central gravity field: ellipses and Kepler's laws.

Rocket motion — Actual application image

Physics / Astronomy / Engineering

Rocket motion

Variable mass and the Tsiolkovsky equation, staging and gravity.