# Joule expansion

The Joule expansion (a subset of free expansion) is an irreversible process in thermodynamics in which a volume of gas is kept in one side of a thermally isolated container (via a small partition), with the other side of the container being evacuated. The partition between the two parts of the container is then opened, and the gas fills the whole container.
The Joule expansion, treated as a thought experiment involving ideal gases, is a useful exercise in classical thermodynamics. It provides a convenient example for calculating changes in thermodynamic quantities, including the resulting increase in entropy of the universe (entropy production) that results from this inherently irreversible process. An actual Joule expansion experiment necessarily involves real gases; the temperature change in such a process provides a measure of intermolecular forces.
This type of expansion is named after James Prescott Joule who used this expansion, in 1845, in his study for the mechanical equivalent of heat, but this expansion was known long before Joule e.g. by John Leslie, in the beginning of the 19th century, and studied by Joseph Louis Gay-Lussac in 1807 with similar results as obtained by Joule.
The Joule expansion should not be confused with the Joule–Thomson expansion or throttling process which refers to the steady flow of a gas from a region of higher pressure to one of lower pressure via a valve or porous plug.

## Description

The process begins with gas under some pressure, $P_{\mathrm {i} }$, at temperature $T_{\mathrm {i} }$, confined to one half of a thermally isolated container (see the top part of the drawing at the beginning of this article). The gas occupies an initial volume $V_{\mathrm {i} }$, mechanically separated from the other part of the container, which has a volume $V_{\mathrm {0} }$, and is under near zero pressure. The tap (solid line) between the two halves of the container is then suddenly opened, and the gas expands to fill the entire container, which has a total volume of $V_{\mathrm {f} }=V_{\mathrm {i} }+V_{\mathrm {0} }$ (see the bottom part of the drawing). A thermometer inserted into the compartment on the left (not shown in the drawing) measures the temperature of the gas before and after the expansion.
The system in this experiment consists of both compartments; that is, the entire region occupied by the gas at the end of the experiment. Because this system is thermally isolated, it cannot exchange heat with its surroundings. Also, since the system's total volume is kept constant, the system cannot perform work on its surroundings. As a result, the change in internal energy, $\Delta U$, is zero. Internal energy consists of internal kinetic energy (due to the motion of the molecules) and internal potential energy (due to intermolecular forces). When the molecular motion is random, temperature is the measure of the internal kinetic energy. In this case, the internal kinetic energy is called heat. If the chambers have not reached equilibrium, there will be some kinetic energy of flow, which is not detectable by a thermometer (and therefore is not a component of heat). Thus, a change in temperature indicates a change in kinetic energy, and some of this change will not appear as heat until and unless thermal equilibrium is reestablished. When heat is transferred into kinetic energy of flow, this causes a decrease in temperature. In practice, the simple two-chamber free expansion experiment often incorporates a 'porous plug' through which the expanding air must flow to reach the lower pressure chamber. The purpose of this plug is to inhibit directional flow, thereby quickening the reestablishment of thermal equilibrium. Since the total internal energy does not change, the stagnation of flow in the receiving chamber converts kinetic energy of flow back into random motion (heat) so that the temperature climbs to its predicted value. If the initial air temperature is low enough that non-ideal gas properties cause condensation, some internal energy is converted into latent heat (an offsetting change in potential energy) in the liquid products. Thus, at low temperatures the Joule expansion process provides information on intermolecular forces.

### Ideal gases

If the gas is ideal, both the initial ($T_{\mathrm {i} }$, $P_{\mathrm {i} }$, $V_{\mathrm {i} }$) and final ($T_{\mathrm {f} }$, $P_{\mathrm {f} }$, $V_{\mathrm {f} }$) conditions follow the Ideal Gas Law, so that initially $P_{\mathrm {i} }V_{\mathrm {i} }=nRT_{\mathrm {i} }$ and then, after the tap is opened, $P_{\mathrm {f} }V_{\mathrm {f} }=nRT_{\mathrm {f} }.$
Here $n$ is the number of moles of gas and $R$ is the molar ideal gas constant. Because the internal energy does not change and the internal energy of an ideal gas is solely a function of temperature, the temperature of the gas does not change; therefore $T_{\mathrm {i} }=T_{\mathrm {f} }$. This implies that $P_{\mathrm {i} }V_{\mathrm {i} }=P_{\mathrm {f} }V_{\mathrm {f} }=nRT_{\mathrm {i} }.$
Therefore if the volume doubles, the pressure halves.
The fact that the temperature does not change makes it easy to compute the change in entropy of the universe for this process.

### Real gases

Unlike ideal gases, the temperature of a real gas will change during a Joule expansion. At temperatures below their inversion temperature gases will cool during Joule expansion, while at higher temperatures they will heat up. The inversion temperature of a gas is typically much higher than room temperature; exceptions are helium, with an inversion temperature of about 40 K, and hydrogen, with an inversion temperature of about 200 K. Since the internal energy of the gas during Joule expansion is constant, cooling must be due to the conversion of internal kinetic energy to internal potential energy, with the opposite being the case for warming.
Intermolecular forces are repulsive at short range and attractive at long range (for example, see the Lennard-Jones potential). Since distances between gas molecules are large compared to molecular diameters, the energy of a gas is usually influenced mainly by the attractive part of the potential. As a result, expanding a gas usually increases the potential energy associated with intermolecular forces. Some textbooks say that for gases this must always be the case and that a Joule expansion must always produce cooling. When molecules are close together, however, repulsive interactions are much more important and it is thus possible to get an increase in temperature during a Joule expansion.
It is theoretically predicted that, at sufficiently high temperature, all gases will warm during a Joule expansion The reason is that at any moment, a very small number of molecules will be undergoing collisions; for those few molecules, repulsive forces will dominate and the potential energy will be positive. As the temperature rises, both the frequency of collisions and the energy involved in the collisions increase, so the positive potential energy associated with collisions increases strongly. If the temperature is high enough, that can make the total potential energy positive, in spite of the much larger number of molecules experiencing weak attractive interactions. When the potential energy is positive, a constant energy expansion reduces potential energy and increases kinetic energy, resulting in an increase in temperature. This behavior has only been observed for hydrogen and helium; which have very weak attractive interactions. For other gases this "Joule inversion temperature" appears to be extremely high.

