Introduction

The barometric formula expresses the dependence of atmospheric pressure on altitude [1,2,3,4,5,6,7,8,9]. Its useful mathematical form is given as follows:

$$p\left( h \right) = p_{0} {\text{e}}^{{ - \rho_{0} gh/p_{0} }} = p_{0} {\text{e}}^{ - h/H} \quad H = \frac{{p_{0} }}{{\rho_{0} g}} = \frac{RT}{{Mg}} = \frac{kT}{{mg}}$$
(1)

In this equation, p(h) is the atmospheric pressure at altitude h, p0 is the atmospheric pressure at sea level, g is the gravitational acceleration, ρ0 is the mass density of air at sea level, R is the gas constant, T is the temperature, M is the (average) molar mass, m is the average mass of a gas molecule, and H is a composite parameter sometimes called “scale height”.

The significance of dropping atmospheric pressure with increasing elevation is quite well known in everyday life and has a number of notable consequences. First, elevation can be estimated with a barometer, and Eq. 1 has a fundamental role in the process. Altitude sickness is also well documented even in popular stories [10]. This syndrome occurs in the mountains at high elevation and is caused by a general lack of oxygen in the body. At high altitudes, the overall atmospheric pressure is lower than at sea level, which means that the partial pressure of oxygen is also much lower than human bodies are used to even if the percentage composition of air is the same.

Airplanes change their altitude very fast and, of course, must have instruments to keep the inside pressure at convenient levels. A very sad chapter in the history of modern aviation was the case when pilots failed to switch on the pressurizing instrument on Helios flight 522 from Cyprus to Athens on August 14, 2005 [10]. The pilot crew did not recognize their mistake soon enough, and one of the first victims of oxygen deprivation was their logical thinking. Even though ground control reminded them to check pressure, they did not respond by proper action and—along with all the passengers on board—fell into a deep coma. The plane reached the destination on automatic pilot but could not land without human intervention and crashed when the fuel supply was exhausted. No one survived the accident. A very similar private jet accident was the cause of the death of world-famous golf player William Payne Stewart on October 25, 1999.

There are less tragic consequences of the falling atmospheric pressure in elevation. For example, the capital of South American landlocked state Bolivia, La Paz, lies at an elevation of 3700 m and their national soccer team is allowed to play their official games there. Needless to say, this means a major (and, most would probably argue, highly unfair) advantage to the home side, whose players are used to these conditions, but the opponent never has the time to undergo full acclimatization. Less spectacularly, cooking in boiling water in La Paz takes a lot more time than at normal elevations because the lower atmospheric pressure causes water to boil at about 90 °C instead of 100 °C as explained by the Clausius–Clapeyron equation [11].

Accurate description of atmospheric phenomena is obviously important in environmental science [12]. The altitude dependence of pressure, temperature, and the composition of the atmosphere all play dominant roles in forming weather patterns on Earth, radiative phenomena [13] such as airglow [14] on polar lights (aurora australis on the southern hemisphere and aurora borealis in the northern hemisphere) [12], and the maintenance and operation of the ozone layer [15]. It is also clear that the use of the barometric formula is not limited to planet Earth [13]; it should be valid for other solar and extrasolar planets as well because gases exist there in a gravitational field.

Most general and physical chemistry textbooks include the barometric formula given in Eq. 1 [11]. This article will show some less standard, but theoretically somewhat more acceptable formulae for the same purpose. In each case, the range of validity and the theoretical limitations on their use will be given. It will also be discussed how well they describe the actual observations on Earth.

The text here will present derivations in a sufficiently detailed form so that they can be understood without consulting other texts. These derivations are mostly based on equilibrium considerations. There are kinetic ways of deriving the barometric formula based on the speed distribution of particles [3, 5], but these will not be recalled in this article. For most of the time, radiation effects will be ignored. These play a major role especially in forming the temperature profile of the atmosphere and, through temperature, they affect the pressure dependence as well. However, radiation effects are difficult to quantify in a way that is simple enough for inclusion in this article. Instead, the disagreement between some of the theoretical formulas and reality will be used as proof of the atmospheric importance of radiative processes. The presence of water vapor in the atmosphere will also be disregarded (i.e., air will be idealized as dry air). Some laws and equation will need to be borrowed from standard physical chemistry textbooks. In these cases, the textbook by Atkins and de Paula will be used as a reference [11]. Furthermore, sometimes it will be necessary to find the solutions of certain ordinary differential equations. This will not be done in detail here. An excellent account of first-order differential equations in chemistry was published as the first article ever in ChemTexts [16]. For other differential equations, the solutions will be simply given. Use of the rules of differentiation allows the validity of these solutions to be tested readily. It is more laborious to find these solutions, but even symbolic mathematical software such as Mathematica can do this, so all that remains to be done by the investigator is to learn the syntax.

Derivation of the barometric formula at constant temperature

Mechanical line of thought

In the mechanical way of thought, the starting point is that the change in the gas pressure going down in a gravity field is only caused by the weight of the gas. Imagine a very thin layer of air in a column that has a horizontal cross section of A, and its vertical size is dh (i.e., infinitesimal). The pressure acting on the lower surface is larger than on the upper one by dp (Fig. 1). The difference dp is caused by the weight of the air between the two surfaces, so:

$${\text{d}}p = \frac{{\rho \left( h \right)\,g\,A\,{\text{d}}h}}{A} = \rho \left( h \right)\,g\,{\text{d}}h$$
(2)

In this formula, ρ(h) (Greek letter rho) is the mass density of air at altitude h, and g is the gravitational acceleration (9.81 m s−2 for mid-latitude geographical locations). The mass density of an ideal gas can be calculated from the definition of mass density and the ideal gas law [11] as ρ = m/V = nM/V and n/V = p/(RT), so this equation will give a direct connection between mass density and pressure:

$$\rho \left( h \right) = \frac{p\left( h \right)M}{{RT}}$$
(3)

The quantities used in this equation were used and defined in Eq. 1. The next step is combining Eqs. 2 and 3 to calculate the derivative of pressure with respect to altitude. Altitude h is measured starting from the surface of Earth, so it increases upward, but pressure decreases upward, so a negative sign is also needed in the final equation:

$$\frac{{{\text{d}}p}}{{{\text{d}}h}}\, = - \frac{Mg}{{RT}}p\left( h \right)$$
(4)

In this section, it is assumed that the temperature does not change with altitude. Thus, the whole term Mg/(RT) in Eq. 4 is independent of altitude. Therefore, Eq. 4 is one of the simplest possible ordinary differential equations: a first-order, linear one, whose solution is the exponential function [16]. Using the notation p0 for the pressure at zero altitude, the solution takes the following form:

$$p = p_{0} {\text{e}}^{{ - \frac{Mgh}{{RT}}}} = p_{0} {\text{e}}^{{ - \frac{h}{H}}}$$
(5)

