COCONUTLAB bali

Theory · about 20 min read

Why the coconut never escapes

One coconut, one boulder, one 13.8-second clip. That is enough to walk through most of a first course in fluid mechanics: separation, shear layers, buoyancy, drag, angular momentum, hydraulic jumps and control volumes, with real (estimated) numbers at every step.

simplified modelsorder-of-magnitude estimatesparameters from video
4×10⁵Reynolds number UD/ν
≈ 19 sresidence time in the eddy
0.48 vs 0.75rise vs downwelling speed [m/s]
Fr ≈ 5.1at the plunge toe → drowned jump

01The scene, in numbers

I filmed a coconut floating in a small stream in Bali. A large boulder sits against one bank. The main flow squeezes past it as a white-water chute and spills over a drop into a pool. In the calm, dark water directly behind the boulder, the coconut drifts around in circles. For the whole 13.8 seconds of the clip it never gets out, even though water a metre away is moving at about 2.5 m/s.

Nothing was measured on site. Every number below is an estimate from the footage (foam speeds, the size of the coconut relative to the rocks) or an assumption from textbooks. Treat them as plausible values with wide error bars, not data.

QuantityEstimatePlausible range · source
Coconut diameter 17.5 cm15–20 cm · visual
Density ratio 0.95 (assumed)≈ 0.5–1.0 · probably too high
Chute (jet) speed 2.5 m/s2–3 m/s · foam tracking by eye
Eddy surface speed 0.35 m/s0.2–0.5 m/s · by eye
Drop height 0.75 m0.5–1 m
Chute depth · pool depth 0.15 m · 0.8 massumed
Eddy width · length 1.2 m · 2.5 m≈ 1 and 2 boulder sizes
Exchange coefficient 0.0250.015–0.04 · lab studies of groyne fields
Drag · added-mass coefficientssphere, textbook values
Water,

From these, the coconut's volume is . With the assumed its mass would be . Keep an eye on that number. It turns out to be the weakest link in the whole story.

02The lateral eddy behind the boulder

Water can't turn a sharp corner at speed. As the flow passes the boulder, the pressure behind it would have to rise to slow the near-wall fluid. The slow fluid next to the rock doesn't have the momentum to push into that rising pressure, so the flow separates. The main stream leaves the boulder's edge as a free jet, and the region behind the rock is cut off from it.

That cut-off water doesn't stand still. Friction with the passing jet drags its outer edge downstream, and it has to come back somewhere, so it turns into a slowly rotating lateral eddy (also called a recirculation zone or dead zone). River engineers see the same thing between groynes and in harbour mouths. The jet reattaches to the bank roughly two obstacle sizes downstream, here at .

Plan view: the boulder blocks the near bank, the fast jet separates from it, and a slow lateral eddy of width W fills its lee. The coconut circles inside the eddy, bounded by the shear layer.near bankfar bankboulderfast jet / chute U ≈ 2.5 m/sshear layerlateral eddyUₑ ≈ 0.35 m/scoconutW ≈ 1.2 mL ≈ 2.5 m (≈ 2 boulder sizes) to reattachmentflow
Plan view. The jet separates at the boulder; a slow eddy of width fills its lee, bounded by the shear layer. The coconut (red) circles inside.

In plan view, it helps to describe the flow with a stream function , where the velocity is

Lines of constant are streamlines, and inside the eddy they are closed loops. That's the key fact. Anything that simply follows the water, a leaf or a coconut, goes round and round forever. To escape, something has to push it across streamlines. The browser lab models the eddy as a closed cell

sitting next to a jet whose speed jumps across a smooth profile. With , the eddy turns over once every . That's slow and lazy, which matches the footage.

03The shear layer and the downwelling

Between the eddy and the jet there's a thin band, a few tens of centimetres wide, where the speed jumps from about 0.3 to 2.5 m/s. This shear layer is unstable. It rolls up into Kelvin–Helmholtz vortices that grow, merge and shed downstream, and you can see them as the boils and swirls along the edge of the white water. Its vorticity is large:

Those vortices are the only thing that can carry the coconut across the closed streamlines. They give it random sideways kicks. In the lab they are modelled as a random velocity with a standard deviation of about and a memory of 0.4 s (an Ornstein–Uhlenbeck process).

There is also a vertical story. Along the shear line, slow eddy water and fast jet water converge at the surface. Mass conservation for an incompressible fluid,

says that if the horizontal flow converges (), the water must go down ( below a surface where ). That's why foam and leaves collect in lines along shear layers: they float, and the water under them dives. Here the downwelling speed is modelled as

