When you pressurize a gas by compressing it into a container you re putting all those molecules into a smaller volume of space and you re adding potential energy by the compression.
Why does compressed air get cold when released.
Cans of compressed air get cold while they re discharging because of a thermodynamic principle known as the adiabatic effect.
There is no reason that the compressed air tank should have a lower temperature in the compressed state when the pressure was not changed for a couple hours.
The process involved is the expansion of the gas.
A gas initially at high pressure cools significantly when that pressure is released.
Metal however feels cold to touch even when at environment temperature due to the high thermal conductivity.
Travelling along this pressure gradient the gas expands and does work and this removes energy from the gas.
When air or other gas is compressed work is done and the gas heats up.
Minutephysics knows the actual reason why compressed air cans become so cold and will explain it.
The cold temperature profile sneaks back towards the can because the air is such a lousy conductor of heat so the heat is all coming from the can.
The secret behind this freezing property of the cans is the do not shake warning that is mentioned on the can.
Then the gas is released through a nozzle the gas expands again and cools.
If the container is stored the temperature equalizes to the ambient temperature.
The video will explain what really happens inside the compressed air cans.