A glass of coffee, in the round. Drag to orbit, scroll to zoom. The glass is sealed, so the cream in it is conserved.

entropy
0
complexity
0
mixedness
0
entropy0.000 bits
complexity0.000
peak so far0.000
flow energy0.0

Entropy is bits per coarse box, at most one. Apparent complexity is the Lempel-Ziv parse of the same boxes, divided by what a random cup would give. Both are measured, neither is rescaled.

the cup is being measured, the curves start in a moment

Entropy, and why it rises

Sean Carroll uses a cup of coffee with a splash of cream as the cleanest everyday picture of the second law of thermodynamics. The unmixed cup is ordered and improbable; left alone, or stirred, it drifts toward the overwhelmingly more numerous mixed configurations. That drift is the increase of entropy.

To put a number on it we coarse-grain: bin the cup into boxes and, for each box, take the cream fraction cc and its binary Shannon entropy. The entropy of the cup is the average over boxes. It is low when each box is nearly pure coffee or pure cream, and maximal when every box sits at a fifty-fifty mix.

H(c)=−[c log⁡2c+(1−c) log⁡2(1−c)]H(c) = -\left[c\,\log_2 c + (1-c)\,\log_2(1-c)\right]

Entropy is defined relative to the coarse-graining. The grid is the observer, and you can move it: the coarse-graining slider is the single most important control in the panel.

The rise and fall of complexity

Entropy climbs monotonically, but the cup does not get more interesting to look at the whole way. Watch the three stages: cream layered on coffee (simple), then a moment of intricate filaments and tendrils (complex), then a flat uniform brown (simple again). The interesting structure lives in the middle.

Aaronson, Carroll and Ouellette measure that middle by compressing the picture: the apparent complexity of a frame is the size of the coarse-grained image once a compressor has had a go at it. A layered cup compresses well because it is two flat blocks. A uniform cup compresses even better because it is one flat block. The filaments in between are what a compressor cannot summarise.

Here that compressor is the Lempel-Ziv parse. Count the distinct phrases LZ76 finds in the coarse-grained, quantised field, and divide by the length a random field of the same size would give. It is deterministic, it needs no compression library, and it has exact known values on degenerate inputs, which is what lets the calibration check it.

C=cLZ(coarse-grained cup)n/log⁡anC = \frac{c_{\mathrm{LZ}}(\text{coarse-grained cup})}{n / \log_a n}

Entropy goes up and stays up. Apparent complexity goes up and comes back down. The high-entropy end state is visually the simplest.

What the cup actually is

A real incompressible fluid, solved on the GPU. Each frame advects the velocity field along itself, adds vorticity confinement and the buoyancy of the density contrast, diffuses momentum at the chosen viscosity, and then projects the field to be divergence free by solving a pressure Poisson equation with Jacobi iteration. Only then is the cream carried through the flow. This is Jos Stam's stable-fluids scheme, and the projection step is what makes the filaments: a flow that is allowed to compress does not fold.

∂tu+(u⋅∇)u=−∇p+ν∇2u+f,∇⋅u=0\partial_t \mathbf{u} + (\mathbf{u}\cdot\nabla)\mathbf{u} = -\nabla p + \nu\nabla^2\mathbf{u} + \mathbf{f}, \qquad \nabla\cdot\mathbf{u} = 0

Cream is slightly denser than hot black coffee, so a layer of it resting on top is unstable and falls as a plume: that is a fresh pour, with no stirring at all. The walls are sealed, so the cream in the cup is conserved and the entropy axis means something fixed.

Three phases of the mix

The same process, at three moments. The coarse-grained entropy climbs across them; the apparent complexity rises and then falls. The entropy figures below are the closed-form values the calibration checks the measurement pipeline against, so the prose and the numbers cannot drift apart.

layered: cream resting on coffee, just poured, every coarse cell internally pure.

entropy 0.00 bits, apparent complexity low

swirling: sheets and tendrils, coarse cells spanning the whole range of mixes.

entropy 0.61 bits, apparent complexity at its peak

uniform: fully mixed, every coarse cell sitting at a fifty-fifty blend.

entropy 1.00 bits, apparent complexity collapsed

Where this is still a toy

Two dimensions, not three, so there is no vortex stretching and the turbulence is the wrong kind. Cream and coffee are one scalar field rather than two fluids with their own equations of state. Semi-Lagrangian transport is not conservative, so a global mass fixer restores the cream total after each step; without it the total wanders by more than ten percent and takes the entropy ceiling with it. Vorticity confinement injects energy rather than conserving it, which is why there is a drag term and a speed cap holding the Courant number below one.

The parameter sweep and the sensitivity tornado run the same solver headlessly on a much coarser grid, so they show the shape of a trend and not an absolute magnitude. All of this is listed, with what would falsify it, in the assumptions panel.

One last point Carroll makes: the second law does not forbid local order. The cup reaches equilibrium, but Earth does not, because it is an open system that takes in low-entropy sunlight and radiates high-entropy heat to space. Life lives on that flow.

Model

v2.0July 2026
  • the fluid is now solved rather than approximated: semi-Lagrangian advection, vorticity confinement, buoyancy from the cream and coffee density contrast, implicit viscous diffusion, and a Jacobi pressure projection that makes the velocity field divergence free. The previous version had no projection at all, only a local density penalty, which is why it never produced filaments.
  • buoyancy now points the right way. Cream is denser than hot coffee, so a poured layer is unstable and falls as a plume; the previous version pushed it upward and held the layering in place with hand-tuned restoring springs.
  • apparent complexity is now the normalised Lempel-Ziv complexity of the coarse-grained, quantised field, which is the construction of Aaronson, Carroll and Ouellette 2014, rather than a local gradient times mixedness.
  • the coarse-graining box is a control. Entropy and apparent complexity are defined relative to the observer, so the observer is now something you can move.
  • both charts sit on a fixed zero-to-one axis. The previous version auto-scaled to dataMax because the absolute metric values never left the floor, which meant the headline shape was being drawn rather than measured.
  • the cup is sealed and the cream in it is conserved, through a monotonicity-limited transport step and a global mass fixer. The uncorrected drift is reported in the calibration panel rather than hidden.
  • a parameter sweep and a sensitivity tornado, built by running the same solver headlessly on a coarser grid. The previous version stated in the outro that neither was possible for a live stochastic fluid.
  • calibration is now a validation: the solver is checked against the Taylor-Green decay rate, the exact translation of a blob in a uniform stream, and the annihilation of a pure gradient flow by projection, alongside the closed-form entropy and Lempel-Ziv values.
  • WebGPU is gone, and with it the browser requirement that showed most visitors an error card, a renderer leaked on every resize, a device that was never destroyed, an unused shader, and a metric that was computed and never displayed.
v1.0June 2026
  • particle fluid: about sixty thousand particles with density and pressure passes, Brownian diffusion, a stirring vortex and viscous damping, inside a cylindrical glass.
  • screen-space fluid rendering: a particle depth map, bilateral smoothing, colour blur and a glass overlay.
  • metrics by coarse-graining a 32-cubed voxel grid into binary Shannon entropy, mixedness, and a gradient-based complexity proxy.
  • five presets traversing the mixing regimes: fresh pour, gentle settle, vigorous stir, thick and watery.