Pendulum Energy Bars
A swinging pendulum with KE and PE bars exchanging; total energy stays flat without friction, decays with damping
Objective
Verify that kinetic and potential energy are exact complements in an undamped pendulum — their sum equals E₀ = mgL(1−cosθ₀) at every instant. With damping added, confirm that the total energy envelope decays as E₀·e^(−2γt) where γ = b/(2mL²), while the KE↔PE exchange shape remains unchanged. Key idealizations: point-mass bob, massless rigid rod, no aerodynamic drag beyond the linear damping term.
Setup
- Set Initial Angle θ₀ to 30°, Damping b to 0, Bob Mass m to 1.0 kg, and Rod Length L to 1.0 m. Note the initial PE readout — it should read ≈ 1.314 J and KE should read 0.000 J.
- Press Start and watch the KE and PE bars oscillate. Observe that the Total E bar stays flat and the Total E readout does not change. Record the Total E value at t = 0, t = 5, and t = 10 seconds.
- Press Reset. Set Damping b to 0.5 N·m·s/rad (all other sliders unchanged). Press Start and observe the Total E bar — it should now visibly decrease over time, while KE and PE still mirror each other.
- Press Reset. Set Damping b to 2.0, then press Start. Confirm the system loses nearly all energy within about 5 seconds — the bars shrink to near zero.
- Press Reset. With b = 0, sweep the Initial Angle slider from 5° to 30° without starting: observe how the PE bar height (= E₀) changes at each angle, and record the predicted PE for θ₀ = 30°.
Analytical Prediction
For θ₀ = 30°, m = 1 kg, L = 1 m, g = 9.81 m/s², the initial total energy is:
With b = 0, Total E stays at 1.314 J for the entire 30 s run. With b = 0.5, γ = b/(2mL²) = 0.5/(2·1·1) = 0.25 s⁻¹, and at t = 5 s:
With b = 2, γ = 1.0 s⁻¹, at t = 5 s: E(5) ≈ 1.314·e^(−10) ≈ 1.3 × 10⁻⁴ J — effectively zero.
Results Analysis
With b = 0, read the Total E readout at t = 0, t = 5, and t = 10 s. All three values should match ≈ 1.314 J (within ±0.03 J, i.e., ±1%). At any moment, verify KE + PE ≈ Total E by mentally adding the keOut and peOut readouts — they should sum to the eOut value. With b = 0.5, read eOut at t = 5 s: expected ≈ 0.236 J. The energy-vs-time trace in the right panel should show a smooth exponential curve from 1.314 J at t = 0 curving down toward zero. With b = 2.0, observe that the bars collapse to near-zero within the first 5 seconds — the eOut readout should read below 0.010 J by t ≈ 3 s. Confirm that at any instant during an undamped run, the KE bar and PE bar heights sum to 1.0 in the normalized chart.
Source of Error
This simulation models the bob as a point mass on a massless rigid rod — a true simple pendulum. The damping term is purely rotational viscous damping (τ_damping = −b·ω), which is a linear model that does not capture aerodynamic drag (quadratic in velocity) or pivot friction. The initial condition assumes the pendulum is released from rest (ω₀ = 0), so all initial energy is potential. The analytical prediction uses the same point-mass and linear-damping assumptions, so these idealizations cancel in the comparison. The residual gap between the predicted 1.314 J and the simulated eOut readout is therefore purely numerical — RK4 integration error over the run, not a physical discrepancy.
Further Exploration
- Set θ₀ to 5° (small angle) and run with b = 0. Compare the period to T ≈ 2π·sqrt(L/g) ≈ 2.007 s. Now increase θ₀ to 30° — the period lengthens by about 1.7% (anharmonic correction θ₀²/16). Count ten full bar oscillations at each angle and compare the elapsed times: the large-angle runs fall measurably behind the small-angle clock.
- With b = 0, change the Bob Mass m from 0.1 kg to 2.0 kg. Do the normalized bar heights (KE/E₀, PE/E₀) change? Does the bar oscillation rate (period) change? Why does mass scale the absolute energies but leave the ratio dynamics untouched?
- Hold m = 1 kg, b = 0, θ₀ = 30° and sweep the Rod Length L from 0.5 m to 2.0 m. The period T ∝ √L — doubling L multiplies the period by √2 ≈ 1.41, visibly slowing the bar oscillation. Verify by counting bar cycles over 10 seconds at L = 1 and L = 2.
- Set b = 0.05 (very light damping) and run for the full 30 s. Does the Total E trace show a clearly exponential decay or an almost-flat line? Compute γ = 0.05/(2·1·1) = 0.025 s⁻¹ and the predicted remaining fraction at 30 s: e^(−1.5) ≈ 0.22 — only about 22% of the energy remains (≈78% has been dissipated). Compare with the trace.