eureka
§ A107

Fluid Mechanics Explained for High Schoolers

Have you ever wondered how smoke swirls from a campfire, or how water flows down a stream? These beautiful, swirling patterns might look completely random, but they are actually governed by some of the most famous equations in physics: the Navier-Stokes equations.

To understand fluid dynamics, it helps to imagine a fluid (like air or water) not as one giant blob, but as millions of tiny, invisible boxes stacked together in a giant grid. In our Fluid simulation, we do exactly this! We break the screen down into a grid of squares, and for each square, we keep track of two things: velocity (which way the fluid is moving and how fast) and density (how much "stuff" like dye or smoke is in that square).

The Three Rules of Fluid Flow

As time ticks forward, the fluid follows three basic rules:

1. Advection (Moving with the flow): The fluid carries stuff with it. If there is a blob of dye in a square, and the velocity is pointing to the right, the dye will move to the right square in the next step. But it's not just dye that moves—the velocity itself is carried by the fluid! This is why a fast-moving stream of water will push other water along with it.

2. Diffusion (Spreading out): Just like a drop of food coloring slowly spreads out in a glass of still water, fluid and its velocity tend to spread out over time. This makes sharp edges smooth out and things become more blurry.

3. Incompressibility (No squishing): This is the most magical part! Water can't be squished into a smaller space. If fluid flows into one of our tiny grid squares, an equal amount of fluid must flow out of it somewhere else. When fluid hits a wall, it can't compress, so it is forced to turn and flow along the wall. This rule is what creates those beautiful swirling vortices and eddies you see in the simulation!

By applying these simple rules over and over again to every square in the grid, we can create a mesmerizing simulation of fluid motion. Go ahead and try drawing some walls and adding dye in the fluid experiment to see these rules in action!