This becomes identical to the classical barometric formula in the first part of Eq. 1 if the ideal gas law in Eq. 3 is used again for the pressure and mass density at sea level: M/RT = ρ0/p0. The value of scale height H is between 4 and 8 km depending on the temperature.

Fig. 1
figure 1

Schematics for calculating the pressure difference with an altitude difference of dh

Mixed thermodynamical-mechanical thinking

In this sequence of thought, the starting point will be that equilibrium is maintained under conditions when the forces acting on a particle are balanced. Gravity exerts an obvious force on any particle in the gas phase (which would be the weight of the molecule if it were exerted on some object below):

$$F_{{{\text{gr}}}} = mg$$
(6)

The force balancing Fgr is a less obvious one. In mechanics, the concept of potential energy is used quite widely [11]. Actually, there is something very similar in thermodynamics as well: it is called chemical potential, μ (Greek letter mu). Usually, force can be calculated as the spatial derivative (gradient) of the potential, and this is true for chemical potential as well:

$$F_{{{\text{td}}}} = - \frac{{{\text{d}}\mu }}{{{\text{d}}h}}$$
(7)

The negative sign is the consequence of the fact that smaller chemical potentials are preferred, so the force points into the direction of decrease in the potential. The pressure dependence of the chemical potential of an ideal gas at constant temperature is readily given by a simple formula [11]:

$$\mu = \mu^\circ + RT\ln \frac{p\left( h \right)}{{p^\circ }}$$
(8)

Therefore, the gradient of chemical potential can be calculated using the derivation rules for a composite function:

$$\frac{{{\text{d}}\mu }}{{{\text{d}}h}} = \frac{{{\text{d}}\mu }}{{{\text{d}}p}}\frac{{{\text{d}}p}}{{{\text{d}}h}}$$
(9)

Combining Eqs. 8 and 9 and calculating the derivative gives:

$$F_{{{\text{td}}}} = - \frac{{{\text{d}}\left( {RT\ln \frac{p\left( h \right)}{{p^\circ }}} \right)}}{{{\text{d}}p}}\frac{{{\text{d}}p}}{{{\text{d}}h}} = - RT\frac{p^\circ }{{p\left( h \right)}}\frac{1}{p^\circ }\frac{{{\text{d}}p}}{{{\text{d}}h}} = - \frac{RT}{{p\left( h \right)}}\frac{{{\text{d}}p}}{{{\text{d}}h}}$$
(10)

Before applying the condition of balancing the two forces, some dimensional analysis is necessary, which reveals that Fgr (unit: newton) gives the force acting on a single molecule, whereas Ftd (unit: newton per mole) is the force acting on one mole of molecules. Therefore, the Avogadro constant (NA = 6.02 × 1023 mol−1) needs to be included in one of the forms. Considering all these, the balanced equation becomes:

$$N_{{\text{A}}} mg = - \frac{RT}{{p\left( h \right)}}\frac{{{\text{d}}p}}{{{\text{d}}h}}$$
(11)

When the definition of molar mass (M = NAm) is introduced in this formula, it is clear that Eq. 4 is derived here by an independent line of thought and the end result of these considerations will also be Eq. 1.

A method based on statistical thermodynamics

Statistical thermodynamics has an important formula for the energy distribution of particles, which is called the Boltzmann distribution [11]. It states that in any molecular system in thermal equilibrium, the following equation will hold for the number of particles in a state with energy ε (nε) and the number of particles in the ground state (n0):

$$\frac{{n_{\varepsilon } }}{{n_{0} }} = {\text{e}}^{{ - \varepsilon /\left( {kT} \right)}}$$
(12)

Here, T is the absolute temperature, whereas k is the Boltzmann constant (k = R/NA = 1.38 × 10−23 J K−1). Thermal equilibrium means that the temperature is the same everywhere, i.e., it does not have a gradient. In this case, the difference between the energies of particles at different altitudes comes only from the potential energy, which can be calculated for a molecule in a simple manner:

$$\varepsilon_{h} = mgh$$
(13)

In an ideal gas at a constant temperature, the ratio of nε and n0 is exactly the same as the ratio of pressures:

$$\frac{{n_{{\varepsilon_{h} }} }}{{n_{0} }} = \frac{p\left( h \right)}{{p_{0} }}$$
(14)

Substituting Eqs. 13 and 14 into Eq. 12 gives the following expression:

$$\frac{p\left( h \right)}{{p_{0} }} = {\text{e}}^{ - mgh/kT}$$
(15)

This is, again, identical to Eq. 1 as m = M/NA and k = R/NA.

Allowing for temperature changes

General thoughts

It is well known from experience that the temperature of air changes with altitude. So, when a more realistic barometric formula is sought, this fact must be somehow taken into account. The first thing to note is that the considerations based on statistical mechanics must be abandoned entirely in this case, as their underlying principle is the concept of thermal equilibrium.

On the other hand, the mechanical way of thought does not need any adjustment, so Eq. 4 is still valid, the only difference being that temperature T becomes a function of altitude h in it, which means that the simple solution in Eq. 5 cannot be used any more. The mixed thermodynamical-mechanical thinking is not beyond help, but this will be discussed in a separate subsection.

There are two strategies to deal with the problem of temperature change: the first is to simply measure it and substitute the empirical temperature dependence into Eq. 4. This method is probably intellectually less satisfying than the alternative that will be presented in much detail as using the observed dependence does not even attempt to explain the findings. The second strategy is to look for a way of thought which either gives the altitude dependence of temperature directly or connects the altitude dependence of temperature and pressure.

As a first approach, one should think about the fact that the temperature differences with altitude in the atmosphere are sustained despite the fact that heat conduction would tend to equalize them. Although the temperature of air does change even at a given altitude, this is quite slow compared to the usual rate of heat conduction and is primarily caused by changes in the irradiation (day and night cycles, for example). So, it is a good starting point to think that constant temperature at a given altitude is maintained despite the fact that heat conduction occurs vertically. In short, a transport equation is needed here. The formulas describing heat transport are fully analogous with Fick's first and second laws (which describe the transport of matter). In physics, the direct analog of Fick's first law is called Fourier's law, whereas the direct analog of Fick's second law [11] is called the heat equation. The latter is important for our purposes here. In one dimension, it is stated as:

$$\frac{\partial T}{{\partial t}} = \frac{\kappa }{{\rho c_{{\text{w}}} }}\frac{{\partial^{2} T}}{{\partial h^{2} }}$$
(16)

The proportionality factor κ (Greek letter kappa) in this equation is called thermal conductivity, and cw is the specific heat. From the kinetic-molecular theory of gases, κ can be given for an ideal gas as follows [11]:

$$\kappa = \frac{2\nu R}{{N_{{\text{A}}} {\uppi }d^{2} }}\sqrt {\frac{2RT\left( h \right)}{{{\uppi }M}}}$$
(17)

