WaveTank
A live ripple tank seen from above: water waves with gravity, surface tension and depth, driven by oscillators and shaped by walls, absorbers and the bottom
Delete?
WaveTank help
- How to use WaveTank
- On a phone or tablet
- What you are looking at
- The three views
- Below the surface
- Objects
- Shaping the bottom
- Steered arrays
- Probes and transects
- One rule for all water waves
- Density
- Saving
- Limits
How to use WaveTank
Start with a simulation. Click Simulations at the top of the page and pick one. The list runs loosely from easy to hard: Basics (sources, slits, a stone, rain, a boat wake), Measuring (simulations that introduce the probes and transects), Arrays and reflectors, and Shaped bottom. The box under the tank gives its name and says what to look for. Blank Project gives an empty tank to build in.
Watch and control time. Pause stops and starts the simulation. The speed slider runs from slow motion to fast forward; ripple-tank projects start at 0.1× because real-time ripples are too fast to follow. Replay starts the run again from the beginning with your changes kept: calm water, the clock at zero and anything that moves back at its start. Reset Project discards your changes and reloads the project as it was chosen, and Reset Speed returns to real time. If the computer can't keep up with the speed you asked for, a note on the tank says how fast it is really showing.
Add and change objects. Create Object adds a point oscillator in the middle; Built-in Objects adds ready-made ones. Double-clicking open water also adds an oscillator there. Click an object in the tank or its name in the list to open its settings: role (oscillator, reflector or absorber), type (point, paddle or wall, shape, array), position, and for oscillators the signal and motion. The project's name is at the top of the Objects panel; rename it before you share it. Drag objects in the tank to move them, even while the waves run. Untick Show to take an object out of the simulation without deleting it.
Reshape by points. A shape's outline runs through points. Tick Show points in its settings and they appear on the tank as white squares, with a dot halfway between each pair. Drag a square to move that point; drag a dot to pull out a new point there; double-click a point to remove it. Dragging anywhere else on the shape moves the whole shape, and with Show points unticked the tank stays uncluttered. Reshaping a square or a boat turns it into a shape of your own (Custom). Choosing Custom for a shape starts you with a triangle, opened for editing, with both side views switched on and cutting through it. A circle has one handle on its rim that sets its size, and a wall or paddle has a handle at each end, so you can stretch and turn it. Points may go beyond the edge of the tank, which is handy for a beach that runs right across it.
Round it off. Blend points rounds the outline: at 0 the points are sharp, and as it rises each point is smoothed into a curve that stays inside the outline, until at 100% the whole outline is one smooth curve passing through the dots. Sharp points scatter little ripples of their own, so rounded shapes give cleaner waves. The waves always see the rounded shape; while Show points is ticked, the straight outline through the points is drawn faintly as well.
Set it exactly. Right-click a point (or press and hold on a touch screen) for a small window with its X and Y, and its height Z for a custom shape with a top. Slide or type the values: the shape and the waves follow as you go, and Save keeps the change while Esc puts it back. The point you are setting is marked in amber. Right-click the middle of a shape to move it exactly, or to raise or lower it as a whole, and right-click a circle's rim or a wall's end for its size or end.
Zoom in. The + and − buttons above the full-screen button zoom the tank in and out, and the square button shows the whole tank again. Ctrl with the mouse wheel zooms around the pointer, and on a phone or tablet two fingers pinch to zoom. The + , − and 0 keys work too. While zoomed in, drag open water to move around; a small map in the corner shows the whole tank and the part in view, and clicking it jumps there. Only the picture is zoomed: the waves run over the whole tank as before. The side views zoom with the tank so they stay lined up with it.
Undo and delete. Ctrl+Z undoes the last change and Ctrl+Y redoes it. The Delete key or Delete Selected removes the selected object or instrument after asking. The tank edge can't be deleted; set it to Absorber for open water or Reflector for a closed tank.
Fold away what you don't need. Click the title of Objects, Tank and Fluid or Instruments to fold that panel down to its title, and click again to open it. Inside Tank and Fluid, the Tank, Gravity, Fluid and Display rows open and close the same way. Folding only tucks the controls out of sight; the waves carry on exactly as before. The page remembers what you leave open.
Look below the surface. The View depth slider under the tank takes the top view down into the water. Depth is measured from the still surface: z = 0 at the surface and negative below it. The slider runs from the bottom on the left up to “Above the water” on the right, the normal view from above.
Look from the side. Open the Instruments panel by clicking its title, and two side views appear, vertical slices through the water to the left of the tank and below it. The boxes at the top of the panel show or hide each one. Drag the dotted lines, or use the sliders under the views, to move the slices.
Measure the waves. With Instruments switched on, Add Probe places a probe that records the water height at one point, and Add Transect places a line that records it all along its length. Drag them on the tank like objects (drag a transect's dot or arrow to move one end). Their plots appear below the views. Hover over any plot to read values.
Shape the bottom. Every reflector and absorber has a top height, Top z. Lower a reflector's top below the surface and it becomes part of the bottom: a shoal, a ridge, a shelf or a lens; lower it below the floor and it is a trench. Above the surface with a wide edge slope it is land with sloping shores. Built-in Objects has these under Bottom shapes, and the Shaped bottom simulations at the end of the Simulations list show what they do. See “Shaping the bottom” below.
Change the world. Open Tank and Fluid. The Tank row sets the grid, the tank's size and its depth; Gravity offers Earth, Moon, Mars, Titan or your own value; Fluid chooses the liquid; Display picks how the water is drawn. Each row shows its current settings even when closed. The readout under the rows gives wave speeds and warns when something is beyond what the grid or the model handles well.
Full screen. The corner button at the lower right of the tank fills the screen with just the water. Move the mouse, or tap the screen on a phone or tablet, for a small bar with Pause and Exit; Esc also returns to the page. The side views have the same button.
Share it. Share Link, at the top of the page, makes a link holding the whole setup. On a phone or tablet it opens the device's own share sheet, so you can send it by message or email; on a computer it copies the link and shows you the full-screen picture it opens on (Esc returns). Whoever opens the link on a computer sees that picture first; on a phone or tablet it opens straight onto the page, running. Leaving full screen, or pressing “Open the project” on the bar (tap the screen to bring it up on a phone), opens the whole project, ready to explore or change. A link made from a simulation you haven't changed opens with its description.
On a phone or tablet
On a phone or tablet, with no mouse or trackpad attached, WaveTank opens as a viewer: the tank, the box describing what to look for, Pause, Replay and the speed, and the Simulations and Share Link buttons at the top. Building and editing need a mouse and a bigger screen, so the Objects, Instruments and Tank and Fluid panels, the side views and the view-depth slider are left out, as is Reset Project, since there is nothing to reset, and touching the tank doesn't move anything. Probes and transects are hidden too; the simulations that use them can be explored further on a computer. A shared link opens straight onto this page, already running. Swipe the tank from right to left for the next simulation and from left to right for the one before, also in full screen, which makes a slideshow. Pinch to zoom; while zoomed in, a finger moves the view instead. To keep the phone cool the waves run on the small grid, and they rest while the tank is scrolled out of sight. The link at the foot of the controls opens the full editor anyway, and on a computer the same place switches to the viewer; the page remembers your choice.
What you are looking at
The tank is seen from straight above. Bright lines mark the wave crests, the way a real ripple tank projects them onto a screen. Shading comes from a light directly overhead: flat water, including the tops of crests and the bottoms of troughs, looks bright, and the steep flanks between them look darker. The contrast adjusts itself to whatever waves are in the tank. The Display row under Tank and Fluid switches the crest lines, the shading and the object markers, and Height colors, when switched on, paint crests warm and troughs cool. Walls are drawn in pale gray, and absorbing water is drawn darker.
The three views
With Instruments switched on, the page is laid out like an engineering drawing. Each view is a flat cut through the water, named after the axis it stands across. The x axis runs left to right across the tank, y runs up the screen, and z runs up out of the water: zero at the still surface, negative below it, positive above, so the surface rises and falls around zero.
The Z plane (x–y cut) is the tank itself: the surface seen from above, or, with the View depth slider moved left, a level slice through the water. The Y plane (x–z cut) is the view below the tank: a vertical slice at one y, seen from the front, with the surface on top and the bottom at the foot. Its x axis lines up with the tank's. The X plane (y–z cut) is the view to the left of the tank: a vertical slice at one x, turned on its side so its y axis lines up with the tank's. The surface is on its right, next to the tank, and the bottom on its left.
Each view shows where the other two cut it, as dotted lines in their colors: blue for the view depth, teal for the X plane, pink for the Y plane. Drag any of these lines, or move the slider under a view, and that slice moves in every view. Dragging the blue depth line up out of the water gives the normal top view again; the line then sits at the very top of each side view, marked “top view”. Small marks at the ends of each side view show the still-water level, z = 0.
Most tanks are far wider than they are deep, so the side views stretch the depth to fill their space; the label in each view gives the stretch. A shaped bottom shows as it is, with dry land above the water. The wave height is exaggerated on its own, because in a linear model heights are in arbitrary units. Solid walls such as an island show as gray where the slice passes through them, and absorbing water is drawn darker. The corner button on a side view fills the screen with that view alone, always with the surface on top; Esc returns.
Below the surface
Every bit of water under a wave moves too, in a small loop: forward under a crest, back under a trough, up under the front of a crest and down behind it. In the side views the dots trace these loops, with faint trails. In deep water they are circles that shrink with depth. In shallow water they flatten into ellipses, and at the bottom the water only slides back and forth. The size of the loops is set from the surface and kept the same at every depth, and the same in both directions, so the shapes are true and what you see shrinking is the water's real motion, exaggerated by the same amount everywhere.
Taken down into the water, the top view shows each loop from above, as a short back-and-forth stroke along the direction the wave travels. The loops shrink with depth fastest for short waves: a wave's motion dies away within about half a wavelength below the surface in deep water, so going down filters out the ripples first and leaves the long waves. Depth acts as a low-pass filter.
The motion below is worked out exactly from the surface waves for a flat bottom; right next to walls it is approximate. Over a shaped bottom it is worked out for a few depths and blended to the depth at each spot, which shows it well but is only approximate. Where the slice lies below the bottom, the view shows the seabed.
Objects
Everything in the tank is an object, and every object has a role. An oscillator pushes on the water and makes waves. A reflector is a solid wall that waves bounce off; with its top set below the surface it becomes a raised part of the bottom instead (see “Shaping the bottom”). An absorber is a patch of water that soaks waves up, like a gently sloping beach. Every tank has a tank edge, which can't be deleted. As an absorber it lets waves leave the tank as if it were open water; switch it to a reflector and you have a closed tank, where waves reflect from the sides and build up standing patterns.
Each object also has a type: a point (a post, for a reflector), a paddle (a straight line, called Wall/Trench for reflectors and absorbers, since a straight line with its top lowered below the floor is a trench), a shape (circle, square, boat or one you draw), an array of points or paddles, or random points (raindrops). Oscillators add a signal (steady sine, pulse, stone-like impulse, steady push, frequency sweep or random noise) and can move at a steady speed and heading. A moving step oscillator behaves like a boat and leaves a wake. Reflectors and absorbers can move too, with the same Speed and Heading, but only slowly: the program moves them by redrawing them, without the push a real wall gives the water, so their speed is held to a tenth of the slowest wave speed in the tank, where a real one would make no wake. A moving wall shows how a reflection changes as the gap behind a source grows. Replay puts everything that moves back at its start. Unticking Show takes an object out of the simulation, which is a quick way to close one slit or silence one source.
Click an object's name, or click it in the tank, to open its settings. Only one is open at a time, and the selected one pulses red in the tank. Built-in Objects gives ready-made objects, grouped as sources, arrays, walls and reflectors, bottom shapes and absorbers; everything the simulations are built from is there, so you can rebuild any of them or start your own. It can also save your own objects (kept in this browser).
Dishes and corners. Built-in Objects has three reflectors made with the shape tool, so you can reshape them point by point. The Shallow dish is a wide, gentle parabola that gathers plane waves into a focus far in front of it, about 40% of the tank across; the Deep dish has its focus close in, inside its curve, so a source placed there sends out a straight beam. A dish's position is its focus: right-click the dish to read or set it, and turn it about its focus with Angle. The Corner reflector is two walls at a right angle. Its position is the best place for a source, one wavelength in front of the inside of the corner; there the source and its three mirror images all add up straight ahead. A radio corner reflector puts its antenna half a wavelength in, because a metal sheet turns a crest into a trough, while a wall turns a water crest back as a crest. These ideal spacings hold for the wavelength they were made for; at another frequency, move the source. Ctrl+Z undoes a change and Ctrl+Y redoes it. Delete removes the selected object after asking.
Shaping the bottom
Think of a new tank as a patch of open, calm sea: with the absorbing edge, waves run out of it as into endless water and never come back, and everything you add rises from its floor. Every reflector is a solid standing on that floor, with its top at the height Top z, measured up from the still surface. A new reflector's top is at the tank's rim, a little above the water, and with straight sides it is a wall, which waves can't pass. Lower its top under the water and it becomes a raised part of the bottom, which waves pass over. Leave it above the water with a wide edge slope and its middle is dry land with beaches round it. Lower it below the tank floor and it is a trench or a hole: Wall/Trench is the same straight object either way, and only Top z decides which. Trenches may reach down to a third of the tank's width; deeper than that, the bottom no longer changes even the longest waves the tank holds. Where shapes overlap, the one lower in the Objects list sets the bottom, so a trench listed after a shelf cuts into it. Objects may reach past the edges of the tank; the parts outside are simply off the map.
Absorbers with a top. Absorbers have a Top z too, starting at the tank floor, where they only soak up waves. Raise one under the water and it is a lossy shoal, like a reef or a kelp bed: the waves slow down and bend over it as over any shoal, and are soaked up at the same time. Raised above the water with a wide edge slope it is a soft, absorbing beach. Strength sets how hard it soaks waves up; a full-strength absorber swallows them before they can bend, so a kelp bed works best at 5 to 20%.
Tilted tops. A custom shape can have a different height at each point: right-click a point and set its Z. The top then runs smoothly between the points: with three points it is a flat tilted plane, a ramp, and with more it is a smooth surface through all of them. Its Top z becomes the height of its highest point, and changing it (in the settings, or by right-clicking the middle of the shape) raises or lowers every point together, so you can sink a whole shape until its highest point is just under the surface. Some points can stand above the water and others below, like a breakwater running down into the sea. A new point pulled from a dot starts at the height the top already has there. Setting a height for a point of a square or a boat turns it into a custom shape; circles, walls drawn as lines, and posts have flat tops.
Seeing a shape in depth. The tank shows a shape from above; to see its height, move the slices through it. Drag the dotted X plane and Y plane lines across the shape (or move the sliders under the views) and watch the side views: like the slices of a scan, they show its profile, cut by cut.
The edge slope is how wide the shape's sides are: over that width, inside its outline, the top slopes down to the bottom around it. A small slope gives steep sides; a wide one gives a gentle shoal, or, with the top above the water, a beach. Left on auto, the sides are straight while the top is above the water (a wall) and slope over a few grid cells once it is under water.
Why depth sets the speed. From above, the water under a wave seems not to move, yet the depth changes how fast waves travel. It does move, all the way down. To build a crest, water has to flow in sideways from under the trough beside it, and then flow away again. In deep water that motion is a set of small circles that die away within about half a wavelength, so the bottom never feels the wave. In shallow water the circles flatten into a back-and-forth slosh that reaches the bottom, and the whole column of water has to carry the flow. A thin column can't carry much water sideways, so each crest builds more slowly and the wave goes slower: in shallow water the speed is just √(g·h). Open the trench simulation on a computer, switch on the Y plane view and set it across the trench to watch it: over the shallow floor the dots slide along the bottom, over the deep trench they circle and fade before the floor.
Refraction and absorption are different things. Refraction is a change of speed: where part of a wave front slows down, the front swings toward the slow side, and no energy is lost. In WaveTank only depth changes the speed, so a reflector with its top under the water is a refractor. Absorption takes energy out: the wave gets lower as it goes but keeps its speed, so it doesn't bend. Light in glass has the same two parts, the real and imaginary parts of the refractive index; an absorber with its top under the water has both.
Baffles. A row of evenly spaced trenches, the Baffle in Built-in Objects, reflects a little at every edge. At most frequencies the little reflections come back out of step and cancel, and the waves pass. When the spacing is half the wavelength they come back in step and add up, and the baffle becomes a mirror for that one frequency (Bragg reflection). More trenches make the reflection stronger and the band of frequencies narrower. Sandbars reflect swell on real coasts this way, and the same physics makes the mirrors in lasers and the coatings on lenses. A noise source in front, with a probe on each side, shows the band: a notch in the spectrum behind the baffle and a peak in front of it.
Waves feel the depth under them. In shallower water they travel more slowly and their crests crowd closer together, so a wave crossing a slope at a slant swings round toward the shallow side, just as light bends going into glass. A shoal acts as a lens and brings waves to a focus behind it; a ridge holds waves along its length the way an optical fiber holds light; waves coming in at a slant to a beach turn to meet the shore nearly head-on. Going the other way, from shallow water into deep, a wave that meets the edge at too slant an angle can't cross and is turned back, as light is inside a glass of water.
Next to dry land, where the water is also shallow, the water soaks waves up. Real waves break and spend their energy in surf, which a linear model can't do, so this stands in for it. A shore that drops straight into deep water still reflects, like a cliff. The tank's shading turns sandier where the bottom is shallow, with depth contours; the Display row under Tank and Fluid switches this off. In the side views the seabed is drawn as it is, and the dots follow the local depth.
The model uses the depth right under each spot, which is accurate for gentle slopes and good for shoals, beaches and lenses. Where the bottom changes in a step, the bending is right but the share of the wave reflected from the step is only approximate.
Steered arrays
An array is a row or grid of identical oscillators. If each one runs a little behind its neighbor, the waves add up in one direction and cancel in others, which steers the beam without moving anything. The relation is sin θ = Δφ·λ / (2π·d), where θ is the angle from straight ahead, Δφ the phase step between neighbors, λ the wavelength and d the spacing. Set the beam angle and the page works out the phase steps, or set the phase steps yourself and it shows where the beam points. When the spacing is more than half a wavelength, extra beams called grating lobes appear; the readout warns when that happens. Focus aims the array at a point instead of a direction.
Probes and transects
A probe works like a tide gauge at one point. Its left plot is an oscilloscope trace of the height over the last few periods; its right plot is the spectrum of the whole record, which shows which frequencies are present and how strong each is. The readout gives the strongest frequency, its period and the wavelength it has in this tank. With two or more probes, each one is compared with the first: the phase difference at the main frequency, and for bursts and stones, how long the energy takes to get from one to the other, which gives the speed the energy travels. Heights are in arbitrary units, because the model is linear: doubling every source doubles every wave.
A transect is a line of 256 probes. Its left plot shows the height along the line (across) over time (up, newest at the top): each crest leaves a streak, and the slope of a streak is the crest speed. Its right plot is a frequency–wavenumber diagram. Every wave running along the line lands at its own frequency and 1/wavelength, so the bright ridge traces out the dispersion relation, and the dashed curve is the theory for this tank. Waves running from the transect's dot toward its arrow appear on the right half, waves running the other way on the left. A wave crossing the line at an angle looks longer along the line than it really is, so it lands inside the curve. A noise source in front of a transect fills in the whole curve at once.
Closing the Instruments panel switches off everything in it: the probes and transects stop recording, and the side views and their dotted lines go away. Their settings are kept for when you open it again, and a project saved with Instruments open opens with them showing.
Scales are held. Each instrument sets its plot scales once, when the waves first reach it, and then keeps them. Move a probe and its trace grows or shrinks with the real amplitude there, instead of being rescaled to fill the plot. Anything bigger than the scale is cut off at the edge of the plot and marked “over scale”. Press Normalize on a plot to fit its scales again. Duplicate Selected copies an instrument together with its scales, so several copies spread around the tank are measured on the same yardstick.
The record length sets how finely frequencies are resolved: a 10-second record separates frequencies about 0.1 Hz apart, enough to split the two tones of the beating project. The spectrum keeps growing until a whole record has come in, so its scale is fitted over one full record. Moving an instrument, or pressing Replay, starts its record over.
One rule for all water waves
Every wave in the tank obeys ω² = (g·k + σ·k³/ρ)·tanh(k·h), where ω is the angular frequency, k the wavenumber, g gravity, σ surface tension, ρ density and h depth. In deep water, long waves outrun short ones. In shallow water all long waves travel at the same speed, √(g·h). For short ripples surface tension takes over, and short ripples outrun long ones. Between the two, water waves have a minimum speed of about 23 cm/s at a wavelength of about 1.7 cm. A source moving slower than that makes almost no waves.
The simulation solves this relation exactly for every wavelength the grid can hold, so dispersion is right in deep water, shallow water and in between. The readout under each oscillator shows the wavelength and speeds its frequency produces.
Density
For a single fluid, density cancels out of gravity waves completely: water, mercury and liquid methane make waves of the same speed under the same gravity. Density only matters through the ratio σ/ρ, which sets how strong surface tension is.
Saving
Share Link puts the whole setup into a web address and sends or copies it: the objects, the tank and fluid, the display choices, the instruments and where the slices are. Bookmark it, or paste it into a browser later, and the project comes back exactly. The link opens on a full-screen picture of the water, like a splash screen, with a note to click for full screen or press Esc to open the project. Only the setup is saved, not the waves. Loading starts from calm water, and because the simulation is deterministic, the same setup plays out the same way every time, rain included. Links from earlier versions of WaveTank still open.
Which panels you leave open is remembered by your browser, not saved in links. Objects you save in Built-in Objects are kept in this browser too.
Limits
The waves are linear: small compared to their wavelength. Breaking, splashing, foam and droplets are outside the model, so waves grow and steepen as they run into shallow water but never break into surf; next to dry land the shallow water soaks them up instead. The tank is two-dimensional, so waves from a point spread as 1/√r rather than 1/r. Walls reflect almost perfectly but are drawn on the grid, so a very thin or slanted wall reflects a little less cleanly than a real one. With absorbing edges, waves longer than about half the tank are removed, because the edges can't soak them up. Over a shaped bottom the waves follow the depth under each spot, which is accurate for gentle slopes and approximate right at a step.