Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

King velocity distribution functions

San Diego State University

The King velocity DF is the lowered-Maxwellian that defines the King spatial profile in the first place. Unlike Plummer — where the DF follows from the density profile via Eddington inversion — King’s DF is the input, and the density profile follows from integrating the DF over velocity space (King profile). Sampling King velocities is therefore conceptually simpler than sampling Plummer velocities: at each particle’s position, draw from the truncated Maxwellian directly.

The lowered-Maxwellian DF

For a particle of specific energy EE at position r\mathbf{r}, the King DF is

f(E)  =  {ρ1(2πσ02)3/2[e(ΦtE)/σ021],E<Φt0,EΦtf(E) \;=\; \begin{cases} \rho_1\,(2\pi\sigma_0^2)^{-3/2}\,\Bigl[\,e^{(\Phi_t - E)/\sigma_0^2} - 1\,\Bigr], & E < \Phi_t \\ 0, & E \ge \Phi_t \end{cases}

↗ model card

where σ0\sigma_0 is the central one-dimensional velocity dispersion, ΦtΦ(rt)\Phi_t \equiv \Phi(r_t) is the potential at the tidal radius, and ρ1\rho_1 is a normalisation constant. The “-1” subtraction is the lowering: it ensures the DF vanishes at E=ΦtE = \Phi_t rather than extending exponentially to EE \to \infty as a pure Maxwellian would.

In terms of the dimensionless central potential W0(ΦtΦ(0))/σ02W_0 \equiv (\Phi_t - \Phi(0))/\sigma_0^2 (King profile, (1)), the DF becomes

f(W,v)    eWv2/(2σ02)1,v<vesc(W)=σ02Wf(W, v) \;\propto\; e^{W - v^2 / (2\sigma_0^2)} - 1, \qquad v < v_{\mathrm{esc}}(W) = \sigma_0\sqrt{2W}

at any radius where the local dimensionless potential is WW. The escape speed at the tidal radius is zero (Wt=0W_t = 0, vesc=0v_{\mathrm{esc}} = 0), so no particles populate that boundary — the cluster is sharply truncated.

Marginal speed distribution

Integrating the DF over velocity directions gives the speed distribution at fixed position:

f(vW)    v2[eWv2/(2σ02)1],0vσ02Wf(v \mid W) \;\propto\; v^2\,\Bigl[\,e^{W - v^2 / (2\sigma_0^2)} - 1\,\Bigr], \qquad 0 \le v \le \sigma_0\sqrt{2W}

↗ model card

The v2v^2 prefactor is the spherical-shell volume element in velocity space. The bracketed factor is positive throughout 0vσ02W0 \le v \le \sigma_0\sqrt{2W} and zero at the upper bound — which means inverse-CDF sampling on f(vW)f(v \mid W) produces velocities in [0,vesc][0, v_{\mathrm{esc}}] with no rejection.

What “lowering” means. One normalized Maxwellian (grey, dashed) and the King
speed distribution at three local well depths: at W = 6 (a cluster core)
the truncation barely bites, at W = 1 (near the tidal edge) most of the
Maxwellian is cut away. The lowering matters most where the well is
shallow — the origin of King clusters’ cold outskirts. Regenerate:
python -m laboratory.icviz --only king-lowered-maxwellian.

Figure 1:What “lowering” means. One normalized Maxwellian (grey, dashed) and the King speed distribution at three local well depths: at W=6W = 6 (a cluster core) the truncation barely bites, at W=1W = 1 (near the tidal edge) most of the Maxwellian is cut away. The lowering matters most where the well is shallow — the origin of King clusters’ cold outskirts. Regenerate: python -m laboratory.icviz --only king-lowered-maxwellian.

Sampling

progenax samples King velocities via a per-particle inverse-CDF on (3):

# At each particle's radius r, look up W(r) from the King ODE solution
W_per_particle = jnp.interp(radii / r_c, xi_grid, psi_grid, left=W0, right=0.0)

# Per particle: build a 1-D speed CDF on [0, sqrt(2W)] and invert it (vmap'd)
def sample_unit_speed(key, W):
    u_grid = jnp.linspace(0.0, jnp.sqrt(2.0 * W), N_SPEED_GRID)   # 256 points
    g = u_grid**2 * (jnp.exp(W - u_grid**2 / 2.0) - 1.0)         # eq:king-fv
    cdf = jnp.cumsum(0.5 * (g[1:] + g[:-1])) * du                # trapezoid
    return jnp.interp(jax.random.uniform(key), cdf / cdf[-1], u_grid)

u = jax.vmap(sample_unit_speed)(keys, W_per_particle)            # speed / sigma_0
v_vec = (sigma_0 * u)[:, None] * isotropic_unit_vector(key2, N)

Each particle builds its own fixed-size (256-point) speed grid scaled to its local escape speed σ02W\sigma_0\sqrt{2W} and inverts the trapezoidal CDF by interpolation — there is no precomputed cross-WW table. The grid size is fixed and the operations are jnp.interp/vmap only (no while_loop), so the whole pipeline is JIT-compatible and differentiable in rhr_h via the chain rhrcσ0vr_h \to r_c \to \sigma_0 \to v.

Velocity dispersion profile

The King DF’s velocity dispersion at radius rr is

σ2(W)  =  σ0202Wv4(eWv2/21)dv02Wv2(eWv2/21)dv\sigma^2(W) \;=\; \sigma_0^2\,\frac{\int_0^{\sqrt{2W}} v^4\,(e^{W - v^2/2} - 1)\,\mathrm{d}v}{\int_0^{\sqrt{2W}} v^2\,(e^{W - v^2/2} - 1)\,\mathrm{d}v}

↗ model card

(in units where σ0=1\sigma_0 = 1). The integrals do not have closed form in general, but progenax precomputes σ(W)\sigma(W) on the same WW-grid used for the speed-CDF table inside the sampler. The current public KingVelocityDF API exposes sample_velocities; it does not export a separate velocity-dispersion method. The dispersion is monotonically increasing in WW: σ20\sigma^2 \to 0 as W0W \to 0 and σ23σ02\sigma^2 \to 3\sigma_0^2 as WW \to \infty (the untruncated-Maxwellian limit). Since WW decreases outward — from W0W_0 at the centre to 0 at the tidal radius — σ\sigma falls with radius and vanishes at the tidal boundary, where the escape speed 0\to 0. King clusters therefore have cold outskirts, in contrast to a Plummer sphere whose dispersion also declines outward but stays finite at all radii.

Check yourself

1. Which WW is most Maxwellian?

Before studying Figure 1: does the King DF resemble a Maxwellian most at the cluster centre or the edge? (Centre: large WW pushes vesc=σ02Wv_{\rm esc} = \sigma_0\sqrt{2W} far into the Maxwellian tail, so almost nothing is cut.)

2. Quantify the cut

Compute the fraction of a pure Maxwellian beyond vesc=2Wv_{\rm esc} = \sqrt{2W}: erfc(W)+4W/πeW\mathrm{erfc}(\sqrt{W}) + \sqrt{4W/\pi}\,e^{-W}. At W=1W = 1 that is 0.57 — the lowering removes the majority of the distribution — while at W=6W = 6 it is 0.007. Check both against the figure by eye, then verify with a quick quadrature of v2ev2/2v^2 e^{-v^2/2}.

Pairing with the King profile

The King DF is in equilibrium with the King density profile by construction: both are derived from the same lowered-isothermal Maxwellian. Pair them by using the same King concentration and tidal radius:

from progenax.profiles import KingProfile
from progenax.kinematics import KingVelocityDF
from jaxstro.units import STELLAR

profile = KingProfile.from_W0_rc(W0=7.0, r_c=1.0)
df = KingVelocityDF(W0=7.0, r_c=1.0)   # r_t is derived from W0 internally

masses = jnp.ones(1000)
positions = profile.sample_positions(masses, key_pos)
velocities = df.sample_velocities(positions, masses, key_vel, G=STELLAR.G)

KingVelocityDF takes only (W0, r_c) — it re-solves the King ODE internally and derives the tidal radius from W0W_0, so there is no r_t argument. Using the same W0 and r_c in the profile and DF keeps them consistent. Pairing a King profile at W0=7W_0 = 7 with a King DF at W0=5W_0 = 5 would produce a mismatched non-equilibrium IC.

Differentiability

The King velocity DF is differentiable in rcr_c (via σ0\sigma_0) and in the total mass MtotM_{\rm tot} (σ0GM\sigma_0\propto\sqrt{GM}). It is also differentiable in W0W_0: diffrax propagates ψ/W0\partial\psi/\partial W_0 through the ODE solve, so the dispersion profile and other shape observables carry correct W0W_0 gradients (gradient-validated in King profile validation). The lone non-differentiable quantity is the scalar tidal radius rtr_t, whose W0W_0-derivative is zeroed by the argmax zero-crossing in _find_tidal_radius; inference should therefore use the profile shape rather than the scalar rtr_t.

Consequently progenax supports joint gradient-based / HMC inference of the King structural parameters (W0,rc,Mtot)(W_0, r_c, M_{\rm tot}) directly — e.g. fitting a cluster’s number-density and velocity-dispersion profiles. The lowered-model family formalized by Gieles & Zocchi (2015) (where the truncation parameter gg enters analytically) remains the natural extension for multi-mass / anisotropic generalisations; progenax plans to implement this family natively as its own differentiable generalization (see The differentiable lowered-model family (Engine A)), but it is not yet available.

Domain of validity

  1. Single-mass equilibrium. Multi-mass equilibrium is described by the lowered-model family formalized by Gieles & Zocchi (2015), not by the standard King DF here.

  2. Spherical and isotropic by default. Anisotropic and rotating variants live in Anisotropy and rotation.

  3. Tidal cutoff is sharp. Real clusters have a smooth transition from the bound population to the tidal tail; King’s mathematical cutoff at E=ΦtE = \Phi_t is an idealisation. For studies where the tidal-tail kinematics matter, post-evolution analysis is the right approach.

Implementation, validation & references

References
  1. Gieles, M., & Zocchi, A. (2015). A family of lowered isothermal models. Monthly Notices of the Royal Astronomical Society, 454, 576–592. 10.1093/mnras/stv1848
  2. King, I. R. (1966). The structure of star clusters. III. Some simple dynamical models. The Astronomical Journal, 71, 64–75. 10.1086/109857
  3. Aarseth, S. J., Henon, M., & Wielen, R. (1974). A comparison of numerical methods for the study of star cluster dynamics. Astronomy and Astrophysics, 37, 183–187.