Tested tool guide
Tested browser tools
Checked August 16, 2026
What Spring-Mass System Simulator does, with a checked example
Enter mass, spring stiffness, and damping, add an optional sinusoidal driving force, and the page plots displacement, velocity, and the kinetic, potential, and total energy against time while the motion evolves. Free oscillation shows the exponential ring-down; a driving force shows the transient settling into steady motion. Most users are surprised by resonance's signature: with damping present, the largest amplitude arrives at a drive frequency slightly below the natural frequency omega0 = sqrt(k/m), while the 90-degree phase lag between displacement and force lands exactly at omega0.
Worked example
A concrete input and expected output from the current implementation.
Input
m = 1 kg, k = 4 N/m, c = 1 N*s/m, drive F = 1*cos(2t) N (omega = 2 rad/s, equal to omega0), start from rest at x = 0
->
Expected output
After a transient that dies out with time constant 1/(zeta*omega0) = 2 s (zeta = 0.25), the trace settles to x(t) = 0.5*sin(2t) m: amplitude 0.50 m, velocity in phase with the force, displacement lagging it by exactly 90 degrees. By t = 8 s the motion is within about 2% of that steady state.
At omega = omega0 the term k - m*omega^2 vanishes, so the steady amplitude is F0/(c*omega) = 1/(1*2) = 0.5 m and the phase lag is exactly 90 degrees. The plot shows the full solution, so the early trace also carries the decaying transient on top of this sinusoid.