Temperature distribution in a column of air Say there is a sealed cylinder of air that has a height $\mathrm{h}$ and area $\mathrm{A}$ on the ends. The initial temperature throughout the column is $T_0$ and has a uniform initial density $\rho_0$. If the bottom of the cylinder is at sea level, what is the temperature at the top of the cylinder when the system reaches equilibrium?
As we know, hot air rises and cold air sinks. So it stands to reason that the bottom will be cooler then the top in a very tall air column. However is there a formula?
 A: CAVEAT - I am giving a possible calculation, but I believe the answer may be off by a factor 2x (compared to the lapse rate observed in the atmosphere). I am leaving it here for you to ponder. Perhaps it can inspire you to find the correct solution yourself. Or perhaps the difference is due to the fact that this calculation doesn't assume convection - so that the adiabatic expansion terms in the derivation of lapse rate don't apply.

If the column of air is sealed we should probably assume there is not much air flow. In the steady state, we can use conservation of energy to solve this.
First - assume that the sum of (mean) kinetic and potential energy of the molecules is constant, independent of height. We know that at a given temperature the kinetic energy of a light diatomic gas (like most of the components of air) is
$$KE = \frac52 k_B T$$
Where the factor 5 comes from 5 degrees of freedom (3 translation, 2 rotation). Now the potential energy for a molecule of mass $m$ is $PE = m~g~h$. For air we will use an "average" mass of 28.8 amu (20% oxygen, 80% nitrogen; ignoring CO2, water, argon, ...). If the sum of $KE+PE$ is constant, then
$$m~g~h + \frac52 k_B T = \rm{C}$$
This means that there will be a linear change in temperature with height:
$$T(h) = T(0) - \frac{2mgh}{5 k_B}$$
Putting in numbers, we get
$$T(h) = T(0) - 0.014 h$$
which results in a temperature change of 1 K for every 70 meters. In reality, the slope in the atmosphere (according to this NASA page) is about 0.00649 K/m
That's about a factor 2x off from my calculation. I don't know what simplifying assumption I am making (or whether there is simply an arithmetic error in my work).
A: To know whether a column of fluid is in equilibrium, you take a fluid element anywhere in the column, displace it by a small amount (compared to column height) in any direction, and see what forces come to act on it; if the forces are such that they push (or pull) the fluid element back to its initial position, then the fluid column may be said to be in equilibrium. Under the action of gravity, we check for displacement along vertical direction. Forces that act on displaced fluid parcel are then due to fluid parcel's density being different from that of its surroundings. Therefore we need to know how fluid parcel's density changes when it is displaced. For that we need to assume some thermodynamic process that fluid element goes through when it is displaced.
For a short fluid column, we may safely assume that displacement process is isobaric. Further if the fluid is single phase, single component, then and only then does density of fluid become function of its temperature alone, and so you can say "hot air rises and cold air sinks". This is the situation we mostly encounter in day-to-day life.
However you may easily set up a stable "cold on top, warm at bottom" fluid configuration by using say, water on top of brine , or oil on top of water, with bottom fluid heated to an appropriate temperature. My point is, just because the system is stable does not imply that bottom fluid is colder than top fluid (and vice versa). You must always compare density.
If the fluid column is very tall, like in atmosphere, pressure decreases with height, and assumption of isobaric displacement process would not be proper. Usually reversible-adiabatic (viz. isentropic) displacement process is assumed, and this is justified by saying that air being poor conductor of heat, in the time the displacement of a fluid element takes place, it would lose negligible amount of heat. If an air parcel is displaced upward then due to decrease in pressure, its temperature and density decrease (recall, $p/\rho ^\gamma=$constant). The question is whether the density has decreased to such an extent that it is less than atmospheric density at that level; if it has then the column is unstable, otherwise stable. Same calculation ought to be repeated for downward displacement too (just to be sure), but the logic is the same.
For more details read up any book on atmospheric thermodynamics.
A: I would expect an isotherm systen since diffusion, heat conduction and radiation should eliminate any differences in the adiabatic system after some time.
The reason the atmosphere of earth has a temperature gradient is just that the earth is not adiabatic, but has a heat source at the ground (heated by the sun) as well as some absortion in the atmosphere (probably as a function of the pressure (or height)).
A: A more simple answer would be Boyles law:
$$\frac{P_1V_1}{RT_1}=\text{constant}$$
since volume remains constant a first approximation would be $T2=P_2T_1/P_1$ and using $P_2=P_1-\text{density}\cdot\text{height}\cdot\text{gravity}$. A more complete answer would need the density to be corrected for temperature though out the column