The previously undefined quantities in this equation are ν (Greek letter nu), which is one half of the number of degrees of freedom for the molecule (dimensionless) and the diameter d of the molecule. This formula implies that the thermal conductivity of air will also change with altitude if the temperature changes. However, the only significant information used from Eq. 17 is the fact that κ is never zero.

As discussed previously, a convenient starting point of thinking is that the temperature of air at a given altitude does not change in time even though thermal conduction occurs. Mathematically, this is expressed by:

$$\frac{\partial T}{{\partial t}} = 0$$
(18)

Therefore, the right side of Eq. 16 must also be zero. κ is never zero (although altitude-dependent), cw and ρ are also positive, so the second partial derivative with respect to altitude should be zero at all points:

$$\frac{{\partial^{2} T}}{{\partial h^{2} }} = 0$$
(19)

This is only possible if the first partial derivative is constant. This quantity will be denoted α (Greek letter alpha) and called the thermal gradient of the atmosphere (unit: kelvin per meter). It is known that temperature decreases with altitude, so because of our usual human preference for positive numbers, α is defined as:

$$- \alpha = \frac{{{\text{d}}T}}{{{\text{d}}h}}$$
(20)

Integrating Eq. 20 with the introduction of T0 (the temperature at sea level) and T(h) (temperature at altitude h) gives:

$$T\left( h \right) = T_{0} - \alpha h$$
(21)

The essence of this equation is that the atmosphere can only be in a stationary state if the temperature decreases linearly with altitude (or isothermal, which means α = 0). This is in quite nice agreement with the experimental observations for the lower atmosphere. A notable property of Eq. 21 is that, taken literally, it would allow a limitless decrease in temperature. Of course, negative temperatures do not make sense on the absolute scale, so the use of this formula will only be reasonable until a limiting altitude. In fact, a deeper analysis of heat conduction reveals that it is necessary to assume both an upper and lower boundary. The lower boundary is obvious: it is the surface of Earth, whereas the upper boundary is less self-explanatory. Whatever it might be, its altitude must not be higher than T0/α, and the independence of the temperature of time in the whole atmosphere (i.e., the stationary state) is caused by the fact that the amount of heat entering through the lower boundary is the same as the one escaping through the upper boundary.

At this point, it should be pointed out that the picture sketched thus far for interpreting the atmospheric temperature profile is highly incomplete. The heat equation shown in Eq. 16 does not include the so-called source term, which means that it is assumed that heat is not produced within the atmosphere. In fact, this occurs because of the absorption of sunlight. Furthermore, heat loss also occurs through thermal radiation, which is also excluded from the considerations. In the following sections, theoretical considerations will be presented to interpret the value of the thermal gradient α based on thermodynamic thinking alone. These will be compared with the actual findings in later sections.

Instead of attempting to determine the value of α in a theoretical manner, Eq. 21 is first substituted back into Eq. 4, which has already been shown to be valid no matter what the temperature changes are. The result is:

$$\frac{{{\text{d}}p}}{{{\text{d}}h}}\, = - \frac{Mg}{{R\left( {T_{0} - \alpha h} \right)}}p\left( h \right)$$
(22)

So, this line of thought decouples the problems of temperature and pressure changes. Equation 22 is still a well-behaved, separable differential equation, which can be solved routinely:

$$p\left( h \right) = p_{0} \left( {1 - \frac{\alpha }{{T_{0} }}h} \right)^{{\frac{Mg}{{\alpha R}}}}$$
(23)

Equation 23 is an improved barometric formula, as it incorporates the temperature change as well.

Now, attention can be turned to finding theoretical estimates of the thermal gradient of the atmosphere.

Simple conservation of energy

Possibly the simplest approach is to include the potential energy in the gravity field as part of the overall energy of the molecule. The average internal energy of a single molecule of a perfect gas at temperature T is νkT, and the common convention is that sea level is the zero point of potential energy. At higher altitude, the internal energy of the molecule is partially transformed into potential energy. Therefore, the internal energy and, consequently, the temperature are smaller than at sea level. Conservation of energy sets the following equation:

$$\nu kT_{0} = mgh + \nu kT\left( h \right)$$
(24)

After multiplying by the Avogadro constant and some additional rearrangements, this yields a straightforward expression for T(h):

$$T\left( h \right) = T_{0} - \frac{Mg}{{\nu R}}h$$
(25)

Equation 25 is in full agreement with Eq. 21. The theoretically obtained temperature gradient is:

$$\alpha = \frac{Mg}{{\nu R}}$$
(26)

This would give an estimate of 0.0137 K m−1 = 13.7 K km−1 for the temperature gradient. The experimental value (as discussed later) is 0.00649 K m−1 = 6.49 K km−1 for the lowest 10 km of the atmosphere.

Reversible adiabatic expansion of an ideal gas

In the explanations following Eq. 21, it was already mentioned that the model predicting a linear change in the temperature as a function of elevation was based on the stationary state of the heat equation, which implies that the same amount of heat enters and escapes the atmosphere at different places. So altogether, the heat exchange with the environment is zero (of course, radiation absorption and emission are still neglected in this model, and the possible role of water evaporation and condensation is also excluded). In this model, the decrease in temperature with increasing altitude may easily be attributed to the adiabatic expansion of an ideal gas. As the pressure and temperature change continuously and the whole atmosphere is in a stationary state, the expansion may also be assumed to be reversible. The law governing the reversible adiabatic expansion of a gas is well known from thermodynamics [11]:

$$pV^{{^{\gamma } }} = p_{0} V_{0}^{\gamma }$$
(27)

The new quantity γ (Greek letter gamma) is the ratio of the two molar heat capacities (measured at constant pressure and constant volume) of an ideal gas:

$$\gamma = \frac{{C_{p} }}{{C_{v} }} = \frac{\nu R + R}{{\nu R}} = \frac{\nu + 1}{\nu }$$
(28)

One can obtain another equation from the ideal gas law:

$$V = V_{0} \frac{{p_{0} T}}{{pT_{0} }}$$
(29)

Comparing Eqs. 27 and 29 makes it possible to eliminate the volume from the calculations:

$$T = T_{0} \left( {\frac{{p_{0} }}{p}} \right)^{1/\gamma - 1}$$
(30)

This is now an equation that connects the pressure change with the temperature change instead of giving the altitude dependence of the temperature change directly. So now Eqs. 4 and 30 together form a system of two simultaneous equations with two unknown functions. Calculating the derivative of Eq. 30 with respect to altitude h gives:

