Spring–mass–damper

Natural frequency
Damping ratio ζ
Period of the swings
Settles within 2% in
Critical damping

Pull the mass down and let go. The spring pulls it back, it overshoots, and the damper takes a little energy out on every swing. With little damping it rings for a long time; at critical damping it comes straight back without overshooting; with more, it creeps back slowly.

The physics

A linear spring, a viscous damper (force proportional to speed) and no gravity offset (the rest position already includes the spring's stretch under the weight). Tested: the exact solutions against step-by-step integration (fourth-order Runge–Kutta) with no damping, light damping, critical damping and heavy damping, that the motion only crosses rest when ζ < 1, and that heavy damping returns more slowly than critical (packages/mechanics/test/science.test.ts).

Example

With mass 1 kg, spring stiffness 400 N/m, damping 4 N·s/m, pulled down by 50 mm: natural frequency: 3.18 Hz (20 rad/s); damping ratio ζ: 0.1: underdamped; period of the swings: 316 ms; settles within 2% in: 1.96 s; critical damping: 40 N·s/m. Open this setup, then change one thing at a time.

Related: Pendulum period · Coil spring rate calculator · RC circuit