Gravitational Softening and Two-Body Heating
A galaxy or a dark-matter halo is, to superb approximation, a collisionless system: its evolution obeys the collisionless Boltzmann equation for a smooth distribution function , with the potential sourced self-consistently by . The physical relaxation time from star–star encounters exceeds the age of the Universe by many orders of magnitude, so a real galaxy never feels its own graininess — it flows like a fluid in phase space. But no computer integrates a continuum. An -body code samples with macro-particles, each of mass that can be to times a real star or WIMP. That coarse sampling manufactures precisely the discreteness the real system lacks, and with it two coupled artifacts. The first is the singular close encounter: two point masses passing near each other feel a force that diverges, forcing microscopic timesteps and injecting spurious energy. Gravitational softening cures it by replacing the point-mass Green's function with a smoothed kernel of scale , capping the peak force at at the price of a controlled bias below . The second is two-body heating: the residual finite- force fluctuations diffuse orbital energies exactly as genuine encounters do, but far too fast, on — flattening cusps into spurious cores, puffing dense clumps, and evaporating poorly sampled subhaloes. Together they fix the domain of validity of any collisionless simulation, and controlling them is what precision cosmology stands on.
- An -body code represents a smooth phase-space distribution with macro-particles far heavier than any real star; this injects discreteness — spurious encounters — the true collisionless system lacks.
- Softening replaces the Newtonian potential with a smoothed kernel (Plummer), capping the force at and trading bias below against noise and short timesteps.
- Two-body heating diffuses orbital energies on , so cores puff, cusps flatten, and small subhaloes evaporate faster than in the real limit.
- Convergence to the collisionless Boltzmann solution demands and together; the Power radius marks where heating has spoiled the inner profile within a Hubble time.
- Softening length and finite are the two dominant systematics of collisionless dynamics — they separate a real dark-matter core from a numerical one.
- Key idea: an -body code integrates a noisy, granular caricature of a smooth collisionless system; softening removes the singular short-range force (adding a bias below ) while finite leaves fluctuations that heat orbits on — so convergence needs and together.
An -body code integrates a noisy, granular caricature of a smooth collisionless system. Softening removes the singular short-range force (introducing a controlled bias below ), while finite leaves residual fluctuations that drive two-body relaxation and heat orbits on . Convergence to the collisionless limit demands and together.
Where this lives today
Softening and two-body heating set the precision of every modern structure-formation result. The central live question is the cusp–core problem: dark-matter-only CDM haloes form cuspy NFW inner profiles, yet many dwarf galaxies appear cored — possibly signalling self-interacting or warm dark matter. Distinguishing a physical core from a numerical one is impossible without the Power radius: a genuine core must persist as grows and shrinks, whereas a heated one retreats with it. The same accounting governs subhalo abundance in near-field cosmology and dark-matter detection — poorly resolved subhaloes evaporate artificially, so counts converge only above thousands of bound particles. Flagship simulations (Aquarius, Via Lactea, and billion-to-trillion-particle GADGET, AREPO, Abacus runs) are engineered around these limits. At the opposite pole sit collisional systems — globular clusters, galactic nuclei — where relaxation is the signal, studied with direct integrators that refuse to soften real encounters. The single clock is read two opposite ways: the physics you want, or the artifact you fear.
The physical picture
Replace the smooth mass of a galaxy — say stars — by only heavy super-stars. The mean field is nearly right, because it is an integral over the smooth density and integrals forgive sampling. But each super-star tugs on its neighbours a hundred thousand times harder than a real star would, and those oversized tugs are pure numerical noise. Softening blurs each super-star into a fuzzy ball of radius so no single passage delivers a delta-function kick; heating is the surviving fuzzy tugs accumulating and randomly stirring the orbits. The first figure shows what softening does to the force law — capping the divergent and turning the deep interior into a harmless harmonic spring.
Two-body relaxation is a random walk in energy. One distant encounter changes a particle's velocity by a tiny ; the cumulative effect of the many weak, far encounters — which dominate the rare close ones and give the Coulomb logarithm — makes grow linearly with time. Once that diffusion has rearranged the orbital energies inside some radius, the simulation there has forgotten its collisionless initial conditions. Convergence is therefore not one number but a resolved region: outside the Power radius the density is trustworthy; inside, heating has taken over and the cusp relaxes to a spurious core, as the second figure shows.
The core equations
The softened potential of a single macro-particle is the starting point. The Plummer kernel is the simplest choice that is smooth at the origin, exact at large radius, and analytically differentiable.
where: — potential of one macro-particle; — Newton's constant; — macro-particle mass; — separation; — softening length. At it is Newtonian; at it flattens to — no singular well. Differentiating gives the force the code sums — and crucially it no longer diverges: it rises from zero, peaks, and rejoins the Keplerian tail.
where: — radial force per unit mass; the numerator kills the divergence as . The peak is at with — the largest kick any pair can exchange, which sets the shortest timestep. The dynamical consequence of finite is the two-body relaxation time — the time for weak encounters to change a star's orbital energy by order itself.
where: — particle number; — Coulomb logarithm, ; — crossing time. Relaxation takes crossings, so a coarser run heats faster. The Coulomb logarithm counts the decades of impact parameter contributing to the diffusion; softening enters here, raising the lower cutoff.
where: — system size; — the -deflection radius , or if larger; — relative speed. Bigger : bigger , smaller , longer . The optimal softening minimises the total force error and shrinks as particles are added, so resolution buys less bias and less noise at once.
where: — softening minimising total force error; — system scale; — particle number. The naive spacing is bracketed by the Merritt–Dehnen ; both fall slowly. The Power criterion fixes where the profile is trustworthy: the density is reliable only outside the radius where the enclosed relaxation time drops to the orbital time.
where: — enclosed particle number; — circular orbit period; — convergence radius. Inside so few particles are enclosed that they relax within a Hubble time — the profile is an artifact. Finally, the quantity every code evaluates each step is the softened acceleration — a pair sum with smoothing every denominator.
where: — acceleration of particle ; — mass of particle ; — positions; — softening. The under the power is the whole prescription; set it to zero and exact gravity — with its divergences — returns.
The goal is to build the scaling from first principles, by following one test star across a system of field particles, summing the random velocity kicks it receives, and demanding their accumulated size reach the star's own speed. This exposes why relaxation is a random walk (variances add, not amplitudes) and why it is fatally sensitive to through the macro-particle mass .
Step 1. A distant encounter at impact parameter and relative speed produces a perpendicular deflection , the impulse result from aq-astro-gravitational-two-body-problem. Why: for weak encounters the star barely deviates, so integrating the transverse pull along a straight line gives a clean law.
Step 2. In one crossing the star meets field particles with in , where . Why: it sweeps an annulus through a column of length , so the count is density times swept volume.
Step 3. The kicks point randomly, so their vectors cancel but their squares add: , the giving . Why: relaxation is diffusion — a random walk in velocity — so the mean square accumulates and the log records that every decade of contributes equally.
Step 4. With the virial estimate , the fractional change per crossing collapses to . Why: the dependence on folds into the virial relation, leaving a pure — the sampling granularity — times the log.
Step 5. Order-unity relaxation then needs crossings, so . Since , this means a coarse run heats far faster than the object it models, vanishing only as . Why: the relaxation time is the crossing time stretched by ; the blame is the macro-particle mass, so the cure is more particles, not more softening. *Verified: reproduces Binney & Tremaine eq. (1.38) and the Carroll & Ostlie cluster relaxation formula; the and dependence are standard, and was checked numerically for a globular cluster below.*
Go deeper · Derivation B · 1 minHow Plummer softening caps the force and builds a harmonic core
The goal is to show that replacing the point-mass potential by the Plummer kernel converts a divergent force into a bounded one with a definite maximum, and makes the deep interior a linear harmonic restoring force. This is what makes a softened integration stable — a finite peak force means a finite shortest timestep — and where the sub- bias is born.
Step 1. Differentiate: . Why: the numerator from the chain rule forces at the origin instead of blowing up — the divergence is gone by construction.
Step 2. Set : with the derivative numerator vanishes at . Why: this is the one interior scale softening introduces — the harmonic-to-Keplerian crossover, fixed at a fraction of regardless of mass or speed.
Step 3. Evaluate there: . Why: the largest kick scales as , so directly sets the maximum acceleration and the minimum stable timestep .
Step 4. For : , so — a spring, a uniform harmonic ball that is stable but physically wrong, the source of the sub- bias. Conversely for , to error . Why: softening is short-range surgery only — the interior is capped and harmless while large-scale dynamics stays exactly Newtonian. *Verified: the peak location and value were confirmed numerically; the limits match Binney & Tremaine App. C and Dehnen 2001.*
Go deeper · Derivation C · 1 minOptimal softening as a bias–variance minimisation
The goal is to turn the qualitative "not too big, not too small" advice about into a quantitative optimum, by writing the mean-square force error as a smoothing bias that grows with plus a Poisson sampling variance that falls with , then minimising the total. The exercise shows the optimal softening shrinks with particle number — the statistician's bias–variance tradeoff exactly.
Step 1. The bias comes from smoothing the field over , shifting the force at second order: , so the squared bias . Why: a symmetric kernel has zero first moment, so the leading error is the second moment times the field's curvature — a wider blur distorts more.
Step 2. The variance comes from sampling with discrete particles; averaging over the neighbours inside a softening volume gives . Why: shot noise falls as one over the number of contributors, and larger averages over more — so noise and bias pull opposite ways.
Step 3. Add them, , and set the derivative to zero: . Why: the total error is convex — variance-dominated at small , bias-dominated at large — so a unique minimum exists where the slopes balance.
Step 4. Solve: , hence for this toy model; realistic density-dependent analyses (Merritt 1996; Dehnen 2001) sharpen the exponent to to , straddling the mean interparticle spacing. Why: even the crude estimate captures the message — the optimum falls with — while folding in the varying density curvature steepens the fall onto the spacing scaling codes adopt. *Verified: reproduces the bias–variance structure and the reported exponent range of Merritt (1996) and Dehnen (2001); the scaling was used in the worked example below.*
Limiting cases
| Case | Result | Meaning |
|---|---|---|
| Large separation, | Softening negligible; exact Newtonian gravity recovered, large-scale dynamics unbiased. | |
| Small separation, | Harmonic restoring force; the singular is capped, but sub- structure is unresolved. | |
| Collisionless limit, | Relaxation diverges vs the crossing time; the CBE solution is recovered and heating vanishes. | |
| Small (poor resolution) | Heating erases cusps within the age; inner profiles collapse to artificial cores. | |
| Optimal softening | Minimises total force error by balancing bias against shot-noise variance. | |
| Cold pair () | in | Softening, not the deflection radius, sets the inner cutoff of the encounter integral. |
Worked examples
1 · Relaxation time of a globular cluster (fully worked)
A globular cluster has stars, radius , and velocity dispersion . Is two-body relaxation a real, physical process here within a Hubble time?
Step 1. Crossing time. — stars orbit through in about a million years.
Step 2. Coulomb logarithm. With , (the refined gives , immaterial here).
Step 3. Relaxation time. .
Step 4. Interpretation. The cluster age is , so it has relaxed ten times over. Two-body relaxation is genuinely physical here — it drives mass segregation, core collapse, and evaporation, which is why direct integrators use tiny or zero softening: softening these encounters away would delete the physics. This is the opposite of a collisionless galaxy simulation.
2 · Numerical heating and the dependence (fully worked)
A subhalo is resolved with bound particles and has an internal crossing time . Will two-body heating corrupt it within a Hubble time? How much better is ?
Step 1. Use . For : , so .
Step 2. Compare to the age. is less than the age, so this subhalo relaxes within the run: its inner density is artificially heated and it may spuriously evaporate — a thousand particles cannot represent a bound clump collisionlessly.
Step 3. Now at the same : , so — Hubble times, safely collisionless.
Step 4. The lesson. Raising by lengthened by (the scaling), turning an unreliable clump into a trustworthy one. This is why subhalo studies demand thousands of bound particles per object — the smallest resolved haloes are always the most suspect.
3 · Choosing the softening length and its force cap
A Milky-Way-mass halo, scale radius , is sampled with particles. Estimate the optimal softening and its force cap.
Step 1. Interparticle-spacing softening: . Published runs often adopt a few percent of this — a few pc to tens of pc — choosing below the mean spacing to preserve resolution.
Step 2. The force cap is with . Smaller raises this cap and shortens the minimum timestep — the cost that stops one softening arbitrarily little. The optimum: small enough to resolve the scales of interest, large enough to keep the timestep manageable.
Physics of the portrait
Two-body relaxation is the concept that ties this article together: a diffusion clock, running at rate , that measures how quickly a granular system forgets its collisionless past. It was worked out for real star clusters decades before it returned, uninvited, as the dominant systematic error of the digital universe.
Origins · 1 mintwo-body relaxation and how this was discovered
Two-body relaxation began as pure stellar dynamics. In 1943 Subrahmanyan Chandrasekhar, studying dynamical friction, derived the diffusion of a star's velocity from the cumulative pull of its neighbours and found the timescale set by the Coulomb logarithm — the same logarithm Landau had introduced for plasmas. For a real galaxy the time is absurd: with stars, exceeds the age of the Universe by a factor of millions, which is exactly why a galaxy is collisionless. The concept slept until the computer arrived. In 1960 Sebastian von Hoerner ran the first digital -body integrations, hit the singular close encounter, and invented force softening to keep the run alive; Sverre Aarseth then built the direct -body codes for star clusters, where relaxation is the physics of interest rather than an error. As tree and TreePM codes pushed collisionless cosmology to billions of particles, Chandrasekhar's clock returned as a villain: Power and collaborators (2003) showed that inside a well-defined radius the finite- relaxation time falls below the halo's age, heating the cusp into a spurious core. The same equation that explains why galaxies do not relax now tells us where our simulations cannot be trusted.
Going further
Texts. Binney & Tremaine, Galactic Dynamics, 2nd ed., §1.2 and §4.1 (relaxation), App. C (softening and -body methods) · Carroll & Ostlie, An Introduction to Modern Astrophysics, Ch. 25 (star clusters) · Dodelson, Modern Cosmology (numerical structure formation) · Mo, van den Bosch & White, Galaxy Formation and Evolution, Ch. 5.
Papers. Power et al. 2003, MNRAS 338, 14 (convergence radius) · Dehnen 2001, MNRAS 324, 273 (optimal softening) · Merritt 1996, AJ 111, 2462 (bias–variance) · Springel et al. 2005, Nature 435, 629 (Millennium).
Provenance. The relaxation scaling follows Binney & Tremaine §1.2 (eq. 1.38) and Carroll & Ostlie Ch. 25, checked numerically for the globular example (). The Plummer potential/force, the peak at (, confirmed), and the harmonic small- limit are standard (BT App. C; Dehnen 2001). The softened follows BT §1.2 and Merritt 1996; the – optimal-softening scaling follows Merritt (1996) and Dehnen (2001); the convergence criterion follows Power et al. (2003). A verifier should recompute and , confirm the divergence, and check the -scaling of .
Prerequisites. Gravitational N-Body Problem · Two-Body Relaxation Time · Collisionless Boltzmann Equation · Gravitational Two-Body Problem · Distribution Function and Phase Space. Leads to. Virial Theorem in Stellar Systems · Jeans Equations · Galactic Potential Models · Orbits in Spherical Potentials.
Ask the tutor: ask me to work the Power radius for a specific halo, or to show how the same is a friend in a star cluster and an enemy in a cosmological box.
Isn't the mean-field potential all that matters? Why should discreteness change anything?
The mean field carries the bulk of the dynamics — orbits, the potential well, the large-scale collapse — and even a modest gets it nearly right, because it is a smooth integral over the density that averages sampling noise away. What discreteness adds is a fluctuating residual: because each macro-particle is a lump, not a smear, the force jitters as neighbours pass. Those jitters never average to zero in the mean-square sense — they diffuse orbital energies, and over a relaxation time that rearranges the distribution the mean field alone would preserve forever.
If softening biases the forces, why not just use zero softening and a tiny timestep?
For a genuinely collisional system (a small star cluster) that is exactly what you do — direct codes use near-zero softening and regularise the singular binaries analytically. But for a collisionless system it backfires: the rare close pair encounters between macro-particles are precisely the artificial events you want to avoid, and they are hugely amplified because is enormous. You would spend vast effort resolving encounters the real object never has, while the singular forces demand near-zero timesteps. Softening deliberately blurs those passages, buying stability at the price of a known bias below . The right move is optimal softening tuned to , not zero.
How is numerical two-body heating different from ordinary error like energy drift?
Energy drift from a finite timestep is a property of the integrator: it shrinks as you shorten the step, vanishes for a perfect integrator, and does not depend on . Two-body heating is a property of the model, not the solver. Even with a flawless energy-conserving integrator and infinitesimal steps, a finite- system still relaxes, because the granularity is baked into the initial conditions. You cannot integrate it away; the only cure is more particles. That is why convergence tests vary , not just the timestep.
What actually sets the Power radius, and how do I find it in practice?
It is the radius inside which the enclosed relaxation time has fallen below the age of the system. Because drops inward, the local relaxation time drops too, and at some radius it crosses the age — inside, the profile has been heated. In practice you evaluate, at each radius, the empirical Power quantity built from and the enclosed mean density relative to critical, and find where it crosses the calibrated threshold (about in the 2003 form). Everything outside is converged; inside is flagged. Raising moves the crossing inward.
Does softening make a simulation collisionless, or just less collisional?
Just less collisional — softening reduces heating but never abolishes it. Raising increases , which lowers and lengthens ; but enters only logarithmically, so even generous softening buys a factor of a few, not orders of magnitude. The dominant lever is , which enters linearly. A run is effectively collisionless only when makes everywhere you care about. Never treat large softening as a substitute for particle number.
Why does the Coulomb logarithm appear, and why is it "only" logarithmic?
It comes from summing encounters over all impact parameters. Each decade of contributes about equally to the mean-square velocity change, because the kick scales as but the number of encounters scales as , so — whose integral is a logarithm. The upper cutoff is the system size; the lower is the -deflection radius or the softening , whichever is larger. Because weak distant encounters dominate, the sum grows only as the log of the range — which is why across a huge range of systems.