Home »Math »Spring-Mass Simulator
Engineering Simulation

Spring-Mass-Damper Simulator

Visualize the full second-order ODE response, free, damped, forced, and resonance, with live solution decomposition and a phase-space portrait.

Visualizations

System Diagram

eqkm = 1 kgy
Show:
t = 0.00 sy = 0.5000 mẏ = 0.0000 m/s

Phase Space Plot

y vs ẏ (displacement vs velocity)

Spiral inward → damped

Closed orbit → undamped

Spiral outward → resonance

Analysis Highlights

ω0 (natural)

4.000 rad/s

ccr (critical)

8.000

Natural period Tn

1.571 s

Damping ratio ζ

0.000

Stability: Conservative system — oscillates indefinitely without decay.

Math & Derivation Breakdown

Collapse / Expand

Dynamic Mathematical Model

General form:
my+ky=0m\,y'' + k\,y = 0
With current values:
1y+16y=01\,y'' + 16\,y = 0

Newton's second law applied to the mass: spring force −ky, damping force −cy', and external force F(t).

Solution Decomposition

y(t)=yc(t)y(t) = y_c(t)
Free response — only the homogeneous (transient) part is present.
Homogeneous yc:
yc(t)=Acos(ω0t)+Bsin(ω0t)y_c(t) = A\cos(\omega_0\,t) + B\sin(\omega_0\,t)
Initial conditions:
y(0)=y0,y(0)=v0y(0) = y_0,\quad y'(0) = v_0

Detailed Derivation

Characteristic equation:
mr2+k=0    r=±iω0m r^2 + k = 0 \;\Rightarrow\; r = \pm i\,\omega_0ω0=k/m=4\omega_0 = \sqrt{k/m} = 4
Apply ICs y(0) = 0.500, y'(0) = 0:
A=y0=0.500A = y_0 = 0.500B=v0ω0=0B = \dfrac{v_0}{\omega_0} = 0
Closed-form solution:
y(t)=0.500cos(4t)y(t) = 0.500\,\cos(4\,t)