$$\frac{{{\text{d}}T}}{{{\text{d}}h}} = T_{0} p_{0}^{1/\gamma - 1} \frac{1 - 1/\gamma }{{p\left( h \right)^{1/\gamma } }}\frac{{{\text{d}}p}}{{{\text{d}}h}} = T_{0} \left( {\frac{{p_{0} }}{p\left( h \right)}} \right)^{1/\gamma - 1} \frac{1 - 1/\gamma }{{p\left( h \right)}}\frac{{{\text{d}}p}}{{{\text{d}}h}} = \left( {1 - 1/\gamma } \right)\frac{T\left( h \right)}{{p\left( h \right)}}\frac{{{\text{d}}p}}{{{\text{d}}h}}$$
(31)

It is now advantageous to substitute Eqs. 4 and 28 into the above formula:

$$\frac{{{\text{d}}T}}{{{\text{d}}h}} = - \left( {1 - \frac{\nu }{\nu + 1}} \right)\frac{T}{p\left( h \right)}\frac{Mg}{{RT}}p\left( h \right) = - \frac{Mg}{{\left( {\nu + 1} \right)R}}$$
(32)

This formula is still in full agreement with Eqs. 20 and 21, but gives a theoretical estimate for the temperature gradient of the atmosphere that is slightly different from Eq. 26:

$$\alpha = \frac{Mg}{{\left( {\nu + 1} \right)R}}$$
(33)

The numerical value is α = 0.00978 K m−1 = 9.78 K km−1 from this equation.

Salvaging the mixed thermodynamical-mechanical thinking

At this point it should be noted that all the considerations with altitude-dependent temperature have been based on the mechanical approach to the problem thus far. Since we consider air to be a single ideal gas, the chemical potential is the same as the molar Gibbs energy (Gm), and it depends on both temperature and pressure. The thermodynamic force would then be given as:

$$F_{{{\text{td}}}} = \frac{{{\text{d}}\mu }}{{{\text{d}}h}} = - \left( {\frac{{\partial G_{{\text{m}}} }}{\partial p}} \right)_{T} \frac{{{\text{d}}p}}{{{\text{d}}h}} - \left( {\frac{{\partial G_{{\text{m}}} }}{\partial T}} \right)_{p} \frac{{{\text{d}}T}}{{{\text{d}}h}}\quad ???$$
(34)

The three question marks at the end of this equation mean that it will be shown to be incorrect later. The first term can be simplified by using the equation that the partial derivative of the Gibbs function with respect to pressure is the volume of the system [11]:

$$\left( {\frac{{\partial G_{{\text{m}}} }}{\partial p}} \right)_{T} = V_{{\text{m}}} = \frac{RT}{p}$$
(35)

The second term in Eq. 34 is the partial derivative of the Gibbs function with respect to temperature, which is the entropy [11]:

$$\left( {\frac{{\partial G_{{\text{m}}} }}{\partial T}} \right)_{p} = - S_{{\text{m}}}$$
(36)

So, the equation giving the thermodynamic force would take the following form now:

$$F_{{{\text{td}}}} = - \frac{RT}{p}\frac{{{\text{d}}p}}{{{\text{d}}h}} - \left( { - S_{{\text{m}}} } \right)\frac{{{\text{d}}T}}{{{\text{d}}h}} = - \frac{RT}{p}\frac{{{\text{d}}p}}{{{\text{d}}h}} + S_{{\text{m}}} \frac{{{\text{d}}T}}{{{\text{d}}h}}\quad ???$$
(37)

The three question marks again mean that this equation will be shown to be incorrect.

Here lies a conundrum: if this force is taken to balance gravity analogously to Eq. 11, the following formula is obtained (the derivative of temperature with respect to temperature was already denoted α):

$$\frac{{{\text{d}}p}}{{{\text{d}}h}} = - \frac{Mg}{{RT}}p - \frac{{pS_{{\text{m}}} }}{RT}\alpha \quad ???$$
(38)

Equation 4, which was based on the mechanical line of thought, was already declared to be valid even in the presence of a temperature gradient. The third law of thermodynamics guarantees that the molar entropy Sm is always positive (side note: the reversible adiabatic expansion is isentropic, so Sm would be independent of the altitude under the scenario outlined in the previous subsection). So the only way to bring Eqs. 4 and 38 into agreement is to say that α = 0, so the case is isothermal. But this scenario was already dealt with in Sect. 2.2. How can this contradiction be avoided?

It would take a large detour into the kingdom of non-equilibrium thermodynamics to resolve this contradiction. A consistent view on the nature and calculation of thermodynamic forces was a significant part of the scientific work for which Norwegian-born American physical chemist and theoretical physicist Lars Onsager (1903–1976) was awarded the Nobel Prize in Chemistry in 1968 [17]. Without going into the details, it turned out that Eq. 34 has two problems. First, the gradient of chemical potential is not the only source of thermodynamic force under non-isothermal conditions. Second, the ultimate origin of the thermodynamic force is not the change in chemical potential (μ) or temperature (T), but the change in the ratio of the chemical potential and temperature (μ/T) and inverse temperature (1/T). Therefore, the correct formula that gives the thermodynamic force is this:

$$F_{{{\text{td}}}} = - T\frac{{{\text{d}}\left( {\mu /T} \right)}}{{{\text{d}}h}} + TH_{{\text{m}}} \frac{{{\text{d}}\left( {1/T} \right)}}{{{\text{d}}h}}$$
(39)

Here, Hm is the molar enthalpy of the system. It is easily seen that the above equation is identical to Eq. 7 under constant temperature as the second term is zero and the temperature can be moved out of the differentiation in the first term. Similarly to Eq. 35, we can first replace μ by Gm, then expand the derivative considering the pressure dependence and temperature dependence separately and also substitute d(1/T) =  − dT/T2:

$$F_{{{\text{td}}}} = - T\left( {\frac{{\partial \left( {G_{{\text{m}}} /T} \right)}}{\partial p}} \right)_{T} \frac{{{\text{d}}p}}{{{\text{d}}h}} - T\left( {\frac{{\partial \left( {G_{{\text{m}}} /T} \right)}}{\partial T}} \right)_{p} \frac{{{\text{d}}T}}{{{\text{d}}h}} - TH_{{\text{m}}} \frac{1}{{T^{2} }}\frac{{{\text{dT}}}}{{{\text{d}}h}}$$
(40)

The first term can be simplified by using the equation that the partial derivative of the Gibbs function with respect to pressure is the volume of the system and then substituting the ideal gas law:

$$\left( {\frac{{\partial \left( {G_{{\text{m}}} /T} \right)}}{\partial p}} \right)_{T} = \frac{1}{T}\left( {\frac{{\partial G_{{\text{m}}} }}{\partial p}} \right)_{T} = \frac{1}{T}V_{{\text{m}}} = \frac{1}{T}\frac{RT}{p} = \frac{R}{p}$$
(41)

The second term in Eq. 40 will require the derivative of (Gm/T) with respect to temperature, which is just the essence of the Gibbs–Helmholtz equation [11, 18,19,20,21]:

