Professor Oops

Air that really moves

Air that really moves

One invisible wind blows over the whole page

Above every drawing in Professor Oops lies a sheet of moving air. A fan, a hair dryer, a rolling football and a hot cup all push that same air. Flour, smoke, smells, candle flames and puddles each answer it in their own way. That's why a candle can be blown out by things nobody planned for.

Dust motes streaking in the game's wind as a fan circles over a sheet of paper

Everything that moves pushes the same air

Hold the fan over the paper. Its air comes straight down, hits the page and spreads out along it, fastest a little way out from where you aim, the way air from a real fan spreads over a table. The hair dryer does the same and adds heat. A hand swept low over the page, a football rolling past, a monster truck or a running puppy push air ahead of them and let it curl round their sides. A slap squeezes air out from under the palm. The vacuum draws air in. A startled pigeon flaps it about. Hot things on the page, like a fire, a hot cup or a hot iron, pull air in along the paper as their warm air rises.

All of them write into one grid of moving air, cells about 5 mm across, laid over the whole sheet. Nothing in the game says "the fan blows out the candle". The fan only writes wind. The candle only checks how fast the air is moving at its flame. A football that happens to roll past at the right speed puts it out just as well, and so does a hand patted down beside it.

When nothing is moving and nothing is warm, the air goes to sleep and costs nothing at all.

One invisible wind blows over the whole page

For engineers

One invisible wind blows over the whole page

