The Joule-Thomson effect demonstrates that in an adiabatic system, if a gas kept at high pressure is forced to pass through a porous plug into a low-pressure region, it expands and occupies a larger volume, changing its temperature and, as a result, it's internal energy. In this adiabatic process, the change in the internal energy of gas must equal the work done on the gas minus the work done by the gas. Rearranging the terms show that enthalpy is conserved. The change in temperature with pressure at constant enthalpy is defined as the Joule-Thomson coefficient. Using the reciprocity theorem and substituting heat capacity relation, the Joule-Thomson coefficient is expressed in terms of the partial derivative of enthalpy with pressure. Expressing the partial derivative in terms of entropy and using Maxwell's relation gives the Joule-Thomson coefficient as a function of temperature. A positive coefficient value indicates cooling, while a negative value indicates heating of gas during expansion. For an ideal gas, the Joule-Thomson coefficient is zero as its temperature remains the same on passing to the low-pressure region.