Elysia Tools

Navigation

Physics

Damped Harmonic Oscillator Simulation

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

Open static visualization

Tool usage guide

Learn when to use this tool, what it supports, and how real users apply it.

Overview

Release a mass on a spring and follow the same motion in three plots. Use the damping presets to see when oscillations disappear, then hold mass and stiffness fixed to find out what increasing damping changes.

Free motion of a spring and damper

The model measures x from equilibrium and solves mx″ + cx′ + kx = 0 from the chosen displacement x₀ and velocity v₀. The spring sets the restoring force −kx and the viscous damper supplies −cv. Each plotted point comes from the analytic solution for the elapsed time.

The critical coefficient is c_crit = 2√(km) and the damping ratio is ζ = c/c_crit. For 0 < ζ < 1 the motion oscillates with a decaying amplitude. At ζ = 1 there is a repeated real root. Above that boundary the response combines two real decaying exponentials. With c = 0 the system is undamped.

What the plots measure

The displacement graph shows x(t). In the oscillatory regimes the dashed lines bound its magnitude. In the phase portrait, the point (x, v) stays on a closed ellipse without damping and spirals inward with underdamping.

The energy plot shares the displacement plot’s time scale and separates ½mv², ½kx² and their sum E. For viscous damping, dE/dt = −cv². The total curve is flat at a turning point and decreases as the mass moves.

Compare two releases on the same spring

Use the critical preset, set x₀ = 1 m and v₀ = 0 m/s, and note the displacement near the same time in both runs. Raise c to 15 N·s/m while keeping k = 25 N/m and m = 1 kg. The overdamped run has farther to travel at that time.

How it works

  1. 1Set spring stiffness k, mass m, damping coefficient c and the initial conditions. The presets change k, m and c and retain your initial displacement and velocity.
  2. 2Select Start and watch the displacement, velocity and total energy readouts above the plots. The characteristic values also show the oscillation period when ζ < 1.
  3. 3Pause to inspect the current state. Start resumes from that time, while Reset returns the state and plots to the initial conditions.

Edge cases & common failures

  • Starting at equilibrium

    At x₀ = 0 and v₀ = 0 there is no motion, regardless of the damping setting. Give the mass a displacement or a nonzero velocity to see a trajectory.

  • Between slider steps

    The slider may skip the exact value of c_crit for a particular mass and stiffness. The critical preset uses a combination that lands on a slider step.

  • Nonlinear friction

    The exponential envelope assumes a damping force proportional to velocity. Dry sliding friction requires a different model.

Examples

1. Undamped energy

How to use

Set damping to zero and run several cycles. Compare the purple total-energy line with the green and blue components.

m = 1 kg, k = 20 N/m, c = 0 N·s/m, x₀ = 1 m, v₀ = 0 m/s

Outcome

T_d ≈ 1.405 s. Total mechanical energy stays at 10.000 J.

2. Next positive peak

How to use

Choose Underdamped and release the mass from rest with x₀ = 1 m. Compare the starting displacement with the first positive crest after release.

m = 1 kg, k = 20 N/m, c = 1 N·s/m, x₀ = 1 m, v₀ = 0 m/s

Outcome

T_d ≈ 1.414 s. The next positive peak is x(T_d) ≈ 0.493 m.

3. Critical release from rest

How to use

Choose Critically damped, set x₀ = 1 m and v₀ = 0 m/s, then pause near t = 1 s. Try the next experiment at the same settings with only c changed.

m = 1 kg, k = 25 N/m, c = 10 N·s/m, x₀ = 1 m, v₀ = 0 m/s

Outcome

ζ = 1. At t = 1 s, x ≈ 0.040 m.

4. More damping at the same stiffness

How to use

Keep the critical preset’s mass and stiffness. Set c = 15 N·s/m and compare the displacement after the same elapsed time.

m = 1 kg, k = 25 N/m, c = 15 N·s/m, x₀ = 1 m, v₀ = 0 m/s

Outcome

ζ = 1.5. At t = 1 s, x ≈ 0.173 m.

5. Equilibrium crossing at critical damping

How to use

Choose Critically damped and give the mass a negative initial velocity at x₀ = 0.5 m. Watch the first crossing of the horizontal axis.

m = 1 kg, k = 25 N/m, c = 10 N·s/m, x₀ = 0.5 m, v₀ = −5 m/s

Outcome

The mass crosses equilibrium at t = 0.200 s. At t = 0.40 s, x ≈ −0.068 m.

FAQ

Where can I read the oscillation period?

The characteristic values show T_d = 2π/ω_d in seconds when ζ < 1, including the undamped case. The critical and overdamped responses have no oscillation period.

Can the mass overshoot at critical damping?

Yes. An initial velocity directed toward equilibrium can carry the mass across once if it is large enough. With v₀ = 0 the critical response approaches equilibrium monotonically.

How are successive peaks related?

For a fixed underdamped run, measure consecutive peaks on the same side of equilibrium. The natural logarithm of their magnitude ratio equals cT_d/(2m).

At a Glance

Interactive Preview

Damped Harmonic Oscillator Simulation
Static preview of this visualization. Use the interactive panel above to explore it.

Verified Results

Typical Experiments and Results

Every parameter set and result below is a fixed output of this page's built-in model (each asserted before delivery) and reproduces directly: set the Parameters column in the interactive panel.

ScenarioParametersResult
Undamped energym = 1 kg, k = 20 N/m, c = 0 N·s/m, x₀ = 1 m, v₀ = 0 m/sT_d ≈ 1.405 s. Total mechanical energy stays at 10.000 J.
Next positive peakm = 1 kg, k = 20 N/m, c = 1 N·s/m, x₀ = 1 m, v₀ = 0 m/sT_d ≈ 1.414 s. The next positive peak is x(T_d) ≈ 0.493 m.
Critical release from restm = 1 kg, k = 25 N/m, c = 10 N·s/m, x₀ = 1 m, v₀ = 0 m/sζ = 1. At t = 1 s, x ≈ 0.040 m.
More damping at the same stiffnessm = 1 kg, k = 25 N/m, c = 15 N·s/m, x₀ = 1 m, v₀ = 0 m/sζ = 1.5. At t = 1 s, x ≈ 0.173 m.
Initial velocity from equilibriumm = 1 kg, k = 20 N/m, c = 1 N·s/m, x₀ = 0 m, v₀ = 4 m/sInitial kinetic energy is 8.000 J. The first turning point is x ≈ 0.759 m at t ≈ 0.328 s.
Equilibrium crossing at critical dampingm = 1 kg, k = 25 N/m, c = 10 N·s/m, x₀ = 0.5 m, v₀ = −5 m/sThe mass crosses equilibrium at t = 0.200 s. At t = 0.40 s, x ≈ −0.068 m.

Sources

References

Papers and datasets underlying this visualization - every formula, algorithm, and data anchor on the page traces back to the sources below.

  1. [1]

    MIT OpenCourseWare (2011). Under, Over and Critical Damping. 18.03SC Differential Equations.

    View source→ mx″ + cx′ + kx = 0, c² − 4mk, three free responses
  2. [2]

    Moebs W., Ling S. J., Sanny J. (2016). 15.5 Damped Oscillations. University Physics Volume 1, OpenStax.

    View source→ ω₀ = √(k/m), ω_d² = ω₀² − (c/2m)², displacement envelope
  3. [3]

    Bamieh B. (2025). Lecture Notes on Vibrations. University of California, Santa Barbara, Ch. 3.

    View source→ §3.4 phase portrait (x, v), Appendix 3.A initial-value solutions
  4. [4]

    LoPresto M. C., Holody P. R. (2003). Measuring the Damping Constant for Underdamped Harmonic Motion. The Physics Teacher 41(1), 22–24.

    View source→ same-side peak ratio, ln(|xₚ/xₚ₊₁|) = cT_d/(2m)
  5. [5]

    Corridoni T., D’Anna M., Fuchs H. (2014). Damped Mechanical Oscillator: Experiment and Detailed Energy Analysis. The Physics Teacher 52(2), 88–90.

    View source→ spring–mass energy exchange, dissipative power F_d·v
  6. [6]

    Molina M. I. (2004). Exponential Versus Linear Amplitude Decay in Damped Oscillators. The Physics Teacher 42(8), 485–487.

    View source→ exponential amplitude envelope with F_d = −cv, dry-friction model boundary

Related

Related tools and workflows

Science & Education

Quantum Harmonic Oscillator Energy Levels

E_n = (n + ½)ℏω from k + m, ω, or f: zero-point energy ½ℏω, equal spacing ħω, adjacent-transition photon wavelength, classical turning points, optional level ladder.

Education

STEM Physics — Kinematics Velocity-Time Graph Tutor

Kinematics visualisation tutor: velocity-time curve (constant-acceleration SUVAT solver with displacement-area shading), projectile parabola (adjustable g + air-resistance toggle), and free-fall timing

Science & Education

Physics Kinematics Problem Solver

Solve 1D constant-acceleration kinematics problems and 2D projectile motion, with a full step-by-step derivation. Enter any 3 of the 5 quantities (displacement, initial velocity, final velocity, acceleration, time) and the solver finds the other two, showing each formula, the substitution, and the result. For projectiles, enter launch speed/angle/height to get range, time of flight, and max height.

Media

Audio Hum Harmonic Remover

Remove 50/60Hz electrical hum and harmonic buzz from audio recordings.

Next

More visualizations nearby

Cookie settings

Essential cookies keep the site running. Analytics and personalized ads are optional.

Cookie policy