A 2D velocity field over the paper (64 × 48 cells on a desktop page, about 5 mm a cell), stepped at 60 Hz in a Web Worker: semi-Lagrangian advection, then a screened pressure solve by full multigrid in a WebAssembly SIMD kernel (13 to 17 µs a tick when it was built; the device wasn't recorded), of which only part is applied, on purpose. About a dozen kinds of source write the field; particles, bits, candles, fire, gases, creatures and the liquids on the paper read it. No reader names a writer.

Under the hood
Everything that moves pushes the same air

Under the hood

Everything that moves pushes the same air

Each air cell covers a square of paper cells: 3,072 air cells on a desktop page, fewer on a phone. Each one carries the wind's speed and direction, its warmth, and how much of each gas it holds. Wind is measured in paper cells per second and stepped 60 times a second.

Who writes what:

  • Fan: a jet that spreads out along the paper, with a little swirl

  • Hair dryer: the same jet, plus heat

  • Hand, ball, car, dog (low): air carried along and swept round its sides, a dipole

  • Slap, hammer: a puff squeezed out from under, a squeeze film

  • Vacuum: a sink that draws air in

  • Pigeon taking off: a short flap outward

  • Fire, cup, iron, wire: a buoyant draw toward the heat

A fan held still doesn't add its push again every tick. Each cell is eased toward the fan's target, so holding it can't blow up. When the air has all but stopped and nothing is warm, the step clears the field and returns.

A fan's air is fastest a little way out

The gust's speed climbs from 0 at the aim point to its peak, 0.841 of the gust speed, a quarter of the way out, and falls back to 0 at the jet's edge.

A fan's air is fastest a little way out0.00.20.40.60.81.00.00.20.40.60.81.0distance from the aim ÷ jet radius (72 cells for the fan)share of the gust speedpeak 0.841 at 0.25A fan's air is fastest a little way out0.00.20.40.60.81.00.00.20.40.60.81.0distance from the aim ÷ jet radius (72 cel…share of the gust speedpeak 0.841 at 0.25
Data table
A fan's air is fastest a little way out
distance from the aim ÷ jet radius (72 cells for the fan)the fan's gust
00
0.020.079
0.040.1561
0.060.2313
0.080.3044
0.10.3755
0.120.4446
0.140.5115
0.160.5764
0.180.6392
0.20.6998
0.220.7581
0.240.8143
0.260.8347
0.280.8211
0.30.8073
0.320.7934
0.340.7793
0.360.7651
0.380.7506
0.40.736
0.420.7212
0.440.7062
0.460.6909
0.480.6755
0.50.6598
0.520.6438
0.540.6276
0.560.611
0.580.5942
0.60.5771
0.620.5596
0.640.5417
0.660.5235
0.680.5048
0.70.4856
0.720.4659
0.740.4456
0.760.4247
0.780.4031
0.80.3807
0.820.3574
0.840.333
0.860.3074
0.880.2802
0.90.2512
0.920.2197
0.940.1849
0.960.145
0.980.0956
10

Source: The shape of the fan's gust in the game. At its fastest ring, a run of the real engine measured 224 cells/s.

The fan held over a blank sheet in the game, its round outline in the middle, with short pale streaks of dust motes flying straight outward all round it.
Motes show the wind. The fan scatters a few dust motes as it blows. They ride the air and are drawn as streaks along their own speed, so you see the gust spread out along the paper from where it's aimed.

Each thing gives way at its own wind speed, so a fan lifts flour and leaves sand

A feather slides off in a breeze of 12 cells per second. Confetti needs 16, a leaf 28. A candle goes out at 40. Flour lifts off the paper at 70, salt at 171, sand at 221. Each of those numbers belongs to the thing on the page. None of them knows what made the wind. The ladder below lists what gives way first.

For powders the number comes from one property, grain size: the finer the grain, the gentler the wind that lifts it. The fan's fastest ring of air reaches about 224 cells per second in the game. That lifts flour and salt and only just reaches sand. In a run of the real engine, sand under the fan stayed where it was everywhere but one spot by the page's edge, where 1 % of it crept. So a fan lifts flour and leaves sand.

The lifted flour comes down again as flour. It rides the wind as a cloud of specks and settles in pale patches further out. A test checks that no powder is made or lost on the way. That dusting clings to the paper's tooth, so a spot gives up its powder to a draught once, and the next gust finds nothing loose to take.

The ladder also shows a seam we left in. In the released game the hair dryer's air is a little slower than the fan's, because its speed setting is lower. The next update next update puts the hand and the hair dryer on a real-speed scale, in the game's slow motion, so the dryer outblows the fan and a waved hand stays gentler than both.

Under the hood
Each thing gives way at its own wind speed

Under the hood

Each thing gives way at its own wind speed

Each grain's lift-off speed is set from its size alone, by the square-root law Bagnold found for blown sand:

lift-off wind ∝ √(grain size)

Cornflour goes first, then flour, pepper, salt and iron filings, and last sand and yeast. Past its lift-off speed, loose powder goes up faster the further the wind is past it. Only powder lying above a thin held layer is loose, and landed powder settles below that layer, so it stays.

Liquids on the paper are moved by the same wind once it passes a threshold: water first, runny goop at a stronger wind and less the thicker it is. Air coming down and spreading out presses harder than air sliding past.

Lifted powder flies as specks that take up the wind's speed quickly and sink. Lift and landing conserve powder to 10−5, and a draught lifts the same spot only a few times; a test checks both. Another test checks that the fan moves flour, that most of it lands back on the page, and that its centre ends up further from the fan.

How fast the wind must blow for each thing to give way
Wind, cells/sWhat gives way
0.5Below this the whole air goes to sleep
3A creature following a smell turns into the wind
12A feather slides; a fly is startled by the gust getting up
16Confetti slides
18A sticker’s edge lifts (more if it’s stuck well)
25A sitting fly takes off
28A leaf slides
30Cap on a fire’s own draught (its target); a pigeon braces against the wind up to here
32Wind starts to work on the paper: water moves
38Cornflour lifts
40A candle goes out; flames lean and fan; ripe mould sheds spores
42Confetti lifts into the air (2.6 × 16)
60Runny paint starts to move
70Flour lifts
120Soapy water whips up into foam
150A lone flame is blown out (more with fire round it)
170▲ Hair dryer, its fastest ring (released game, measured)
171Salt lifts
221Sand lifts
224▲ Fan, its fastest ring (measured)

Speeds in paper cells per second (a cell is about half a millimetre). Each threshold belongs to the thing that gives way, set in its own part of the game. ▲ Sources: peak wind with the tool held 3 s on a desktop page, one run of the real engine, the released dryer without its heat.

Try it: blow on flour, salt, sand and candles The game's own rule

A desktop page, 512 × 384 cells, under the game's 64 × 48 air grid. The fan is already blowing between the flour and the salt. Pick a tool and press and hold on the page (or sweep the hand fast); without a pointer, press Blow again or Sweep a hand across. What to look for: flour streams away at the edge of the gust, salt only where the air is fastest, sand almost never. Candles in the gust go out at 40 cells/s. This runs the game's wind step, its multigrid solve, lift rule and thresholds; the hair dryer's heat is left out, and specks are lifted from 4 cells up for the picture.

A page with heaps of flour, salt and sand and five candles under a fan; arrows show the wind
  • flour 70
  • salt 171
  • sand 221
Tool
fastest wind
—
candles lit
—
flour blown off its heap
—
salt blown off its heap
—
sand blown off its heap
—
flour accounted for
—
In the game, after the fan was held between a heap of flour and a heap of sand: pale patches of flour blown out to the far side of the flour heap, the round sand heap untouched.
Picked by grain size. The same gust lifts flour off its heap and drops it in pale patches further out, and leaves the sand heap as it was.

The same breeze grips dust, smoke and drops differently

Things in the air don't take the wind's speed at once. A speck of dust catches up in under a tenth of a second. Smoke, steam, sparks and embers take about a quarter of a second. A flying drop of paint keeps most of its own course for seconds, so a fan bends its arc without stopping it. The game gives each kind of particle its own grip on the air, and the same gust sorts them.

Confetti, leaves and feathers lying on the paper slide past their own wind speed, and lift into the air in a stronger wind. In the air they flutter and warm up in hot air. Confetti rising out of a fire in a breeze can catch alight in flight and land burning on the far side of a cut in the paper, lighting it there. Without the confetti, the same fire stops at the cut. A test checks both.

Same gust, different grip

After half a second dust has taken up all but 0.2 % of the wind's speed, smoke 86 %, flames 63 % and a drop of paint 18 %.

Same gust, different grip0.00.20.40.60.81.00.00.51.01.52.02.53.0seconds after a gust startsshare of the wind's speed taken upSame gust, different grip0.00.20.40.60.81.00123seconds after a gust startsshare of the wind's speed taken up
  • dust and motes
  • smoke, steam, sparks, embers
  • flames
  • drops of paint or water
Data table
Same gust, different grip
seconds after a gust startsdust and motessmoke, steam, sparks, embersflamesdrops of paint or water
00000
0.050.45120.18130.09520.0198
0.10.69880.32970.18130.0392
0.150.83470.45120.25920.0582
0.20.90930.55070.32970.0769
0.250.95020.63210.39350.0952
0.30.97270.69880.45120.1131
0.350.9850.75340.50340.1306
0.40.99180.79810.55070.1479
0.450.99550.83470.59340.1647
0.50.99750.86470.63210.1813
0.550.99860.88920.66710.1975
0.60.99930.90930.69880.2134
0.650.99960.92570.72750.2289
0.70.99980.93920.75340.2442
0.750.99990.95020.77690.2592
0.80.99990.95920.79810.2739
0.8510.96660.81730.2882
0.910.97270.83470.3023
0.9510.97760.85040.3161
110.98170.86470.3297
1.0510.9850.87750.343
1.110.98770.88920.356
1.1510.98990.89970.3687
1.210.99180.90930.3812
1.2510.99330.91790.3935
1.310.99450.92570.4055
1.3510.99550.93280.4173
1.410.99630.93920.4288
1.4510.9970.9450.4401
1.510.99750.95020.4512
1.5510.9980.9550.4621
1.610.99830.95920.4727
1.6510.99860.96310.4831
1.710.99890.96660.4934
1.7510.99910.96980.5034
1.810.99930.97270.5132
1.8510.99940.97530.5229
1.910.99950.97760.5323
1.9510.99960.97980.5416
210.99970.98170.5507
2.0510.99970.98340.5596
2.110.99980.9850.5683
2.1510.99980.98640.5768
2.210.99980.98770.5852
2.2510.99990.98890.5934
2.310.99990.98990.6015
2.3510.99990.99090.6094
2.410.99990.99180.6171
2.4510.99990.99260.6247
2.5110.99330.6321
2.55110.99390.6394
2.6110.99450.6465
2.65110.9950.6535
2.7110.99550.6604
2.75110.99590.6671
2.8110.99630.6737
2.85110.99670.6802
2.9110.9970.6865
2.95110.99730.6927
3110.99750.6988

Source: The game's own grip curves: each kind of particle eases toward the wind at its own rate, set per kind, not per size.

Air pushed forward has to go somewhere, so it swirls back round the sides

Air can't pile up in one place. Push some forward and the air around it has to get out of the way and swirl back round. In a fluid simulation that push-back is called pressure, and working it out is the expensive part, because every cell depends on every other.

The game works it out on four copies of the air grid, each with cells twice as big as the last. The coarse grids settle the big, slow shape of the push-back cheaply, and the finer ones fix the detail. This trick is called multigrid. Every sixtieth of a second it gets within about 3 % of the fully worked-out answer (on the test's wind field) for the price of about three and a half passes over the grid. Plain passes over the grid would need about 128 to get as close. Counting all the extra bookkeeping, that is still over twenty times less work.

Then the game applies only part of that push-back, and only nearby. That's on purpose. Seen from above, a fan blowing down really does add air to the layer over the paper, and a fire really does take some away upward. Pressure solved in full, right across the page, pushes back on a fan's gust and a fire's draught until they blow a fifth to a third weaker. Try the controls below and you'll see the gust fade.

The solve is also exactly fair. Blow to the left or blow to the right, and the push-back comes out as a perfect mirror image, the same to the last bit. The older solver it replaced leaned: draughts drew in 4 % faster from the left and from above, and on the phone's grid 13 % faster from below.

Under the hood
Air pushed forward has to go somewhere

Under the hood

Air pushed forward has to go somewhere

A screened Poisson equation with open edges:

(4 + σ) pi,j − pi±1,j − pi,j±1 = divi,j  ·  σ sets how far a push is felt

The reach is set in paper cells, not air cells, so a finer air grid gives the same wind: within 10 %, where the old solver was 68 % off. A test pins both. The correction is then applied only in part, where a full projection would apply all of it.

Full multigrid: the solve starts on the coarsest grid and works its way up, each finer grid starting from the answer below and getting one cheap cycle of correction. The screening decides how many levels are worth having, so every page size gets four. Grids with an odd number of cells coarsen cleanly too, so the phone's grid needs no padding.

Mirror-exact because every cell in a sweep reads only the previous sweep, neighbours are added in matched pairs, and the coarse grids lie symmetrically on the fine ones. All arithmetic is single precision, rounded the same way at every step, so the WebAssembly SIMD kernel (four cells at a time) and the JavaScript agree to the bit: on every cell over 12 grid shapes, and on four whole scenes after 150 ticks. An automated test checks this. The rest of the air step, its random eddies and gas spreading, is not mirror-exact.

Method: semi-Lagrangian advection and a pressure projection, after Stam 1999, with no diffusion step and only part of a screened projection. Multigrid as in Brandt 1977 and Briggs 2000, found later and consistent with the code. Only the pressure solve is WebAssembly; advection, gases, surface work and particles are JS.

Four grids share one solve

The four levels of the solve on a desktop page. Each coarse cell is four fine ones. The coarse grids settle the big shape of the push-back cheaply, and the fine ones fix the detail.

Air grids of 64 by 48, 32 by 24, 16 by 12 and 8 by 6 cells over the same page
  • 64 × 48
  • 32 × 24
  • 16 × 12
  • 8 × 6
  • the fine detail
  • middle shapes
  • big shapes
  • the whole page at once
Multigrid gets close for a sliver of the workOne field. Work counts sweeps only; multigrid also spends some work on residuals and grid transfers. An automated test holds the game's solve to a bound.

Full multigrid, as the game runs it, is 2.9 % off after 3.63 sweeps; plain sweeps are still 15.5 % off after 64 and 3.1 % after 128.

Multigrid gets close for a sliver of the work0.010.1110100050100150200250work, in sweeps over the full griderror, % (log)Multigrid gets close for a sliver of the work0.010.1110100050100150200250work, in sweeps over the full griderror, % (log)
  • plain damped Jacobi sweeps
  • V-cycles from nothing (2.69 each)
  • full multigrid, as the game runs it
Data table
Multigrid gets close for a sliver of the work
work, in sweeps over the full gridplain damped Jacobi sweepsV-cycles from nothing (2.69 each)full multigrid, as the game runs it
196.3
293
2.6920.6
3.632.9
486.8
5.384.7
876.2
8.071.1
10.760.28
1659.5
16.140.02
3237.3
6415.5
1283.1
2560.18

Source: Computed for this site with a copy of the game's solver on the wind field of its own test, against a fully converged answer.

A push is felt only nearbyThe reach was chosen to match the older solver's wind; it is not a measured property of air.

A unit push gives 0.471 where it is applied, 0.084 at 24 cells and under 0.002 at 112 cells.

A push is felt only nearby0.00.10.20.30.40.5020406080100distance from a unit push, paper cellspressurethe game's reachA push is felt only nearby0.00.10.20.30.40.5020406080100distance from a unit push, paper cellspressurethe game's reach
Data table
A push is felt only nearby
distance from a unit push, paper cellsscreened pressure
00.471
80.231
160.133
240.084
320.055
400.038
480.026
560.018
640.013
720.0092
960.0034
1120.0018

Source: Converged solve of a unit push on the 64 × 48 grid, computed for this site with a copy of the game's solver.

Try it: give the air more or less push-back The game's own rule

A fan is held over the middle of a desktop page; drag to move it, or press Move the fan. Red is air spreading out, blue is air drawn in (averaged over 3 × 3 air cells). This page runs a copy of the game's solver. What to look for: at the game's 0.2 the gust spreads wide with swirls round it. Turn the push-back up to 1 with no screening and the gust's fastest air drops by about a quarter. Every half second the page also solves the wind and its mirror image and counts the cells that differ.

A fan over a desktop page; colours show where air spreads out or is drawn in, arrows show the wind
  • red: air spreading out
  • blue: air drawn in
0.20
Reach
fastest wind
—
peak since last change
—
divergence taken out this tick
—
multigrid levels
—
mirror test
—

A ball rolling past can blow out a candle it never touches

Roll a football fast past a lit candle, with a few millimetres of clear paper between them, and the candle goes out. Roll it slowly along the same line and the candle burns on. A test checks both. Pat the paper right next to a candle and the air squeezed out from under your palm puts it out too. A monster truck's wake whirls confetti up beside its path without touching it.

The ball doesn't know about candles. As it moves, it carries the air right by it along and pushes the air round it forward and back round its sides, in the textbook pattern for air flowing round a moving cylinder. The candle reads the wind at its flame. Past 40 cells per second, it's out.

The hand works the same way. In the released game a hand stirs the air at its full speed on the screen, so an ordinary sweep blows harder than the hair dryer beside it. The next update next update scales a hand's draught to its real speed, in the game's slow motion, and a waved hand stays under the fan.

Under the hood
A ball rolling past can blow out a candle it never touches

Under the hood

A ball rolling past can blow out a candle it never touches

Anything moving low over the paper carries the air right under it along. Outside its outline, out to a few radii, the air follows the 2D potential-flow doublet round a moving cylinder, the textbook pattern:

target = (r/d)² · (cos 2θ·ux + sin 2θ·uy, sin 2θ·ux − cos 2θ·uy)

Only the shape is textbook. The strength is a share of the body's speed, with a cap, and the air is brought toward it over a few ticks. Below a minimum speed a mover stirs nothing. A mover only ever speeds air up along its own direction, so a ball in a fan's stream doesn't still the fan, and pushing every tick can't run away. A wake doesn't count as stirring, so it gets no random eddies.

A blow from above (slap, hammer) is a radial puff sized by what lands and how hard, kicked in at once.

Try it: roll a football past a candle The game's own rule

A football (radius 18 cells) rolls past a candle again and again on a 320 × 160 page, the size of the game's own test. Arrows show the air it moves. What to look for: at 320 cells/s and 24 cells away the candle goes out; at 45 it stays lit, as in the game's own test. Find the slowest roll that still puts it out, then move the candle further away.

A football rolling past a candle; arrows show the air it pushes
320 cells/s
24 cells
wind at the flame
—
peak this pass
—
blows out at
—
candle
—
A football rolling fast across the paper in the game, a few centimetres past a birthday candle whose flame has just gone out, a grey puff of smoke blown off beside it and clear paper between ball and candle.
Out without a touch. The football never reaches the candle. The air it pushes does.

Smells drift downwind, and the heavy gas from a fizz can put out a candle

The air carries more than speed. It holds eight gases: smoke, the heavy CO₂ from a fizz, chlorine, four smells (sweet, foul, sour and sharp) and mould spores. Each drifts with the wind, spreads on its own and fades into the room at its own rate.

CO₂ is heavier than air. Pour vinegar on baking soda next to a candle and the gas from the fizz lies on the paper and creeps outward like spilled water, faster where it lies deeper. When it gets deep enough round the candle's foot, the flame is starved and goes out, with no breath of wind. A candle across the page stays lit. A fire is choked where it lies a little deeper. Tip a tablet and the CO₂ runs downhill, while smoke drifts up.

Smells work the same way. Food on the page keeps the air above it smelling, the wind carries the smell downwind, and creatures follow it. In a test with a steady breeze past a banana, flies arrive from downwind and fly up the smell; in play the fan blows only while it's held, and flies find food left out by themselves within minutes. A puppy finds peanut butter far upwind, further than it could see it. Real flies turn upwind within a fraction of a second of meeting an odour Vanbreugel 2014; that study was found after the rule was written, and agrees with it. Bounce a ball on mouldy bread in a breeze and, after a time skip, new mould grows downwind.

Chlorine, from bleach meeting vinegar, drifts off the page into the room. Open the window, put on a mask or wave air about, or in the end you have to leave the room. Waving the vacuum about airs the room out, because the room counts how much the air is moving, whatever moves it.

Under the hood
Smells drift downwind, and the heavy gas from a fizz can put out a candle

Under the hood

Smells drift downwind, and the heavy gas from a fizz can put out a candle

Each gas lives on the air grid and is worked only inside the area where there is some. Each step it drifts with the wind (a heavy gas also slides downhill), spreads by a flux that conserves what spreads, leaks out at the page's edge, and fades.

∂h/∂t = ∇·((D + K h)∇h)

For a heavy gas the spreading grows with depth, the thin-layer form of a gravity current. CO₂ spreads that way and fades slowly. Smoke is lighter than air and fades fast. Smells spread wide and linger. Spores never fade.

A candle goes out once the CO₂ round its foot is deeper than a set share of its flame's height, and a fire is choked by a slightly deeper layer. The fizz gives off CO₂ in proportion to the soda it uses up. A test checks that soda alone and vinegar alone leave the candle lit, together they put it out, the wind stays under a candle's blow-out speed throughout, and a candle across the page stays lit.

Smells: a slow sweep samples a sparse share of the paper under each air cell, and slower still when all is calm. It holds the air above food at least at a level read from what lies there. That is a floor, so the food never runs out of smell. Chlorine that drifts off the page goes into one number for the room, which airs out faster the more the air in it is moving.

Try it: put out candles with no wind The game's own rule

Vinegar is poured on a heap of baking soda at the start. Three candles stand 26, 50 and 84 cells away; the 26 and the 84 match the game's test. The game never draws CO₂; here it's tinted so you can see it. There is no wind in this demo at all. What to look for: the pool creeps out and the nearest candle goes out about a second after the pour. Tilt the page and pour again: the gas runs downhill and the depth at the far candle climbs.

Baking soda fizzing beside three candles; a tinted pool of CO₂ spreads over the page
  • baking soda
  • a candle goes out past 2.6 cells of CO₂
  • 26 cells away
  • 50 cells away
  • 84 cells away
0.00 g
26 cells away
—
candle
—
50 cells away
—
candle
—
84 cells away
—
candle
—
CO₂ on the page
—
snuffs at 0.1 × 26
—
In the game, vinegar fizzing in bubbles on a heap of baking soda beside a birthday candle that has just gone out, its wick black.
Out by chemistry. The fizz beside the candle gives off CO₂, which lies on the paper and reaches the flame's foot. The air never moved.

Heat pulls air in, and wind dries wet paper and fans flames

Hot air rises, so the air along the paper flows in toward hot things such as a fire, a hot cup or a hot iron. Put a hot cup down and over eight seconds it slowly draws a feather in; a cold cup doesn't, and a test checks both. The game also knows how high the heat is. A candle's flame stands up on its wick, so its warm air rises from up there and leaves the confetti round its foot alone. In a run of the real engine, a hot cup drew air at 20 cells per second and a lit candle on its own drew none.

That draught is kept gentle by design. Its target is capped just under the speed where wind starts to push puddles, so a fire's own pull mostly leaves the paint round it alone. The cap is on a target, not a hard limit. In runs of the real engine, heat held mid-page drew air at 23 to 26 cells per second, a big fire (radius 40) reached 33.5, just past the line, and heat near the page's edge drew 43 to 48.

Wind dries the paper, faster the faster it blows. Hot wind dries much faster: the hair dryer's hot air dries several times faster than the fan's cool air at the same speed. A breeze fans a small fire into a racing one, leans its flames and pushes its front downwind. A candle goes out at 40 cells per second; a lone flame on burning paper needs a far stronger wind, and more again with fire round it.

Under the hood
Heat pulls air in, and wind dries wet paper and fans flames

Under the hood

Heat pulls air in, and wind dries wet paper and fans flames

Hot things write heat into the air. A source smaller than an air cell warms only its share of the cell. Air near the paper flows up the slope of a blurred warmth field, toward a target speed that is capped, and the warmth fades within a fraction of a second, so sources keep it topped up. Warm air rises at a speed that grows with the square root of its warmth, the right scaling for a plume's speed; the constants are tuned. The air also remembers how high its heat came from, so heat held up at a flame draws next to nothing along the paper. Air heat is one-way: the air never writes the paper's temperature.

drying ∝ wind speed × (1 + a boost for hot air)

Wind starts to work on the paper just past the draught's cap, eased in rather than switched on. Fire reads the same wind: flames lean and fan in a breeze, and a flame is blown out by a stronger wind, more so with fire round it. Tests check wind pushing a fire front downwind, and a candle's hot spot moving with its flame.

Heat's pull stays mostly below where puddles start to moveTwo bars where several runs spread. Lines: the draught's target cap, the speed where wind starts to move water, and the speed that blows a candle out.

A lit candle draws 0, a hot cup 20, heat mid-page 23 to 26, a big fire (radius 40) 33.5 and heat near the page's edge 43 to 48 cells per second.

Heat's pull stays mostly below where puddles start to move0102030405060A lit candleHeat mid-pageHeat by the edgedraw toward the heat, cells/s30–32: target cap, then water moves40 a candle goes outHeat's pull stays mostly below where puddles start to move0204060A lit candleA hot cupHeat mid-pageA big fireHeat by the e…draw toward the heat, cells/s30–32: target cap, then water…40 a candle goes out
  • lowest run
  • highest run
Data table
Heat's pull stays mostly below where puddles start to move
lowest runhighest run
A lit candle00
A hot cup2020
Heat mid-page2326
A big fire33.533.5
Heat by the edge4348

Source: Draw toward the heat in cells per second, from runs of the real engine.

The same air links candles, fire, puddles, flies and mould

Each chain below runs through the air and nothing else. No code joins the first box to the last.

Shared: heavy gas (CO₂ depth)

Pour vinegar on baking soda beside a candle

The fizz's CO₂ creeps to the candle's foot and starves the flame, while the wind stays under the 40 that blows a candle out. A test checks it.

Chemistry and pH

Shared: wind

Hold the fan beside a small fire

Flames lean and fan, and the burning front is pushed downwind. A test checks it.

Heat and fire

Shared: wind on the paper

Blow a fan across a puddle

The water is pushed along, the same distance whichever way you blow, within 10 %. A test checks it.

Water in paper

Shared: smell gas

A steady breeze past a banana, as the test sets it up

Flies arrive from downwind and fly up the smell to the banana. A test checks it.

Animals with their own minds

Shared: spores (gas)

Bounce a ball on mouldy bread in a breeze

The shaking sheds spores, the breeze carries them, and after a time skip new mould grows on food downwind. A test checks it.

Dough, mould and time

Shared: a squeeze film

Slap the paper next to confetti

Air squeezed from under the palm nudges the confetti outward. A test checks it.

Things that push things

3,072
Air cells over a desktop page, 64 × 48, each about 5 mm across.
13–17 µs
The pressure solve per tick in WebAssembly, measured when the kernel was built. The device wasn't recorded.
2.9%
How far one tick's pressure is from the fully solved one, for the work of about three and a half passes over the grid, plus some bookkeeping (computed on the wind field of the test that pins it).
0 bits
Difference between the push-back on a wind and on its mirror image. Pinned by a test.
10⁻⁵
The most powder made or lost while wind lifts it and lands it again. Pinned by a test.

Where we simplify, and why

This is a coarse, flat, game-speed wind, tuned to look and act right for a child on a tablet. No test compares it with a real flow. Here is exactly where it parts from real air.

In real life. Air moves in three dimensions

In the game. One flat layer of wind over the paper. Height exists only as a number for warm air's rise, and to decide whether a mover is low enough to stir it.

Why that's enough. We look at the page from above, and a 3D grid would cost many times more. A thing held high up feels the same wind as one on the paper.

In real life. Air is close to incompressible

In the game. Only part of a screened pressure correction each tick, so some of the divergence is left in on purpose.

Why that's enough. Seen from above a fan is a source and a fire a sink. A full, unscreened solve made gusts and draughts a fifth to a third weaker. Swirls are weaker than real ones.

In real life. Solid things block and steer the air

In the game. Nothing blocks the wind. There are no walls and the page's edges are open. Only moving things shape it.

Why that's enough. Cost and simplicity. A cup doesn't shelter a candle, and wind passes through creatures.

In real life. A moving body leaves a complex wake

In the game. The 2D potential-flow doublet round a cylinder, at a share of the body's speed, cut off a few radii out.

Why that's enough. The right far-field shape for almost nothing. No separation or vortex street, and the strength isn't the textbook's.

In real life. Turbulence cascades from big eddies to small

In the game. A few random small eddies plus vorticity confinement, the method of Fedkiw 2001 (found later, consistent with the code), only for a moment after something stirs the air.

Why that's enough. Looks like gusts on a 5 mm grid. It's random, not computed; a seeded random number keeps it repeatable.

In real life. Whether wind lifts a grain depends on its size, density and stickiness

In the game. A lift-off speed that grows with the square root of grain size, the law Bagnold found for sand. Density and cohesion are ignored.

Why that's enough. One property, one rule, and fine goes before coarse. Iron filings lift like salt, and very fine real powders are harder to lift than this says, because they stick. Here cornflour goes first.

In real life. A smell is molecules leaving the food

In the game. The food holds the air above it at a level read from what lies there. Nothing is used up.

Why that's enough. Stable sources from a sparse sample. A banana never runs out of smell.

In real life. Big drops and fine mist feel drag by size

In the game. One grip on the air per kind of particle. A drop feels the air only while something is blowing.

Why that's enough. Cheap, and arcs look right. Fine mist doesn't hang in still air.