autosim.simulations.double_pendulum#
Double-pendulum simulator and ODE helpers.
- class DoublePendulum(parameters_range=None, output_names=None, log_level='progress_bar', t_span=(0.0, 10.0), n_time_points=500, g=9.81)[source]#
Bases:
SimulatorSimulator of double pendulum motion.
A double pendulum consists of two pendulums attached end to end. The motion is chaotic and highly sensitive to initial conditions. This simulator computes the time evolution of both pendulum angles and the total kinetic energy.
- double_pendulum_equations(y, m1, m2, l1, l2, g)[source]#
Solve double pendulum equations of motion.
y = [theta1, z1, theta2, z2] where z1 = theta1_dot, z2 = theta2_dot.
- compute_kinetic_energy(theta1, z1, theta2, z2, m1, m2, l1, l2)[source]#
Compute total kinetic energy of the double pendulum system.