Torsional Pendulum Simulator

JJ Ben-Joseph headshot JJ Ben-Joseph

Enter parameters and press Play.
Simulation summary will appear here.

1. Real‑world motivation

Torsional pendulums appear everywhere from delicate seismometers to playful novelty clocks. When a disk suspended by a wire twists and is released, it oscillates back and forth as the wire seeks to untwist. Traditional calculators return only the oscillation period, leaving users to imagine the graceful rotation and the gradual loss of energy to friction. This upgraded tool preserves the original purpose—computing periods and torsion constants—but adds a responsive canvas that shows the disk spinning in real time. As you modify inertia, stiffness, or damping, the animation makes the underlying mechanics intuitive, revealing why soft wires yield languid swings and why heavy damping quenches motion quickly.

2. Variables and assumptions

The simulation tracks angular displacement θ and angular velocity ω of a rigid body with moment of inertia I. The torsion wire supplies a restoring torque τ=κθ, where κ is the torsion constant. Linear viscous damping with coefficient b opposes motion through torque bω. An optional driving torque τ_d(t)=τ_0sin(ω_dt) can inject energy. Small angles are assumed so that the wire’s restoring torque remains proportional to θ; gravitational effects and axial vibrations are neglected. All inputs use SI units: kilograms times meters squared for inertia, newton meters per radian for torsion constant, and seconds for time. Input validation rejects non‑finite numbers, enforces positive I and κ, and clamps Δt to 0.001–0.1 s.

3. Governing equations

Rotational dynamics follow the analog of Newton’s law: Idωdt=τ_d(t)-bω-κθ. Coupled with dθdt=ω, the system becomes two first‑order differential equations. Rotational kinetic energy is E_k=12Iω2, torsional potential energy is E_p=12κθ2, and dissipated energy accumulates at rate bω2. Work done by the driver adds W=τ_d(t)ωdt, permitting an energy check E_k+E_p+E_d-(E_0+W).

4. Numerical scheme

The code integrates the equations using a fourth‑order Runge–Kutta algorithm. Each step evaluates torques at the current angle and velocity, two midpoints, and the predicted endpoint. The weighted average of these estimates advances both θ and ω. RK4’s error scales with Δt4, so halving the step slashes drift by roughly a factor of sixteen. Extremely stiff systems with large κ or b may require smaller steps for stability. The input field therefore clamps Δt and the script debounces recomputation to avoid excessive calculations during rapid input changes.

5. Worked example

Imagine a circular disk with I=0.02 kg·m² suspended by a wire with κ=0.1 N·m/rad and damping b=0.01 N·m·s/rad. Starting from a 10° twist and zero initial velocity, the simulator predicts a natural period of about 2.8 s. The animation shows the disk oscillating with slowly decaying amplitude as energy drains into the damping term. If we apply a small driving torque of 0.005 N·m at the resonance frequency, the disk settles into steady oscillations around ±12°. The CSV export lists time, angle, angular velocity, and energies, letting you verify that the ΔE column—representing numerical error—remains near zero.

6. Comparison table

The table compares the baseline above with two variants using data captured at 15 s.

Scenario κ (N·m/rad) b (N·m·s/rad) Max |θ| (deg) Energy drift (J)
Baseline 0.1 0.01 10 ≈0
Stiffer wire 0.3 0.01 5.8 ≈0
Heavy damping 0.1 0.05 3.0 <0.001

Tripling the torsion constant halves the amplitude and shortens the period, while quintupling the damping coefficient causes the motion to die out within a few cycles. The small energy drift values confirm numerical stability.

7. How to read the animation

The canvas provides a top view: a radial line indicates the disk’s current angle relative to the horizontal axis. A faint trail marks the recent path. Beneath, striped orange, blue, and gray bars display rotational kinetic energy, torsional potential energy, and cumulative dissipated energy. Text labels and patterns make the bars interpretable without color perception. The caption reports time, angle, angular velocity, and energy error, and a hidden “Simulation summary” div supplies the same information for screen readers. Keyboard users can focus the canvas and press the space bar to play or pause.

8. Limitations

The model assumes linear elasticity and damping; real wires exhibit anelastic behavior and may not respond perfectly proportionally to twist. The disk is treated as rigid and isolated from gravitational torques. Large angles that approach wire yield or plastic deformation are outside the simulation’s scope. Numerical integration with extremely large time steps can introduce phase lag or energy drift, which the reported ΔE highlights. Despite these constraints, the tool captures the first‑order physics governing many laboratory torsion balances and mechanical oscillators.

9. Suggested extensions

Future versions could couple multiple torsional pendulums to explore normal modes or incorporate a magnetic restoring torque for electromagnetic torsion balances. Adding a phase‑space plot of ω versus θ would visualize the spiral toward equilibrium. You might even combine this tool with the Foucault Pendulum Precession Calculator to study compound motions, or examine energy analogies with the Damped Harmonic Oscillator and Rotational Kinetic Energy Calculator.

10. References

For deeper insight, see J. L. Meriam and L. G. Kraige, Engineering Mechanics: Dynamics, which covers torsional oscillators, and D. Halliday, R. Resnick, and J. Walker, Fundamentals of Physics, which introduces rotational dynamics. These texts discuss energy methods and damping models that inspired this simulation.

Embed this calculator

Copy and paste the HTML below to add the Torsional Pendulum Simulator to your website.