VOF Method for Wave Simulation
Theory: wave properties and free-surface tracking
Overview
I want CFD of waves hitting an offshore structure, but the waves I generate shrink as they travel.
That's the most common numerical-wave-tank complaint. Usually the mesh near the surface is too coarse for the wave, or the time step too large. VOF transports the water fraction, so coarse cells smear the surface and bleed wave energy. First compute the target wavelength correctly and check how many cells span a wavelength and the wave height. Wavelength depends on period and depth, so calculate it from the dispersion relation.
Dispersion relation
$\omega = 2\pi/T$ is angular frequency, $k$ wavenumber, $h$ depth, $L$ wavelength and $c$ phase speed. In deep water (large $kh$) $L = gT^2/2\pi$; in shallower water the same period gives a shorter, slower wave. Longer-period waves feel depth sooner.
The VOF method
$\alpha$ is the water volume fraction in a cell (1 water, 0 air). Water and air densities are blended by $\alpha$ and solved as one flow. The surface is at $\alpha = 0.5$, and special advection schemes (interface compression, etc.) keep it sharp.
Representing the surface by a volume fraction
The VOF method was published by Hirt and Nichols at Los Alamos in 1981. Earlier methods tracked marker points along the surface or described it with a function, and failed when waves broke or droplets flew. Giving each cell a single number — how full of water it is — proved robust however the surface deformed. Refinements to keep the interface sharp followed, and today it is used from ship resistance to dam breaks and liquid sloshing in tanks.
Worked examples
Example 1: wavelength by period and depth
| Period | Deep-water L | L at 20 m depth | Phase speed | kh |
|---|---|---|---|---|
| 4 s | 25.0 m | 25.0 m | 6.2 m/s | 5.03 |
| 6 s | 56.2 m | 55.0 m | 9.2 m/s | 2.28 |
| 8 s | 99.9 m | 88.8 m | 11.1 m/s | 1.42 |
| 10 s | 156.1 m | 121.2 m | 12.1 m/s | 1.04 |
A 4 s wave has its deep-water length even at 20 m, but a 10 s wave is more than 20% shorter than the deep-water formula gives. Building the tank with the deep-water formula skews both mesh guidelines and damping-zone lengths for long-period waves.
Example 2: tank mesh and cost
A 2D tank 20 m deep, five wavelengths long, 2 m wave height; a ±2 m band around the surface is refined, with vertical cells four times coarser elsewhere:
| Period | Cells per L / per H | dx | dz | 2D cells | Steps per period |
|---|---|---|---|---|---|
| 6 s | 80 / 10 | 0.69 m | 0.20 m | about 21k | 160 |
| 6 s | 100 / 20 | 0.55 m | 0.10 m | about 52k | 200 |
| 10 s | 80 / 10 | 1.52 m | 0.20 m | about 21k | 160 |
| 10 s | 100 / 20 | 1.21 m | 0.10 m | about 52k | 200 |
Only tens of thousands of cells in 2D. What about 3D?
Refining the lateral direction as finely multiplies cell counts by the lateral cell number, quickly reaching millions to tens of millions. So 3D models refine only near the structure and coarsen the generation and absorption zones, or solve the far field with a potential-flow wave model coupled to CFD near the structure. Note also that for the 10 s wave the horizontal-to-vertical cell ratio exceeds 7; overly stretched cells destabilise the surface, so adjust horizontal size when you refine vertically.
Time step
Keeping the Courant number around 0.5 gives about 100–200 steps per period. VOF often uses an even smaller Courant number (about 0.25) to keep the interface sharp.
Building a numerical wave tank
Procedure
- From period, height and depth, compute wavelength and choose the wave theory (linear, Stokes, cnoidal).
- Provide a wave-generation zone and an absorption zone (1–2 wavelengths) to suppress reflection.
- Run without the structure and confirm wave height and period at its location.
- Vary mesh and time step to confirm wave decay and structural forces don't change.
“Waves come back from the far end”
While computing wave forces on a structure, the forces crept upward as the run continued. The absorption zone at the tank's far end was insufficient, so reflected waves returned and superposed on incoming ones. Short absorption zones reflect long-period waves more readily, and waves reflected by the structure travel back toward the generator, so the generation zone must absorb reflections too. The basic check is a structure-free run confirming wave height doesn't vary along the tank (no standing waves).
Common mistakes
Mistakes and fixes
| Mistake | Effect | Fix |
|---|---|---|
| Coarse mesh at the surface | Waves decay | 80–100 per L, 10–20 per H |
| Deep-water wavelength | Wrong long-period wavelength | Solve the dispersion relation |
| Short absorption zone | Reflections superpose | Use 1–2 wavelengths |
| Highly stretched cells | Unstable surface | Limit the ratio |
| Running with the structure first | Wave quality unverified | Check with an empty tank |
I'd like to try wave calculations myself.
Try the ocean wave simulator and wave basics tool for wave properties, the Froude number tool for similarity and the wave energy converter tool for wave energy. Related topics are covered in wave modelling, sloshing, ship resistance and mooring analysis.
Related Topics
Experience the theory firsthand with the interactive simulator for this field
All Simulators