Saturday, March 29, 2014

The Ideal Gas Law, Free-Body Diagrams, and the Interiors of Stars: Hydrostatic Equilibrium

A Hydrostatic Haiku:
Gravity Pulls Down
Down, Inexorably Down
P briefly impedes

Consider the Earth's atmosphere by assuming the constituent particles comprise an ideal gas, such that $P = nk_b T$, where $n$ is the number density of particles (with units cm$^{-3}, k_b = 1.4 \times 10^{-16}$ erg K$^{-1}$ s is the Boltzmann constant. We'll use this ideal gas law in a bit, but first:

a-b) Think of a small, cylindrical parcel of gas, with the axis running vertically in the Earth's atmosphere. The parcel sits a distance $r$ r from the Earth's center, and the parcel's size is defi ned by a height $\Delta r < < r$ and a circular cross-section area A. The parcel will feel pressure pushing up from gas below ($P_{up}  P(r)$) and down from above ($P_{down} = P(r+\Delta r)$).  What other force will the parcel feel, assuming it has a density $\rho$ and and the Earth has a mass $M_\oplus$. Make a drawing of this.

Here, we're looking at a snapshot of an object. At this point, it doesn't matter whether the cylindrical parcel contains gas, the new Kindle you ordered (dropped from one of Amazon.com's drones), or a cylindrical cow. Whatever it is, it has a cross-section $A$ and a height $\Delta r$, and it's in the air--floating, rising, falling, it doesn't matter yet--at a height $r$.

What we want to do now is draw a free body diagram of the forces currently acting on our object. As the problem's setup explains, there's both an upward and downward force exerted by pressure ($P_{up}$ and $P_{down}$). Finally, and perhaps most obviously, there's the force most of us would think of first when considering what'll happen to an object floating in the air: gravity, $F_g$ (which, of course, is another downward force). Here's what it looks like:

Each force is labeled, with the arrows pointing in the direction in which they are acting.

c) If the parcel is not moving, give a mathematical expression relating the various forces, remembering that force is a vector and pressure is a force per unit area. 

Our next step is to essentially treat this like a static equilibrium problem, setting the sum of the upward forces equal to the sum of the downward forces (multiplied by negative one, since they are pointing in different directions) so that the parcel can sit where it is without moving. Pushing down on it we have $F_g$ and $P_{down} \times A$ (since pressure acts on the entire top surface area), while $F_{up} \times A$ is pushing up (again, because the upward pressure is distributed over the bottom surface). So, in its most general form, the expression we're looking for is \[F_g + P_{down} = -P_{up}\]

d-e) Give an expression for the gravitational acceleration, $g$, at a distance $r$ above the Earth's center in terms of the physical variables of this situation. Finally, show that \[\frac{dP(r)}{dr} = -\rho g\] This is the equation of hydrostatic equilibrium. What does it ``say" in English? Does it make sense? 

What we need to do here is figure out exactly what each of the terms in that last equation is. $F_g$ is defined as mass, $m$, times gravitational acceleration, $g$. On Earth's surface, $g$ is right around 10 m s$^{-2}$, but in order to generalize this we need to go a step farther back to the actual equation for $g$, $g = -\frac{GM}{r^2}$. In this case, since we're talking about the Earth, $M$ is $M_\oplus$, so $g = -\frac{GM_\oplus}{r^2}$. Now let's factor this into $F_g$. If we define the density of the gas in the parcel to be $\rho$, then mass is density times volume--or $\rho A \Delta r$, meaning $F_g = -\rho A \Delta r \frac{GM_\oplus}{r^2}$. However, for visual simplicity's sake, let's just keep $\frac{GM_\oplus}{r^2}$ as $g$, meaning $F_g = -\rho A \Delta r g$.

Next, let's consider how pressure is behaving and put all of this together. The problem's setup defines pressure as a function of height, $P(r)$, so $P_{up} = P(r)$ and $P_{down} = -P(r + \Delta r)$. Plugging these back into the general equation, we have \[P(r) A= -P(r + \Delta r) A - \rho A \Delta r g\] This can, however, be simplified quite a bit. Let's begin by putting the pressure terms on one side and canceling out each A, giving us \[P(r)+P(r+\Delta r) = - \rho \Delta r g\] Next, let's divide both sides by $\Delta r$, so that we have \[\frac{P(r)+P(r+\Delta r)}{\Delta r} = - \rho g\]This may look familiar to some folks as the definition of the derivative--so the entire left side is actually $\frac{dP(r)}{dr}$!. Thus our final answer, which puts our package in static equilibrium (or, more properly, hydrostatic equilibrium) is\[\frac{dP(r)}{dr} = -\rho g\] This actually tells us quite a lot. The easiest way to think about it is imagining what happens to the equation overall as the various terms change. The denser (and thus, heavier) our parcel is, the more $P(r)$ changes as a function of $r$. If the parcel is in the air over a more massive planet, thus increasing $g$, $P(r)$ will change more if the parcel gets nudged slightly higher or lower.

Hydrostatic equilibrium is why our Sun, and other stars like it, do not contract due to their enormous gravity, nor do they expand due to the enormous pressure of their interior gas. The forces balance each other out (source).

f) Now go back to the ideal gas law described above. Derive an expression describing how the density of the Earth's atmosphere varies with height $\rho(r)$. Recall that $dx/x = dlnx$.