$$\left( {\frac{{\partial \left( {G_{{\text{m}}} /T} \right)}}{\partial T}} \right)_{p} = - \frac{{H_{{\text{m}}} }}{{T^{2} }}$$
(42)

The equation giving the thermodynamic force takes the following form now:

$$F_{{{\text{td}}}} = - T\frac{R}{p}\frac{{{\text{d}}p}}{{{\text{d}}h}} - T\left( { - \frac{{H_{{\text{m}}} }}{{T^{2} }}} \right)\frac{{{\text{d}}T}}{{{\text{d}}h}} - \frac{{H_{{\text{m}}} }}{T}\frac{{{\text{dT}}}}{{{\text{d}}h}} = - \frac{RT}{p}\frac{{{\text{d}}p}}{{{\text{d}}h}}$$
(43)

So, with much effort, the formula already given in Eq. 10 was obtained, but now under non-isothermal conditions. Therefore, Eq. 4 follows from the thermodynamical-mechanical way of thinking under non-isothermal conditions as well.

A more refined view of gravity

Thus far, gravity was only handled through a single gravitational acceleration, either in the form of force (mg) or potential energy (mgh). The law of gravity, however, requires a different sort of dependence: gravitational acceleration depends on the altitude as the gravitational force acting upon an object is smaller when it is farther away from the center of Earth. Given for the force acting on mass m at altitude h, the force exerted by gravity takes the following form:

$$F_{\rm gr} = \frac{{\gamma _{{\rm gr}} m_{\rm E} m}}{{\left( {R_{\rm E} + h} \right)^{2} }}$$
(44)

Here, γgr is the gravitational constant (γgr = 6.67 × 10−11 kg−1 m3 s−2), mE is the mass of the Earth (mE = 5.97 × 1024 kg), and RE is the radius of the Earth (RE = 6.37 × 106 m). Instead of using all these parameters, it is better to define g0 as the gravitational acceleration at the surface of the Earth (g0 = γgrmE/RE2 = 9.81 m s−2) and give g as a function of h:

$$g\left( h \right) = g_{0} \left( {\frac{{R_{{\text{E}}} }}{{R_{{\text{E}}} + h}}} \right)^{2}$$
(45)

The potential energy also takes a more complicated form:

$$E_{{{\text{gr}}}} \left( h \right) = \frac{{mg_{0} R_{{\text{E}}} h}}{{R_{{\text{E}}} + h}}\left( { = - \int\limits_{0}^{h} {mg\left( z \right){\text{d}}z} } \right)$$
(46)

Some comments on this equation may be interesting, although they may not be directly relevant to the barometric formula. When h tends to infinity in Eq. 46, Egr(h) will tend to the finite limit of mg0RE. This is the energy needed for a gas molecule of mass m to escape the gravity of Earth. Calculations for the smallest of all gas particles, the hydrogen molecule (m = 3.32 × 10−27 kg), give 2.07 × 10−19 J for this limit. The average kinetic energy of the hydrogen molecule at 300 K (which is not very far from the usual surface temperature on the Earth) is 1.5kT = 6.21 × 10−21 J, which is more than an order of magnitude lower than the limit. What is remarkable here is that a very common explanation of the low concentration of hydrogen and helium in the atmosphere is that these gases escape to outer space. Yet, at the surface of the Earth, they certainly do not have enough energy to do so (in other words, the average speed of their molecules is well below the escape velocity at sea level). It should also be noted that any possible gas escape is also limited by the mean free path, i.e., the average distance a molecule can travel between two collisions, which is less than 100 nm at the surface of the Earth. More will be said about this issue at the end of Sect. 6.

Following in the footsteps of isothermal thinking, Eq. 45 can be simply substituted into mechanics-based Eq. 4 to yield:

$$\frac{{{\text{d}}p}}{{{\text{d}}h}}\, = - \frac{{Mg_{0} }}{RT}\left( {\frac{{R_{{\text{E}}} }}{{R_{{\text{E}}} + h}}} \right)^{2} p$$
(47)

The solution of this separable ordinary differential equation is:

$$p\left( h \right)\, = p_{0} {\text{e}}^{{ - \frac{{Mg_{0} R_{{\text{E}}} h}}{{RT\left( {R_{{\text{E}}} + h} \right)}}}}$$
(48)

This formula can also be derived by statistical thermodynamics using Eq. 46 as the potential energy.

The equation expressing the conservation of energy is now stated by a modification of Eq. 24 with the updated potential energy given in Eq. 46:

$$\nu kT_{0} = \frac{{mg_{0} R_{{\text{E}}} h}}{{R_{{\text{E}}} + h}} + \nu kT\left( h \right)$$
(49)

The temperature as a function of altitude can be given after a straightforward rearrangement:

$$T\left( h \right) = T_{0} - \frac{{mg_{0} R_{{\text{E}}} h}}{{\left( {R_{{\text{E}}} + h} \right)\nu k}}$$
(50)

It should be noted that this formula predicts non-linear change, which is a contradiction to Eq. 21 that awaits some explanation.

Setting T = 0 in Eq. 49 makes it possible to find the maximum altitude a molecule can achieve, hmax:

$$h_{\max } = \frac{{\nu RT_{0} R_{{\text{E}}} }}{{Mg_{0} R_{{\text{E}}} - \nu RT_{0} }}$$
(51)

For air at 288.15 K, a numerical value would be hmax = 22 km.

Now, everything is ready to set up a new differential equation incorporating both the temperature change and the refined view of gravity; this can be done by substituting Eq. 50 into Eq. 47:

$$\frac{{{\text{d}}p}}{{{\text{d}}h}}\, = - \frac{{Mg_{0} }}{{R\left( {T_{0} - \frac{{mg_{0} R_{{\text{E}}} h}}{{\left( {R_{{\text{E}}} + h} \right)\nu k}}} \right)}}\left( {\frac{{R_{{\text{E}}} }}{{R_{{\text{E}}} + h}}} \right)^{2} p\left( h \right)$$
(52)

This equation can be stated in a somewhat more orderly form after some rearrangements:

$$\frac{{{\text{d}}p}}{{{\text{d}}h}}\, = - \frac{{\nu Mg_{0} R_{{\text{E}}}^{2} }}{{\left( {R_{{\text{E}}} + h} \right)\left[ {\nu RT_{0} R_{{\text{E}}} - \left( {Mg_{0} R_{{\text{E}}} - \nu RT_{0} } \right)h} \right]}}p$$
(53)

This differential equation might seem frightening, but it is still a separable one. Therefore, routine calculations yield a full solution:

$$p\left( h \right)\, = p_{0} \left( {\frac{{\nu RT_{0} R_{{\text{E}}} - \left( {Mg_{0} R_{{\text{E}}} - \nu RT_{0} } \right)h}}{{\left( {R_{{\text{E}}} + h} \right)\nu RT_{0} }}} \right)^{\nu }$$
(54)

