Simple Harmonic Motion (SHM) Animation Physics

1.0
10.0
1.5
0.00

What is the SHM Animation?

Quick Answer: A live animation of a mass-spring system undergoing simple harmonic motion. See the mass oscillate, and simultaneously view graphs of position, velocity, acceleration, and energy bar charts (kinetic, potential, total). Adjust mass, spring constant, amplitude, and damping to explore how they affect the motion.

Theory of Simple Harmonic Motion

For an ideal mass-spring system (Hooke's law: F = -kx), the equation of motion is m d²x/dt² + k x = 0, giving ω = √(k/m). The solution is x(t) = A cos(ωt + φ). Velocity v = -Aω sin(ωt + φ), acceleration a = -Aω² cos(ωt + φ). Energy is conserved: E = ½ k A² = ½ m v² + ½ k x². With small damping (Fdamp = -b v), the motion becomes underdamped: x(t) = A e-βt cos(ωd t + φ) where β = b/(2m) and ωd = √(ω² - β²).

Step-by-Step Examples

Example 1: Effect of Mass

  1. Set k=10 N/m, A=1.5 m, b=0. Increase mass from 1 kg to 3 kg. The oscillation becomes slower (ω decreases) while amplitude stays constant.
  2. Watch the graphs: velocity amplitude decreases (v_max = Aω), energy remains constant (since no damping).

Example 2: Damped Oscillations

  1. Set mass=1 kg, k=10 N/m, b=0.5. Press Play. The amplitude decays exponentially; the energy bars decrease over time.
  2. Increase b to 1.8 to see nearly critically damped motion (rapid decay without oscillation if b≥2√(mk)).

Example 3: Energy Bar Chart

  1. At any instant, the kinetic (red) and potential (blue) energy bars sum to a constant total (green) if no damping. With damping, total energy decreases.

Frequently Asked Questions

How do I start the animation?

Click the Play button. The mass will begin oscillating from the initial displacement set by Amplitude. You can adjust parameters while it runs.

What do the three graphs show?

The top graph plots displacement x (yellow), velocity v (cyan), and acceleration a (magenta) vs. time. The bottom graph shows kinetic energy (red), potential energy (blue), and total mechanical energy (green).

Why does the energy bar change with damping?

Damping dissipates energy as heat, so the total mechanical energy decreases over time. The bar chart updates to reflect the instantaneous KE and PE, and the total energy decays exponentially.

Can I see the equations?

The info panel shows ω and the period T. The exact x(t), v(t), a(t) are plotted. You can pause and read values from the graphs.

Is this simulation accurate for large amplitudes?

Yes, Hooke's law is assumed linear. The spring remains ideal regardless of amplitude in this model.