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.

Virial Q convention (Q = T/|V|)

San Diego State University

Virial Q convention

The virial Q parameter pins the dynamical state of an N-body initial condition. progenax adopts the convention

Qvir    TVQ_{\mathrm{vir}} \;\equiv\; \frac{T}{|V|}

where TT is the total kinetic energy of the particles and VV is the total gravitational potential energy. This page documents the convention, justifies the choice, and lists the call sites.

Three conventions in the literature

Three definitions appear in the literature; readers should not assume any value without checking which is in use:

Convention

Equilibrium value

Reference

Used by

Q=T/VQ = T/|V|

0.5

Aarseth et al. (1974)

progenax (this work), McLuster Küpper et al., 2011

Q=2T/VQ = 2T/|V|

1.0

Direct virial-theorem statement

Some textbook derivations; older N-body papers

αvir=2T/Ugrav\alpha_{\mathrm{vir}} = 2T/|U|_{\mathrm{grav}}

1.0

Federrath & Klessen (2012) for clouds

Cloud / GMC literature

The Aarseth et al. (1974) Q=T/VQ = T/|V| form is the dominant convention in star-cluster N-body work and is what every progenax convenience function expects. The factor-of-2 forms appear when the virial theorem is quoted directly from 2T+V=02T + V = 0.

Why Q=0.5Q = 0.5 is equilibrium

The scalar virial theorem for a gravitationally bound system in steady state reads

2T+V  =  02T + V \;=\; 0

Substituting V=VV = -|V| (gravitational potential energy is negative) and solving for T/VT/|V|:

T  =  12VQvir  =  TV  =  12.T \;=\; \tfrac{1}{2}|V| \quad\Longrightarrow\quad Q_{\mathrm{vir}} \;=\; \frac{T}{|V|} \;=\; \frac{1}{2}.

A system at Qvir=0.5Q_{\mathrm{vir}} = 0.5 is in dynamical equilibrium: the kinetic energy is exactly the value that balances the gravitational self-binding. Departures from 0.5 are physically meaningful:

progenax interpretation of QvirQ_{\mathrm{vir}}.

QvirQ_{\mathrm{vir}}

State

Astrophysical interpretation

<0.5< 0.5

Subvirial (cold)

Collapsing system. Used to seed primordial mass-segregation studies Allison et al., 2009; cluster contracts on a crossing time before bouncing.

0.5

Virial equilibrium

Stable steady-state. Default for production ICs unless an out-of-equilibrium starting condition is needed.

>0.5> 0.5

Supervirial (hot)

Expanding/unbound. Used to model post-gas-expulsion clusters where rapid mass loss leaves stars on hyperbolic-like orbits Goodwin & Whitworth, 2004.

The subvirial regime is particularly important for fractal-substructure work: Allison et al. (2009) showed that cool (Qvir0.3Q_{\mathrm{vir}} \approx 0.3) clumpy initial conditions produce dynamical mass segregation on 1\sim 1 Myr timescales — much faster than the classical relaxation time. Reproducing that result therefore requires the ability to seed QvirQ_{\mathrm{vir}} explicitly, which is what virial_scale provides.

Implementation

Every velocity DF in progenax produces velocities at exactly Qvir=0.5Q_{\mathrm{vir}} = 0.5 by construction (the equilibrium DFs of Plummer (1911), King (1966), and EFF). To reach a target QvirQ_{\mathrm{vir}}^\star, progenax rescales the velocities by

vi    vi2Qvirv_i \;\to\; v_i \cdot \sqrt{2\,Q_{\mathrm{vir}}^\star}

The factor of 2 converts from the equilibrium Q=0.5Q = 0.5 baseline. The rescaling is implemented in progenax.builders.virial_scale:

@jax.jit
def virial_scale(positions, velocities, masses, Q_target, G, softening=0.0):
    T = compute_kinetic_energy(velocities, masses)
    V = compute_potential_energy(positions, masses, G=G, softening=softening)
    Q_current = T / jnp.abs(V)
    scale = jnp.sqrt(Q_target / Q_current)
    return velocities * scale   # only velocities are rescaled

