Understanding Joule-Thomson expansion apparatus
The purpose of the porous plug is to cause a viscous frictional pressure drop, resulting from the gas flow through the tiny interstitial pores of the porous medium.  This results in a dissipation of mechanical energy (pressure and kinetic energy) to internal energy, which translates into a &quot;viscous heating&quot; to essentially offset the adiabatic expansion cooling of the gas.  The net result is no change in temperature for an ideal gas, and small change in temperature for a real gas.