# How can an *increase* in atmospheric temperature cause an *increase* in the atmospheric mass density?

We often hear that heating Earth's atmosphere from solar activity or CMEs increases the mass density of the atmosphere at a given altitude, causing orbiting spacecraft to lose altitude faster from increased drag.

Most space fans are familiar with the Ideal Gas Law: PV = NRT, where P is pressure, V is the volume of a gas parcel, N is the number of moles of the gas, R is the universal gas constant, and T is the temperature on an absolute scale (like Kelvins). People who like dealing with individual atoms or molecules express it as PV = nkT, where n is the number of gas particles (either atoms or molecules) and k is Boltzmann's constant.

Regardless of which equation you use, you find (via some simple algebra to rearrange the equation) that if you increase the temperature of a gas parcel without changing the pressure or the number of particles involved (N or n), then the volume must increase in proportion to temperature, and that decreases the mass density!

So how can the statement in the first sentence be true? How can a temperature increase result in a mass density increase??

• The effect is real (agupubs.onlinelibrary.wiley.com/doi/pdf/10.1002/2014JA019885) and this paper (ann-geophys.net/34/725/2016/angeo-34-725-2016.pdf) may be describing the why, but it's beyond a simple aerospace engineer's reading level. Perhaps you can make something of it. Hint: It doesn't use the ideal gas law. – Organic Marble Aug 2 '18 at 22:23
• Very nice question! ;-) – uhoh Aug 2 '18 at 22:48
• @OrganicMarble , I asked this question in response to some comments on another question, folks not understanding how this could happen, and answering those queries in a way useful for non-Ph.D. folks would take more characters than a comment. Thanks for the references! I downloaded them and will give them a look. Scientists and engineers often use different language: one group says "optical depths", the other says "dB", etc. This sometimes makes it difficult for someone to read the other group's publications. – Tom Spilker Aug 3 '18 at 0:47

The key concept is that for a satellite at a fixed altitude, when the atmospheric temperatures below its altitude increase, atmospheric expansion pushes more atmosphere up above the satellite! At the satellite's altitude the pressure must increase to support the weight of that additional atmospheric mass above, and the increase in pressure outweighs the increase in temperature.

