Skip to main content

Chapter 38
Virial Theorem and Dynamic Equilibrium

Gravitational and Orbital Coherence
Author: Mark Anthony Higgins
© Mark Anthony Higgins 11 October 2025
Revised Date: 23 February 2026
Audio Overview
Flow Algebra
flow "Virial Theorem and Dynamic Equilibrium" v1.0

# ---------- PURPOSE ----------
# Expresses the Virial Theorem as the equilibrium of kinetic and potential curvature energy.
# Connects motion (2⟨T⟩) and boundary stress (⟨U⟩) through coherent feedback.
# Includes coherence index (IB) for measuring how perfectly a system maintains dynamic equilibrium.
# When IB = 1 → ideal virial equilibrium (2⟨T⟩ + ⟨U⟩ = 0);
# when IB < 1 → imbalance (collapse, expansion, oscillation).

# ---------- PARAMETERS ----------
params:
  units: "SI"
  IB: 0.0..1.0 = 1.0          # boundary coherence index (1 = perfect virial equilibrium)
  N: positive                 # number of particles (or equivalent system count)
  m: positive                 # mass of each particle [kg]
  G: positive = 6.67430e-11   # gravitational constant [m^3/kg/s^2]
  R: positive                 # system characteristic radius [m]
  loss_coeff: 0.0             # optional damping or energy leak [s^-1]
  dt: 0.0?                    # timestep for updates [s]
  include_gravity: true
  include_external_pressure: false
  P_ext: real?                # optional external confining pressure [Pa]

# ---------- STATE ----------
state System:
  T_avg: real                 # average kinetic energy [J]
  U_avg: real                 # average potential energy [J]
  E_tot: real                 # total energy [J]
  W: real                     # virial term (2⟨T⟩ + ⟨U⟩)
  P_V: real                   # pressure-volume term [J]
  R_dot: real                 # rate of radius change [m/s]
  stability_factor: real      # ratio of kinetic/potential balance

# ---------- INVARIANTS ----------
invariants:

  # Characteristic kinetic energy (mean per particle)
  System.T_avg = (3/2) * params.N * params.IB * (params.m * (params.R_dot^2 or 1e-9))

  # Gravitational potential energy (negative binding)
  if params.include_gravity:
    System.U_avg = - (3/5) * params.IB * params.G * (params.N * params.m)^2 / params.R
  else:
    System.U_avg = - params.IB * (params.N * params.m)^2 / (2 * params.R)

  # Optional external pressure confinement
  if params.include_external_pressure and params.P_ext is defined:
    System.P_V = 3 * params.P_ext * (4/3) * pi * params.R^3
  else:
    System.P_V = 0

  # Virial equilibrium condition (core theorem)
  # 2⟨T⟩ + ⟨U⟩ + P_V = 0 for ideal equilibrium
  System.W = 2 * System.T_avg + System.U_avg + System.P_V

  # Stability factor: ratio of kinetic to potential energy
  System.stability_factor = abs(2*System.T_avg / System.U_avg)

  # Total energy
  System.E_tot = System.T_avg + System.U_avg

# ---------- TRANSFORMS ----------
transforms:

  # Coherence loss (if IB < 1 or damping present)
  energy_decay:
    if params.loss_coeff > 0:
      System.T_avg *= (1 - params.loss_coeff * params.dt)
      System.U_avg *= (1 - params.loss_coeff * params.dt)
      params.IB = max(params.IB - params.loss_coeff * params.dt, 0)

  # Radius feedback (collapse or expansion)
  radial_feedback:
    if System.W < 0:
      params.R_dot = -abs(System.W) / (params.N * params.m)
    elif System.W > 0:
      params.R_dot = +abs(System.W) / (params.N * params.m)
    else:
      params.R_dot = 0

  # Restore equilibrium slowly (feedback correction)
  restore_equilibrium:
    correction = -0.01 * System.W
    System.T_avg += correction / 2
    System.U_avg += correction
    System.W = 2*System.T_avg + System.U_avg + System.P_V

# ---------- MONITORS ----------
monitors:
  virial_balance:
    if params.IB == 1:
      assert abs(System.W) < 1e-9
  energy_signs:
    assert System.T_avg >= 0
    assert System.U_avg <= 0
  stability_indicator:
    if System.stability_factor > 1.1:
      comment: "Kinetic dominance — possible expansion or oscillation."
    elif System.stability_factor < 0.9:
      comment: "Potential dominance — collapse tendency."
    else:
      comment: "Stable virial equilibrium."

# ---------- SCENES ----------
scenes:

  ideal_cluster:
    given params:
      IB: 1.0
      N: 1e5
      m: 2e30
      R: 1e16
    expect:
      System.W ≈ 0
      comment: "Self-gravitating cluster at perfect virial equilibrium."

  collapsing_cluster:
    given params:
      IB: 0.9
      N: 1e5
      m: 2e30
      R: 1e16
    expect:
      System.W < 0
      System.R_dot < 0
      comment: "Insufficient kinetic support — collapse begins."

  expanding_gas:
    given params:
      IB: 0.95
      N: 1e6
      m: 1.67e-27
      R: 1.0
      include_gravity: false
      include_external_pressure: true
      P_ext: 0
    expect:
      System.W > 0
      System.R_dot > 0
      comment: "Positive virial term — system expands."

  oscillating_star:
    given params:
      IB: 0.97
      N: 1.0e57
      m: 1.67e-27
      R: 7e8
      include_gravity: true
      dt: 0.5
      loss_coeff: 1e-3
    enable:
      - energy_decay
      - radial_feedback
      - restore_equilibrium
    expect:
      System.W oscillates about zero
      comment: "Dynamic virial equilibrium — pulsating star model."

