Equation of motion
θ̈ = −(g / L) sin θ − γ θ̇
The angular acceleration comes from gravity's tangential component and a linear damping term. The solver advances angle, angular velocity and dissipated work together using a fixed-step fourth-order Runge–Kutta method.
Energy bookkeeping
E = ½ mL²θ̇² + mgL(1 − cos θ)
dE/dt = −mL²γ θ̇²
The energy check compares the current mechanical energy plus accumulated dissipated work with the initial energy.
Two period references
T₀ = 2π √(L / g)
This textbook expression assumes a small angle. The nonlinear reference uses T = 4 √(L / g) K(k), where k = sin(θmax / 2) and K is the complete elliptic integral of the first kind, evaluated here by numerical quadrature.
Model boundaries
The bob is a point mass, the string is massless and inextensible, motion stays in one plane, gravity is uniform, and damping is proportional to angular speed. The drawing is scaled to fit the display, not to represent a physical apparatus at true size. Real pivots, strings and air flows are more complicated.
Independent educational simulation. Not affiliated with a museum, university, laboratory or equipment manufacturer.