Similarly to a previous line of thought, it is also possible to substitute the reversible adiabatic formula of Eq. 30 and the refined view of gravity in Eq. 45 into the mechanics-based Eq. 4:

$$\frac{{{\text{d}}p}}{{{\text{d}}h}}\, = - \frac{{Mg_{0} p^{1/\gamma } }}{{RT_{0} p_{0}^{1/\gamma - 1} }}\left( {\frac{{R_{{\text{E}}} }}{{R_{{\text{E}}} + h}}} \right)^{2}$$
(55)

This is again a separable differential equation, the solution of which is:

$$p\left( h \right) = \left( {p_{0}^{{1/\left( {\nu + 1} \right)}} - \,\frac{{Mg_{0} R_{{\text{E}}} p_{0}^{{1/\left( {\nu + 1} \right)}} h}}{{\left( {\nu + 1} \right)RT_{0} \left( {R_{{\text{E}}} + h} \right)}}} \right)^{\nu + 1}$$
(56)

The dependence of temperature on altitude is then given as:

$$T\left( h \right) = T_{0} \left( {\frac{{p_{0} }}{p\left( h \right)}} \right)^{1/\gamma - 1} = T_{0} \left( {1 - \,\frac{{Mg_{0} R_{{\text{E}}} h}}{{\left( {\nu + 1} \right)RT_{0} \left( {R_{{\text{E}}} + h} \right)}}} \right)$$
(57)

Finally, the highest altitude that makes sense in this model is:

$$h_{\max } = \frac{{\left( {\nu + 1} \right)RT_{0} R_{{\text{E}}} }}{{Mg_{0} R_{{\text{E}}} - \left( {\nu + 1} \right)RT_{0} }}$$
(58)

A numerical estimate here would be hmax = 30 km.

Equation 57 again displays non-linear dependence, which—similarly to Eq. 50—contradicts Eq. 21. Now it is time to think more deeply about this fact. The equations developed for the altitude dependence of temperature after introducing the more refined view of gravity all predict non-linear formulas. In the case of Eq. 50, the mechanics-based differential equation given was not even used in the derivation, so modifying in Eq. 4 would not help the problem. The starting point of deducing a linear temperature dependence was the heat equation in Eq. 16. This assumes that the only driving force of heat transfer is the temperature gradient. The discrepancies imply that a gradient in gravitational acceleration is also a driving force of heat transfer, an effect that is not reflected by the usual heat equation. This would not be surprising in non-equilibrium thermodynamics at all. Actually, a very similar sequence of thought was already used: the temperature gradient had to be considered an additional driving force of matter transfer when the thermodynamical-mechanical thinking was salvaged.

Comparison with observations

In science, any theory should be compared to experimental observations to prove its usefulness. In the case of atmospheric pressure and barometric formulas, this comparison is somewhat hindered by the fact that pressure and temperature depend on the meteorological conditions according to the time of the day and year. However, pressure altimeter calibrations, aircraft performance calculations, rocket design, ballistic tables, meteorological diagrams, and other atmospheric modelling studies all require at least some sort of average values of pressures and temperatures as a function of altitude. For this purpose, the US standard atmosphere was developed in 1976, which gives an idealized, steady-state representation of mean annual conditions at mid-latitude from sea level up to 1000 km and is entirely empirical [22, 23]. The temperature at sea level is taken as T0 = 288.15 K (15 °C), the pressure at sea level is p0 = 101,325 Pa, and the atmospheric gases are assumed to obey the ideal gas law. In the forthcoming section, the barometric formulas developed in earlier sections will be compared to the US standard atmosphere, which is shown in Fig. 2. It should be pointed out that the US standard atmosphere is still a model: the real atmospheric temperature and pressure profiles show obvious daily and seasonal variations and are also somewhat dependent on the geographical location.

Fig. 2
figure 2

Temperature and pressure at different altitudes in the atmosphere. Solid blue (temperature) and black (pressure) lines are those given in the US standard atmosphere [18, 19]. Other curves are labelled by a letter, the meaning of which is given in Table 1. As explained in the text, curve G was calculated using Eq. 23 with the real value of α (0.00649 K m−1 = 6.49 K km−1). ISS: location of the International Space Station

In terms of temperature, the first 11 km is like a theorist's dream. It is in fact a linear decrease, in agreement with Eq. 21, with α = 0.00649 K m−1 = 6.49 K km−1 (which is often quoted as 1 °C decrease for each 150 m of increase in elevation). Equation 26 gives the estimate α = 0.0137 K m−1 = 13.7 K km−1, which is about double the observed value, whereas Eq. 32 shoots significantly closer with α = 0.00978 K m−1 = 9.78 K km−1. This suggests that the adiabatic expansion scenario may be closer to reality than simple conservation of energy. However, the rest of the temperature curve seems close to hopeless from the point of view of simple quantitative interpretation. There is a constant temperature part (about 215 K) from 11 to 20 km. It should be noted that real atmospheric conditions seldom show such an extended isothermal region, and this is one of the simplifications of the US standard atmosphere. This region is followed by an increase (often called temperature inversion) up to almost 0 °C at an altitude of 50 km, then a sharp drop to reach a minimum of 185 K at 90 km and finally a gradual increase until the temperature stabilizes at 1000 K above 300 km. In the theoretical considerations presented in earlier sections, there was nothing that made an increase of temperature with increasing elevation possible. Qualitatively, it is easy to understand that the phenomenon is caused by the effects of radiation [13]. For example, it is quite common knowledge that the ozone layer, most of which is between 15 and 35 km, absorbs most of the ultraviolet radiation of the Sun, which is converted to heat in the process [10, 15]. This causes the temperature increase in that region. Both absorption and emission of electromagnetic radiation also occur simultaneously in all parts of the atmosphere, and these processes have a very important influence on the temperature profile. Within the lower 10 km of air, the radiative heat source is not very large because essentially all absorbable radiation is stopped by the upper layers [13]. However, solar heating of the surface and condensation of water vapor (cloud formation) still could influence the temperature there.

The pressure behaves in a much more predictable manner in Fig. 2: at least it decreases monotonically with increasing altitude. Actually, six different formulas were derived in the earlier sections to interpret this dependence; these are collected in Table 1 for easy reference, and are labelled A–F. Four of them (C–F) came with a limitation of altitude (hmax); these can be calculated as T0/α for C and E, whereas Eqs. 51 and 58 are used for cases D and F. It is now worth computing these limits numerically; they are 21, 29, 22, and 30 km for C, D, E, and F, respectively.

Table 1 Different barometric formulas derived in the text. T0 = 288.15 K was used from the US standard atmosphere