This is more or less a matter of plugging and chugging. We'll start by solving our final equation above for $\rho$ and plugging in $nk_b T$ for $P(r)$. Before we do, however, let's get rid of that $n$, reflecting the number density of particles, since it's just not a very useful or informative term, and we can represent it in terms of variables we're already using: mass and density (or more specifically, mass divided by density). This gives us \[\rho = -\frac{1}{g}\frac{d\rho}{dr}(\frac{ k_B T}{m})\] Next, let's solve for $dr$ on the left and get all of the constants and $\rho$ terms on the right, so that we have\[dr = -\frac{k_B T}{mg} \frac{d\rho}{\rho}\]. Now we'll integrate both sides to give us an actual function for $\rho (r)$. this is where that hint about $dx/x$ will come in handy, since that's exactly what we have on the right side of our equation (with $\rho$ in place of $x$). What we end up with, then, is \[r = -\frac{k_B T}{mg}ln(\rho) + c\] Where c is the constant resulting from integrating--we'll get to in a bit. However, what we need to do first is solve for $\rho$ (or more properly, $\rho (r)$, first by subtracting $c$ over to the other side and dividing by $-\frac{k_B T}{mg}$, then by raising $e$ to each side in order to get $\rho$ out of that natural log. This gives us \[\rho (r) = e^{-\frac{rmg}{k_B T} - c}\] Finally, we can pull that $c$ out of the exponent and make it a coefficient, and think about what it actually means. When $r=0$, $\rho (r)$ will just be equal to whatever that $c$ is, so really it's reflective of the "initial conditions" of our setup--more properly, $c = \rho_0$. Thus, our final expression is \[ \rho(r) = \rho_0e^{-\frac{rmg}{k_B T}}\]

This pretty neat graphic shows, among other interesting things, the fall-off in density of $N_2$, $O_2$, and $O$ at increasing altitude (source).

g) Show that the height, $H$, over which the density falls off by a factor of $1/e$ is given by\[H=\frac{k_BT}{\bar{m}g}\] where $\bar{m}$ is the mean mass of a gas particle. This is the \scale height." First, check the units. Then do the math. Then make sure it makes physical sense, e.g. what do you think should happen when you increase $\bar{m}$? 

Let's start with the unit check. $k_B$ has units of energy $\times$ temperature$^{-1}$, while $g$ has units of length $\times$ time$^{-2}$. $m$ and $t$ obviously have units of mass and temperature respectively, and $H$ has units of length, so the equation overall works out to\[\textrm{length} = \frac{\textrm{energy} \times \textrm{temperature}^{-1} \times \textrm{temperature}}{\textrm{mass} \times \textrm{length} \times \textrm{time}^{-2}}\] At first this doesn't seem to work out exactly right, until we realize that energy actually has units of its own--mass $\times$ length$^2$/time$^2$, to be exact. Thus, what we actually have is \[\textrm{length} = \frac{\textrm{mass} \times \textrm{length}^2 \times \textrm{time}^{-2} \times \textrm{temperature}^{-1} \times \textrm{temperature}}{\textrm{mass} \times \textrm{length} \times \textrm{time}^{-2}}\] Which simplifies to length = length.

Ok, so our units check out. From here out it's just a matter of setting $\frac{\rho (r)}{\rho_0} = 1/e$ and solving for $r$. First, we'll plug everything in for $\rho (r)$, giving us\[\frac{\rho_0e^{-\frac{rmg}{k_B T}}}{\rho_0} = 1/e\] Then, canceling $\rho_0$ and rewriting $1/e$ as $e^{-1}$ makes that into\[e^{-\frac{rmg}{k_B T}} = e^{-1}\] Finally, we can take the natural log of both sides in order to give us an equality with just the exponents, and then divide by $-\frac{mg}{k_B T}$ to solve for $r$, giving us \[H=r=\frac{k_B T}{mg}\]

h) What is the Earth's scale height, $H_\oplus$? The mass of a proton is $1.7 \times 10^{-24}$ g, and  the Earth's atmosphere is mostly molecular nitrogen, $N_2$, where atomic nitrogen has 7 protons and 7 neutrons.

This is relatively straightforward--all we need to do is calculate the mass of an $N_2$ molecule and plug it into the equation for $H$ we just derived. Two atoms, each holding 7 protons and 7 neutrons massing $1.7 \times 10^{-24}$ g each (neutrons and protons have approximately equal mass) comes out to $2( 2\ times 7 \times 10^{-24} \approx 3 \times 10^{-23}$ g. $g$ can be approximated as 10 meters/s$^2$--or $10^3$ cm/s$^2$ in more-familiar cgs units. We can set $T$ to be room temperature--around 300 Kelvin. Now it's just time to put it all together:\[H_\oplus = \frac{k_B T}{mg} = \frac{1.4 \times 10^{-16} \times 3 \times 10^2}{3 \times 10^{-23} \times 10^3} \approx 2 \times 10^6 \: \: \textrm{cm}\] This is about 20 kilometers, which is pretty high--twice the hight of an intercontinental flight (or of Mount Everest). However, even though the Earth's atmosphere continues up to around 100 km, it gets denser and denser the lower it is (hence why passenger jets need to be pressurized even flying at half this altitude), so 1/5 the total height seems like a very reasonable estimate of the Earth's scale height.

Special thanks to Anne Madoff and Scott Zhuge for collaborating with me on this problem.

1 comment: