Particle-mesh self-gravitating disk
What you are seeing: a flat rotating disc of 1500 self-gravitating particles. The gravity force is computed by "particle-mesh": deposit the particle masses onto a 32 x 32 grid, solve Poisson's equation by FFT, interpolate the gradient of the potential back to each particle, and step forward.
Initial state: an exponential surface-density disc on a circular orbit. Over time, gravitational instabilities seed spiral arms and asymmetries; the disc heats up and the spiral structure dissolves. This is the simplest "galaxy formation in a box" toy. The PM scheme is what large astrophysical N-body codes (e.g. GADGET-4) use for the long-range force.
disc R1.00
speed1
WHAT TO TRY
- Vary each control and watch the rail readouts respond.
- Compare the diagnostic plot against the live scene.