Ocean Wave Simulator Back
Ocean Engineering

Ocean Wave Spectrum Simulator

Synthesize an irregular sea state from a JONSWAP spectrum by Fourier superposition. Adjust significant wave height, peak period, JONSWAP gamma and wind speed to see the wave time-series and the wave spectrum update live.

Wave conditions
Significant wave height Hs
m
Peak period Tp
s
JONSWAP γ
Wind speed U10
m/s
Results
Significant wave height Hs
Mean zero-up-crossing period Tz
Peak wavelength λp
Wave steepness
Energy density
Spectrum type
Wave
Theory & Key Formulas

$$\omega^2 = gk\tanh(kd)$$ Deep water (d > λ/2): $C_p = \sqrt{g/k}$
Shallow water (d < λ/20): $C_p = \sqrt{gd}$
Wave energy: $E = \frac{1}{8}\rho g H^2$

What is Ocean Wave Physics?

🙋
What exactly is the "dispersion relation" for ocean waves? I see it in the simulator controls but I'm not sure what it's telling me.
🎓
Basically, it's the fundamental rule that connects a wave's speed to its length and the water depth. In practice, it means not all waves travel at the same speed. The equation is $\omega^2 = gk\tanh(kd)$. Try moving the "Water Depth" slider in the simulator from deep to shallow—you'll see the wave profile and speed change dramatically.
🙋
Wait, really? So in deep water, longer waves are faster? That seems backwards from what I'd expect. How does that work?
🎓
It is counterintuitive! For instance, in a storm far out at sea, the long, rolling swell you feel on a boat travels ahead of the short, choppy waves. The dispersion relation predicts this. In the simulator, set a long "Wave Period" (like 15 seconds) and watch the phase velocity. Then try a short period (3 seconds). You'll see the long-period wave crests moving much faster.
🙋
Okay, that makes sense for deep water. But what about near the shore? The simulator shows the waves slowing down and "bunching up" in shallow depth. What's happening there?
🎓
Great observation! That's the shallow water limit, where the wave speed depends only on depth, not wavelength. A common case is waves approaching a beach. As the depth ($d$) decreases, the speed $C_p = \sqrt{gd}$ drops. Try setting the depth to just 5 meters and crank up the wave height. You'll see the wave steepen and the orbits of water particles become more elliptical, which is the precursor to the wave breaking.

Physical Model & Key Equations

The core of linear wave theory is the dispersion relation. It defines how the angular frequency (related to period) is linked to the wavenumber (related to wavelength) and the water depth.

$$\omega^2 = gk\tanh(kd)$$

Where $\omega = 2\pi/T$ is the angular frequency, $k=2\pi/\lambda$ is the wavenumber, $g$ is gravity, and $d$ is water depth. The $\tanh$ function is the mathematical key—it smoothly transitions the physics from deep to shallow water.

From the dispersion relation, we derive the phase velocity ($C_p$), the speed of individual wave crests. This equation shows the two important limits you can explore in the simulator.

$$C_p = \frac{\omega}{k}= \sqrt{\frac{g}{k}\tanh(kd)}$$

Deep water ($d \gt \lambda/2$): $\tanh(kd) \approx 1$, so $C_p \approx \sqrt{g/k}$. Speed depends on wavelength.
Shallow water ($d \lt \lambda/20$): $\tanh(kd) \approx kd$, so $C_p \approx \sqrt{gd}$. Speed depends only on depth.

Frequently Asked Questions

The simulator uses Fourier synthesis with random phases, so the wave shape may not change immediately after parameter changes. Pressing the 'Regenerate' button recalculates the wave with new random numbers, reflecting the changes.
Increasing the gamma coefficient sharpens the peak of the JONSWAP spectrum, concentrating wave energy near the peak frequency. As a result, stronger swell components are generated, producing a wave shape closer to a regular wave train. It is typically adjusted within a range of 1 to 7.
This tool is intended for educational and visualization purposes and cannot be used for actual design. Real design requires specialized software that considers more detailed directional spectra, nonlinear effects, and extreme value statistics. However, it is helpful for intuitively understanding basic wave characteristics.
The wave spectrum shows the energy distribution of each frequency component. The lower the peak frequency of the spectrum, the more dominant the long-period waves; the wider the spectrum, the more irregular the wave shape becomes due to the mixing of waves with various periods. The wave shape is synthesized by inverse Fourier transforming these components.

