# Calculating correction term for Non-constant Temperature situations in Relation between Height and Air pressure [closed]

Background

We initially have $$p(h+\Delta)-p(h)=-g\rho(\xi)\Delta$$ as of the definition of pressure, where $$p(h)$$ is the pressure at height $$h$$, $$\rho(h)$$ is the air density at height $$h$$.

By taking limits of it, we get:

$$p'(h)=-g\rho(h)\tag{1}$$

By Clapeyron's Law we have:

$$\frac{pV}{T}=R$$

Where $$R$$ is the universal gas constant. By setting $$M$$ as the molar mass of air, $$V$$ as the molar volume of air. We have from the above that:

$$p=\frac 1V RT=\frac MV\frac RM T=\rho \frac RM T\tag{2}$$

And by setting $$\lambda(T)=\frac RM T,$$

We have $$p=\lambda(T)\rho\tag{3}$$

And by combining (1) and (3) we get:

$$p'(h)=-\frac g\lambda p(h)\tag{4}$$

By operating on the ODE in (4) we finally get

$$p(h)=p(0)e^{-(g/\lambda)h}$$

Now the problem asks us to:

Using the data from the above, obtain a formula for a correction term to take account of the dependence of pressure on the temperature of the air column, if the temperature is subject to variation, within the range of $$\pm 40 ^{\circ} C$$.

I noticed that the premise was taken as the temperature is constant, and now we are asked to prove the correction term for the case when it is non constant. But I don't really understand why and how it should be constant in accordance with the equation, and what we do to in turn solve the problem.

Any help is greatly appreciated!

### Correction Term for Non-constant Temperature Situations in the Relation between Height and Air Pressure

Given the relationship between pressure and height:

$$p(h+\Delta) - p(h) = -g \rho(\xi) \Delta$$

Taking the limit as (\Delta \to 0), we get:

$$\frac{dp(h)}{dh} = -g \rho(h) \tag{1}$$

Using the ideal gas law, we have:

$$pV = RT$$

where (R) is the universal gas constant. Expressing this in terms of density (\rho) and molar mass (M):

$$p = \frac{\rho R T}{M}$$

Thus, combining this with equation (1), we get:

$$\frac{dp}{dh} = -\frac{gM}{RT} p$$

### Non-constant Temperature

If the temperature (T) varies with height (h), we denote it as (T(h)). Therefore, the differential equation becomes:

$$\frac{dp(h)}{dh} = -\frac{gM}{R T(h)} p(h)$$

To solve this differential equation, we can rewrite it as:

$$\frac{1}{p(h)} \frac{dp(h)}{dh} = -\frac{gM}{R T(h)}$$

Integrating both sides:

$$\int \frac{1}{p(h)} \, dp(h) = -\frac{gM}{R} \int \frac{1}{T(h)} \, dh$$

$$\ln p(h) = -\frac{gM}{R} \int_0^h \frac{1}{T(\xi)} \, d\xi + C$$

where (C) is the integration constant.

$$p(h) = p(0) \exp \left( -\frac{gM}{R} \int_0^h \frac{1}{T(\xi)} \, d\xi \right)$$

### Correction Term for Temperature Variation

To find a correction term due to temperature variation, consider (T(h) = T_0 + \Delta T(h)), where (T_0) is a reference temperature and (\Delta T(h)) is the deviation. Assuming (\Delta T(h)) is small compared to (T_0), we can approximate:

$$\frac{1}{T(h)} \approx \frac{1}{T_0} - \frac{\Delta T(h)}{T_0^2}$$

Using this approximation:

$$\int_0^h \frac{1}{T(\xi)} \, d\xi \approx \int_0^h \left( \frac{1}{T_0} - \frac{\Delta T(\xi)}{T_0^2} \right) d\xi$$

$$= \frac{h}{T_0} - \frac{1}{T_0^2} \int_0^h \Delta T(\xi) \, d\xi$$

### Corrected Pressure Formula

Substituting this into the exponent:

$$p(h) = p(0) \exp \left( -\frac{gM}{R} \left( \frac{h}{T_0} - \frac{1}{T_0^2} \int_0^h \Delta T(\xi) \, d\xi \right) \right)$$

$$= p(0) \exp \left( -\frac{gM h}{R T_0} \right) \exp \left( \frac{gM}{R T_0^2} \int_0^h \Delta T(\xi) \, d\xi \right)$$

### Conclusion

The correction term due to temperature variation is:

$$\exp \left( \frac{gM}{R T_0^2} \int_0^h \Delta T(\xi) \, d\xi \right)$$

Thus, the corrected formula for pressure as a function of height, taking into account the temperature variation, is:

$$p(h) = p(0) \exp \left( -\frac{gM h}{R T_0} \right) \exp \left( \frac{gM}{R T_0^2} \int_0^h \Delta T(\xi) \, d\xi \right)$$

This correction term allows for the pressure calculation to adapt to variations in temperature within the specified range.

• $$\int \frac{1}{p(h)} \, dp(h) = -\frac{gM}{R} \int \frac{1}{T(h)} \, dh$$ $$\ln p(h) = -\frac{gM}{R} \int_0^h \frac{1}{T(\xi)} \, d\xi + C$$ I don't really understand this line, that how does the integral goes from indefinite to definite. Commented Jul 28 at 14:59
• @YinuoAn the integral goes from indefinite to definite by choosing two integration bowndries. I chose the origin of the system to be at h=0. Commented Jul 28 at 15:05