Mechanics and simulation
Double Pendulum
Simple and compound double-pendulum models solved in Lagrangian or Hamiltonian form.
Deployed · active
The system and its boundary
The application solves two ideal conservative systems: a simple double pendulum with endpoint masses, and a compound model with extended rigid bodies and explicit centres of mass. Damping, forcing, friction, and measurement error are outside both formulations.
The angles \(q=(\theta_1,\theta_2)\) are the generalised coordinates. A complete state also contains angular velocities or canonical momenta. From selected parameters and initial conditions, the application computes one trajectory for animation, angle traces, and state-space projections.
Implemented model geometry
Two formulations of the same motion
Lagrangian formulation
The Lagrangian route begins with kinetic and potential energy. The Euler–Lagrange equations give the coupled equations of motion:
Hamiltonian formulation
The Hamiltonian route introduces canonical momenta \(p_i=\partial L/\partial \dot q_i\) and evolves four first-order equations:
The interface keeps the selected formulation visible because the two routes describe the same mechanics with different state variables.
Computational approach
SymPy derives and caches the governing expressions for the selected model. Each formulation is arranged as a first-order state derivative and passed to SciPy’s solve_ivp. The Lagrangian state contains angles and angular velocities; the Hamiltonian state contains angles and canonical momenta.
The requested evaluation times provide a common basis for Cartesian animation, angle traces, and angular or phase projections. Visitors can change the model, formulation, physical parameters, initial conditions, and integration time; every view then updates from the same solution.
Application output
Limitations
The application is for mathematical exploration, not a calibrated physical apparatus. Numerical validation remains incomplete: it does not yet publish a finished suite for solver convergence, conservation error, agreement between formulations, or defined chaos diagnostics. A complicated trajectory alone is not treated as evidence of chaos.