A cluster with primordial binaries carries two energy scales, and conflating
them is a classic mistake. build_binary_cluster virializes the system
centres-of-mass to treating each binary as a single point mass — the
McLuster scale-separation convention Küpper et al., 2011 — and leaves
the internal binary binding energy as a separate reservoir that the global
virial scaling never touches. This demo makes that separation explicit and shows
why the naive virial ratio of the resolved stars is not the cluster’s.
The two scales, from binary_energy_budget:
— the cluster’s bulk gravitational binding on the system COMs; the scale the cluster is virialized on, .
— the internal binary binding (vis-viva), set by the periods and masses and independent of where the COM sits in the cluster.
because the resolved ratio mixes the two scales. It is not the cluster’s virial ratio (audit S10): a hard binary’s internal virial is itself (time-averaged), so sampled at random orbital phases scatters around 0.5 rather than deflating monotonically. The robust, gated statement is the energy separation — cleanly recovers 0.5 while dwarfs .
Why a young cluster. Primordial binaries are the population present at birth, before dynamical processing ionizes the soft ones and hardens the rest. Their natural home is therefore a young cluster, for which the Elson–Fall–Freeman (1987) Elson et al., 1987 extended power-law profile is the standard parametrization — not the King model of an old, relaxed globular. So the primary cluster here is EFF ( pc, , pc); a concentrated King () King, 1966 appears only in the environment figure (below).
What is built¶
A Plummer-masses-first EFF young cluster of systems, virialized
to , with a smooth (differentiable) Maschberger primary IMF over
and companions from IndependentCompanions (or the full
Moe & Di Stefano (2017) Moe & Di Stefano, 2017 model). Two controlled sweeps:
Hardness — the companion period band
LogUniformPeriodis slid from (hard, 30 d) to 5.5 (soft, 900 yr) at fixed . Shorter periods smaller deeper binding (vis-viva).Binary fraction — swept at a fixed broad period band.
Inputs and assumptions¶
This demo fits nothing — it is a controlled sweep over hardness and binary fraction, gating the energy separation and reporting diagnostics. Every quantity is a known/fixed physical input or a swept/numerical choice.
Table 1:Model inputs
Input | Meaning and role | Status (fiducial) |
|---|---|---|
EFF | Young-cluster profile (scale, slope, truncation) — the primary cluster potential . | known / fixed (1.0, 2.5, 15.0) |
King | Concentrated GC-like comparison potential (environment figure only). | known / fixed (7.0, 1.0) |
primary IMF | Maschberger (, 0.08–) — draws primaries, hence and . | known / fixed |
distribution, eccentricity | Flat mass ratio with , and a thermal distribution (the headline sweeps use these independent distributions, not the Moe coupling). | known / fixed |
(virial) | Build-time virial ratio the system centres of mass are scaled to. | known / fixed (0.5) |
, | System count (2000); STELLAR units. | known / fixed |
period band, sweeps, seeds, gates |
| sweep / numerical choices |
Result — freshly run, ALL PASS¶
Measured 2026-06-12 (CPU/float64, , seeds from PRNGKey(0); wall
s; exit 0).
Hardness sweep (EFF, ). is pinned at 0.5 to four decimals at every point; spans three orders of magnitude; scatters (the contamination):
1.5 (hard) | 0.5000 | 0.464 | ||
2.5 | 0.5000 | 0.420 | ||
3.5 | 0.5000 | 0.512 | ||
4.5 | 0.5000 | 0.491 | ||
5.5 (soft) | 0.5000 | 0.327 |
Across both sweeps the reservoir ratio stays in — the internal binding always dwarfs the cluster potential — while confirms the resolved ratio is a contaminated proxy. Gate summary:
Check | Gate | Status |
|---|---|---|
(all 12 points) | PASS | |
(all bound) | PASS | |
realized matches set | Poisson | PASS |
(all points) | reservoir dwarfs potential | PASS |
identical EFF vs King (same key) | controlled comparison | PASS |
reservoir fraction EFF King | environment effect | PASS |
The environment comparison¶
The same realistic Moe & Di Stefano population is laid into a young EFF and a concentrated King () potential using the same random key, so the masses and orbital elements — and therefore — are byte-identical between the two. Only the cluster structure differs:
Cluster | ||||
|---|---|---|---|---|
EFF (young) | 5.32 pc | 440 | ||
King (GC-like) | 3.26 pc | 298 |
The concentrated King is more tightly bound ( larger), so the same primordial binary population is a relatively larger energy store in the young, puffy cluster — the global importance of the binary reservoir depends on the birth environment. This is the Heggie (1975) hard/soft intuition at the level of the total energy budget; a per-binary hard/soft classification ( vs the local ) is a related but distinct quantity and is not claimed here.
Figures¶

Figure 1:EFF young-cluster sweeps (scripts/demo_binary_energy_budget.py). (a)
Hardness sweep: pinned at 0.5 (blue) while
(vermilion) scatters around it — the resolved ratio is not the cluster’s. (b)
(green) towers over (purple) and grows three
orders as binaries harden. (c, d) Binary-fraction sweep: same
pinning, and the reservoir fraction rising with , with the realistic
Moe & Di Stefano population marked (★).

Figure 2:Birth-environment comparison (same Moe population, same key). (a) is identical between EFF and King (the controlled comparison); is larger for the concentrated King. (b) The reservoir fraction is therefore larger in the young EFF cluster. for each cluster is annotated.
Caveats¶
How to run¶
env -u VIRTUAL_ENV uv run --no-sync python scripts/demo_binary_energy_budget.pyReferences¶
The EFF young-cluster profile is Elson et al. (1987); the King model
King (1966); the binary statistics follow Moe & Di Stefano (2017); the
COM/internal scale separation is the McLuster convention
Küpper et al. (2011); the hard/soft intuition is Heggie (1975).
The budget API and its vis-viva / scale-separation tests live in
progenax.binaries.diagnostics.
- Küpper, A. H. W., Maschberger, T., Kroupa, P., & Baumgardt, H. (2011). McLuster: A tool for making star clusters. Monthly Notices of the Royal Astronomical Society, 417, 2300. 10.1111/j.1365-2966.2011.19412.x
- Elson, R. A. W., Fall, S. M., & Freeman, K. C. (1987). The structure of young star clusters in the Large Magellanic Cloud. The Astrophysical Journal, 323, 54–78. 10.1086/165807
- King, I. R. (1966). The structure of star clusters. III. Some simple dynamical models. The Astronomical Journal, 71, 64–75. 10.1086/109857
- Moe, M., & Di Stefano, R. (2017). Mind your Ps and Qs: The interrelation between period (P) and mass-ratio (Q) distributions of binary stars. The Astrophysical Journal Supplement Series, 230, 15. 10.3847/1538-4365/aa6fb6
- Heggie, D. C. (1975). Binary evolution in stellar dynamics. Monthly Notices of the Royal Astronomical Society, 173, 729–787. 10.1093/mnras/173.3.729