Calculating Pressure & Density Proportions with Changing Altitude & Temperature

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
19 replies · 2K views
cwill53
Messages
220
Reaction score
40
Homework Statement
With the assumption that the air temperature is a uniform ##0.0^{\circ}C##, what is the density of the air at an altitude of 1.00 km as a percentage of the density at the surface?
Relevant Equations
$$pV=nRT$$

$$\frac{\partial p}{\partial z}=-\rho g$$
I got the correct answer to this question with the following calculations, but I do need some correction in terms of what units I'm integrating across.
ρ##\rho ## is density.

mtot=n##m_{tot}=nM##, where n is the number of moles of a substance and M is the molar mass of the substance.

$$pV=nRT\rightarrow pV=\frac{m_{tot}}{M}RT\Rightarrow \rho =\frac{pM}{RT}$$
pV=nRT→pV=mtotMRT⇒ρ=p$$p\propto \rho ,\frac{p_{1}}{p_{2}}=\frac{\rho _{1}}{\rho _{0}}$$

$$\rho =\frac{(101325Pa)(0.02896kg/mol)}{(8.31446\frac{J}{(mol\cdot K)})(273.15K)}=1,2921kg/m^3\propto 1.2921Pa$$
The molar mass of air, composed of nitrogen, oxygen, argon, carbon dioxide, and some other elements is 28.96g/mol. I'm not exactly sure if the above is correct in terms of the proportionality between the density and pressure, but I guessed that this was correct because you can't integrate pressure across density.

So,

$$\frac{dp}{dy}=-\rho g=-\frac{pM}{RT}g$$
$$\int_{p_{0}}^{p_{1}}\frac{dp}{p}=\int_{1.2921Pa}^{p_{1}}\frac{1}{p}dp=\frac{-Mg}{RT}\int_{0m}^{1000m}dz$$
$$ln(p)\rvert_{1.2921Pa}^{p_{1}}=ln(p_{1})-ln(1.2921Pa)=ln(p_{1})-0.25627Pa$$
$$\frac{-Mg}{RT}[z]\rvert_{0m}^{1000m}=-\frac{(0.02896kg/mol)(9.81m/s^2)(1000m)}{(8.31446J/(mol\cdot K))(273.15K)}=-0.1250927Pa\Rightarrow ln(p_{1})=0.1311773Pa\Rightarrow p_{1}=e^{0.1311773Pa}=1.14016Pa\Rightarrow p_{1}=.88241p_{0}\Leftrightarrow \rho _{1}=.88241\rho_{0}$$

Now this is correct numerically, even though some of the units for the bounds might be off (correct me please).

I also wanted to add another parameter. Say the 1.00 km in the question was replaced with 6.00 km, and the temperature was varying at a rate:
$$\frac{\partial T}{\partial z}= -6.5^{\circ}C/km$$
How would I go about solving the problem then?
 
Last edited:
on Phys.org
Pilots, etc. use air pressure halved every 5000 ft above sea level.
 
  • Like
Likes   Reactions: cwill53
Do you mean, ##\frac{\partial T}{\partial z}= -6.5^{\circ}C/km##, i.e. a temperature distribution with a lapse rate of ##\lambda = 6.5^{\circ}C/km## of the form$$T(z) = T(0) - \lambda z$$Surely you are nearly there already! You start with $$\frac{\partial p}{\partial z} = -\rho g$$and use the ideal gas law just like you did before to obtain$$pV = nRT(z) \implies p = \frac{nRT(z)}{V} = \frac{\rho R T(z)}{\mu}$$which gives$$\frac{\partial p}{\partial z} = - \frac{\mu p g}{R T(z)}$$ $$\int_{p(0)}^p \frac{1}{p'} dp' = -\int_0^z \frac{\mu g}{RT(z')}dz'$$ $$\ln{\frac{p}{p(0)}} = - \frac{\mu g}{R} \int_0^z \frac{1}{T(0) - \lambda z'} dz' = \frac{\mu g}{\lambda R}\left[ \ln{(T(0) - \lambda z')} \right]_0^z$$which you can finally substitute back to get the density relations?
 
  • Like
