entropy cafe

a WebGPU fluid simulation of mixing, entropy, and complexity
based on Based on Sean M. Carroll's coffee mixing metaphor for the second law of thermodynamics.

entropy

0.000

mixedness

0.000

complexity

0.000

kinetic

0.000

Sean M. Carroll uses coffee and cream mixing as a metaphor for entropy in the universe. The unmixed state is ordered and simple. Stirring drives the system toward many possible microstates, raising entropy while the visible complexity of swirls rises and then fades.

We approximate the system by binning cream concentration cc into voxels. Mixedness captures how close each voxel is to a 50/50 mix, and entropy follows the classic binary form.

H(c)=[clog2c+(1c)log2(1c)]H(c) = -\left[c \log_2 c + (1-c) \log_2 (1-c)\right]
mixedness=12c1\text{mixedness} = 1 - |2c - 1|

Complexity tracks structure by combining mixedness with the local concentration gradient. It peaks during filament formation, then drops as the mixture becomes uniform.

complexityc×mixedness\text{complexity} \propto \overline{|\nabla c|} \times \text{mixedness}

Entropy keeps increasing even as visible structure disappears: the high-entropy end state is visually simple. Life and local order can still exist because Earth is not a closed system; it exports entropy to its surroundings.