Three properties hold by construction:

  1. Energy ratio is enforced exactly (to floating-point precision). Tests in tests/integration/test_physics_validation.py::test_virial_scaling verify QmeasuredQtarget<1012|Q_{\mathrm{measured}} - Q_{\mathrm{target}}| < 10^{-12} for N104N \le 10^4.

  2. Spatial structure is preserved. Only velocities scale; positions are untouched. The density profile, half-mass radius, and any substructure are unchanged.

  3. Differentiable. virial_scale is JIT-compatible and survives jax.grad, so it can sit inside a posterior-evaluation chain.

Call sites and contract

All progenax IC builders accept Q_target and pipe it through virial_scale:

Function

Default QtargetQ_{\mathrm{target}}

Notes

gravax.ic.plummer_sphere

0.5

Mass-first API; explicit Q_target overrides

progenax.MultiComponentCluster.sample_cluster

0.5 by construction

Shared-potential equilibrium; no external rescale — global and per-component Qj=0.5Q_j = 0.5

gravax.ic.sample_kroupa_stochastic consumers

0.5

IMF + Plummer composition

progenax.builders.virial_scale

explicit

Bare rescaling utility

Validation

The progenax test suite includes physics-anchored regressions for the virial Q convention:

Why not αvir=2T/U\alpha_{\mathrm{vir}} = 2T/|U|?

The cloud-evolution literature uses αvir=2T/U\alpha_{\mathrm{vir}} = 2T/|U| for GMC virial parameters, where U|U| is the gravitational binding energy Federrath & Klessen, 2012. progenax does not mirror that convention because the IC builders operate on point-mass particle distributions, not continuous gas. Using the cluster-N-body Q=T/VQ = T/|V| convention keeps consistency with Aarseth et al. (1974), McLuster Küpper et al., 2011, NBODY6, and the rest of the star-cluster N-body ecosystem.

When converting between conventions: αvir=2Qvir\alpha_{\mathrm{vir}} = 2 \cdot Q_{\mathrm{vir}}. Equilibrium is αvir=1\alpha_{\mathrm{vir}} = 1 in cloud notation, Qvir=0.5Q_{\mathrm{vir}} = 0.5 in the progenax notation.

References

The convention follows Aarseth et al. (1974)’s star-cluster N-body tradition and matches McLuster Küpper et al., 2011. The out-of-equilibrium use cases are Allison et al. (2009) (subvirial cold collapse for primordial segregation) and Goodwin & Whitworth (2004) (supervirial post-gas-expulsion). For the substructure Q parameter that shares the letter, see JAX-native CW04 substructure Q parameter.

References
  1. Cartwright, A., & Whitworth, A. P. (2004). The statistical analysis of star clusters. Monthly Notices of the Royal Astronomical Society, 348, 589–598. 10.1111/j.1365-2966.2004.07360.x
  2. 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.
  3. Küpper, A. H. W., Maschberger, T., Kroupa, P., & Baumgardt, H. (2011). Mass segregation and fractal substructure in young massive clusters. Monthly Notices of the Royal Astronomical Society, 417, 2300–2317. 10.1111/j.1365-2966.2011.19412.x
  4. Federrath, C., & Klessen, R. S. (2012). The star formation rate of turbulent magnetized clouds. The Astrophysical Journal, 761, 156. 10.1088/0004-637X/761/2/156
  5. Allison, R. J., Goodwin, S. P., Parker, R. J., Portegies Zwart, S. F., de Grijs, R., & Kouwenhoven, M. B. N. (2009). Using the minimum spanning tree to trace mass segregation. Monthly Notices of the Royal Astronomical Society, 395, 1449–1454. 10.1111/j.1365-2966.2009.14508.x
  6. Goodwin, S. P., & Whitworth, A. P. (2004). The dynamical evolution of fractal star clusters: The survival of substructure. Astronomy and Astrophysics, 413, 929–937. 10.1051/0004-6361:20031529
  7. Plummer, H. C. (1911). On the problem of distribution in globular star clusters. Monthly Notices of the Royal Astronomical Society, 71, 460–470. 10.1093/mnras/71.5.460
  8. King, I. R. (1966). The structure of star clusters. III. Some simple dynamical models. The Astronomical Journal, 71, 64–75. 10.1086/109857