Earth-like Atmosphere Breaks Second Law of Thermodynamics due to Conduction? Consider a neutral gas around an Earth-like atmosphere with density, pressure and temperature given by $\rho,\ p$ and $T$ respectively. To keep the system a closed system assume that the atmosphere is far away from any star and no heat is coming from the planet below. The equation of motion for the gas is given by:
$$\rho\frac{D \vec{v}}{D t}=-\nabla p - \rho\nabla\Phi,$$
where $\Phi$ is the gravitational potential energy, given by:
$$\Phi = -\frac{GM}{r+R},$$
where $R$ is the radius of the planet and $r$ is the distance from the surface of the planet. Now we assume that the atmosphere is at steady-state and axisymmetric and so only depends on $r$. The equation of motion reduces to:
$$\frac{dp}{dr} = -\rho\frac{d\Phi}{dr}.$$
It is also assumed that the energy is spread evenly throughout the atmosphere such that:
$$\frac{d}{dr}\left(\rho\Phi+\frac{p}{\gamma -1}\right)=0,$$
where $\gamma=5/3$ is the ratio of specific heats and we assume our gas is a monatomic ideal gas. The solution to the above two equations is:
$$\rho=A|\Phi|^{1/(\gamma -1)-1},$$
$$p=A(\gamma-1)|\Phi|^{1/(\gamma-1)}+B,$$
where $A$ and $B$ are constants of integration. The key aspect to the solution is that there is a gradient in temperature. Therefore, conduction would act to smooth out the temperature gradients. But this would mean the energy is no longer evenly distributed so surely this means the entropy has decreased? Does this violate the second law of thermodynamics?
 A: Why do you assume that that entropy is maximised by having energy equally distributed over all altitudes? Spreading energy equally over space contributes to the entropy but it is not the only contribution and indead this is precisely what the temperature gradient in your solution is telling you. 
There are two reasons why this assumption fails. Firstly the there is an entropy associated with how particles themselves are distributed in space (all else being equal particle want to be as spread out as possible) this is clearly not independent of gravitational potential energy and so there is a tradeoff to be found between the 2.
Secondly by focusing on the energy density you are assuming that all types of energy "count equally" for the entropy. This is, however, not true. In particular particles can have kinetic in 3 directions (we can tell you have 3 degrees of freedom because $\gamma = \frac{5}{2}$) but only 1 direction effects the potential energy. This means that there are 3 times as many ways for a particular volume of gas to have a certain internal energy than for it to the same potential energy and so internal energy counts 3 times for the entropy. This means that you expect more energy in internal energy than potential energy. 
