Why does the gas get cold when I spray it?

The temperature of the gas that is sprayed goes down because it adiabatically expands. This is simply because there is no heat transferred to or from the gas as it is sprayed, for the process is too fast. (See this Wikipedia article for more details on adiabatic processes.)

The mathematical explanation goes as follows: let the volume of the gas in the container be $V_i$, and its temperature $T_i$. After the gas is sprayed it occupies volume $V_f$ and has temperature $T_f$. In an adiabatic process $TV^{\,\gamma-1}=\text{constant}$ ($\gamma$ is a number bigger than one), and so $$ T_iV_i^{\,\gamma-1}=T_fV_f^{\,\gamma-1}, $$ or $$ T_f=T_i\left(\frac{V_i}{V_f}\right)^{\gamma-1}. $$ Since $\gamma>1$ and, clearly, $V_f>V_i$ (the volume available to the gas after it's sprayed is much bigger than the one in the container), we get that $T_f<T_i$, i.e. the gas cools down when it's sprayed.

By the way, adiabatic expansion is the reason why you are able to blow both hot and cold air from your mouth. When you want to blow hot air you open your mouth wide, but when you want to blow cold air you tighten your lips and force the air through a small hole. That way the air goes from a small volume to the big volume around you, and cools down according to the equations above.


This is a very confused discussion. Gas being forced through a nozzle, after which it has a lower pressure, is an irreversible process in which the entropy increases. This has nothing to do with adiabatic expansion. It has everything to do with the Joule-Thomson effect.

The change in temperature following the drop in pressure behind the nozzle is proportional to the Joule-Thomson coefficient, which can be related to the (isobaric) heat capacity of the gas, its thermal expansion coefficient, and its temperature. This is a famous standard example in thermodynamics for deriving a nontrivial thermodynamic relation by using Maxwell relations, Jacobians, and whatnot. Interestingly, it is not certain that the temperature drops. For an ideal gas – which seems to be the only example discussed so far in this thread – it wouldn't, because the Joule-Thomson coefficient exactly vanishes. This is because the cooling results from the work which the gas does against its internal van der Waals cohesive forces, and there are no such forces in an ideal gas.

For a real gas cooling can happen, but only below the inversion temperature. For instance, the inversion temperature of oxygen is about $1040$ $K$, much higher than room temperature, so the JT expansion of oxygen will cool it. $\text{CO}_2$ has an even higher inversion temperature (about $2050$ $K$), so $\text{CO}_2$ fire extinguishers, which really just spray $\text{CO}_2$, end up spraying something that is very cold. Hydrogen, on the other hand, has an inversion temperature of about $220$ $K$, much smaller than room temperature, so the JT expansion of hydrogen actually increase its temperature.


your question is about large drops in pressure, and why they cool gasses. The answer is that the gas is doing work in the process of expanding, and this work releases energy to the environment.

If you prevent the gas from doing work, if there is nothing for it to push against, it doesn't get cold. If you have a dilute gas in the corner of a room and you open a barrier to a vacuum, the gas expands into the vacuum with no change in temperature. This is not what you are doing when you spray the can into air. There, the gas is encountering air, and produces a pressure wall which it then pushes against doing work. Once the equilibrium spray-profile is established, there is a pressure gradient from the can outward that accelerates the spray to its final velocity. 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. Eventually, your hand gets cold.