Re: why tanks get cold when gas is released...
Nerd Alert!!
This thread is a few months old, but I just stumbled across it. The previous explanations are all fine, and cover all you need to know regarding air and nitrox cylinders, but I can't resist adding this little "fun fact" about gases.
Different gases are affected by expansion to different degrees - the operative parameter is the Joule-Thompson (J-T) coefficient. The J-T coeffs for most gases (including nitrogen and oxygen) are positive, which means they cool when expanding. But a few gases have negative J-T coeffs, most notably hydrogen and helium. When expanding through a constriction (i.e. valve) these gases get warmer! For most of us this totally goes against "common sense" (or at least common experience), but it was taught (and explained) in a thermodynamics class I took a few decades ago.
Divers and shops don't normally work with hydrogen (H2), but there is a common warning / lore in my lab at work: H2 escaping from a pin-hole leak in a HP hose or fitting can get sufficiently HOT to auto-ignite, which qualifies as a VBT (Very Bad Thing.) I have never seen this in action, but I keep the fact filed away along with "never grease the threads on the O2 cylinder used for glass blowing."
Helium, of course, is nonflammable, so while leaks can be really expensive, they don't cause fires.
Happily providing more than you ever wanted to know about the reversible adiabatic expansion of non-ideal gases,
-Don