Cross-section through the shear line: slow eddy water and fast jet water converge at the surface and dive down at w_d, then leave as underflow. A floating coconut resists with its buoyant rise speed w_b.free surfaceriver bededdy side (slow)jet side (fast)downwellingw_d ≈ 0.3 U ≈ 0.75 m/sunderflowrise speed w_bpull-downcoconut on the shear line
Cross-section through the shear line. Surface convergence drives a downward current . A floater resists with its buoyant rise speed . Below the surface the water leaves as underflow, heading downstream.

Be warned that is a guess. It is the least constrained number in the model, and as you'll see in section 5, it decides whether the coconut stays afloat.

04How long it stays: residence time

Draw a control volume around the whole eddy: width , length , depth . Water (and anything in it) leaks out across the shear layer at an exchange velocity that experiments on river groyne fields put at a small fraction of the main-stream speed, with . For the amount of "eddy water" still inside, a mass balance gives

With , and :

So a passive floater would stay about 19 s on average, longer than the clip. The chance it is still there after 13.8 s is , a coin flip. Seeing it stay is no surprise.

Turn the question around: how fast would the river have to run for the coconut to escape within the clip? Setting ,

Residence time in the eddy versus jet speed: T = W/(kU). At 2.5 m/s the estimate is about 19 s; escaping within the 13.8 s clip needs U of about 3.5 m/s (2.2 to 5.8 m/s across the plausible range of k).123450102030405060jet speed U [m/s]residence time T [s]clip length 13.8 sfilmed: T ≈ 19 sU ≈ 3.5 m/sk = 0.025 (band: 0.015–0.04)2-D lattice-Boltzmann + particles (mean)
Residence time vs jet speed. The lime band covers the plausible range of . Blue dots come from an offline 2-D lattice-Boltzmann simulation with tracked particles. They escape about twice as fast as the simple formula predicts, a fair measure of how uncertain this all is.

05Float or dive: buoyancy vs downwelling

A floating body sinks until it displaces its own weight of water (Archimedes):

Now push it fully under. The net upward force is , and it rises until drag balances that force. Using and frontal area ,

For our coconut (, ) that gives at , about 0.96 m/s at , and 1.35 m/s at .

Compare that with the downwelling. If the water dives faster than the coconut can rise, , the coconut gets dragged under, picked up by the underflow and flushed downstream. The threshold density ratio is

Buoyant rise speed of a 17.5 cm sphere versus density ratio s, compared with the 0.75 m/s downwelling. Below s* ≈ 0.88 it wins; at the assumed s = 0.95 it rises at only 0.48 m/s.0.50.60.70.80.9100.40.81.21.6density ratio s = ρ_c / ρ_wspeed [m/s]downwelling w_d ≈ 0.75 m/srise speed w_b = √(8gR(1−s)/(3C_D))s* ≈ 0.88assumed s = 0.95 → 0.48 m/spulledunder
Rise speed vs density ratio. Lighter than , the coconut beats the 0.75 m/s downwelling and stays on the surface, trapped. The assumed 0.95 sits on the wrong side of the line.

In force terms: the downwelling drag on a fully submerged coconut, , is more than twice the net buoyancy at (). This is the surprising lesson of the lab: being light keeps the coconut trapped. A heavy, waterlogged nut can't hold the surface on the shear line, so it gets pulled under and escapes. At the assumed the model coconut survives only because its orbit stays just inside the shear line. That's fragile, and it's one reason I think 0.95 is too heavy (section 13).

06The free-body diagram

Cut the coconut free from its surroundings and draw every force on it. It's the most useful sketch in mechanics.

Free-body diagram of the floating coconut: buoyancy up, weight down, drag from the jet on one side and from the eddy return current on the other, a downward drag where the water dives, and a spin from the shear.free surfaceGbuoyancy F_B = ρ g V_subweight W = m gjet drag F_Dreturn dragdownwelling drag F_downspin ω, L = Iωadded mass C_A ρ V_sub moves with it · torque from the shear
Free-body diagram of the floating coconut (side view, flow from left to right).
  • Weight at the centre of mass (if ).
  • Buoyancy at the centre of the submerged volume, up to fully submerged.
  • Drag from the relative velocity : the jet pulls one way, the eddy's return current the other. Only the submerged frontal area counts.
  • Downwelling drag on the shear line, pulling it down.
  • Added mass: accelerating the coconut also accelerates the water around it, which acts like an extra of inertia (half the displaced mass for a sphere).
  • Torque from the shear across it, which makes it spin (section 8).

Put together horizontally, this is a reduced form of the Maxey–Riley equation for a small sphere in a non-uniform flow:

The last term is the pressure-gradient force the fluid would need to accelerate itself, plus its added-mass share. It is what makes a floater hug curved streamlines. Neglected here: the Basset history force, Magnus and shear lift, wave forces, and wind.

07Drag and the Reynolds number