Likes   Reactions: cwill53
etotheipi said:
Do you mean, ##\frac{\partial T}{\partial z}= -6.5^{\circ}C/km##, i.e. a temperature distribution with a lapse rate of ##-\lambda## of the form$$T(z) = T(0) - \lambda z$$Surely you are nearly there already! You start with $$\frac{\partial p}{\partial z} = -\rho g$$and use the ideal gas law just like you did before to obtain$$pV = nRT(z) \implies p = \frac{nRT(z)}{V} = \frac{\rho R T(z)}{\mu}$$which gives$$\frac{\partial p}{\partial z} = - \frac{\mu p}{R T(z)}$$ $$\int \frac{1}{p} dp = -\int\frac{\mu}{RT(z)}dz$$ $$\ln{\frac{p}{p(0)}} = - \frac{\mu}{R} \int \frac{1}{T(0) - \lambda z} dz = \left[ \frac{\mu}{\lambda R} \ln{(T(0) - \lambda z)} \right]_0^z$$which you can finally substitute back to get the density relations?
I did mean that. My mistake. For some reason when I try to edit the equations my LaTeX formatting messes up, but that’s what I meant.
I’m going to try what you told me and make a part b to the problem, and post my results.
 
  • Like
Likes   Reactions: etotheipi
@etotheipi
I'm working through it now. But what came to mind is, what if the change in temperature is ALSO varying? What if ##\frac{\partial T}{\partial z}=-6.5^{\circ}C/km## has a second derivative ##\frac{\partial ^2T}{\partial z^2}=0.5^{\circ}C/km^2##? How would I solve it then? I just think of these questions because I feel that's more realistic.
 
cwill53 said:
@etotheipi
I'm working through it now. But what came to mind is, what if the change in temperature is ALSO varying? What if ##\frac{\partial T}{\partial z}=-6.5^{\circ}C/km## has a second derivative ##\frac{\partial ^2T}{\partial z^2}=0.5^{\circ}C/km^2##? How would I solve it then? I just think of these questions because I feel that's more realistic.
The lapse rate (temperature drop per unit height) has a maximum determined by the gas laws. Basically via ##PV^\gamma##, etc. but it depends on humidity, etc.
Below that maximum, it can vary quite a bit due to happenstance, even going negative at some altitudes (a temperature inversion). So other than sticking to the theoretical maximum rate, there's no practical relevance to solving for a functional form.
 
  • Like
Likes   Reactions: etotheipi and cwill53
haruspex said:
The lapse rate (temperature drop per unit height) has a maximum determined by the gas laws. Basically via ##PV^\gamma##, etc. but it depends on humidity, etc.
Below that maximum, it can vary quite a bit due to happenstance, even going negative at some altitudes (a temperature inversion). So other than sticking to the theoretical maximum rate, there's no practical relevance to solving for a functional form.
I see, I had even noticed as I was working through the problem I had made assuming the temperature varies with height. The answer I got was similar to the base question which assumed the temperature was constant.
 
cwill53 said:
@etotheipi
I'm working through it now. But what came to mind is, what if the change in temperature is ALSO varying? What if ##\frac{\partial T}{\partial z}=-6.5^{\circ}C/km## has a second derivative ##\frac{\partial ^2T}{\partial z^2}=0.5^{\circ}C/km^2##? How would I solve it then? I just think of these questions because I feel that's more realistic.

I take it that these are different scenarios, because if ##\frac{\partial T}{\partial z}=-6.5^{\circ}C/km## then ##\frac{\partial^2 T}{\partial z^2} = 0## :wink:

If you do want a functional form, just plug whatever ##T(z)## you like into the integral and see what happens. Like @haruspex mentioned, a common one is also an adiabatic temperature distribution, where you would consider$$P^{1-\gamma}T^{\gamma} = k$$You might also have a look at this question which is quite nice and goes over a few different cases, including some where the temperature of the air parcel cannot be assumed to be the same as that of the surrounding air!
 
Last edited by a moderator:
  • Like
Likes   Reactions: cwill53
etotheipi said:
I take it that these are different scenarios, because if ##\frac{\partial T}{\partial z}=-6.5^{\circ}C/km## then ##\frac{\partial^2 T}{\partial z^2} = 0## :wink:

