Physics Theory — Project 2: Simple and Double Pendulums
Objective
This project studies rotational oscillating systems using angular coordinates instead of direct Cartesian coordinates. It focuses on three areas:
- rotational dynamics;
- numerical integration of ordinary differential equations;
- the transition between regular and chaotic behavior.
Conventions
- Length unit: meter (m)
- Mass unit: kilogram (kg)
- Time unit: second (s)
- Angle unit in the interface: degree (deg)
- Angle unit in the integrator: radian (rad)
- Gravity: m/s²
- Angular velocity: rad/s
The angle represents the rod pointing downward in stable equilibrium. Positive values rotate counterclockwise when viewed in the conventional Cartesian plane.
Simple pendulum
Model
The simple pendulum is modeled as a point mass attached to a rigid, massless rod of length .
Its exact equation of motion is:
The project also uses a linear damping term proportional to angular velocity:
where:
- is gravity;
- is the rod length;
- is the angular damping coefficient.
Small-angle approximation
When rad, , and the equation becomes linear:
In this regime, the theoretical period is:
This expression is used as a numerical validation reference in the tests.
Mechanical energy
For mass , the simple pendulum’s total energy can be written as:
where .
Without damping, the energy should remain approximately constant. With damping, it should decrease over time.
Double pendulum
Model
The double pendulum has two point masses, and , coupled by two rigid rods of lengths and . Its degrees of freedom are and .
The exact equations are nonlinear and coupled, and they depend simultaneously on the angles and angular velocities. One standard form for the angular accelerations is:
The project also adds linear damping terms:
Mechanical energy
The mass positions are:
The velocities are obtained by differentiating these expressions. The total energy is:
with gravitational potential measured relative to the lowest-energy configuration:
Numerical integration
The project implements two integrators:
Symplectic Euler
- Updates the angular velocities first;
- Then updates the angles using the corrected velocities.
It is simple and inexpensive, and it often preserves the system’s qualitative structure better than standard explicit Euler.
Fourth-order Runge-Kutta (RK4)
It uses four intermediate evaluations per time step and produces much lower local error than first-order methods.
For the simple pendulum, RK4 should closely approximate the theoretical small-angle period. For the double pendulum, it helps reduce local error in a system that is highly sensitive to initial conditions.
Chaos and sensitivity to initial conditions
The double pendulum is a classic example of a deterministic system that can exhibit chaotic behavior. This means that:
- the equations are fully deterministic;
- small differences in the initial state can grow rapidly over time;
- long-term predictions become highly sensitive to numerical error.
Therefore, double-pendulum tests should prioritize:
- absence of
NaNandInf; - numerical stability for reasonable time steps;
- basic invariants when the system has no damping;
- simple special cases, such as exact rest at .
Practical validation targets
Simple pendulum
- small-angle period;
- approximate energy conservation without damping;
- energy decay with damping;
- stability with different integration methods.
Double pendulum
- stable rest in the downward vertical configuration;
- finite evolution without numerical blow-up;
- coherent trails for both bobs;
- qualitatively distinct behavior between regular and chaotic regimes.
Model limitations
This project deliberately simplifies several aspects:
- rods are rigid and massless;
- there is no pivot friction beyond the model’s imposed linear damping;
- masses and rods do not collide;
- there is no distributed air resistance along the rods;
- the problem is two-dimensional.
These simplifications are appropriate for studying numerical integration, energy, periodicity, and chaos without introducing unnecessary complexity too early.