Every pair of particles pulls (or, at short range, also repels at contact) on every other pair, and the energy slider acts like a reservoir slowly draining or adding energy while the N-body dynamics keep integrating underneath. The (E, T) trace on the left is the system's caloric curve, built up live as you scrub the slider.
In the long-range mode every particle attracts every other particle no matter the distance (like self-gravity). The virial theorem for such a bound system gives E ≈ −T: pulling energy out makes the whole cloud contract into a denser core, which *raises* its kinetic temperature — the caloric curve bends backward and the effective heat capacity C = dE/dT is negative.
In the short-range mode interactions are cut off beyond a small radius (plus a hard repulsive core), just like molecules in an ordinary gas. Removing energy simply slows every particle down — T falls monotonically with E, C stays positive, and the curve never bends.
virial (bound, long-range): 2⟨KE⟩ + ⟨PE⟩ ≈ 0 → E ≈ −⟨KE⟩ = −T
dE/dT ≈ −1 ⇒ C < 0 (anomalous)
short-range gas: E ≈ N·T (equipartition)
dE/dT ≈ +N ⇒ C > 0 (normal)
- Energy budget — the target total energy the reservoir is driving the gas toward.
- Auto sweep — slowly scans the slider down and back up so the whole curve traces itself.
- Core density — fraction of particles currently within the inner third of the container radius; watch it spike as the long-range gas collapses.
This is why star clusters and black-hole-hosting systems can have negative specific heat while a jar of gas never can — gravity (and any other long-range, non-additive force) breaks the usual assumption that energy scales with system size.