text: There are two factors that can change the temperature of a fluid during an adiabatic expansion: a change in internal energy or the conversion between potential and kinetic internal energy. Temperature is the measure of thermal kinetic energy (energy associated with molecular motion); so a change in temperature indicates a change in thermal kinetic energy. The internal energy is the sum of thermal kinetic energy and thermal potential energy. Thus, even if the internal energy does not change, the temperature can change due to conversion between kinetic and potential energy; this is what happens in a free expansion and typically produces a decrease in temperature as the fluid expands. If work is done on or by the fluid as it expands, then the total internal energy changes. This is what happens in a Joule–Thomson expansion and can produce larger heating or cooling than observed in a free expansion.
  In a Joule–Thomson expansion the enthalpy remains constant. The enthalpy, , is defined as
  where  is internal energy,  is pressure, and  is volume. Under the conditions of a Joule–Thomson expansion, the change in  represents the work done by the fluid (see the proof below). If  increases, with  constant, then  must decrease as a result of the fluid doing work on its surroundings. This produces a decrease in temperature and results in a positive Joule–Thomson coefficient. Conversely, a decrease in  means that work is done on the fluid and the internal energy increases. If the increase in kinetic energy exceeds the increase in potential energy, there will be an increase in the temperature of the fluid and the Joule–Thomson coefficient will be negative.
  For an ideal gas,  does not change during a Joule–Thomson expansion. As a result, there is no change in internal energy; since there is also no change in thermal potential energy, there can be no change in thermal kinetic energy and, therefore, no change in temperature. In real gases,  does change.
  The ratio of the value of  to that expected for an ideal gas at the same temperature is called the compressibility factor, . For a gas, this is typically less than unity at low temperature and greater than unity at high temperature (see the discussion in compressibility factor). At low pressure, the value of  always moves towards unity as a gas expands. Thus at low temperature,  and  will increase as the gas expands, resulting in a positive Joule–Thomson coefficient. At high temperature,  and  decrease as the gas expands; if the decrease is large enough, the Joule–Thomson coefficient will be negative.
  For liquids, and for supercritical fluids under high pressure,  increases as pressure increases. This is due to molecules being forced together, so that the volume can barely decrease due to higher pressure. Under such conditions, the Joule–Thomson coefficient is negative, as seen in the figure above.
  The physical mechanism associated with the Joule–Thomson effect is closely related to that of a shock wave, although a shock wave differs in that the change in bulk kinetic energy of the gas flow is not negligible.