Damped Harmonic Oscillator

Adjust mass, spring stiffness and damping, then compare the spring motion, displacement, phase portrait and mechanical energy.

Spring motion

Damping regime
Underdamped
Time
0.00 s
Displacement (x)
1.000 m
Velocity (v)
0.000 m/s
Acceleration (a)
−20.000 m/s²
Total mechanical energy
10.000 J

Displacement over time

Phase portrait (x, v)

Mechanical energy over time

  • Elastic potential energy
  • Kinetic energy
  • Total mechanical energy

Parameters

Changing a motion parameter or choosing a preset restarts the motion from the specified initial displacement and velocity.

Damping presets

Equation and characteristic values

Equation of motion mx″ + cx′ + kx = 0
Natural angular frequency ω₀ = √(k/m) 4.472 rad/s
Critical damping coefficient ccrit = 2√(km) 8.944 N·s/m
Damping ratio ζ = c/ccrit 0.1118
Oscillation angular frequency ωd = ω₀√(1 − ζ²) (ζ < 1) 4.444 rad/s
Oscillation period Td = 2π/ωd (ζ < 1) 1.414 s

How does the spring oscillator move?

Displacement x is measured from equilibrium. The ideal spring exerts a restoring force −kx, and the linear viscous damper exerts a force −cv. Their sum is the net force. The mass starts with the chosen displacement and velocity and moves freely after release.

How do the damping regimes differ?

Without damping (ζ = 0), amplitude is constant as kinetic and potential energy exchange.

With underdamping (0 < ζ < 1), the disturbed mass crosses equilibrium repeatedly. The dashed lines on the displacement plot are the exponential amplitude bounds. Initial velocity affects their height.

Critical damping (ζ = 1) is the boundary for oscillation. With the same mass and stiffness, a critically damped oscillator released from rest approaches equilibrium faster than an overdamped one.

With overdamping (ζ > 1), displacement is a sum of two decaying exponentials. A sufficiently large initial velocity can produce a single equilibrium crossing in either non-oscillatory regime.

Reading the phase portrait

Displacement is on the horizontal axis and velocity is on the vertical axis. An undamped trajectory is a closed ellipse. An underdamped trajectory spirals inward. Critical and overdamped trajectories approach the origin without repeatedly circling it.

How does mechanical energy change?

Total mechanical energy is E = ½mv² + ½kx². Its rate of change is dE/dt = −cv², so total energy never increases. At a turning point the velocity and the instantaneous dissipation rate are both zero.