This is the principle operation of air conditioners refrigerators and other heat pumps.
Why does compressed air get cold when released.
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.
Minutephysics knows the actual reason why compressed air cans become so cold and will explain it.
The video will explain what really happens inside the compressed air cans.
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.
If the container is stored the temperature equalizes to the ambient temperature.
Travelling along this pressure gradient the gas expands and does work and this removes energy from the gas.
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 reason the can gets cold after being used is due to a process known as adiabatic cooling a property of thermodynamics.
The process involved is the expansion of the gas.
Then the gas is released through a nozzle the gas expands again and cools.
Eventually your hand gets cold.
The secret behind this freezing property of the cans is the do not shake warning that is mentioned on the can.