You're half right.It's called the Joule-Thomson effect, an expanding gas cools according to ideal gas laws. It's handy for some applications like cooling thermal optic sensor chips in smart bombs and Stinger missiles, because it doesn't need any machinery, just a vessel of compressed gas expanding through an orifice. It is not the process that makes air conditioners and heat pumps work as asserted in Post #4. Those work on a reverse Carnot thermodynamic cycle, a closed continuous cycle, as opposed to the J-T effect where the working fluid is lost.
The effect that the OP noted is because of the Joule-Thomson effect; the expanding air from the tank cools off enough to freeze the entrained moisture as it passes through the drain valve.
This IS the "process that makes air conditioners and heat pumps work as asserted in Post #4".
The Carnot cycle is a theoretical model that describes the general principle, but it's actually not possible to build a Carnot engine (or reverse-Carnot refrigerator).
A modern mechanical refrigeration system has a JT valve in it, whether they call it that or not, and that's where the actual cooling takes place.