In the entropy formula, how do we know which one is a valid microstate for a particular macrostate?

Consider a very long vertical cylinder containing air in thermodynamic equilibrium. Observe that the air column is necessarily bottom heavy. The macrostate is described in part by a pressure gradient that is due to gravity. All corresponding microstates for this particular macrostate will have a matching density distribution. It seems that a top heavy distribution of the air molecules is not a valid microstate of that macrostate. And neither is a uniform density distribution along the cylinder length. When gravity is reversed, the density distribution also reverses.

When the gravity force is removed or equalized along the cylinder's length by turning it horizontal, it seems the density distribution necessarily becomes uniform in equilibrium. A microstate where all the air molecules are concentrated in one area appears to not be a valid microstate of that macrostate because the density gradient causes a pressure gradient (all else equal) that is different than the uniform pressure of the uniform density system, hence the two macrostates are not identical.

Can we therefore say that entropy forbids density fluctuations in a gas-filled system in thermodynamic equilibrium? In other words, can we say that the only valid microstates of a particular macrostate are those that always match the macrostate parameters?

Remember that macro state parameters are derivable from the distribution of micro states. Concretely, macro state parameters like pressure, density etc are averages over micro states of like velocity, number density etc.

It is not true that for a gas in a gravitational field, the uniform density micro state does not contribute because it does not reproduce the correct bulk parameter. Instead the statistical interpretation would be that this micro state occurs with a very low probability in comparison to the micro state that is bottom heavy, which occurs with a very high probability. Therefore when one averages over all possible micro states, the average is dominated by the bottom heavy configurations thereby reproducing the correct macrostate parameter.

• Interesting. However, how are the macrostates averages over microstates? If there were any fluctuations, won't we measure them in the macrostates? But the whole point of a macrostate is that it's perfectly described by its static parameters. And that the system is in thermodynamic equilibrium. Furthermore, does it make sense to be able to extract work from a transition between microstates of the same macrostate (such as from top-heavy to bottom-heavy state)? Oct 22, 2020 at 17:30

It depends on the setup which constraints are put on the microstate. For example the microcanonical ensemble assumes that the system is entirely isolated from the environmnent so necessarily energy has to be conserved. The microcanonical ensemble doesn't forbid the state where all particles are at the top as long as energy is conserved. So some of the system's kinetic energy has to be converted into potential energy. In the canonical ensemble it is only assumed that the system is in contact with a heat bath so energy is not necessarily conserved for the system.

The microstate where most of the particles are at the top is a valid microstate. In fact in the microcanonical ensemble each microstate has equal probability. But there are a lot more microstates where the particles are distributed in a more sensical way (more at the bottom, less at the top). Similarly if you toss a million coins the outcome of all heads is a valid microstate. But since the probability of getting all heads is $$1/2^{1000\,000}\approx 10^{-300\,000}$$ I can tell you that this will not happen in our lifetimes. The chance of getting exactly half a million is $$\sim 0.0008$$ which is a lot higher. Since gasses often contain at least a mole $$\sim6\cdot 10^{23}$$ of molecules we can guarantee that the gas will always be in a 'sensical' microstate even though nonsensical ones are still possible. So no, density fluctuations are possible and thermodynamics even makes predictions about these fluctuations.

What do I mean by sensical states? With sensical I mean a state that is in thermodynamical equilibrium which in term means the entropy is maxized. Maximum entropy means a maximum number of microstates by Boltzmann's law. I can force the system in a non-equilibrium state by turning the bottle upside down but the second law of thermodynamics says the entropy always has to increase (or stay the same). Once the entropy is maximized we can say it's in thermodynamical equilibrium and we can use the machinery of thermodynamics since technically thermodynamics only considers systems in equilibrium.

• How can the top-heavy microstate be valid when the pressure gradient of that microstate doesn't match that of the macrostate? And how can the coin analogy be valid when they're not subject to gravity, and when those events are IID as apposed to air molecules which clearly interact with one another? Oct 22, 2020 at 17:20