The background of this page is a live particle simulation built on the same mathematical principles used to study fluid flows in astrophysics and climate science. Click anywhere to inject particles and watch them evolve.
The Flow Field
Each particle is advected through a 2D velocity field, which is a simplified version of what you compute when solving the Navier-Stokes equations for fluid motion. The field is constructed from superimposed trig functions at different spatial frequencies, mimicking the Fourier decomposition of a turbulent flow:
- Large-scale modes create broad, sweeping currents (like jet streams or galactic-scale gas flows)
- Small-scale modes add fine structure and chaotic mixing (like turbulent eddies in molecular clouds or oceanic convection cells)
Use the Turbulence Cascade slider to strip away modes and watch the flow evolve: 1 mode gives smooth laminar streams, 3 modes introduce transitional mixing, and 6 modes produce fully developed turbulence
In Astrophysics
Simulations like this (scaled up enormously) are used to study how interstellar gas moves, collapses, and forms stars. In my Ph.D., I ran multi-terabyte simulations studying how shock waves interact with turbulence in star-forming regions. The Kolmogorov energy cascade (energy transferring from large scales to small ones) governs the turbulent structure of the interstellar medium. Try increasing Flow Scale to see larger coherent structures, like you'd find in a giant molecular cloud.
In Climate & Agriculture
The same fluid dynamics underpin atmospheric and ocean circulation models. General Circulation Models (GCMs) solve the Navier-Stokes equations on a rotating sphere (Earth) to predict climate. The advection of tracer particles through flow fields, just like these particles are doing, is how climate models transport heat, moisture, and pollutants. The Damping slider controls effective viscosity: low damping lets particles coast freely (like stratospheric flow), while high damping creates tight, responsive motion (like viscous boundary layers). Understanding these flows is essential for predicting how climate variability affects crop yields.
The Mouse Interaction
Your cursor applies a force with both radial (inward pull) and tangential (swirling) components, which creates a vortex analogous to hurricanes, accretion disks, or the drain in a bathtub. Clicking injects tracer particles, like introducing dye into a flow to visualize its structure.
What's Simplified
Real fluid simulations solve conservation of mass, momentum, and energy on adaptive grids with millions of cells. This visualization uses a prescribed (not self-consistent) velocity field with no pressure feedback or conservation laws. But the visual intuition it builds (how particles cluster along convergent streamlines, how mixing occurs at different scales, and how structure emerges from simple rules) is genuine and physically meaningful.