JouleThomson effect
In physics, the JouleThomson effect or JouleKelvin effect describes the increase or decrease in the temperature of a real gas when it is allowed to expand freely at constant enthalpy (which means that no heat is transferred to or from the gas, and no external work is extracted).
The effect is named for James Prescott Joule and William Thomson, 1st Baron Kelvin who discovered it in 1852 following earlier work by Joule on Joule expansion, in which a gas expands at constant internal energy.

# Description
The adiabatic (no heat exchanged) expansion of a gas may be carried out in a number of ways.
If the process is reversible, meaning that the gas is in thermodynamic equilibrium at all times, it is called an isentropic expansion. In this scenario, the gas does positive work during the expansion, and its temperature decreases.
In an adiabatic free expansion, on the other hand, the gas does no work and the process is called isenthalpic (no change in enthalpy).  Expanded in this manner, though the temperature of an ideal gas would remain constant, the temperature of a real gas may either increase or decrease, depending on the initial temperature and pressure. This temperature change is known as the JouleThomson effect.
For any given pressure, a real gas has a JouleThomson (Kelvin) inversion temperature above which expansion at constant enthalpy causes the temperature to rise, and below which such expansion causes cooling. For most gases at atmospheric pressure, the inversion temperature is above room temperature, so most gases can be cooled from room temperature by isenthalpic expansion.

# Physical mechanism
As a gas expands, the average distance between molecules grows.  Because of intermolecular attractive forces (see Van der Waals force), expansion causes an increase in the potential energy of the gas.  If no external work is extracted in the process (free expansion) and no heat is transferred, the total energy of the gas remains the same because of the conservation of energy.  The increase in potential energy thus implies a decrease in kinetic energy and therefore in temperature.
A second mechanism has the opposite effect. During gas molecule collisions, kinetic energy is temporarily converted into potential energy. As the average intermolecular distance increases, there is a drop in the number of collisions per time unit, which causes a decrease in average potential energy. Again, total energy is conserved, so this leads to an increase in kinetic energy (temperature).  Below the JouleThomson inversion temperature, the former effect (work done internally against intermolecular attractive forces) dominates, and free expansion causes a decrease in temperature.  Above the inversion temperature, the latter effect (reduced collisions causing a decrease in the average potential energy) dominates, and free expansion causes a temperature increase.

# The JouleThomson (Kelvin) coefficient
The rate of change of temperature with respect to pressure in a JouleThomson process is the JouleThomson (Kelvin) coefficient:
The value of \mu_{JT} is typically expressed in C/bar (SI units: K/Pa) and depends on the type of gas and on the temperature and pressure of the gas before expansion.
All real gases have an inversion point at which the value of \mu_{JT} changes sign. The temperature of this point, the JouleThomson inversion temperature, depends on the pressure of the gas before expansion.
In any gas expansion, the gas pressure decreases and thus the sign of \partial P is always negative. With that in mind, the following table explains when the JouleThomson effect cools or warms a real gas:
Helium and hydrogen are two gases whose JouleThomson inversion temperatures at a pressure of one atmosphere are very low (e.g., about 51 K (222 C) for helium).  Thus, helium and hydrogen warm up when expanded at constant enthalpy at typical room temperatures.  On the other hand nitrogen and oxygen, the two most abundant gases in air, have inversion temperatures of 621 K (348 C) and 764 K (491 C) respectively: these gases can be cooled from room temperature by the JouleThomson effect.
For an ideal gas, \mu_{JT} is always equal to zero: ideal gases neither warm nor cool upon being expanded at constant enthalpy.

# Applications
In practice, the JouleThomson effect is achieved by allowing the gas to expand through a throttling device (usually a valve) which must be very well insulated to prevent any heat transfer to or from the gas. No external work is extracted from the gas during the expansion (the gas must not be expanded through a turbine, for example).
The effect is applied in the Linde technique as a standard process in the petrochemical industry, where the cooling effect is used to liquefy gases, and also in many cryogenic applications (e.g. for the production of liquid oxygen, nitrogen, and argon). Only when the JouleThomson coefficient for the given gas at the given temperature is greater than zero can the gas be liquefied at that temperature by the Linde cycle. In other words, a gas must be below its inversion temperature to be liquefied by the Linde cycle. For this reason, simple Linde cycle liquefiers cannot normally be used to liquefy helium, hydrogen, or neon.