1. Gas laws#

Note

Questions you should be able to answer at the end of this module:

  • Can I derive the ideal gas law from the collective motion of particles?

  • How are pressure, density and temperature related, when one of the three is held fixed?

  • What is a partial pressure?

  • How should I interpret virtual temperature?

Ideal gases - the kinetic theory#

We almost always consider the atmosphere to be an ideal gas (even when cloud, ice and aerosol particles form within it!). What does this mean again? Ideal gases obey the gas law:

(1)#\[ pV = k_bn_0T \]

It says that if the gas occupies a volume \(V\), we can relate easily measured properties of the gas (temperature \(T\), pressure on \(V\)’s walls \(p\) and the “amount of stuff” in \(V\), here expressed as number of particles \(n_0\)). Conveniently, this allows us to describe gases without tracking individual atoms and molecules, and we will do so in the rest of the course. But understanding why the gas law holds is actually best understood from considering the forces and energies on the collection of particles in \(V\).

Temperature#

If the distance between particles is much larger than their individual size, and the particles move in random directions with a fixed distribution of speeds, the average kinetic energy of all \(n_0\) particles, each with speed \(u_i\) and average mass \(m_a\)[1], is:

\[ \frac{1}{2}m_a\frac{1}{n_0}\sum_i^{n_0} u_i^2 \]

In the kinetic theory, this average kinetic energy over the \(n_0\) particles expresses itself as temperature \(T\):

(2)#\[ T \propto \frac{1}{2}m_a\frac{1}{n_0}\sum_i^{n_0} u_i^2 = \frac{1}{2} m_a v^2, \]

where \(v\)[2] is the single speed that all the particles would have to have to give the same kinetic energy.

Pressure#

The particles constantly bounce into each other, and into the walls. Over these collisions:

  • the particles’ kinetic energy must be preserved (else e.g. \(T\) would change without doing anything to the gas!), and

  • there must be enough collisions with the wall that the momentum carried by the colliding particles can be measured as a force \(F\), so pressure \(p=F/A\).

If \(V\) is a 3D cube with side length \(l\) and 6 sides, the area of one side is \(V/l\), so:

(3)#\[ A=6\frac{V}{l} \]

For \(n_0\) particles of average mass \(m_a\) and average speed \(v=l/t\) [3] move randomly in all three directions, their force on the walls in the \(d\)th direction is

\[ F_d = 2n_0m_a\frac{dv}{dt} = 2n_0m_a\frac{d}{dt}\left( \frac{l}{t} \right) = 2n_0m_a \frac{l}{t^2} = \frac{2n_0}{l}m_av^2, \]

where the factor 2 expresses that the particles can move both forward and backward in that direction, and collide with both walls [4]. Because this force is the same in all directions, the pressure on all walls is:

(4)#\[ p = F/A = F_d/A = \frac{\frac{2n_0}{l}m_av^2}{6\frac{V}{l}} = \frac{1}{3}\frac{n_0}{V}m_av^2 \]

The gas law#

We can now write something that looks a lot like the ideal gas law from eq. (4) by using the observation from eq. (2) \(m_av^2\propto 2T\), i.e. that temperature is completely explained by the kinetic energy of the particles:

\[ p \propto \frac{2}{3}\frac{n_0T}{V} \]

And we can turn it into the gas law exactly by defining the constant \(k_b=1.380649\times 10^{-23}\) J/K [5], which converts units of temperature into kinetic energy of molecules, so that:

(5)#\[ p = k_b\frac{n_0T}{V} \]

The gas law summarises three important relationships:

  1. If \(T=\text{cst}\), expanding the gas (\(V\uparrow\)) lowers the pressure (\(p\downarrow\)), as the particles with the same kinetic energy have to spread out, and bounce into the larger walls less frequently (Boyle’s law)

  2. If \(p=\text{cst}\), raising the temperature (\(T\uparrow\)) requires the volume to increase, to retain the same rate and momentum of particles bouncing of the walls (Charles’ first law)

  3. If \(V=\text{cst}\), raising the temperature (\(T\uparrow\)) raises the kinetic energy of the particles, so they bounce into the walls more often and more vigorously, raising the pressure (\(p\uparrow\)) (Charles’ second law).

