When a real gas is allowed to expand adiabatically through a porous plug or a fine hole into a region of low pressure, it is accompanied by cooling (except for hydrogen and helium which get warmed up).
Cooling takes place because some work is done to overcome the intermolecular forces of attraction. As a result, the internal energy decreases and so does the temperature.
Ideal gases do not show any cooling or heating because there are no intermolecular forces of attraction i.e., they do not show Joule-Thomson effect.
During Joule-Thomson effect, enthalpy of the system remains constant.
Joule-Thomson coefficient. µ=(∂T/∂P).
For cooling, µ = +ve (because dT and dP will be -ve)
For heating µ=ve (because dT = ve, dP =-ve).
For no heating or cooling µ = 0 (because dT = 0).