## Entropy production

Entropy is a function of state, and therefore the entropy change can be computed directly from the knowledge of the final and initial equilibrium states. For an ideal gas, the change in entropy is the same as for isothermal expansion where all heat is converted to work: $\Delta S=\int _{\text{i}}^{\text{f}}dS=\int _{V_{\text{i}}}^{V_{\text{f}}}{\frac {P\,dV}{T}}=\int _{V_{\text{i}}}^{V_{\text{f}}}{\frac {nR\,dV}{V}}=nR\ln {\frac {V_{\text{f}}}{V_{\text{i}}}}=Nk_{\text{B}}\ln {\frac {V_{\text{f}}}{V_{\text{i}}}}.$
For an ideal monatomic gas, the entropy as a function of the internal energy U, volume V, and number of moles n is given by the Sackur–Tetrode equation: $S=nR\ln \left[{\frac {V}{N}}\left({\frac {4\pi m}{3h^{2}}}{\frac {U}{N}}\right)^{3/2}\right]+{\frac {5}{2}}nR.$
In this expression m is the particle mass and h is the Planck constant. For a monatomic ideal gas U = ⁠3/2⁠nRT = nC$_V$T, with C$_V$ the molar heat capacity at constant volume.
A second way to evaluate the entropy change is to choose a route from the initial state to the final state where all the intermediate states are in equilibrium. Such a route can only be realized in the limit where the changes happen infinitely slowly. Such routes are also referred to as quasistatic routes. In some books one demands that a quasistatic route has to be reversible, here we don't add this extra condition. The net entropy change from the initial state to the final state is independent of the particular choice of the quasistatic route, as the entropy is a function of state.
Here is how we can effect the quasistatic route. Instead of letting the gas undergo a free expansion in which the volume is doubled, a free expansion is allowed in which the volume expands by a very small amount δV. After thermal equilibrium is reached, we then let the gas undergo another free expansion by δV and wait until thermal equilibrium is reached. We repeat this until the volume has been doubled. In the limit δV to zero, this becomes an ideal quasistatic process, albeit an irreversible one. Now, according to the fundamental thermodynamic relation, we have: $\mathrm {d} U=T\,\mathrm {d} S-P\,\mathrm {d} V.$
As this equation relates changes in thermodynamic state variables, it is valid for any quasistatic change, regardless of whether it is irreversible or reversible. For the above defined path we have that dU = 0 and thus T dS = P dV, and hence the increase in entropy for the Joule expansion is $\Delta S=\int _{i}^{f}\mathrm {d} S=\int _{V_{0}}^{2V_{0}}{\frac {P\,\mathrm {d} V}{T}}=\int _{V_{0}}^{2V_{0}}{\frac {nR\,\mathrm {d} V}{V}}=nR\ln 2.$
A third way to compute the entropy change involves a route consisting of reversible adiabatic expansion followed by heating. We first let the system undergo a reversible adiabatic expansion in which the volume is doubled. During the expansion, the system performs work and the gas temperature goes down, so we have to supply heat to the system equal to the work performed to bring it to the same final state as in case of Joule expansion.
During the reversible adiabatic expansion, we have dS = 0. From the classical expression for the entropy it can be derived that the temperature after the doubling of the volume at constant entropy is given as: $T=T_{i}2^{-R/C_{V}}=T_{i}2^{-2/3}$ for the monoatomic ideal gas. Heating the gas up to the initial temperature T$_i$ increases the entropy by the amount $\Delta S=n\int _{T}^{T_{i}}C_{\mathrm {V} }{\frac {\mathrm {d} T'}{T'}}=nR\ln 2.$
We might ask what the work would be if, once the Joule expansion has occurred, the gas is put back into the left-hand side by compressing it. The best method (i.e. the method involving the least work) is that of a reversible isothermal compression, which would take work W given by $W=-\int _{2V_{0}}^{V_{0}}P\,\mathrm {d} V=-\int _{2V_{0}}^{V_{0}}{\frac {nRT}{V}}\mathrm {d} V=nRT\ln 2=T\Delta S_{\text{gas}}.$
During the Joule expansion the surroundings do not change, i.e. the entropy of the surroundings is constant. Therefore the entropy change of the so-called "universe" is equal to the entropy change of the gas which is nR ln 2.

## Real-gas effect

Joule performed his experiment with air at room temperature which was expanded from a pressure of about 22 bar. Under these conditions, air behaves only approximately as an ideal gas. As a result, the real temperature change will not be exactly zero. Rather, one can calculate that the temperature of the air should drop by about 3 degrees Celsius when the volume is doubled under adiabatic conditions. However, due to the low heat capacity of the air and the high heat capacity of the strong copper containers and the water of the calorimeter, the observed temperature drop is much smaller, so Joule found that the temperature change was zero within his measuring accuracy.