b2KIT

Pendulum Simulator

Simulate simple and double pendulums with adjustable length, mass, and damping. Shows phase space plots and chaotic motion.

Tested tool guide Tested browser tools Checked August 16, 2026

What Pendulum Simulator does, with a checked example

Pendulum Simulator numerically integrates the nonlinear equation of motion for a simple pendulum (bob on a rigid, massless rod) or the coupled equations for a double pendulum (two linked rods and masses), rather than relying on the textbook small-angle formula. You set length, bob mass, starting angle, and a damping coefficient, then watch an angle-vs-time trace and a phase-space plot (angular velocity against angle) update as the simulation runs. The common surprise: push the starting angle past roughly 20-30 degrees and the measured period grows noticeably longer than 2 pi times the square root of L over g, because that formula only holds in the small-angle limit.

Worked example

A concrete input and expected output from the current implementation.

Input

Simple pendulum, length = 1 m, gravity = 9.81 m/s^2, starting angle = 5 degrees, damping = 0

Expected output

Period ~= 2.006 s

At a 5-degree starting angle the motion stays in the near-linear regime, so the numerically integrated period matches the small-angle formula 2*pi*sqrt(L/g) = 2*pi*sqrt(1/9.81) to within about a millisecond.

How the result is produced

1

Numerical integration of the equation of motion

For the simple pendulum the tool solves theta'' = -(g/L)*sin(theta) - b*theta' step by step, where b is the damping coefficient, instead of substituting sin(theta) with theta. For the double pendulum it solves the four coupled first-order equations from the two-mass Lagrangian, advancing theta1, theta2, and both angular velocities together so the arms stay physically coupled at every step.

2

Phase-space and angle plots

Alongside the angle-vs-time trace, the simulator plots angular velocity against angle. An undamped simple pendulum traces a closed loop repeating every period; adding damping spirals that loop inward to the origin as energy dissipates. In double-pendulum mode the equivalent plot fills in an irregular, non-repeating path - the visual signature of chaotic motion, not a rendering glitch.

Good uses

  • checking how far a large starting angle pushes the measured period away from the 2*pi*sqrt(L/g) small-angle estimate
  • showing a physics class how two double pendulums with nearly identical starting angles diverge into completely different paths within a few swings
  • comparing how different damping coefficients change the rate a pendulum's swing amplitude decays to rest

Limits and checks

  • how the tool defines 'one period' (successive returns to the same angle, or successive zero-velocity crossings) may not be labeled on screen; with damping, amplitude shrinks every swing, which can make the measured period read as a drifting value rather than one fixed number
  • double-pendulum output is chaotic by nature: two runs with starting angles that look identical but differ in the last entered digit can produce completely different trajectories after a few swings - that is the physics, not a broken simulation
  • the model treats the bob as a point mass on a massless rod (two point masses for the double pendulum), not a physical pendulum with distributed rod mass, so results should not be matched directly against a real swinging-rod experiment

Common questions

Does increasing the bob's mass change the period?

No, not for the simple pendulum - in this model mass cancels out of the equation of motion, so the period depends only on length, gravity, and starting angle. In double-pendulum mode the mass of each arm does change the motion, because the two arms are dynamically coupled through their masses.

Why do two 'identical' double pendulum runs look different?

The double pendulum is chaotic: any difference in starting angle too small to notice on the input, or in the integrator's step size, grows exponentially over time. If both runs used exactly the same entered values they should match; if the paths diverge after a few swings, that is expected chaotic behavior, not an error.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools