Skip to main content
Sandbox Physics

M047 · Energy averages

Virial Theorem Observatory

Follow bound and escaping trajectories in power and logarithmic potentials. Compare running kinetic and radial-force averages, retain the finite-time boundary term and audit the relation again from raw sensor readings.

Interactive modelVirial Theorem Observatory
Mean potential energyReady\text{Ready}
Selected timeReady\text{Ready}
Particle radiusReady\text{Ready}
Particle speedReady\text{Ready}
Kinetic energyReady\text{Ready}
Potential energyReady\text{Ready}
Twice mean kinetic energyReady\text{Ready}
Mean radial virialReady\text{Ready}
Finite-window boundary termReady\text{Ready}
Finite-window identity residualReady\text{Ready}
Characteristic clockReady\text{Ready}
Maximum energy errorReady\text{Ready}
Maximum angular momentum errorReady\text{Ready}
Endpoint refinement differenceReady\text{Ready}
Raw-record identity residualReady\text{Ready}
Initial binding conditionReady\text{Ready}
Acquired trajectory stationsReady\text{Ready}

Physics tutorial

Finite-time virial, before the limit

BackgroundA radial force is determined by the source and its geometry.

Why it mattersConnect the scene, the trajectory and a separately acquired sensor record.

Start with the essentials

Focus question
When does the energy average settle?
One-sentence intuition
A finite boundary term is physical, and must not be mistaken for numerical error.

Core mathematical model

Attractive radial potentials

U(r)=An(rr0)n(n≠0)Ulog⁡(r)=Aln⁡(rr0)\begin{aligned}U(r)&=\frac A n\left(\frac r{r_0}\right)^n\quad(n\ne0)\\U_{\log}(r)&=A\ln\left(\frac r{r_0}\right)\end{aligned}

The logarithmic member is a separate potential; the power-potential energy zero is not shifted. The test mass is one kilogram.

Instantaneous virial identity

d(r⋅p)dt=2K−W,W=−r⋅F\frac{d(\mathbf r\cdot\mathbf p)}{dt}=2K-W,\qquad W=-\mathbf r\cdot\mathbf F

The outward radial coordinate and inward force determine the signs.

Finite-time audit

2⟨K⟩T−⟨W⟩T=(r⋅p)(T)−(r⋅p)(0)T2\langle K\rangle_T-\langle W\rangle_T=\frac{(\mathbf r\cdot\mathbf p)(T)-(\mathbf r\cdot\mathbf p)(0)}{T}

A short interval can have a large physical boundary term while satisfying the identity accurately.

Power and logarithmic limits

W=nU(n≠0)Wlog⁡=A\begin{aligned}W&=nU\quad(n\ne0)\\W_{\log}&=A\end{aligned}

Only when the boundary term vanishes does the familiar long-time energy relation follow.

Conserved quantities

E=12m∣v∣2+U(r)Ly=m(zvx−xvz)\begin{aligned}E&=\frac12m|\mathbf v|^2+U(r)\\L_y&=m(zv_x-xv_z)\end{aligned}

The planar orbit lies in the horizontal plane. Energy and angular momentum errors are reported independently of the virial residual.

Common difficulties

Assumption boundary

Typical misconceptionAn ideal model automatically describes a real planet or relaxed star cluster.

Better mental modelThe source is prescribed, the particle has no back reaction, and omitted effects are stated.

Run the experiment

  1. 01

    Compare potentials

    Try Kepler ellipse, Harmonic well, Quartic confinement and Logarithmic potential.

    What to observe: The force law and running averages change together.
  2. 02

    Keep the boundary

    Compare Short observation and a longer duration; scrub the selected time.

    What to observe: The average difference follows the physical boundary term; its corrected residual diagnoses numerics.
  3. 03

    Test the assumption

    Increase the Kepler launch speed beyond escape and watch the boundary term.

    What to observe: An escaping particle violates the bounded-motion premise; extending time need not repair it.
  4. 04

    Acquire and refine

    Acquire the solved trajectory, inspect raw estimates, then halve the integration step.

    What to observe: Raw resampling and sensor noise are separate from the every-step numerical average.