Why do cars have tails?
Students streamline a cylinder, then cut a car's drag by a fifth, and read the result in litres of fuel. Ends with a class leaderboard.
- Missions 01 and 03
- NGSS MS-PS2-2 · MS-ETS1-4
Draw a shape, hold something up to the camera, or drop in a Blender file. A fluid solver on your GPU pushes air around it and reports the drag, the lift, and what that drag would cost in fuel on the road. Most schools can't afford the real thing. This one runs on a Chromebook.
Or type two objects and race them ↓Cream is solid. Shift-drag erases.
Start the camera, then click directly on the object in the video.
#EF6B4A
Cut-out engine: waiting for camera
Google MediaPipe runs locally in this tab. Camera frames are not uploaded.
Use Blender .glb for true 3D, or PNG/JPG/WebP/SVG as a palm decal.
Name two objects. They get drawn, tested one after the other, and compared in drag, fuel and CO₂.
Run a five-second test and the averaged drag and lift become a score. 2D and 3D are ranked separately. Create a room if one class wants a board of its own.
Your last run
After a five-second test this space says what your shape did to the air and suggests one change to try.
No accounts, no install, and camera frames never leave the device. Each lesson below fits a 45-minute block and is built on the missions. The physics primer covers every idea they rest on, with the equations and the honest limits.
Students streamline a cylinder, then cut a car's drag by a fifth, and read the result in litres of fuel. Ends with a class leaderboard.
From a flat plate to a lifting body. Students explain lift as deflected air, then chase lift-to-drag like an aircraft designer.
Same cylinder, different fluid. Students watch the vortex street vanish as viscosity rises, then test a real object from their desk.
Four GPU passes per frame, no approximated animation. The tracers ride the same velocity field the pressure solve projects, so what you see is what the force integral feels. The Numerics button at the top has the full breakdown.
Sculpt directly in the test section, or start from an airfoil, cylinder or flat plate. Solid cells are rasterized into the solver mask at grid resolution.
Semi-Lagrangian advection, divergence, Jacobi pressure iterations and a projection step run in ping-pong float framebuffers — every frame, on the GPU.
Pressure is read back asynchronously and integrated around the body boundary. Cd, Cl, drag and lift update at 20 Hz while the tunnel renders at 60.
How accurate is it? Measured against textbook values on the physics page: in range for the cylinder and airfoil at Re 692, reads low at Re 180 and below and for the flat plate. Trust it for comparing shapes, not absolute numbers.
WebGL2 cannot read and write the same texture in one draw call. Velocity
and pressure therefore live in two framebuffers. A pass reads
read and renders into write; then the pair is
swapped. This is the GPU-compute equivalent of a double buffer and avoids
read-after-write hazards.
Each frame: semi-Lagrangian advection traces velocity backwards in time,
central differences compute divergence, 32–44 Jacobi iterations solve
∇²p = ∇·u, and the pressure gradient is subtracted from
velocity. Solid cells enforce no-slip; the inlet carries a small
time-varying shear.
Particle positions are stored in a 256×256 RGBA32F texture. A fragment pass advances each tracer with midpoint RK2, respawning runaways at the inlet. The draw shader maps speed to deep blue → cyan → cream, with muted violet recirculation.
The 3D tunnel runs a D3Q19 BGK lattice-Boltzmann solver on a 72×36×36 grid with half-way bounce-back walls. Drag and lift come from momentum exchange on every solid link. Your 2D silhouette is lifted into a finite wing, a wall-to-wall extrusion, or a body of revolution. Drag to orbit, scroll to zoom, double-click to reset.
Pick an object colour (or the backdrop) and the webcam is thresholded in hue-aware colour space, smoothed over time, reduced to the largest blob, hole-filled and fitted to a quarter of the tunnel height — then used as the solid boundary. Freeze it to run a fair test.
Google MediaPipe Hand Landmarker turns 21 hand joints into a temporally
stabilized solid boundary without uploading camera frames. Uploaded
.glb models or PNG/JPG images can also be anchored directly
to the moving palm. Blender models are projected from three wind directions
into the same solver and can launch into WebXR, Scene Viewer or Quick Look AR.
A pixel-pack buffer reads the pressure field asynchronously. The CPU walks
the solid/fluid interface, sums −p·n·ds into drag and lift,
then normalizes to Cd and
Cl against the body's reference length. UI metrics
update at 20 Hz independently of the 60 FPS render loop.
Each mission loads a shape, waits for the force signal to stabilise, then
records a baseline and watches the live telemetry until the target holds for
about a second. The road panel scales the relative Cd
onto a mid-size car (frontal area 2.2 m², air 1.2 kg/m³) at 100 km/h:
P = ½ρv³CdA, converted to petrol at 34.2 MJ/L and 25%
tank-to-wheel efficiency, and to CO₂ at 2.31 kg/L. It is the drag share only,
for comparing shapes, not a certified consumption figure.