NOTE: This page uses MathJax, a JavaScript program running in your web browser, to render equations. It renders the equations in three steps: 1. during loading you may see the “raw code” that generates the equations, 2. an HTML version of the equations is pre-rendered (functional, but not nice looking), then 3. a full and proper “typeset” rendering of the equations. Depending on the speed of your system and browser, it may take a few seconds to tens of seconds to finish the whole process. The end product is usually worth the wait, imho.
This is the next instalment in Phelonius’ Pedantic Solutions which aims to tackle something I wish I had when I was doing my physics degree: some step-by-step solutions to problems that explained how each piece was done in a painfully clear way (sometimes I was pretty thick and missed important points that are maybe obvious to me now, looking back). I have realized I could have benefited from a more integrated approach to examples, where whatever tools that are needed are explained as the solution is presented, so that is at the core of these attempts. I have also been told all my life that the best way to learn something is to try to teach it to someone else, and so this is part of my attempt to become more agile and comfortable with the ideas and tools needed to do modern physics. If you don’t understand something, please ask, because I haven’t explained it well enough and others will surely be confused as well.
Things covered:
- introduction to unit vectors
- creating differential equations
- solving differential equations
This problem is of the sort that is the bane of my existence: it’s relatively straightforward, but I somehow get misdirected and can’t find the angle to approach it from. In Schroeder’s “Thermal Physics”, question 1.16(a): Consider a horizontal slab of air whose thickness (height) is \(dz\). If this slab is at rest, the pressure holding it up from below must balance both the pressure from above and the weight of the slab. Use this fact to find an expression for \(dP/dz\), the variation of pressure with altitude, in terms of the density of air. It’s actually a simple question that only involves a little algebra to solve, but the wording of the question sent me down the entirely wrong path. What I saw was a need to come up with generic equations for the pressure of air above and below the slab and then somehow fit the slab into it all. Diagrams and a few attempts at solutions and I was no further ahead after a week of poking at it casually. Nothing I did looked like it would lead to the answer, so at least I had that right. If the question was rephrased as: consider a horizontal slab of air at rest whose thickness (height) is \(dz\). What is the change in pressure, \(dP\), from its bottom to its top for any altitude? Write the result as \(dP/dz\), I would have been trying to answer the right thing.
When faced with a problem I clearly don’t understand, I do what all students of physics do these days: I look on the Internet for similar problems or even the solution. In this case, there are solutions to many of the problems in the Schroeder book. Unlike most other solution sets available on the Internet, this one is actually worked out independently by someone and is not just a copy of the formal solutions manual. As such, this site is incredibly valuable for anyone trying to learn how to solve problems, and it is: http://www.physicspages.com/schroeder%20thermal.html (by Glenn Rowe). I learned what the proper question was by reading their solution and realized how “simple” it was when approaching it the right way. If you’re taking a degree in physics or have to take physics courses — or are just trying learn physics on your own — if you don’t have a group of people you can work with (preferably with diverse histories and backgrounds to provide non-homogenous perspectives with which to approach problems), then online solutions may be your only recourse. Because I was a “mature” student in undergraduate physics studies, it was not easy for me to work with the other students on our mutual homework problems. From a social or life situation perspective, we simply had different priorities and needs… it was just plain uncomfortable for all concerned, although there were many great and friendly fellow students who reached out to me (I was generally accepted once they figured out I wasn’t going to try to parent them). In short, studying under the influence of age in a formal university environment is an additional handicap on top of any other challenges being faced (the program is generally just hard no matter one’s age), and I was often on my own to figure things out (or not).
With all that said, solutions to problems can be helpful or harmful. If all you are trying to do is get a grade in class and move on, then maybe they can help with that. Relying on canned answers to problems will eventually catch up though if you actually want to learn — whether it be in writing an exam where the techniques just haven’t been practised sufficiently to do well, or in later school years or even on the job when stuff that should be known, just isn’t. However, if you turn to a solution of a particular problem or a class of problems for guidance and learn a technique on how to approach them and then solve the problem on your own, then they can be invaluable. As the saying goes, I can tell you how to play a violin (or solve a differential equation) in 30 seconds, but unless you put the practice in to develop agility and “muscle memory” with it, then despite knowing how to play it in theory, in practice it is not going to go very well. Once there is clarity around how to think about a problem, then any problem becomes approachable.
Turning back to the problem at hand, and before moving forward, a couple of definitions are needed. The first definition is for pressure, \(P\). Pressure is the amount of force applied to a given area, in this case it is the weight of air pressing down because of Earth’s gravity. As soon as we hear force we should turn to Newton’s laws of motion. Here, we want the second law: “In an inertial frame of reference, the vector sum of the forces \(\vec{F}\) on an object is equal to the mass \(m\) of that object multiplied by the acceleration \(\vec{a}\) of the object: \(\vec{F} = m\vec{a}\)” [1] (where mass is assumed not to be affected by the acceleration, and is thus a constant). So for the pressure, we can write (where little \(a\) is acceleration, and big \(A\) is area):
\[ P = \frac{\text{force}}{\text{area}} = \frac{\vec{F}}{A} = \frac{m\vec{a}}{A} \]
But there’s a problem: pressure is a scalar value (not a vector: when air pressure is given, it’s just a magnitude, not a magnitude and direction), and \(\vec{F}\) and \(\vec{a}\) are vectors. Multiplying or dividing a vector by scalars will result in a vector, and here since the left hand side of the equation is a scalar, the right hand side needs to be a scalar as well. Multiplying or dividing vectors can potentially (but not usually) result in a scalar though… We know that \(m\) is a scalar for sure (mass doesn’t have a direction), so by process of elimination, \(A\) must somehow be a vector. While this is not generally the way people think about areas, in the three-dimensional space we live in, to fully specify an area, it needs a direction! Sometimes it doesn’t matter which way the area is oriented: for instance, when the area is in an isotropic environment (where everything is generally the same no matter the direction); however, here the area is in a gravitational field, so direction does matter. The question even spells it out: the slab of air is “horizontal” (i.e. parallel to the ground, which is perpendicular to the gravitational field), so we need to know the orientation of the area with respect to the gravitational field to fully specify the system. Here, since pressure is pushing down onto the area from above because of gravity, so the direction of the area is “up”. Likewise, the direction of the force (and thus the acceleration due to gravity), is “down”. This provides us with the directions we need to write the equation properly (the magnitude of the acceleration due to gravity is usually written \(g\), and \(g\approx 9.8m/s^{2} = 9.8 m\cdot s^{-2}\) at sea level):
\[ P = \frac{m\vec{a}}{\vec{A}} = \frac{m\vec{g}}{\vec{A}} = \frac{m|\vec{g}|\downarrow}{|\vec{A}|\uparrow} = \frac{mg\downarrow}{A\uparrow} = \frac{mg(-\uparrow)}{A\uparrow} = -\frac{mg}{A}\cdot\frac{\uparrow}{\uparrow} = -\frac{mg}{A} \]
So, there’s a bit to unpack here… recall that putting the “absolute value” bars around a vector strips off its direction and just returns the magnitude (a scalar). I’m just using up and down arrows to indicate direction since that’s all we need to work with here, we can write equivalently, for instance, \(\vec{g} = |\vec{g}|\downarrow = g\downarrow \) (where \(\vec{g}\) is the vector, \(g\) is its magnitude, and \(\downarrow\) is its direction). The negative of a vector is the same vector, but facing in the opposite direction, so: \(\downarrow = -\uparrow\). Lastly, \(\uparrow / \uparrow = 1\). Both \(\uparrow\) and \(\downarrow\) (or \(\leftarrow\) and \(\rightarrow\), or anything in between) are directions with a magnitude of \(1\), and are called unit vectors. Multiplying a scalar by a unit vector adds a direction, but doesn’t change the magnitude of the scalar (because the magnitude of the unit vector is \(1\)). Multiplying a unit vector by the same unit vector results in the scalar value \(1\): e.g. \(\uparrow\cdot\uparrow = 1\) or \(\rightarrow\cdot\rightarrow = 1\), etc.; but multiplying a unit vector by a perpendicular unit vector results in the scalar value \(0\): \(\uparrow\cdot\rightarrow = 0\) or \(\downarrow\cdot\leftarrow = 0\), etc.. As you might guess, multiplying a unit vector by another one that is neither parallel nor perpendicular gives a scalar value between \(0\) and \(1\) (more on that some other time I guess). I used up and down arrows for the unit vectors since that made sense to me here, but in three dimensional space \((x, y, z)\), the usual way of writing the corresponding unit vectors for the three perpendicular axes are: \((\hat{i}, \hat{j}, \hat{k})\) or \((\hat{x}, \hat{y}, \hat{z})\). I prefer the later since it is obvious that \(\hat{x}\) points in the positive \(x\) axis direction, but the former seems to be more common.
As an aside, while Newton posited 3 laws of motion, there are really only two principles at work: \(\vec{F} = m\vec{a}\) (the second law) and “when one body exerts a force on a second body, the second body simultaneously exerts a force equal in magnitude and opposite in direction on the first body” (the third law). The first law, “in an inertial frame of reference, an object either remains at rest or continues to move at a constant velocity, unless acted upon by a force” is just a special case of the second law where \(\vec{F} = 0\), so \(\vec{a}\) must also equal \(0\) (since \(m\) may not be zero in all cases and the law must hold for all cases). [1]
Now, there is one last thing that needs to be done for the proper, pedantic, definition of pressure for this problem: the question of height. The pressure is not the same for different altitudes (which is the \(z\) direction in this problem); so, we need to write that pressure is a function of \(z\). For pressure to be a function of \(z\), then something on the right hand side of the equation must also be a function of \(z\). The acceleration due to gravity will not be the same as we move away from the Earth’s surface, but for this problem those differences are not that significant and it would complicate things tremendously (and there are variations due to differences in the density of Earth at various places as well as changing with height). However, we do know that the density of the slab of air will decrease with altitude (it bugs me that this was not explicitly stated in the question, but Schroeder assumes it should be general knowledge for anyone doing physics I guess), and therefore its mass will change (for a fixed volume of air) with altitude, and so it is mass that is a function of height. So, the final version of the equation for pressure for this problem is:
\[ P(z) = -\frac{m(z)\cdot g}{A} \]
The second definition needed is for density. Density is the amount of stuff in a given volume. In this context, it is the number of air molecules in a given volume which, as was seen in the previous post, is another way of saying the mass of air in a given volume. In our slab of air, its area was chosen to be an arbitrary area \(A\), and its height is given in the question as being \(dz\), so the volume is \(V = A\cdot dz\). Remembering that the mass of the air in the slab is a function of height (\(z\)), the density must also be a function of \(z\). So, density, \(\rho\), is:
\[ \rho(z) = \frac{\text{mass}}{\text{volume}} = \frac{m(z)}{V} = \frac{m(z)}{A\cdot dz} \]
and so we can write:
\[ m(z) = \rho(z)\cdot A\cdot dz \]
and substituting into the pressure equation and recognizing that we’re talking about an infinitesimal of height, so we only get an infinitesimal change of pressure:
\[ P(z) = -\frac{m(z)\cdot g}{A}\,\,\,\rightarrow\,\,\, dP(z) = -\frac{\rho(z)\cdot A\cdot g}{A}dz = \, -\rho(z)\cdot g\, dz \]
which allows us to get rid of the unspecified area of the slab, \(A\), and gives us all the pieces we needed! Since it shouldn’t make any difference whether we use a small area or a big area, the pressure should be the same (force per unit area), so this is an indication of being on the right track. Since the question asked us to write the solution where the \(z\) dependence is implied, the final answer is:
\[ \frac{dP}{dz} = -\rho\cdot g\, dz = -\rho g\, dz\]
So, as indicated above, this was a really simple question that only required a little bit of algebra (and some trickiness due to the infinitesimals, but here they are just treated in a geometric manner for the slab height). Once the definitions were written out, the solution was practically there.
The next part of the question is 1.16(b): use the ideal gas law to write the density of the air in terms of pressure, temperature, and the average mass \(m\) of the air molecules (see problem 1.14). Show that the pressure obeys the differential equation \(dP/dz = -mgP/kT\), called the barometric equation. It is important to note at the outset, that the mass \(m\) here (the average mass of an air molecule) is not the same as the mass in 1.16(a) (the mass of a slab of air). In particular, the mass here is not dependent on height, but rather it’s the pressure that is height-dependent, so we can explicitly write:
\[ \frac{dP(z)}{dz} = -\frac{mgP(z)}{kT} \]
Comparing that to the solution of 1.16(a), it looks like “all” that needs to be done is to prove that \(\rho(z) = mP(z)/kT \). Before tackling that, and to keep things straight, we need another way to refer to the mass of the slab of air (versus the average mass of an air molecule used in this part). One way is to use a subscript for the slab mass, \(m_s\), and the other common way is to label the mass of the larger thing with a capital letter, \(M\). Here, I’m going to use \(m_s\) and might as well use \(\rho_{s}\) and \(V_s\) to be ultra clear that it’s the density and volume of the slab of air, so:
\[ \rho_{s}(z) = \frac{m_{s}(z)}{V_s} \]
The ideal gas law that was used in the previous post was the raw version of it: \(PV = nRT\), where \(P\) is pressure, \(V\) is volume, \(n\) is the number of moles of gas (which can be molecules or any other collection of things), \(R\) is a constant, and \(T\) is the temperature in Kelvins (where \(0K\) is absolute zero). But Schroeder then gives a slightly cooked version of the equation that uses the actual number of molecules rather than the number of moles and then adjusts the constant appropriately for the new ratio. For the number of molecules, \(N = n\cdot N_{A}\), where \(N_{A}\) is Avogadro’s number, which is the number of things (air molecules here) in a mole. \(N_A\approx 6.02\times 10^{23} mol^{-1}\), which says there are that many things per mole (I keep saying things instead of just molecules, because the mole is used to count all sorts of things in physics and I just wanted to keep that in mind… for instance, about \(0.93\)% of air is argon, which is just an atom not a molecule, but we count the atoms on equal footing with oxygen or nitrogen molecules). Because we’re multiplying a value by \(N_A\), we need to divide a value by \(N_A\) to keep the equation true, so we create a new constant where \(k = R/N_A\). The value \(k\) is called Boltzmann’s constant and is a very important number used in everything from atmospheric research to astrophysics (\(k\approx 1.381\times 10^{-23} J\cdot K^{-1}\)). One way to think about the progression is (since \(N_A/N_A = 1\) and it’s okay to multiply anything by one):
\[ PV = nRT = \frac{N_A}{N_A}\cdot nRT = nN_A\cdot \frac{R}{N_A}\cdot T = NkT \]
Thinking about it, we need the left hand side of this equation to look like the right hand side of the density equation for \(\rho_s(z)\) in order to substitute it back in to the equation for \(dP/dz\). So we can rewrite it for this specific scenario, \(N\rightarrow N_s\) (the number of molecules and/or atoms in the volume of the slab), \(P\) is a function of \(z\) (\(P\rightarrow P(z)\)), and \(V\rightarrow V_s\) is the volume of the slab of air. What about \(T\)? The temperature generally decreases with height to a point and then starts going up again eventually until space, so it is also a function of \(z\) in the real world. To that end, I will write \(T(z)\) here as well. So we can write:
\[ P(z)V_s = N_skT(z) \rightarrow \frac{N_s}{V_s} = \frac{P(z)}{kT(z)} \]
Close, but not quite there yet… we need the mass of the slab of air to match with the right hand side of the density equation. We have the number of molecules/atoms, \(N_s\), so the mass of the slab is just that number times the average mass of an air molecule, \(m\): \(m_s = N_s m\rightarrow N_s = m_s/m\). Substituting in the above equation for \(N_s\):
\[ \frac{N_s}{V_s} = \frac{m_s}{mV_s} = \frac{P(z)}{kT(z)}\rightarrow \frac{m_s}{V_s} = \frac{mP(z)}{kT(z)} = \rho_s(z)\tag{1} \]
Then substituting that into the equation for \(dP/dz\):
\[ \frac{dP(z)}{dz} = -\rho(z) g\, dz = -\frac{mP(z)}{kT(z)} g = -\frac{mg}{kT(z)}P(z) \]
(remembering that \(m\) here is the average mass of a single molecule/atom of air). Then writing it as required by the question (where the \(z\) dependence is implicit):
\[ \frac{dP}{dz} = -\frac{mg}{kT}P \]
While the steps are quite simple and algebraic, what’s interesting is we have created another differential equation for an important phenomenon (air pressure versus height), and we should then be able to solve it to get a useful equation that will let us estimate the pressure given a height (it’s an estimate because gravity was made constant, and all sorts of other variables were just not taken into account). This is often the way that science progresses though: simple approximations are made that are tested against observations to see if they are roughly accurate (sometimes it’s the best that can be done with the measuring instruments at the time as well, so more theoretical accuracy is wasted). Once there is a generally accepted model for a phenomenon, then more details and variables are brought into it to make the model more and more accurate, and to take into account dynamic conditions (everything in this question is assumed to be static). So, question 1.16(c) states: assuming that the temperature of the atmosphere is independent of height (not a great assumption but not terrible either), solve the barometric equation to obtain the pressure as a function of height: \(P(z) = P(0)e^{-mgz/kT}\). Show also that the density obeys a similar equation. This should look very familiar since it is the same form for the solution to the differential equation in the decay and growth rates entry.
Just quickly following the procedure in that entry without too much explanation… start by separation of variables (so all the dependencies are grouped on either side of the equation, and are thus isolated):
\[ \frac{dP(z)}{dz} = -\frac{mg}{kT}P(z)\rightarrow \frac{dp(z)}{P(z)} = -\frac{mg}{kT}dz \]
Integrate both sides separately (not forgetting the integration constants):
\[ \int \frac{dp(z)}{P(z)} = ln(P(z)) + B \]
\[ \int \left( -\frac{mg}{kT}dz \right) = -\frac{mg}{kT} \int dz = -\frac{mg}{kT}z + C \]
So:
\[ ln(P(z)) + B = -\frac{mgz}{kT} + C\rightarrow ln(P(z)) + B – C = -\frac{mgz}{kT} \]
Combining the integration constants into one called \(D = B – C\):
\[ ln(P(z)) + B – C = ln(P(z)) + D = -\frac{mgz}{kT} \]
Raising \(e\) to the power of both sides (and remembering \(e^{a+b} = e^ae^b\), and \(e^{ln(x)} = x\)):
\[ e^{ln(P(z))}e^D = e^{-mgz/kT}\rightarrow P(z) = -\frac{1}{e^D} e^{-mgz/kT} \]
Solving the equation at \(z = 0\):
\[ P(0) = -\frac{1}{e^D} e^0 = -\frac{1}{e^D} \]
So, substituting:
\[ P(z) = P(0) e^{-mgz/kT}\tag{2} \]
And that’s it. Simple, no?
What about density now? Looking back at Equation (1) for \(\rho(z)\), then substituting in Equation (2) for \(P(z)\), and continuing to treat temperature \(T\) as a constant:
\[ \rho(z) = \frac{mg}{kT}P(z) = \frac{m}{kT} P(0) e^{-mgz/kT} \]
Once again solving at \(z = 0\) to figure out the constant:
\[ \rho(0) = \frac{m}{kT} P(0) e^0 = \frac{m}{kT} P(0) \]
And substituting:
\[ \rho(z) = \rho(0) e^{-mgz/kT} \]
So we can see that density does, indeed, obey a similar equation. Question 1.16(d) asks us to use the equations to figure out the atmospheric pressure at various altitudes. See Glenn Rowe’s PDF solution for some great data and analysis, and plot of the equation showing visually that pressure (in this simple model, which turns out to be a not-too-bad approximation) decreases exponentially with altitude.
While no new techniques were learned per se, it was good to see a demonstration of the stuff done earlier and seeing another approach to figuring out how to write differential equations and then solve them (or at least this type).
If you have any feedback, or questions, please leave a comment so others can see it. I will try to answer if I can. If you think this was valuable to you, please leave a comment or send me an email at to dafriar23@gmail.com. If you want to use this in some way yourself (other than for personal use to learn), please contact me at the given email address and we’ll see what we can do.
© 2018 James Botte. All rights reserved.