m ẍ + c ẋ + kx = F₀ cos(ωt)
The cart's acceleration is set by the net force: the drive pushes, the spring pulls back, and the damper resists motion. The simulation advances position and velocity with fourth-order Runge–Kutta integration at a fixed 1/240-second step.
ωₙ = √(k/m) · ω = 2πf
A = F₀ / √[(k − mω²)² + (cω)²]
δ = atan2(cω, k − mω²)
Here, A is the ideal steady-state displacement amplitude and δ is the phase lag behind the driving force. The free ring-down check uses the damped frequency ωd = √(ωₙ² − (c/2m)²).
What the model leaves out
- The spring is perfectly linear and has no mass of its own.
- Damping is viscous and proportional to velocity.
- The cart moves along one frictionless guide; there are no impacts or mechanical stops.
- The ideal equations become less trustworthy when the displacement is large compared with the apparatus travel scale.
This is an independent educational simulation and is not affiliated with or endorsed by any manufacturer or institution.