If you do want a functional form, just plug whatever ##T(z)## you like into the integral and see what happens. Like @haruspex mentioned, a common one is also an adiabatic temperature distribution, where you would consider$$P^{1-\gamma}T^{\gamma} = k$$You might also have a look at this question which is quite nice and goes over a few different cases, including some where the temperature of the air parcel cannot be assumed to be the same as that of the surrounding air!
I see, I should have wrote the first partial of T with respect to z as that λ function.
I will definitely check that link out.
 
  • Like
Likes   Reactions: etotheipi
Yeah if ##\frac{\partial ^2 T}{\partial z^2} = k## then ##\frac{\partial T}{\partial z} = kz + a## and ##T = \frac{1}{2}kz^2 + az + b##. Also if you do decide at some point to have a go at that question here are the solutions :smile:
 
By the way, there is a very easy way to do the very first part of your question where the temperature is constant... it is a bit hand-wavy, but maybe you will find it interesting :wink:

Boltzmann tells us that the probability a particle is in a certain state with energy ##\varepsilon## is proportional to the factor ##e^{-\frac{\varepsilon}{kT}}##. For all of the particles in the atmosphere, then, we can deduce the pressure will be proportional to this probability at any given ##z##.

If we let the energy of any state be ##\varepsilon = mgz##, if ##m## is the mass of a single particle, then we have that$$P = P(0)e^{-\frac{mgz}{kT}} = P(0)e^{-\frac{mN_A gz}{RT}}$$because ##R = kN_A##. The molar mass equals the mass per particle times the number of particles per mole, i.e. ##\mu = mN_A##, so finally$$P = P(0)e^{-\frac{\mu g z}{RT}}$$which is the same as you would have gotten with the integration 😁
 
Last edited by a moderator:
  • Like
Likes   Reactions: cwill53
etotheipi said:
By the way, there is a very easy way to do the very first part of your question where the temperature is constant... it is a bit hand-wavy, but maybe you will find it interesting :wink:

Boltzmann tells us that the probability a particle is in a certain state with energy ##\varepsilon## is proportional to the factor ##e^{\frac{\varepsilon}{kT}}##. For all of the particles in the atmosphere, then, we can deduce the pressure will be proportional to this probability at any given ##z##.

If we let the energy of any state be ##\varepsilon = mgz##, if ##m## is the mass of a single particle, then we have that$$P = P(0)e^{\frac{mgz}{kT}} = P(0)e^{\frac{mN_A gz}{RT}}$$because ##R = kN_A##. The molar mass equals the mass per particle times the number of particles per mole, i.e. ##\mu = mN_A##, so finally$$P = P(0)e^{\frac{\mu g z}{RT}}$$which is the same as you would have gotten with the integration 😁
I will try these questions very soon as they look interesting. I want to work through the next few chapters of my book, though. I barely know what adiabatic, isochoric, and isobaric processes are! There are two chapters left in the introductory thermal physics section of this textbook, so I should be done soon. Once I finish the problem I will try the problem out and post my results ITT.
 
Really there's no hurry! Of course continue with what you intended to be studying! I only upload it since it is very similar to your first question, and it might be interesting to read through and see how they work with the concept of an air parcel. Maybe in a while you can return to it and have a go, or ma`ybe not. Please don't feel obligated to do anything ☺
 
  • Like
Likes   Reactions: Lnewqban and cwill53
etotheipi said:
Boltzmann tells us that the probability a particle is in a certain state with energy ε is proportional to the factor ##e^{ε/kT}##. For all of the particles in the atmosphere, then, we can deduce the pressure will be proportional to this probability at any given z.
I think you need a minus sign in the Boltzmann... ##e^{-ε/kT}## ...
 
  • Like
Likes   Reactions: cwill53 and etotheipi
hutchphd said:
I think you need a minus sign in the Boltzmann... ##e^{-ε/kT}## ...

Of course you are right, I have fixed it o0)
 
  • Like
Likes   Reactions: cwill53
I wanted to write this question here as I think it's similar to the first question and is related to what we discussed earlier.

I'm currently stuck on this question:
In the troposphere, the part of the atmosphere that extends from the Earth's surface to an altitude of about 11 km, the temperature is not uniform but decreases with increasing elevation. (a) Show that if the temperature variation is approximated by the linear relationship ##T=T_{0}-\alpha y## where ##T_{0}## is the temperature at the earth’s surface and T is the temperature at height y, the pressure p at height y is