I'm going to make some simplifying assumptions that, although not descriptive of Earth's actual atmosphere, won't change the general result. I'll assume the atmosphere is isothermal, i.e. the same temperature regardless of altitude (it's not). And I'll assume that g, the acceleration due to gravity, is constant regardless of altitude (it's not). Later on I'll say why these don't change the conclusions.

I'll rearrange the Ideal Gas Law to yield mass density. The first rearrangement gives $$\frac{N}{V} =\frac{P}{RT}$$ N/V is the number of moles per volume, or the molar density. Since N is the total mass of all the molecules in the parcel, m, divided by the average molar mass $\mu$, $$\frac{m}{\mu V} =\frac{P}{RT}$$ or $$\frac{m}{V} =\frac{P\mu}{RT}$$ and m/V is just mass density.

A parameter central to atmospheric science and dynamics is the scale height, which is the vertical distance you have to travel to change the atmospheric pressure by a factor of e; e if you go downward, 1/e if you go upward. Usually denoted by H, it is given by $$H =\frac{RT}{\mu g}$$ where R is the universal gas constant, T is temperature in absolute units (like kelvins), $\mu$ is the average molar mass of the air mixture, and g is the acceleration of gravity.

Since I'm keeping T, g, and $\mu$ constant, H is a constant for this analysis.

An isothermal atmosphere has a vertical pressure profile given by $$P(h) = Po e^{-h/H}$$ where Po is the pressure at some specified altitude (like sea level), h is the altitude with respect to the specified reference altitude, H is the scale height, and P(h) is the pressure at altitude h.

Now imagine a layered, isothermal (for now) atmosphere with 10-km layers. Each layer supports all the layers above it. Assume a typical scale height for Earth's lower atmosphere of 8 km. Then at the top of a layer, the pressure would be $$P(top) = P(bottom) e^{-10/8}$$ or ~1/3.5 of the pressure at the bottom.

Now increase the temperature of the entire lowest layer by 10%, expanding it by 10% per the Ideal Gas Law, so now it's 11 km thick, with the pressure at its top unchanged. It pushed all the higher layers up by 1 km and is still supporting their weight, which hasn't changed (due to constant g).

Now do the same for the next higher layer—another 1 km rise for the layers above that one. The top of layer 2 is now 22 km up instead of the original 20 km, and everything above it has been pushed up by 2 km.

Do that another 8 times, for successively higher layers. Now the top of the 10th layer is at 110 km, where the top of the 11th layer used to be, but it's still at the original top-of-the-10th pressure. The pressure at the top of the 10th is the same as the pressure at the bottom of the 11th, so the pressure at the top of the 11th is ~1/3.5 of the pressure at the top of the 10th.

At h = 110 km, before the heating, the pressure was that of the top of level 11 (~1/3.5 times the pressure at the top of level 10), and the temperature was the original isothermal temperature, call it To. Calculating an expression for the original density at 110 km, defining Po as the original pressure at the top of level 10: $$\frac{m}{V} =\frac{(Po/3.5)\mu}{RTo} = \frac{1}{3.5} \times\frac{Po \mu}{RTo}$$

After heating, the pressure at h = 110 km is now the pressure of the top of level 10 and the temperature is up by 10%. Now calculate an expression for the density at 110 km after that heating: $$\frac{m}{V} =\frac{(Po)\mu}{R(1.1\times To)} = \frac{1}{1.1} \times\frac{Po \mu}{RTo}$$

The second is greater than the first by a factor of ~3.2! This arises from the fact that the entire mass of layer 11, which originally was beneath the 110 km altitude, is now above the 110 km level, so the pressure at 110 km must increase enough to support that added weight.

Note that this upward movement is a result of increasing the temperatures of layers below the 110 km altitude. If you increase the temperatures of layers above the specified altitude, it has no effect on the density at the specified altitude, other than a transient due to accelerating air upward.

For those who don't like the isothermal assumption, fine: make the temperature variable. Now, instead of 10 km layers, have 1 m layers, each at its own temperature, which in each layer will be very nearly constant over that 1 m altitude change. Change the temperature of each by 10% and do the expansion, and voila!: you get the same net result—after a lot more iterations through the process.

Gravitational acceleration does indeed decrease with altitude, increasing the scale height (g is in the denominator of that equation), but for an altitude change of 110 km it varies less than 4%, not enough to offset that factor-of-3+ increase seen in the analysis above.

As Mark Adler says, the reality is much more complicated, but this treatment helps to see why the density increase occurs. During real atmospheric heating events (solar flares, coronal mass ejections) the heating occurs well above the surface—nobody not in the space business ever notices it—but significant portions of it occur at altitudes below normal LEO, so it affects LEO birds.

• Based on the way you posed the question, I think there should be something about why the Ideal Gas Law doesn't apply, and the answer to that would roughly be that the Ideal Gas Law assumes the gas is in a container, where the molecules rebound off walls (or off of gas around it etc). This doesn't hold at the top of the atmosphere. – Erin Anne Aug 3 '18 at 17:37
• @ErinAnne , Actually no, the Ideal Gas law doesn't assume a container per se, it just assumes a parcel of gas that doesn't exchange energy or matter with its surroundings, i.e. it's isentropic. The Ideal Gas Law doesn't apply here because the gas around the satellite after expansion is not the same parcel of gas that was there before expansion (heating). Notably, the enthalpy of the gas around the satellite after expansion started out different from that of the pre-expansion gas that was around the satellite. – Tom Spilker Aug 3 '18 at 21:29
• wow I managed to misread that quite badly. Thanks for re-explaining. – Erin Anne Aug 4 '18 at 1:08
• Wow-- I was entirely wrong in my earlier comment, thanks for explaining-- I never had considered the atmosphere could temporarily expand beyond what it currently is. But it makes a LOT of sense. Thanks again sir! I used to see it as anne said--the atmosphere is a container! Rather its a layer upon other layers, where one infinitesimal layer just happens to be the end with no specified altitude due to many factors. – Magic Octopus Urn Aug 5 '18 at 23:24

The scale height is proportional to temperature. As the scale height increases, the density above about one scale height increases. (The density below that decreases.) This is what you'd expect if the whole atmosphere gets heated. In short, the atmosphere blooms, so you are simply getting more particles higher up.

The reality is way more complicated than that though, since the thermosphere is not in equilibrium, is not close to an ideal gas, and is partly a plasma. Oh, and gravity varies enough that scale height doesn't quite work anymore.

This paper discusses modeling density changes in the thermosphere in response to a geomagnetic storm.

• Since you decided to answer an easy question (likely targeted to new users) rather than a hard one can you at least mention very roughly, below what altitude does the density slightly drop during a "bloom" in order to conserve total number? – uhoh Aug 2 '18 at 23:14
• Sorry, I don't know how to answer this very roughly. The altitude at which two exponential density distributions of equal mass are equal is exactly $h_1 h_2\left(\log{h_1}-\log{h_2}\right)\over h_1-h_2$, where $h_1$ and $h_2$ are the two scale heights. Below that the density of the longer scale height (higher temperature) is lower. Above that the density of the longer scale height is higher. – Mark Adler Aug 2 '18 at 23:49
• Okay I'll try to do some further reading. – uhoh Aug 3 '18 at 0:32

Here's the density profile of an isothermal atmosphere of fixed total mass 1, $$\rho(h) = \frac{\exp(-h/h_0)}{h_0}$$ animated over different temperatures (and thus different scale heights): We see that, whilst the density at ground level indeed always decreases with rising temperature, the density at greater heights increases at first, as the temperature drives the atmosphere to greater expansion.

import Graphics.Dynamic.Plot.R2
. continFnPlot $\h -> exp (-h/h0)/h0 | h0 <- [0,0.06..]] , forceXRange (0,10), forceYRange (0,0.5) , xAxisLabel "ℎ", yAxisLabel "𝜌" ]  • Well, the plotted function is just \h -> exp (-h/h0)/h0, i.e.$\rho(h) = \frac{\exp(-h/h_0)}{h_0}$. Simply normalised to$\int\limits_0^\infty\!\mathrm{d}h\:\rho(h) = 1\$. It does go to zero, but that doesn't represent the centerpoint of Earth but the surface. (And the gravity potential is not central but homogeneous, which is a good approximation if the scale hight is much smaller than the radius, as it is on all planets). – leftaroundabout Aug 3 '18 at 11:34