Maxwell's demon is a thought experiment in which physicist James Clerk Maxwell suggested how the Second Law of Thermodynamics might hypothetically be violated. Basically, a demon controls a small door between two chambers of gas. As individual gas molecules approach the door, the demon quickly opens and shuts the door so that fast molecules pass into the other chamber, while slow molecules remain in the first chamber. Because faster molecules are hotter, the demon's behavior causes one chamber to warm up as the other cools, thus decreasing entropy and violating the Second Law of Thermodynamics.
So what if you flip the image above 90% clockwise and assume the existence of gravity in the direction of that yellow arrow?
Inside a vertical cylinder full of gas, the pressure should be lower at greater heights (e.g., greater distance from the gravity exerting center) --akin to the atmosphere above our heads-- considering that the pressure
p exerted by a column of fluid of height
h and density
ρ is given by the hydrostatic pressure equation
p = ρgh, where
g is the gravitational acceleration.
In our flipped image, A is the top half of the column, and B the bottom half. The column height above molecules in A is then of course less than that of molecules in B. Finally, due to the ideal gas law a difference in pressure between A and B corresponds to an equivalent difference in temperature between A and B.
Unless gravity indeed manifests itself as Maxwell's demon, thereby violating the 2nd law of thermodynamics; I must have missed something. What is that something?