Ideal gases of mixed composition#

Partial pressures#

In atmospheric air, \(n_0\) is a composition of many types of molecules:

\[ n_0 = n_{0_{N_2}} + n_{0_{O_2}} + n_{0_{H_2O}} + ... \]

Notice that what matters in eq. (5), is the number of particles bouncing around in \(V\). The consequence is that pressure can be linearly decomposed into pressure contributions from different gases (called partial pressures), according to how many molecules of that gas there are[6]:

\[ p = k_b\frac{n_0T}{V} = (n_{0_{N_2}} + n_{0_{O_2}} + n_{0_{H_2O}} + ...)\frac{k_bT}{V} = n_{0_{N_2}}\frac{k_bT}{V} + n_{0_{O_2}}\frac{k_bT}{V} + n_{0_{H_2O}}\frac{k_bT}{V} + ... = p_{N_2} + p_{O_2} + p_{H_2O} + ... \]

Of course, we can choose which decomposition of \(n_0\) is useful, and in atmospheric science, we almost always decompose it into the total number of water molecules \(n_{v}\)[7], and “everything else”, \(n_d\) (we usually call \(n_d\) dry air).

(6)#\[ p = (n_d + n_{v})\frac{k_bT}{V} \]

Converting to mass#

Earlier, we argued that it would be useful to have an expression for gases that don’t rely on having to count numbers and speeds of molecules. That gave us expressions for \(T\) and \(p\) and their relation (eq. (5)), but in eq. (6) we still have \(n_d\) and \(n_{v}\). In air, it is usually easier to measure masses. For example, the dry air density \(\rho_d\) measures the mass of dry air \(m_d\) in \(V\): \(\rho_d = m_d/V\), while for water, \(\rho_{v} = m_{v}/V\). To convert \(n_d\) to \(m_d\) (or any molecule number to a mass), we need to know how much a particular molecule weighs, which is expressed by the molecular mass \(m_m\) (in kg), i.e.:

\[ m = n m_m \]

Because an air volume may contain many versions of the same molecule of different molecular mass (isotopes), often \(m_m\) is reported not for one, but for \(6.022\times 10^{23}\) molecules (equal by definition to Avogadro’s number \(N_A\) and to one mole). That quantity, \(M_m = m_m*N_A\) is called the molar mass (commonly reported in grams per mole). For our conversion, it means:

(7)#\[ m = n \frac{M_m}{N_A} \]

Such that, for the decomposition chosen in eq. (6),

(8)#\[ p = (\frac{N_A m_d}{M_{m_d}} + \frac{N_A m_{v}}{M_{m_{v}}})\frac{k_bT}{V} \]

with \(M_{m_d}=28.97\) g/mol [8] and \(M_{m_v}=18.016\) g/mol. At this point we usually gather constants, giving the gas constants \(R_d\) and \(R_v\) for dry air and water:

\[ R_d = \frac{N_A k_b}{M_{m_d}} = 287.05 \text{ J / kg / K}, \quad R_v = \frac{N_A k_b}{M_{m_{v}}} = 461.5 \text{ J / kg / K} \]

You will see \(R_d\), \(R_v\) and derivatives of them many times in the future. The key thing to remember about them, is that they can only change between different gases due to differences in the gas’s (molar) mass:

\[ R_d/R_v = \frac{\frac{N_A k_b}{M_{m_d}}}{\frac{N_A k_b}{M_{m_{v}}}} = \frac{M_{m_{v}}}{M_{m_d}} = \frac{18.016}{28.97} = 0.622 = \varepsilon. \]

In fact, the fact that water vapour is \(\varepsilon = 0.622\) times lighter than dry air, is the most important reason to choose the decomposition of eq. (6). Inserting the definitions for \(R_d\) and \(R_v\) in eq. (8) and rewriting in terms of densities, then finally gives us a gas law we can practically do atmospheric science with:

(9)#\[ p = \left(\frac{R_dm_d}{V} + \frac{R_vm_{v}}{V}\right)T = \left(R_d\rho_d + R_v\rho_v\right)T \]

Virtual temperature#

