Simulation of a Pendulum hanging on a spinning Disk

2 min read 04-10-2024
Simulation of a Pendulum hanging on a spinning Disk


Unraveling the Swing: Simulating a Pendulum on a Spinning Disk

Have you ever wondered how a pendulum would behave if it was hanging from a spinning disk? It's a fascinating question that combines the elegance of simple harmonic motion with the complexity of rotating frames of reference. In this article, we'll delve into the intriguing dynamics of this system and explore how to simulate its behavior using Python.

The Setup: A Spinning Stage for a Pendulum

Imagine a pendulum, a simple weight attached to a string, hanging from a disk that is rotating at a constant speed. The pendulum's motion is influenced by both gravity and the centrifugal force arising from the disk's rotation. This interplay leads to a captivating dance of forces, making the pendulum's trajectory anything but predictable.

The Code: Bringing the Simulation to Life

Let's use Python and the popular numerical integration library scipy.integrate to model this system. The code below provides a basic implementation:

import numpy as np
from scipy.integrate import odeint
import matplotlib.pyplot as plt

# Constants
g = 9.81  # Acceleration due to gravity
L = 1.0  # Length of the pendulum
omega = 2.0  # Angular velocity of the disk

# Initial conditions
theta0 = np.pi/4 # Initial angle of the pendulum
dtheta0 = 0.0 # Initial angular velocity of the pendulum

# Define the system of equations
def pendulum_equations(y, t):
  theta, dtheta = y
  ddtheta = -g/L * np.sin(theta) + omega**2 * np.sin(theta) * np.cos(theta)
  return [dtheta, ddtheta]

# Time span for simulation
t_span = np.linspace(0, 10, 500)

# Solve the differential equations
sol = odeint(pendulum_equations, [theta0, dtheta0], t_span)

# Extract results
theta = sol[:, 0]
dtheta = sol[:, 1]

# Plot the results
plt.plot(t_span, theta)
plt.xlabel("Time (s)")
plt.ylabel("Angle (rad)")
plt.title("Pendulum Angle vs Time")
plt.show()

This code defines a system of differential equations that represent the pendulum's motion. odeint numerically solves these equations, providing the angle and angular velocity of the pendulum over time. The resulting plot shows the pendulum's angle oscillating as it swings on the spinning disk.

The Insights: Unveiling the Complexities

The simulation reveals fascinating insights into the pendulum's behavior:

  • Coriolis Force: The spinning disk introduces a Coriolis force, perpendicular to both the pendulum's velocity and the disk's rotation axis. This force is what causes the pendulum to precess, or slowly change its oscillation plane.

  • Centrifugal Force: The centrifugal force due to the disk's rotation acts outwards, altering the effective gravity acting on the pendulum. This affects the pendulum's oscillation frequency.

  • Non-Linear Dynamics: The system exhibits non-linear dynamics, meaning that small changes in initial conditions can lead to vastly different long-term behavior. This complexity is reflected in the intricate patterns of the pendulum's swing.

Going Further: Exploring the Possibilities

This basic simulation serves as a starting point for further exploration. You can:

  • Vary parameters: Experiment with different disk speeds, pendulum lengths, and initial conditions to observe how the pendulum's behavior changes.

  • Add damping: Introduce a damping force to account for air resistance or friction, making the oscillations gradually decay.

  • Visualize in 3D: Extend the simulation to visualize the pendulum's motion in 3D space, providing a more realistic representation.

Conclusion: A Glimpse into a Fascinating System

Simulating a pendulum on a spinning disk opens a window into the intricate world of mechanics and non-linear dynamics. The system exhibits a captivating interplay of forces, showcasing the power of numerical methods to unravel complex physical phenomena. With this foundation, you can explore the fascinating possibilities of this system and delve deeper into the secrets of physics through simulation.