Hi, have searched around but can't find what im looking for (probably because im not entirely certain what its called) An elemental gas in a contained volume, say microcanonical for simplicity, will have atoms that bounce against the walls. Is there an equation for the average density of the gas with respect to position? Everywhere I see (such as Van der Walls equation) presumes a constant density across the volume. Is this simplification justified? Or do atoms on average hang by the walls, or in the middle? Presumably in a more complicated system, gravity included, they hang closer to the bottom. If we allow energy exchange between the walls and the gas, will this average position change? Speed is related to the temperature kT, is this position also? Pointing me in the right direction on this will be greatly appreciated. Thanks.