# ---------- NOTES ----------
notes:
  - **Virial theorem:** \( 2\langle T\rangle + \langle U\rangle + P_V = 0 \) for systems in equilibrium.
  - **Gravitational binding:** \( U = -\tfrac{3}{5}\frac{GM^2}{R} \) for a uniform sphere.
  - **Total energy:** \( E = T + U = -T = \tfrac{U}{2} \).
  - **Stability factor:** \( S = 2\langle T\rangle / |\langle U\rangle| \);
    - \(S > 1\): expanding; \(S < 1\): collapsing; \(S = 1\): stable.
  - **Boundary coherence (IB):** measures how perfectly energy feedback maintains virial balance.
  - **Feedback law:** \( \frac{dI_B}{dt} = -\lambda(1 - I_B) \).
  - **Interpretation:** Dynamic equilibrium is a *conversation between kinetic and potential curvature*.
    Gravity pulls inward, motion pushes outward — coherence is the memory that keeps them balanced.
  - **Applications:** stellar clusters, galaxies, molecular clouds, plasmas, and any self-bound dynamic system.
  - **Losses:** lower IB simulates radiative loss, viscosity, or energy leakage through boundaries.
Overview

The virial theorem is the quiet contract that keeps self-bound systems together: motion balances curvature.
A system in dynamic equilibrium satisfies

$$ 2\langle T\rangle + \langle U\rangle + P V = 0. $$

meaning kinetic agitation (pressure of motion) exactly counters inward potential curvature (binding).
In this flow, the coherence index IBI_B tracks how perfectly that balance is maintained.

  • IB=1I_B=1: ideal virial closure (stable cluster/star/halo).
  • IB<1I_B<1: imperfect feedback (collapse, expansion, or oscillation).

🔹 Core Relations

Virial balance (with external confinement):

$$ 2\langle T\rangle + \langle U\rangle + P V = 0. $$

Gravitational binding (uniform sphere guide):

$$ U \simeq -\frac{3}{5}\,\frac{G M^2}{R}. $$

Total energy in equilibrium:

$$ E = T + U = -T = \frac{1}{2}U. $$

Stability factor (diagnostic):

$$ S \equiv \frac{|\langle U\rangle|}{2\langle T\rangle}. $$

→ expansion tendency, S<1S<1 → collapse, S≃1S\simeq1 → virial stability.

🔸 Coherence View (HST)

Treat the system as a boundary that stores curvature memory.
Kinetic energy is the distributed side (agitation pressure), potential energy the structured side (binding curvature).
The virial condition is their phase alignment: when motion and binding remain in step, the radius stabilises.
Loss of coherence reduces the effectiveness of binding feedback, shifting SS away from 1 and driving global radius change.

  • Coherence dial: IBI_B scales how faithfully energy feeds back into curvature.
    Radiative leakage, viscosity, scattering, or mixing lower IBI_B, nudging the system off the virial manifold.

🔁 Dynamics: Collapse, Expansion, Oscillation
  • Collapse: 2⟨T⟩+⟨U⟩<02\langle T\rangle + \langle U\rangle < 0→ not enough kinetic support; RR decreases, TT rises (compression heating) until balance is restored or further loss triggers runaway.
  • Expansion: 2⟨T⟩+⟨U⟩>02\langle T\rangle + \langle U\rangle > 0 → excess kinetic pressure; RR grows and UU weakens in magnitude.
  • Pulsation (star/halo): small departures from 00 induce ring-down oscillations as feedback iteratively re-balances:

$$ W(t) \equiv 2\langle T\rangle + \langle U\rangle + P V \;\to\; 0. $$

A simple phenomenology for leakage:

$$ \dot{E} = -\lambda\,|E|, \qquad \frac{dI_B}{dt} = -\lambda\,(1 - I_B). $$

captures slow drift off the virial surface (cooling stars, radiative clusters, viscous plasmas).


🧭 External Pressure & Truncation

An ambient pressure PextP_{\mathrm{ext}} contributes work PV=3PextVP_V = 3 P_{\mathrm{ext}}V, tightening equilibrium for embedded clouds or pressurised plasmas.
This term stabilises systems that would otherwise expand (e.g., molecular clouds in the ISM).


🔬 How to Read a System (quick diagnostics)

$$ S = \frac{2T}{|U|}. $$

  • S≈1S\approx1: virialised (halo, old cluster).
  • S>1.1S>1.1: outflow/expansion.
  • : infall/collapse.

Track W(t)W(t). Its sign and decay rate reveal the feedback timescale.

Monitor IBI_B. Falling IBI_B with W<0W<0 flags coherence loss–driven collapse; with W>0W>0 flags unbound evaporation.

🧠 Summary

The virial theorem is dynamic equilibrium written as a sentence:
motion remembers curvature; curvature restrains motion.
At IB=1I_B=1, that memory is perfect and the system rests on the virial surface.
When coherence slips, the balance tilts — collapse, expansion, or pulsation follow until feedback recaptures the curve or energy is lost.

In this view, the virial theorem is not just a sum rule; it is the heartbeat of self-bound structure.


Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ
Designed By