Loading the engineShared by all simulations, so the next one opens instantly.
The physics

A star that passes close to a supermassive black hole can be torn apart. Its own gravity holds it together, but the black hole pulls harder on the near side than on the far side, and inside a certain distance that difference wins. Jack Hills worked out the condition in 1975. Since the 1990s such tidal disruption events have been seen as flares in X-rays, then in optical and ultraviolet surveys, at a rate of roughly one per galaxy every 10,000 to 100,000 years. About half of the shredded star falls back onto the black hole and lights it up for months.

Here the star is a cluster of 200 particles held together only by their mutual gravity, in units where G=1 and lengths are pixels.

What you see

The black hole sits at the center of an 800 by 800 pixel view, with a mass of 5×104. The star, 200 particles of mass 1 in a disc of radius 20 pixels, starts 350 pixels to the right on a parabolic orbit, the orbit of a body that falls in from far away with zero energy. All particles start with the same velocity, so the star also contracts a little under its own gravity as it falls. It reaches its closest approach after about 16 time units, some seven seconds at normal speed.

Each particle is colored by its orbital energy relative to the black hole alone: blue when it is bound and will come back, red when it will escape. Because the star as a whole has zero energy, its near half is blue and its far half red from the start. The passage widens that split into a stream with a bound and an unbound end. The dashed circle marks the Roche radius rR. Particles that leave the view keep moving out of sight.

Governing equation

Every particle feels the black hole and every other particle,

𝐫¨i=G∑j≠imj(𝐫j−𝐫i)(|𝐫j−𝐫i|2+ε2)3/2,

with softening ε=8 pixels, integrated with leapfrog (velocity Verlet) at dt=0.005, eight steps per frame. The star is disrupted when its closest approach rp is inside the Roche radius

rR=r⋆(M∙m⋆)1/3,

where the black hole’s tidal pull across the star equals the star’s own gravity. With the defaults, r⋆=20, M∙=5×104 and m⋆=200, this gives rR≈126 pixels. The spread of orbital energy across the star is about

Δε≈GM∙r⋆rp2,

so a closer passage spreads the debris over a wider range of orbits. In real events the bound debris returns at a rate that falls off as t−5/3, the signature astronomers look for in the light curves; the simulation stops well before that phase.

Presets

Full disruption (r_p = 40): a passage deep inside the Roche radius. The star is drawn out into a long stream, and after the passage about a third of its particles are still close together; the rest spread along the stream, roughly half of them bound.

Partial disruption (r_p = 120): just inside the Roche radius. The outer layers are stripped and about half the particles stay in a surviving core.

Flyby (r_p = 200): outside the Roche radius. The star is stretched and loses some particles, but most of it stays together.

Without a preset the passage comes to 80 pixels.

Parameters

Black hole mass: 104 to 2×105 (default 5×104). A heavier black hole has a larger Roche radius and a faster passage.

Periapsis r_p (px): the closest approach, 20 to 300 pixels (default 80).

Star particles: 50 to 500 (default 200). Each particle has mass 1, so this is also the star’s mass m⋆.

Star radius (px): 5 to 60 (default 20).

Softening ε (px): default 8. A smaller value makes close encounters between particles more violent and lets the star collapse further before the passage.

These apply on Reset. Roche limit, Center of mass and the trail controls change only the drawing.