How to use this calculator
Advance a sampled vibrating-string profile using two consecutive time levels and fixed endpoints.
- Enter Current displacement nodes, Previous displacement nodes, Wave speed (m/s), Spacing (m), then complete the remaining labeled fields. Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Centered wave equation two level grid evolution explained
Enter current and previous node values in matching left-to-right order. The centered recurrence advances interior nodes while keeping both endpoints fixed; its Courant number cΔt/Δx must be at most 1.
How the calculation works
uᵢⁿ⁺¹=2uᵢⁿ−uᵢⁿ⁻¹+C²(uᵢ₋₁ⁿ−2uᵢⁿ+uᵢ₊₁ⁿ), C=cΔt/Δx≤1.
Two profiles encode displacement and approximate initial velocity. Equal consecutive profiles do not exactly impose zero initial velocity under every start-up convention; supply profiles from a consistent discretization.
Set up the calculation
u— Current displacement nodes- Displacement at the current time with fixed end nodes. Use comma-separated values in the stated order.
previous— Previous displacement nodes- Values exactly one time step earlier on the same grid. Use comma-separated values in the stated order.
c— Wave speed (m/s)- Positive propagation speed.
dx— Spacing (m)- Uniform node spacing.
dt— Time step (s)- Time separation of both profiles.
steps— Forward steps- Number of centered updates. Enter a whole number.
Limits of this model
No damping, forcing or variable tension. The two-level history must be consistent, and stability alone does not prevent numerical dispersion.
Check this example
Current displacement nodes = [0, 0, 1, 0, 0]; Previous displacement nodes = [0, 0, 1, 0, 0]; Wave speed (m/s) = 2; Spacing (m) = 1; Time step (s) = 0.2; Forward steps = 3.
- Middle displacement: -0.23392 displacement units
- Profile two norm: 0.751973 displacement units
- Largest absolute displacement: 0.505344 displacement units
- Final node displacement profile: 0.00000000000, 0.505344000000, -0.233920000000, 0.505344000000, 0.00000000000 left to right
A unit center displacement is advanced three steps at Courant number 0.4 with equal current and previous profiles.
Reading the outputs
Middle displacement, the profile Euclidean norm and largest absolute displacement share the input displacement unit. The complete solved vector or profile is also listed in the original component order, so no coordinate is hidden.
Frequently asked questions
Why are two profiles required?
The wave equation is second order in time and needs a two-level state.
Can the endpoint move?
No. This page holds both endpoints fixed.
Is the displayed profile norm physical energy?
No. Wave energy also depends on velocity and spatial gradients.
How do I use the Centered wave equation two level grid evolution calculator?
Enter Current displacement nodes, Previous displacement nodes, Wave speed (m/s), Spacing (m), then complete the remaining labeled fields. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Centered wave equation two level grid evolution?
Current displacement nodes = [0, 0, 1, 0, 0]; Previous displacement nodes = [0, 0, 1, 0, 0]; Wave speed (m/s) = 2; Spacing (m) = 1; Time step (s) = 0.2; Forward steps = 3. Middle displacement: -0.23392 displacement units Profile two norm: 0.751973 displacement units Largest absolute displacement: 0.505344 displacement units Final node displacement profile: 0.00000000000, 0.505344000000, -0.233920000000, 0.505344000000, 0.00000000000 left to right A unit center displacement is advanced three steps at Courant number 0.4 with equal current and previous profiles.
Background or definition reference: MIT numerical PDE lecture notes.
Read our calculation methodology.