What is a fluid? Viscosity, the continuum hypothesis, and compressibility
A fluid is any substance that deforms continuously under an applied shear stress — liquids and gases alike. Unlike solids, fluids have no preferred shape and will flow to fill their container. Fluid dynamics studies how these substances move, and it all begins with three foundational ideas: the continuum hypothesis, viscosity, and compressibility.
The demos below let you explore each concept interactively. Every visualization runs in real time on a 2D canvas, so feel free to adjust the controls and build intuition before diving into the equations.
At the molecular level, a fluid is a chaotic swarm of individual molecules bouncing around. But if we zoom out far enough, the random molecular motion averages into smooth, deterministic fields — velocity, pressure, density — that vary continuously in space and time. This is the continuum hypothesis, and it is the foundation on which the Navier-Stokes equations are built.
Use the slider below to transition between the molecular view (individual particles with Brownian motion) and the continuum view (a smooth velocity field). Notice how the random jitter of individual molecules vanishes into coherent flow arrows.
At the molecular scale, each dot is a “molecule” with random (Brownian) motion superimposed on the flow. Zoom out to the continuum scale to see the same motion described as a smooth velocity field — the foundation of fluid dynamics.
Viscosity measures how strongly a fluid resists being deformed. Water has low viscosity — layers of fluid slide past each other easily. Honey has high viscosity — internal friction couples adjacent layers tightly together. The simplest setup to see this difference is Couette flow: fluid between two parallel plates, one moving and one stationary.
In a low-viscosity fluid, the velocity is nearly uniform across the gap except in thin boundary layers near the walls. In a high-viscosity fluid, the velocity varies linearly from zero at the stationary wall to the plate speed at the moving wall. Adjust the plate speed and boundary layer thickness to see how the velocity profile and particle motion change.
When you push a piston into a tube of gas, the molecules near the piston crowd together first, and this compression propagates outward as a pressure wave traveling at the speed of sound. This is compressible flow.
For liquids (and gases at low Mach numbers), density changes are negligible. In the incompressible idealization, pressure disturbances propagate instantaneously — every particle in the tube shifts at the same moment. Toggle between the two modes and push the piston to see the difference.
In compressible flow, a pressure disturbance travels at a finite wave speed (sound speed) — you can see the compression front move through the tube. In incompressible flow, pressure changes propagate instantaneously — all particles respond at once.