Let’s say that we have a big sphere filled with gas, and in its center a solid core of a very dense material. The sphere is in equilibrium, alone in space. Because of the gravity of the core the gas density shouldn’t be uniform, and the pressure near the core should be higher. But I was taught that in equilibrium thermodynamic parameters like temperature and pressure are uniform in a gaseous phase. Can anyone explain this apparent incongruence?

• Thermodynamic works a bit differently when gravity is involved. You still have equilibium on small enough scales, though. Basically, thermodynamics books usually assume that the system you are studying is "small enough". – valerio Feb 16 '18 at 10:21
• Indeed. Just see at various depth suffices to show the same. Tough a star is even more complex . – Alchimista Feb 16 '18 at 12:11

Thermodynamic equilibrium requires both thermal equilibrium (a uniform temperature) and mechanical equilibrium. In the absence of a gravitational field, the latter requires a uniform pressure. However in the presence of a gravitational field a pressure gradient is required for mechanical equilibrium and is therefore required for thermodynamic equilibrium.

On small scales the temperature would be uniform in your gas sphere, so the approximation of thermodynamic equilibrium can be made. This is often termed local thermodynamic equilibrium. For example, the temperature may not change significantly over the distance between where a photon was emitted and absorbed in the gas.

However, for real balls of gas - e.g. a star, this cannot be true on large scales since energy flows (even in the absence of nuclear reactions) from the centre to the surface via convection and radiation (and perhaps conduction). As a result there is also a temperature gradient and indeed heat is radiated away from the surface. Therefore the ball of gas cannot be in global thermodynamic equilibrium except as a rough approximation.

• @valerio The pressure does not need to be uniform to be in mechanical (hydrostatic) equilibrium if there is a gravitational field present. – Rob Jeffries Feb 16 '18 at 18:44
• I agree with valerio, beside, if there is equilibrium we can write U = U(S,V,…) and then the pressure is the partial derivative of the energy wrt volume, so it must be uniform (if the thermodynamic approach hold). – Rob1019 Feb 16 '18 at 18:45
• I agree with him that pressure must be uniform, I mean if there is a thermodynamic state there must be a "system pressure". And equilibrium was itroduced to me "formally" as the codition for the system to have a macroscopic state. – Rob1019 Feb 16 '18 at 18:56
• @Rob1019 I agree that thermodynamic equilibrium means thermal and mechanical equilibrium. However, whilst the former requires a uniform temperature, the latter does not require a uniform density, temperature or pressure if you are in a gravitational field. Indeed, it requires a pressure gradient. – Rob Jeffries Feb 16 '18 at 18:56
• "But I was taught that in equilibrium thermodynamic parameters like temperature and pressure are uniform in a gaseous phase. Can anyone explain this apparent incongruence?" Yes. You weren't taught correctly if you were told this is applicable in a gravitational field. – Rob Jeffries Feb 16 '18 at 18:58

But I was taught that in equilibrium thermodynamic parameters like temperature and pressure are uniform in a gaseous phase.

This is only true when gravity is not involved. Just consider the simple problem of a tall container filled with an ideal gas. If you impose mechanical (hydrostatic) equilibrium, you will find that the pressure of the gas as a function of height $h$ is given by the equation

$$P(h) = P(0) \exp\left(-\frac{mgh}{kT}\right) \tag{1}$$

where $m$ is the mass of a gas molecule, and therefore it's definitely not uniform in the container ((1) is known as the barometric formula).

In thermodynamics books, you are working most of the time under the assumption that the effects of gravity are negligible. This assumption makes perfect sense: to see this, try to use (1) with the average molecular mass of air ($29$ amu) and calculate the relative variation of pressure with an height difference of $1$m, which is an exaggeration of what you may expect to have in an actual lab experiment:

$$\frac{\Delta P}{P} = \frac{P(1\text{m})-P(0)}{P(0)}$$

In general, thermodynamic equilibrium requires thermal, mechanical and chemical equilibrium. Thermal equilibrium means uniform $T$, chemical equilibrium uniform $\mu$. When the effects of gravity can be neglected (small systems), mechanical equilibrium implies uniform $P$ (or equivalently uniform $\rho$, density). However, when the effects of gravity cannot be neglected (large systems), mechanical equilibrium does not imply anymore uniform $P$, as shown by the above example (equation (1)). Thermodynamics still applies, but you cannot assign a single value of $P$ to the whole system. However, if you consider small enough (but still macroscopic!) subsets of the whole system, you can continue to apply thermodynamics as you know it from the books, i.e. with uniform values of $T,\mu,P...$ in the whole (sub)system.

• So, if I understood correctly, you are saying that classic thermodynamics doesn’t apply “perfectly” to a big system with gravity and everything, we have to break it in smaller chunks with a definite thermodynamic state. Practically even in equilibrium that big system doesn’t have a “macrostate”. – Rob1019 Feb 16 '18 at 18:53
• Why are you querying my answer when you have presented here a solution in mechanical equilibrium where the pressure is not uniform! But it is in thermal equilibrium because you have assume a constant $T$! – Rob Jeffries Feb 16 '18 at 19:03
• @RobJeffries Sorry Rob, see my last comment to your answer. I got confused: I thought that you were omitting mechanical equilibrium, but you were not. And also, I was thinking about small systems when writing the comment, so I wrote the thing about uniform pressure...My bad. – valerio Feb 16 '18 at 19:25
• @Rob1019 When gravity is present pressure is not uniform at mechanical equilibrium, as explained by Rob in his answer (and as I can try to show in mine). Then yes, if you consider small subsets of the system you can often neglect the effects of gravity and apply the usual thermodynamics, where "thermodynamic equilibrium" means uniform $T,P,\rho$ etc. – valerio Feb 16 '18 at 20:59