Real-World Applications

Coastal Engineering & Harbor Design: Engineers use these exact equations to model how waves will propagate into a harbor. They need to predict where waves will refract, slow down, and potentially cause damaging resonance inside the harbor, which directly affects the placement of breakwaters.

Offshore Structure Design: Platforms for oil, gas, or wind energy must withstand wave forces. The particle orbits and wave energy equation $E = \frac{1}{8}\rho g H^2$ are used to calculate the total load on the structure's legs, which is critical for ensuring stability in storms.

Surf Forecasting: Forecast models use the dispersion relation to "back-track" waves seen by deep-water buoys to their source storm. Since long-period swell travels faster, its arrival time at a beach can be predicted days in advance, which is essential for surfers and maritime safety.

Sediment Transport & Beach Erosion: The shift from circular to elliptical particle orbits in shallow water is what moves sand along the seabed. Understanding this helps coastal managers predict how beaches will change after storms or where to place sand nourishments to combat erosion.

Common Misunderstandings and Points to Note

When you start using this simulator, there are a few key points to keep in mind. First, the "Significant Wave Height (Hs)" is not the "Maximum Wave Height". Significant wave height is the average of the highest one-third of wave heights. For example, even if Hs is 3m, there can occasionally be much larger waves mixed in, exceeding 5m. In design, it's crucial not to overlook these "maximum waves". Next, "Peak Period (Tp)" and "Average Period" are different. Tp corresponds to the period at the peak of the spectrum and is close to the interval of the "swell" you see in the wave profile. However, if you calculate the actual zero-up-crossing period from a wave record, it's typically shorter than Tp. For instance, even if you set Tp=10 seconds, the average period will often be around 7-8 seconds. Finally, remember that simulation results are just "one possible realization". The irregular waves generated by Fourier synthesis will produce a different wave profile every time for the same Hs and Tp, due to the randomness of the phases. When evaluating the response of an actual structure, the golden rule is to account for this "variability" by running calculations with multiple different wave profiles (using different random seeds).

How to Use

  1. Set significant wave height (Hs) in metres—typical ocean swells range 1–6 m; input values between 0.5–10 m.
  2. Adjust peak period (Tp) in seconds, controlling dominant wavelength; coastal waves: 5–8 s, deep-water swell: 12–20 s.
  3. Define gamma (peak enhancement factor) from 1–6 to shape the spectrum bandwidth; higher values concentrate energy at the peak frequency.
  4. Set wind speed in m/s (0–20 m/s) to modulate wave generation; the simulator recalculates particle orbits and dispersion relation in real time.
  5. Observe the spectral density plot, wave profile animation, and orbital velocity vectors; zoom to inspect near-shore vs. deep-water behaviours.

Worked Example

A North Sea platform engineering scenario: Hs = 3.5 m, Tp = 10 s, gamma = 3.3 (JONSWAP spectrum), wind = 12 m/s. The simulator displays peak frequency fp = 0.10 Hz, wavelength λ ≈ 156 m in deep water (h > λ/2). Particle orbital velocity at the surface reaches 0.72 m/s; at 20 m depth, velocity decays to 0.08 m/s. The wave profile shows asymmetric crests due to nonlinearity, validated against DNV-GL environmental codes for deck-wetting and foundation load assessment.

Practical Notes

  1. Gamma > 3.5 models fetch-limited coastal generation (e.g., North Sea storms); gamma ≈ 1 approximates swell-dominated spectra (Southern Ocean, Pacific trade-wind belts).
  2. Shallow-water regime (Tp²g/2πh > 1) triggers nonlinear effects and shoaling; observe wavelength compression and orbital velocity amplification near the seabed.
  3. Wind speed > 15 m/s drives spectral broadening and increases spectral tail; critical for marine structure fatigue analysis and deck clearance verification.
  4. Export spectral data (CSV) for input to hydrodynamic codes (WAMIT, AQWA) or fatigue analysis software; period doubling occurs in second-order sum/difference frequencies.