The box knows
Take a sealed flask of argon and squash it into a pancake without letting any gas out. The pressure does not change. It does not change on the two wide faces, and it does not change on the thin rim, and it does not change if you stretch the pancake into a drinking straw instead. Volume is volume. The shape of the container is not in the equation of state, and that absence is not an oversight.
The absence is the physics. A molecule of argon goes about four hundred metres per second and forgets its direction every seventy nanometres or so, which means that by the time it arrives at a wall it has no memory of the wall. It did not aim. It is not pushing. It arrives, bounces, leaves. The rate at which that happens depends on how many molecules there are and how fast they are going, and on nothing else at all. So the gas cannot tell a cube from a straw, and pressure comes out the same everywhere, and we write $PV = Nk_BT$ and stop thinking about the room.
Bacteria aim.
That is the whole of it, really. A swimming bacterium holds a direction for a second or so before it tumbles, and a Janus colloid with one catalytic face pushes until something turns it around, and during that time they are not bouncing off walls but leaning on them. You can see it in a microscope: active particles pile up along a boundary, in a layer, and the layer has a thickness. Thickness is a length. Once there is a length in the problem, the box can compare itself to it, and a gas that can compare itself to its container is a gas whose pressure knows the size of the room.
Li, Eichhorn and Dabelow wrote the comparison down three weeks ago. Their result is one line:
$$PV = Nk_BT\,\frac{1+\mathrm{Pe}^2}{1+\mathrm{Pe}^2\,\vartheta},\qquad \vartheta=\frac{\tanh\ell}{\ell},\qquad \ell = L\sqrt{\frac{1+\mathrm{Pe}^2}{4D\tau_a}}$$
and the thing worth staring at is $\vartheta$. It is the only part of the expression that contains the box.
Run it to its edges. For a very large box, $\ell$ is large, $\tanh\ell$ saturates at one, and $\vartheta$ goes to zero, leaving $PV = Nk_BT(1+\mathrm{Pe}^2)$ — which people have known for a decade and usually describe by saying the activity acts like a higher temperature. Fine. Now go the other way. Make the box tiny, or make the particle’s persistence time enormous, and $\ell$ goes to zero, and $\tanh\ell \to \ell$, and $\vartheta \to 1$, and the entire correction cancels itself: $PV = Nk_BT$, the passive law, exactly. A box small enough is indistinguishable from no activity at all.
That second limit is the one I did not see coming, and I think it is the honest heart of the paper. The naive story about an effective temperature says activity makes the gas hotter, full stop. But a particle crammed into a box narrower than its own boundary layer has nowhere to pile up. It is already at the wall. It is always at the wall. The accumulation that produces the extra pressure is a difference between the edge and the middle, and if there is no middle there is no difference, and the swim pressure has nothing to push against. Squeeze hard enough and the activity drops out of the equation of state. The particles are still swimming. The measurement has stopped being able to tell.
There is a second thing in their paper that they state and do not dwell on, and it makes the first thing sharper. Their steady-state density, evaluated at the wall, is
$$\rho(L)\,L = \frac{1+\mathrm{Pe}^2}{1+\mathrm{Pe}^2\vartheta}$$
which is the right-hand side of the gas law, character for character. The equation of state and the density at a single point are the same number. I checked it over sixteen combinations of box size and activity, spanning values from 1.0002 to 133.8, and the largest disagreement anywhere was $2\times10^{-16}$ — machine epsilon, which is to say they are not two results. For overdamped particles against a hard wall, pressure is wall density; the whole of thermodynamics here collapses onto one point in the box. It means the “equation of state” is not reporting a bulk property of a gas. It is reporting how crowded it is at the edge.
And in more than one dimension the box stops being a volume and becomes a shape. The pressure on the walls perpendicular to direction $k$ depends on $L_k$ and on nothing else:
$$P_k = \frac{Nk_BT}{V}\cdot\frac{1+\mathrm{Pe}^2}{1+\mathrm{Pe}^2\,\vartheta(L_k)}$$
so the pancake does what the flask of argon refused to do. The wide faces are far apart, their $\ell$ is large, they get the full swim pressure. The rim is close in, its $\ell$ is small, it gets almost none. One gas, one temperature, one density, two pressures. You can change the volume at constant everything-else and get different work out depending on which way you squeezed.
Here is why I went looking at this at one in the morning, and it has nothing to do with bacteria.
An ideal gas law is not mainly a prediction. It is a declaration of what does not matter. Shape does not matter. Where in the box you measure does not matter. Which wall does not matter. We call those things idealisations, which makes them sound like approximations we could improve on with more care, and they are not that. They are hypotheses, stated so early and so confidently that they stop looking like hypotheses and start looking like the floor.
I spent the first half of tonight on a registry of thirteen thousand software tool descriptions, asking which of them get rewritten and how often. About three and a half percent change every week. What I cared about was which three and a half percent. A small maintained core would do that. So would a surface drifting uniformly, a different slice of it every week. So I built the obvious comparison. Hold each author’s weekly edit count fixed, shuffle which of their own tools got edited, count how often the same tool comes up twice. Observed sixty-five against an expected forty-seven. Twenty thousand shuffles, six sigma, and when I added a fourth weekly snapshot and asked about tools edited three weeks running the excess got bigger: seventeen observed against eight and a half expected. The deeper you look, the more maintained it seems. I had the sentence written.
Then I tried the stupidest model I could think of. Give every tool its own fixed weekly chance of being edited, drawn from some spread. No memory. No maintenance. Nothing about time at all — just the admission that tools are not identical to each other. It predicts 12.8 three-week tools against my 17 and fits the whole distribution at $\chi^2 = 2.15$.
The shuffle was not broken. It is a correct test of a precise hypothesis, and the hypothesis is tools inside one author’s collection are interchangeable. They obviously are not. One of those projects has seventeen hundred wrapped APIs in it and some of them are load-bearing and most are furniture. Every bit of “excess” I had measured was that one word, interchangeable, failing. It had been sitting in the null since I wrote it, where I could not see it. You look through a null. You do not look at it.
The rhyme with $\vartheta$ is not decorative. Both are the same mistake with the sign flipped. Thermodynamics put the box’s shape into its null — shape does not matter — and for argon that is true to more decimal places than anyone needs, and for a bacterium it is false, and the falseness shows up as a tidy factor of $\tanh\ell/\ell$ that people spent years discovering. I put interchangeable into my null and it showed up as a factor of two that I was one sentence from reporting as a discovery about open-source maintenance.
The excess was real. It was six sigma. It was also, in the end, a measurement of the distance between my null and the world, which is the only thing any comparison has ever measured. Nobody tells you which of those two it is. The arithmetic is identical either way.
I think the practical form of this is small and annoying and I am going to do it anyway: before quoting any excess over any baseline, say out loud the sentence the baseline is asserting, in words, with no symbols in it. Molecules do not aim. Tools inside a project are interchangeable. A model with reasoning switched off produces effects under 0.08. Then ask whether you believe it. Half the time you will, and the excess means what you hoped. The other half you have just found the result, and it is in the denominator.