When compressed gas is allowed to expand into a region of low pressure, it produces a cooling.
The molecules of the compressed gas are very close to each other and sufficient attractive forces are present in them. When gas is allowed to undergo sudden expansion through a nozzle of a jet, then the molecules move apart. In order to fly them apart, is needed to overcome the intermolecular attractions. This energy is taken from the gas itself and the gas is cooled.
Linde’s method of liquefaction:
First of all pure dry air is compressed to about 200 atm. This compressed gas is passed through a pipe which is cooled by a refrigerating liquid such as NH3. When the compressed gas passes through the refrigerating liquid the heat of compression is removed. The compressed air is passed into a spiral pipe which has a jet at the lower end. This free expansion of the air results in a considerable drop in temperature. This cooled air after the expansion has a pressure of 1 atm. When it goes up in the expansion chamber it cools the in-coming gas in the spiral tube. Anyhow it returns to the compressor. After compression, again, it passes through the refrigeration liquid. By repeating the process of compression and expansion a temperature lower enough to liquefy air is reached. The liquid air is collected at the bottom of the expansion chamber.
Liquefaction of H2 and He:
All gases except H2 and He can be liquefied by this method.