# Finding pressure differences considering variations in different parameters [duplicate]

I have a place where the density of air at sea level is $\rho_0$ and the atmospheric pressure is $P_0$. Now suppose I want to calculate the pressure of air at a certain height h above the sea level, say at a height of 10 km above the sea level. Let the actual pressure be P.

I realise that I need to use this relation: $$P_0 - P = \rho gh$$ However this would work only for small heights as the value of $g$ and $\rho$ vary with height.

Suppose for some sufficiently large height, I keep the value of $g$ constant and vary $\rho$ with height, I get a pressure, say $P_1$

Next, I keep the value of $\rho$ constant and vary $g$, and I get a value $P_2$

Lastly, I vary both $g$ and $\rho$, and get a pressure say $P_3$

I am interested to know what would be the order of the pressures, like which would yield me the highest value among $P,P_1,P_2,P_3$ and among them which one would be closest to the actual value $P$

PS: For a height like 10 km, can I keep the value of $\rho$ constant? For g, I think I can keep it constant since 10 << 6400

## marked as duplicate by John Rennie, Chris♦, Kyle Kanos, Jon Custer, sammy gerbilMar 8 '18 at 3:03

As you note, the equation $P_0 - P = \rho g h$ is only really valid if $\rho$ and $g$ are constant throughout the slab. The true equation we should be using is something like $$P(h) - P(0) = - \int_0^h \rho(z) g(z) \, dz$$ This latter equation has a natural interpretation if you realize that this integral, multiplied by the cross-sectional area $A$ of an air column, is the total gravitational force exerted on the air contained in that air column.

What this equation tells us is that the quantity $\rho g$, viewed as a function of $z$, is the derivative of the pressure as a function of elevation. For a given $P(0)$, two different functions $\rho_1(z) g_1(z)$ and $\rho_2(z) g_2(z)$ could, in principle, lead to the same pressure at a particular height $h$, so long as their integrals are the same. In other words, if $P_1$ is the pressure prediction from a model with $\rho_1(z)$ and $g_1(z)$, and $P_2$ is the pressure prediction from a model with $\rho_2(z)$ and $g_2(z)$, then we have $$P_1(h) - P_2(h) = \int_0^h[ \rho_2(z) g_2(z) - \rho_1(z) g_1(z) ] \, dz,$$ which can in principle be zero for some particular $h$ even if the functions do not agree. This also implies that just "allowing the functions to vary" doesn't provide you with enough information to compare the pressure predictions of the two models; you need to know how they vary.

That said, it is a pretty good approximation to treat $g$ as constant, since (as you note) the height of the atmosphere is much less than the radius of the Earth. This means that the equation above simplifies to $$P_1(h) - P_2(h) = g \int_0^h[ \rho_2(z) - \rho_1(z) ] \, dz.$$ From this, we can see that a model in which $\rho_1 \leq \rho_2$ at all values of $z$ will necessarily result in $P_1(h) \geq P_2(h)$ at all elevations, since the integrand is non-negative. In particular, if we have two models that predict that the air density decreases with elevation, and one of them predicts a more rapid density decrease than the other, then the model with the faster density decrease will always have the greater pressure at a given elevation.

As far as specific models for the atmosphere, the usual method is to differential the equation at the top with respect to $h$ to obtain $$\frac{dP}{dz} = - g \rho(z).$$ You can then assume a particular relationship between the pressure and density of the gas; this gives you a differential equation to solve. Some common assumptions are:

• Assume the gas is at constant temperature $T$. This is the simplest assumption, and for an ideal gas predicts that $\rho \propto P$. If you solve the resulting differential equation, you will end up with $P$ falling off exponentially with $z$.

• Assume air is convecting upwards due to ground heating. Air closer to the ground will be heated, and will want to rise upwards. As it rises, it will cool adiabatically (without substantial heat input from nearby air masses.) If you take the adiabatic expansion of an ideal gas and combine it with the above, you find that the temperature of the atmosphere decreases linearly $z$ at a rate of a little less than 10°C per kilometer (the so-called dry adiabatic lapse rate). Applying the ideal gas law with a changing $T$ then gives you a different prediction for $P(z)$; the fall-off is somewhat faster in this case than in the constant-$T$ case.

• Assume air is convecting upwards due to ground heating, and contains water vapor. As the air rises, its pressure (and temperature) falls, and it can eventually fall below the vapor pressure of water at that particular pressure and temperature. At that point, water will start to condense into droplets in the atmosphere (clouds), giving up latent heat into the air mass. This causes a change in the temperature profile as a function of elevation, leading to a different change in temperature with elevation (the so-called wet adiabatic lapse rate.) One can in principle calculate this as well, and then solve the resulting differential equation to find $P(z)$; however, your results will vary depending on how much water vapor is in the air, which you would need to know in advance.

The "actual value of $P$" is a complicated combination of these and other factors, though the constant-$T$ model is probably further from the truth than the other two.