The Reynolds number compares inertia with viscosity:

That's based on the jet speed. What matters for drag is the relative speed between coconut and water, typically a few tenths of a m/s, which gives . Either way viscosity is negligible except in a thin boundary layer, and drag is dominated by the low-pressure wake. For a sphere between roughly and , sits on a plateau near 0.4–0.5. A smooth sphere has a "drag crisis" around , where drops sharply. A hairy husk would trigger it earlier, but at the relevant relative speeds we're on the plateau, so is a fair choice.

Because drag goes as speed squared, the jet pulls on anything that touches it

times harder than the eddy does. That's why the shear layer is a one-way door. Once the coconut gets a solid foothold in the jet, it's gone within a second.

08Tumbling and angular momentum

In the footage the coconut visibly rotates. A sphere free to turn in a shear flow spins at about half the local fluid vorticity, . That gives a few rad/s in the shear layer. In the offline side-view model, turbulent bursts push it to about 2–9 rad/s. A hard upper bound is .

Its angular momentum is . Treating it as a thick shell, (assumed; the liquid inside lags behind the shell), so

What happens when it drifts out of the shear layer into calm water? The angular-momentum balance about its centre is . With a turbulent, quadratic resisting torque (, assumed),

Pure viscous (Stokes) friction, , would take minutes. So the spin is forgotten within a couple of seconds. It records where the coconut has just been, a little like a tracer of recent shear.

Spin-down after leaving the shear layer: with a turbulent (quadratic) moment the spin decays like ω0/(1+t/τ), τ ≈ 1.5 s for ω0 ≈ 16 rad/s and ≈ 2.7 s for 9 rad/s. Viscous (Stokes) friction alone would take minutes.024680481216time after leaving the shear layer t [s]spin ω [rad/s]viscous only: τ ≈ 6 minω0 = 16 rad/s, τ ≈ 1.5 sω0 = 9 rad/s, τ ≈ 2.7 s
Spin-down after leaving the shear layer. Turbulent friction kills the spin in seconds; viscosity alone would take minutes. Spin ratios of order 1 also mean Magnus lift is not negligible, one more thing this simple model leaves out.

09Froude numbers and the drowned hydraulic jump

The Froude number compares the flow speed with the speed of shallow-water waves, :

In the chute, . The flow is supercritical: waves can't travel upstream against it. It then falls down the 0.75 m drop. Energy (ignoring losses) and continuity per unit width, , give the speed and depth at the toe of the plunge:

Supercritical flow running into slow, deep water has to jump up to subcritical, and does so in a hydraulic jump. Momentum conservation across it (next section) gives Bélanger's equation for the conjugate depth:

But the pool is about 0.8 m deep, deeper than 0.55 m (a submergence ratio of about 1.45). The jump is drowned. Instead of a standing wall of white water, the jet dives under the tailwater and a submerged roller forms on top, with a surface current running back toward the drop. That's the vertical twin of the lateral eddy, and a second trap for anything floating. A free jump at these numbers would dissipate of head, about half the incoming energy.

Side view of the plunge: the chute (Fr about 2) accelerates down the 0.75 m drop to a toe with Fr about 5.1. Its conjugate depth is 0.55 m, but the pool is about 0.8 m deep, so the jump is drowned into a submerged roller.boulderU₁ ≈ 2.5 m/s, y₁ ≈ 0.15 m, Fr₁ ≈ 2toe: U ≈ 4.6 m/s, y ≈ 8 cm, Fr ≈ 5.1rollercontrol volumepool ≈ 0.8 mconjugate y₂ ≈ 0.55 mpool ≈ 0.8 m > y₂ ≈ 0.55 m → drowned (submerged) jump
Side view of the plunge. The dashed box is the control volume used to derive Bélanger's equation. The jump stays drowned as long as the conjugate depth stays below the pool depth. With the chute depth fixed, that holds up to a chute speed of roughly 4.2 m/s.

10Control volumes: the bookkeeping behind it all

Almost every result above comes from the same move: draw a box, then count what flows in and out. Reynolds' transport theorem turns the laws for a fixed lump of matter into laws for a fixed (or moving) box. For linear momentum,

and for angular momentum about a point G,

Control volume drawn around the coconut: the net force equals the rate of change of momentum inside plus the net momentum flux through its surface.control volume CV (moves with the coconut)momentum inmomentum outsurface CS, outward normal n
A control volume around the coconut. The momentum missing from the wake leaving the box is exactly the drag force.

Three boxes do the work in this lab:

  1. Around the coconut. The momentum deficit in its wake equals the drag. The angular-momentum version gives the spin-down law of section 8.
  2. Around the jump (steady, per unit width, ignoring bed friction). Hydrostatic pressure forces on the two faces balance the momentum flux:
    which, with , rearranges into Bélanger's equation.
  3. Around the eddy. A mass (tracer) balance gives the exponential emptying and of section 4.