Figure 2 shows that theoretical curve pairs A–B, C–D, and E–F are almost identical, which implies that considering the change in gravitational acceleration is unnecessary in the validity range of these formulas. Curves C and D give the poorest agreement with observations. This is not surprising as the thermal gradient of the atmosphere was overestimated by a factor of 2 by the sequence of thought based on the conservation of energy. Curves A and B (isothermal) consistently overestimate the pressure, whereas curves E and F (adiabatic) underestimate it by approximately the same amount. It was already stated that curves C–F have a theoretical upper limit on their validity (hmax). No such thing exists for curves A and B. Nevertheless, they become practically useless above 30 km. Unsurprisingly, the best way to describe the observed data is using Eq. 23 with the real value of α (0.00649 K m−1 = 6.49 K km−1). This is also shown in Fig. 2 by curve G. The curve underestimates the real pressure somewhat, but the deviation never exceeds 5% at altitudes lower than 15 km. That means this formula is very useful for the commercial airline industry or human hiking. At 30 km, the formula gives only one fourth of the actual pressure (the theoretical validity limit is hmax = 44 km in this case).

It should be noted that the primary reason for the general failure of the forms displayed in Table 1 above 20 km is the inability to account for the variation in temperature. However, this is irrelevant for the differential form shown in Eq. 47, which can be tested independently. In the US standard atmosphere, it is possible to determine the observed pressure gradient at each altitude, which is denoted π (Greek letter pi):

$$\pi \left( h \right) = \frac{{{\text{d}}p_{{{\text{observed}}}} }}{{{\text{d}}h}}$$
(59)

The validity check of Eq. 47 uses these pressure gradients directly through calculating the relative difference, Δ (Greek uppercase letter delta) between the observed gradient and the right-hand side of Eq. 47:

$$\Delta \left( h \right) = \left( {\pi \left( h \right) + \frac{{Mg_{0} }}{{RT_{{{\text{observed}}}} \left( h \right)}}\left( {\frac{{R_{{\text{E}}} }}{{R_{{\text{E}}} + h}}} \right)^{2} p_{{{\text{observed}}}} \left( h \right)} \right)\pi^{ - 1}$$
(60)

Figure 3 displays Δ as a function of altitude h. It can be seen that the deviations are really minor below 60 km, and these are most likely caused by the error of the numerical differentiation necessary in calculating π from data of the US standard atmosphere. However, major differences (up to a multiplying factor of 6) occur above this. These cannot be caused by the imprecision of the temperature as the calculations use those given in the standard US atmosphere itself. Also, the derivation of Eq. 47 relies on a simple mechanical sequence of thought; there is no known source of conceptual error in it.

Fig. 3
figure 3

Altitude dependence of the relative difference between the observed pressure gradient and that calculated by Eq. 4. The definition of Δ is given in Eq. 59

However, at this point, it should be remembered that air is not a single ideal gas but a mixture of different gases. Quantities h, p, T, and π are observed data. RE, g0, and R are natural constants. With this knowledge, it is possible to rearrange Eq. 47 so that the only remaining quantity, the molar mass, is expressed:

$$M\left( h \right) = - \pi \left( h \right)\frac{{RT_{{{\text{observed}}}} \left( h \right)}}{{p_{{{\text{observed}}}} \left( h \right)g_{0} }}\left( {\frac{{R_{{\text{E}}} + h}}{{R_{{\text{E}}} }}} \right)^{2}$$
(61)

Figure 4 displays the values of M as a function of altitude h. In the beginning, M = 29 g/mol is in perfect agreement with the known composition of air. At 1000 km, however, M = 4 g/mol is identical to the molar mass of helium. This clearly hints that the composition of air changes drastically with altitude. In fact, this is in full agreement with observations: at 1000 km, with an overall pressure of 7.5 nPa, more than 90 mol% of the atmosphere is helium gas. Therefore, the closing section of this article will deal with altitude-dependent composition changes.

Fig. 4
figure 4

Altitude dependence of the average molar mass of the atmosphere as calculated by Eq. 60

Composition changes in the atmosphere

For most practical purposes, mixtures of ideal gases behave like a single ideal gas. Thus far, we have assumed that the fact that air is a mixture of gases is sufficiently taken into account by using the average molar mass. Yet, it is a well-known observation that the relative abundance of a lighter gas increases with altitude.

As a first approach, we might remark that if the use of Eq. 4 is attempted separately for the components of a mixture, the pressure of those with lower molar masses decreases with increasing altitude less as the relative pressure gradient is smaller. However, the mechanical thinking that yielded Eqs. 4 or 47 is not easily extended in this case: the weight of the air column has the same pressure contribution irrespective of the composition of the gas below. Only the overall weight matters and it is not possible to divide this into contributions for mixtures of gases. Yet, it may seem rather obvious that the pressure increase balancing the weight must be distributed between the components in the proportion that they cause the overall pressure. For a component X with a partial pressure of pX, the following equation is obtained in this way:

$$\frac{{{\text{d}}p_{{\text{X}}} }}{{{\text{d}}h}} = \frac{{p_{{\text{X}}} }}{p}\frac{{{\text{d}}p}}{{{\text{d}}h}}$$
(62)

Substituting this back into Eq. 47 gives:

$$\frac{{{\text{d}}p_{{\text{X}}} }}{{{\text{d}}h}}\, = - \frac{{Mg_{0} }}{RT\left( h \right)}\left( {\frac{{R_{{\text{E}}} }}{{R_{{\text{E}}} + h}}} \right)^{2} p_{{\text{X}}} \left( h \right)$$
(63)

Here, it must be strongly emphasized that M is the average molar mass of the mixture, and not the molar mass of X. Using this equation for two different components, X and Y, and considering pX as function of pY rather than h yields the following, very simple differential equation:

$$\frac{{{\text{d}}p_{{\text{X}}} }}{{{\text{d}}p_{{\text{Y}}} }}\, = \frac{{p_{{\text{X}}} }}{{p_{{\text{Y}}} }}$$
(64)

This differential equation has the unexpected consequence that the ratio of the two partial pressures does not change with altitude, which means that the composition would not change, either.

Based on the mixed thermodynamical-mechanical thinking, the forces acting upon a single molecule were taken into account. The chemical potential of an ideal gas in an ideal mixture (μX) is given as [11]:

$$\mu_{{\text{X}}} \, = \mu_{{\text{X}}} ^*\, + RT\ln \frac{{p_{{\text{X}}} }}{p^\circ }$$
(65)

Here, μX* is the chemical potential in the standard state and p° is the standard pressure (105 Pa by convention). As μX* is usually taken to be identical to μX° (see Eq. 8), μX is identical to the chemical potential of a pure sample of X gas at the pressure pX. In other words, the chemical potential of an ideal gas does not depend on what other ideal gases are present in a mixture. So, Eqs. 3943 can be used for the components of a mixture directly: the only modification needed is to use partial pressures and the molar masses of the individual components:

$$\frac{{{\text{d}}p_{{\text{X}}} }}{{{\text{d}}h}}\, = - \frac{{M_{{\text{X}}} g_{0} }}{RT\left( h \right)}\left( {\frac{{R_{{\text{E}}} }}{{R_{{\text{E}}} + h}}} \right)^{2} p_{{\text{X}}} \left( h \right)$$
(66)

Most unfortunately, this formula contradicts the one in Eq. 63, which was the result of the mechanical way of thinking. On a conceptual level, Eq. 66 implies that the increase in the pressure of component X balances in its own weight only.

Both Eqs. 63 and 66 have potential problems. As already remarked, the implication in Eq. 63 is that the total pressure increase balancing the weight of a layer with a thickness of dh is distributed between the components in the proportion that they cause the overall pressure. This seems logical but in fact not required by mechanics. The potential problem with the derivation of Eq. 66 is even less obvious: it is the use of Eq. 65 for obtaining the chemical potentials, which is valid for an ideal mixture of ideal gases. As pointed out by Robinson [24], the constant μX* is the chemical potential of component X in a mixture of such total pressure p that pX is 105 Pa, and this (often hypothetical) mixture has the same composition and temperature as the one for which the chemical potential is calculated. This cannot be equated, without further argument, to the standard chemical potential of the pure component X (μX°). This is especially problematic for the minor components of a mixture. For example, the partial pressure of He in air at sea level pressure is about 0.5 Pa. So, in this case, μHe* would be the chemical potential of helium at the partial pressure 105 Pa in the presence of other gases so that the total pressure is 20 GPa, which clearly lies outside the usual validity range of ideal gas behavior.

The contradiction between Eqs. 63 and 66 does not submit itself to an easy resolution. When problems like this arise, it is a standard strategy to turn to experimental data. Fortunately, the composition of air as a function of altitude is readily available from some public databases: NRLMSISE-00 will be used here [25, 26] (side note: this database generates data that takes both the geographic location and the exact time into account).

Figure 5 shows a typical composition–altitude diagram for those components that are handled within the NRLMSIS-00 model. These are N2, O2, Ar, and He as well as the somewhat less expected species of O, N, and H (atoms!). Even the identity of the species in this list indicates that gravity is most likely not the dominant force shaping the altitude dependence of the composition of the atmosphere. Photochemical processes are very important in the region above 100 km; this is nicely illustrated by the fact that atomic oxygen is the most important gas in the atmosphere between 200 and 600 km. Yet, the usefulness of the barometric formula(s) can certainly be tested on the unreactive gases helium and argon, and the partial pressures of molecular oxygen and nitrogen are also worth testing.

Fig. 5
figure 5

Partial pressures and molar concentrations of selected atmospheric gases at different altitudes. NRLMSISE-00 model input parameters [22]: year = 2000, month = 1, day = 1, hour = 12.00, Time_type = Universal, Coordinate_type = Geographic, latitude = 55.00, longitude = 45.00, height = 100.00

This test can be done very similarly to that already outlined in Eqs. 59 and 61. First, the gradient of the partial pressure of component X is calculated by numerical differentiation of the data obtained from the NRLMSIS-00 model [26]:

$$\pi_{{\text{X}}} \left( h \right) = \frac{{{\text{d}}p_{{\text{X}}} }}{{{\text{d}}h}}$$
(67)

Then this quantity is used to calculate the gradient-equivalent molar mass ηX (Greek letter eta):

$$\eta_{{\text{X}}} \left( h \right) = - \pi_{{\text{X}}} \left( h \right)\frac{RT\left( h \right)}{{p_{{\text{X}}} \left( h \right)g_{0} }}\left( {\frac{{R_{{\text{E}}} + h}}{{R_{{\text{E}}} }}} \right)^{2}$$
(68)

If Eq. 63 is valid, then ηX should be equal to the average molar mass of the mixture and should not depend on which gas is used in the calculation. On the other hand, if Eq. 66 is valid, then ηX should be identical to the molar mass for each of the components.

The calculated ηX values are shown as a function of altitude for argon, molecular oxygen, molecular nitrogen, and helium in Fig. 6. The emerging picture may be unexpected at first sight. The ηX values below 100 km are, indeed, independent of the identity of the gas and agree very well with the average molar mass of air (29 g/mol), which shows that Eq. 63 is valid in this region. The pattern of change seems complex between 100 and 200 km. Above 200 km, however, full adherence to Eq. 66 is evident as ηX values are equal to the individual molar masses of the components.

Fig. 6
figure 6

Calculated ηX values of selected atmospheric gases as a function of altitude

It is also notable that some of the ηX values are negative for helium in the intermediate region between 100 and 200 km. This arises from the fact that there is a minor increase in the partial pressure of helium in this region. It must be noted that the source of the anomaly is the steep increase in temperature in this region (Fig. 2): the molar concentrations of helium (magenta curve in Fig. 5) actually never increase with an increase in altitude.

It is worth returning to the issue of the escape of atmospheric gases to space at this point. As seen from Fig. 5, the second most abundant component of the atmosphere is the hydrogen atom (H) at 1000 km, closely followed by the oxygen atom (O). For the hydrogen atom (m = 1.66 × 10−27 kg) at this altitude, the energy necessary to escape the gravity of Earth can still be calculated from Eq. 46 by the difference Egr(h → ∞) − Egr(h = 1000 km) = 8.97 × 10−20 J. The average kinetic energy of the hydrogen atom at 1000 K (the temperature at altitude 1000 km in the US standard atmosphere) is 1.5kT = 2.07 × 10−20 J. This is still more than a factor of 4 lower than the escape limit. However, from the kinetic molecular theory of gases, it must also be remembered that the velocities are described by the Maxwell–Boltzmann distribution [11], so values much larger than the average are possible. Calculating the numerical values shows that about 0.5% of hydrogen atoms have speeds larger than the escape velocity. Also, it must be remembered that temperatures may show large variations (e.g., between day and night) at this high altitude.

Conclusion

Through the example of the barometric formula, the derivations included in this text show that there are multiple different theoretical ways to arrive at the same result. It is also illustrated how refinement of scientific ideas by considering additional factors may lead to improved conceptual understanding of natural phenomena. However, as this example also shows, the improvement does not necessarily yield a spectacularly better numerical agreement between theoretical predictions and observed data. For barometric formulas, the main reason for the deviations from measured data is that the vertical temperature change within the atmosphere is difficult to describe by simple theories. The reason for this difficulty is recognized: radiative effects are also very important in maintaining the temperature profile, but they cannot be described with formulas as simple as the barometric equations. A standard scientific strategy to handle this problem is to use the hard-to-predict variable (in this case, temperature) as an external parameter, whose value is taken directly from observations rather than obtained from the model. With this method, it could be proven that the differential form of the barometric formula is valid for the atmosphere of the Earth for the entire studied region between sea level and 1000 km of altitude.