$$ln(\frac{p}{p_0})=\frac{Mg}{R\alpha }ln(\frac{T_0-\alpha y}{T_0})$$

where ##p_{0}## is the pressure at the Earth's surface and M is the molar mass of the air. The coefficient ##\alpha ## is called the lapse rate of temperature, which varies with atmospheric conditions, but has an average value of about ##0.6C^{\circ}/100m##. (b) Show that the above result reduces to the result of reduces to the result of
$$p=p_0e^{\frac{Mgy}{RT}}$$
in the limit that ##\alpha \rightarrow 0##. (c) With ##\alpha =0.6C^{\circ}/100m ## evaluate p for y=8863 m and compare your answer to the result of 0.33 atm. Take ##T_0=288K## and ##p_0=1.00atm##.

I got part (a) using a similar approach that @etotheipi showed earlier in the thread. I had to set temperature T as a function of height y, and then make a change of variables when integrating to get

$$ln(\frac{p}{p_0})=\frac{Mg}{R\alpha }ln(\frac{T_0-\alpha y}{T_0})$$

But I'm stuck on part (b). What I got was

$$ln(\frac{p}{p_{0}})=\frac{Mg}{R\alpha }ln(\frac{T-\alpha y}{T_0})\rightarrow p=p_0e^{\frac{Mg}{R\alpha }ln(\frac{T_0-\alpha y}{T_0})}$$
$$\lim_{\alpha \rightarrow 0}p=\lim_{\alpha \rightarrow 0}p_0e^{\frac{Mg}{R\alpha }ln(\frac{T_0-\alpha y}{T_0})}$$
$$=\lim_{\alpha \rightarrow 0}\frac{T_0-\alpha y}{T_0}p_0e^{\frac{Mg}{R\alpha }}$$

which I don't think is correct.
 
cwill53 said:
$$\ln(\frac{p}{p_0})=\frac{Mg}{R\alpha }\ln(\frac{T_0-\alpha y}{T_0})$$

Say that, using the approximation ##\ln(1+x) \approx x##,$$\ln{\frac{p}{p_0}} = \frac{Mg}{R\alpha} \ln(1 - \frac{\alpha y}{T_0}) \approx \frac{Mg}{R\alpha}(-\frac{\alpha y}{T_0}) = -\frac{Mgy}{RT_0}$$then we obtain$$p \approx p_0 e^{-\frac{Mgy}{RT_0}}$$

The mistake in your working
cwill53 said:
$$ln(\frac{p}{p_{0}})=\frac{Mg}{R\alpha }ln(\frac{T-\alpha y}{T_0})\rightarrow p=p_0e^{\frac{Mg}{R\alpha }ln(\frac{T_0-\alpha y}{T_0})}$$ $$\lim_{\alpha \rightarrow 0}p=\lim_{\alpha \rightarrow 0}p_0e^{\frac{Mg}{R\alpha }ln(\frac{T_0-\alpha y}{T_0})}$$ $$=\lim_{\alpha \rightarrow 0}\frac{T_0-\alpha y}{T_0}p_0e^{\frac{Mg}{R\alpha }}$$

is on the third line. You should instead get

$$\lim_{\alpha \to 0} p = \lim_{\alpha \to 0} p_0\left(\frac{T_0 - \alpha y}{T_0}\right)^{\frac{Mg}{R\alpha}}$$
 
Last edited by a moderator:
  • Like
Likes   Reactions: cwill53
etotheipi said:
Say that, using the approximation ln⁡(1+x)≈x,ln⁡pp0=MgRαln⁡(1−αyT0)≈MgRα(−αyT0)=MgyRT0then we obtainp≈p0eMgyRT0

The mistake in your workingis on the third line. You should instead get

limα→0p=limα→0p0(T0−αyT0)MgRα
I see where I went wrong. My approach doesn't even seem to lead to anything. Thanks for the clear explanation. I haven’t forgotten about those problems you sent, I will definitely check those out after I get done with these next couple chapters. These type of problems I find quite interesting.
 
Last edited: