Numerical Methods & Scientific Computing

1-D Wave Equation Solver

Simulate the one-dimensional wave equation with fixed endpoints and zero initial velocity. Choose the wave speed, grid, time step and initial displacement profile, then inspect snapshots and the Courant-number stability screen.

Finite-difference PDE workbench

1-D Wave Equation

Domain is normalized to 0 ≤ x ≤ 1 unless the 2-D Laplace solver is selected.

How this tool works

The centered scheme uses uᵢⁿ⁺¹=2uᵢⁿ−uᵢⁿ⁻¹+C²(uᵢ₋₁ⁿ−2uᵢⁿ+uᵢ₊₁ⁿ), where C=cΔt/Δx. The standard stability condition is C≤1.

Example

Start with a sine displacement and zero velocity. The fixed-end solution oscillates while preserving the boundary values at zero.

Common questions

Why is the first time step different?

The two-level recurrence needs u at two time levels. The solver constructs the first step from the initial displacement and zero initial velocity using a second-order Taylor start.

What causes numerical dispersion?

Finite spatial and temporal resolution make different numerical wavelengths travel at slightly different phase speeds. Refining Δx and Δt reduces that error.