Skip to content

Simple Pendulum Modeling

Learning Objectives

By the end of this lecture, you should be able to:

  1. Set up the mathematical model for a simple pendulum
  2. Understand the small angle approximation and when to use it
  3. Implement the pendulum equation using numerical methods
  4. Create an animated visualization of pendulum motion
  5. Explore how different parameters affect pendulum behavior

The Physical System

A simple pendulum consists of a mass (bob) attached to a string of length L, swinging under the influence of gravity.

Simple Pendulum

Key Variables:

  • θ (theta): Angular displacement from vertical
  • L: Length of the pendulum
  • m: Mass of the bob
  • g: Gravitational acceleration (9.81 m/s²)

Mathematical Model

The motion of a pendulum is governed by the equation:

For small angles (θ < 15°), we can use the approximation sin(θ) ≈ θ:

This gives us simple harmonic motion with period:

Building the Simulation

Let’s implement the pendulum model step by step:

import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
# Physical parameters
L = 1.0 # Length (m)
g = 9.81 # Gravity (m/s²)
theta0 = 0.3 # Initial angle (radians)
omega0 = 0.0 # Initial angular velocity
# Time parameters
dt = 0.01 # Time step
t_max = 10 # Total time
time = np.arange(0, t_max, dt)

Interactive Pendulum Simulation

Controls

System Properties

Natural Frequency:3.13 rad/s
Period:2.01 s
Current Angle:17.2°
Angular Velocity:0.00 rad/s
Time:0.0 s

Tip: Try different lengths to see how period changes. Add damping to see oscillations decay. Large angles show nonlinear behavior!

Parameter Studies

Explore how different parameters affect pendulum behavior:

Length Effect

Longer pendulums have longer periods. Try L = 0.5m vs L = 2.0m to see the difference.

Initial Angle

Large angles break the small angle approximation. Compare θ₀ = 0.1 rad vs θ₀ = 1.0 rad.

Damping

Add air resistance: domega_dt = -(g/L) * np.sin(theta) - b * omega

Example Problem

Clock Pendulum Design

Design a pendulum clock that ticks every second (period T = 2s). What length should the pendulum be?

Solution

Using the period formula for small oscillations:

Solve for L:

Substituting values:

Therefore, the pendulum should be approximately 1 meter long.

Assignment

Pendulum Experiment

  1. Modify the code to include air resistance (damping)
  2. Compare the motion with and without damping
  3. Find the damping coefficient that reduces the amplitude by half in 10 swings
  4. Create plots showing energy conservation (or loss with damping)

Key Takeaways

  • Mathematical modeling translates physical principles into equations
  • Numerical methods solve equations that lack analytical solutions
  • Visualization helps understand system behavior
  • Parameter studies reveal how design choices affect performance

Next Lecture

In the next lecture, we’ll explore spring-mass systems and learn about resonance, natural frequencies, and how these concepts apply to vibration control in engineering systems.

Comments

© 2021-2025 SiliconWit. All rights reserved.