Many atmospheric science problems involve calculating the lightness of air with respect to its surroundings; its buoyancy. Since \(M_{v} = 0.622M_d\), we cannot ignore the effect of water vapour in these problems [9]. But people like to work with the gas law as if it applied to dry air. To resolve this, it is common to define a temperature that still satisfies the dry gas law, even when the air is moist. Let us do this too.

If we have a volume \(V\) with \(n_d\) dry air molecules at temperature \(T\) and pressure \(p\), and we replace \(n_v\) of those dry air molecules with \(n_v\) water vapour molecules with the same kinetic energy, the gas law eq. (5) tells us that \(p\) should not have changed, i.e.

(10)#\[ p = n_d\frac{k_bT}{V} = \frac{m_d N_A}{M_d}\frac{k_b T}{V} = \rho_dR_dT \]

should be the same after we exchanged the molecules. But the mass of the dry air molecules we have removed (\(n_vM_d/N_A\) by eq. (7)) is larger than the mass we added back (\(n_vM_v/N_A\)), because the water molecules weigh less than the dry air molecules. That is, defining \(m_d\) as the dry air mass and \(m_t\) the mass of the dry/moist air mixture:

(11)#\[\begin{split} m_t & = m_d - n_v\frac{M_d}{N_a} + n_v\frac{M_v}{N_a} \\ & = m_d - \frac{n_v}{N_A}(M_d - M_v) \\ & = m_d - m_v\frac{M_d-M_v}{M_v} \end{split}\]

where in the last step, we expressed the exchanged molecules \(n_v\) in terms of their water mass: \(n_v = m_vN_A/M_v\). Since \(M_d = 1.608M_v\), \(m_t = m_d - 0.608m_v\): The moist air mass is lighter than the dry air mass by \(0.608m_v\).

What influence does this have on the gas law? We argued above that \(p\) and \(T\) are unchanged, but if we divide eq. (11) through \(V\) and rearrange for \(\rho_d\), we see that:

\[ \rho_d = \rho_t + \rho_v\frac{M_d-M_v}{M_v}. \]

That is, if we just took the lower total density of the moist air \(\rho_t\) and multiplied it by \(R_dT\), we would underestimate the pressure, by a factor proportional to i) the relative heaviness of dry molecules to moist molecules (\((M_d-M_v)/M_v\)), and ii) how much moisture there is (\(\rho_v\)). It is common to express \(\rho_v\) as a fraction of the total mass in the volume, called the specific humidity \(q_v\) (in kg water vapour per kg moist air)

\[ q_v = \frac{m_v}{m_t} = \frac{\rho_v}{\rho_t}, \]

so that \(\rho_v = \rho_t q_v\). Rewriting \(\rho_d\) in terms of \(q_v\) and \(\rho_t\), and using the definitions of the gas constants gives:

\[\begin{split} \rho_d & = \rho_t\left(1 + q_v\frac{M_d-M_v}{M_v}\right) \\ & = \rho_t\left(1 + q_v\left(\frac{R_v}{R_d} - 1\right)\right) \end{split}\]

To get the proper gas law for the moist air volume, we insert this expression in the gas law for our initial, dry volume:

(12)#\[\begin{split} p & = \rho_dR_dT \\ & = \rho_tR_dT\left(1 + q_v\left(\frac{R_v}{R_d} - 1\right)\right) \\ & = \rho_tR_dT_v \end{split}\]

In the last line, we absorbed the factor by which the dry air density is higher than that of the moist/dry air mixture (\(1+q_v\left(R_v/R_d - 1\right)\)) in a redefined temperature, called the virtual temperature \(T_v\) [10]:

(13)#\[\begin{split} T_v & = T\left(1 + q_v\left(\frac{R_v}{R_d} - 1\right)\right) \\ & = T\left(1 + 0.608 q_v\right). \end{split}\]

The point of the exercise we went through here, is to get a feeling for what \(T_v\) is: It is the temperature we would have to give to a volume that contains both dry and moist air, to bring it to the same pressure as a volume of air where we exchanged all the water vapour molecules for dry air molecules, thus modifying \(\rho_t\) to \(\rho_d\). \(T_v > T\), because we have to compensate for the fact that such an exchange would raise \(\rho_t\) to \(\rho_d\).

-->