11Why rain and floods set it free

After heavy rain the discharge goes up, and almost everything in this story moves against the coconut at once. How much faster the water runs depends on the channel. Near critical flow , and for uniform flow in a wide channel . As a rough rule, doubling buys roughly +30–40% in speed. Take +40%, from 2.5 to 3.5 m/s:

QuantityNormal (U = 2.5 m/s)After rain (U ≈ 3.5 m/s)Effect
Residence time ≈ 19 s≈ 14 sshorter than the clip
Downwelling 0.75 m/s1.05 m/spulls harder
Pull-under threshold 0.88≈ 0.76even lighter nuts dive
Conjugate depth 0.55 m≈ 0.70 mroller close to being swept out
Reynolds number4.4×10⁵6.1×10⁵still fully turbulent

On top of that, the water level rises until it starts overtopping the boulder. The obstacle that created the dead zone is drowned. The jet spreads across the eddy and the closed streamlines open up. In the lab, the boulder's shelter fades between 3.2 and 4.4 m/s, as a stand-in for this. Hit flood surge and you'll see all of it at once.

12What the browser model actually does

  • Flow: an analytic, steady stream function. It has a shear layer, a jet that speeds up past the boulder while conserving flow rate, and the closed eddy cell of section 2 (1.3 m × 2.6 m, so its residence-time readout says ~21 s rather than 19 s). It is prescribed, not solved.
  • Coconut: the reduced Maxey–Riley equation of section 6, integrated at ~120 sub-steps per second, with drag on the submerged frontal area (a light coconut riding high feels less drag).
  • Turbulence: an Ornstein–Uhlenbeck random velocity, strongest in the shear layer.
  • Vertical: a balance of against . Pushed deep enough, the coconut joins an underflow at heading downstream.
  • Floods: the jet speed is scaled up to ×2.3 for a few seconds, and the boulder's shelter fades above 3.2 m/s.

The offline analysis behind it (Python: a D2Q9 lattice-Boltzmann plan-view run with tracked particles, and a side-view roller model) gave the same qualitative picture, including the critical speeds of about 3.5 m/s (escape within the clip) and about 4.2 m/s (roller swept out).

13Honest section: what this gets wrong

The coconut's mass doesn't add upThe model assumes and , so . But at the coconut would float with only ~2.4 cm of dry cap and rise at 0.48 m/s, slower than the assumed 0.75 m/s downwelling. The model then predicts it should be pulled under at the shear line, yet in the video it rides visibly high and never dives. Either the coconut is much lighter ( would give ), it's smaller than it looks, or is too big. The mass needs recalibrating.

How to recalibrate, cheaply:

  1. Weigh and measure a similar coconut, then float it in a bucket.
  2. Or read the freeboard (height of the dry cap) off the footage. With immersion depth , the spherical-cap volume gives
  3. Measure surface speeds with a floating marker and a stopwatch, rather than by eye.

Other known limitations:

  • One short clip. Everything is estimated from 13.8 s of handheld video, with no measured speeds, depths or coconut properties.
  • Prescribed flow. The water field is invented, not computed. The coconut doesn't disturb it, and there is no free surface, no 3-D roller and no waves.
  • Turbulence is a random walk with assumed intensity and time scale.
  • Exchange coefficient. comes from laboratory groyne fields, not boulder eddies. The 2-D lattice-Boltzmann run disagrees with the formula by about a factor of 2.
  • Downwelling is a guess, and the answer is very sensitive to it.
  • Forces left out: Magnus and shear lift, history force, wind, collisions with rocks.

So treat this as a way to build intuition for dimensionless numbers and force balances, not as a prediction. To do it properly, see the free tools page: OpenFOAM's interFoam with a 6-DoF floating body, or DualSPHysics on a gaming GPU.

14Further reading

  • M. R. Maxey & J. J. Riley (1983), "Equation of motion for a small rigid sphere in a nonuniform flow", Physics of Fluids 26, 883.
  • W. S. J. Uijttewaal, D. Lehmann & A. van Mazijk (2001), "Exchange processes between a river and its groyne fields: model experiments", J. Hydraulic Engineering 127(11).
  • V. Weitbrecht, S. A. Socolofsky & G. H. Jirka (2008), "Experiments on mass exchange between groin fields and main stream in rivers", J. Hydraulic Engineering 134(2).
  • H. Chanson, The Hydraulics of Open Channel Flow: An Introduction (2nd ed., 2004): hydraulic jumps, Bélanger's equation, Froude numbers.
  • F. M. White, Fluid Mechanics: control volumes, Reynolds transport theorem, sphere drag.