I'm a scuba diver - diving since the 1960's. For more years than I'd like to admit, I've wondered why tanks get hot when you fill them from other high pressure tanks. I've seen it happen with "empty" scuba tanks (really at atmospheric pressure, temp). And with vacuum evacuated oxygen tanks. I'd like to set up a simple scenario: A starting tank of air (assume ideal gas laws if you wish) at 3000 psi and 11 liters of volume and room temp is connected with a hose (called a transfill whip) to an identical tank that is vacuum empty. The valves are opened and the donor tank gets cold and the receiving tank gets hot. Many times I've asked others - more experienced divers - those teaching diving classes, etc. all who are teaching ideal gas laws, Henry's law, Dalton's law, etc. why the receiving tank gets hot. I've always gotten one of two answers. The first is that the gas going into the empty tank is getting compressed and is heated by compression. The second is that the tank has residual air and that residual air is heated by compression. The first answer made no sense to me. The gas expands into two tanks and the pressure drops. By any reckoning that makes sense to me, that's expansion, not compression. The second doesn't explain why vacuum empty tanks get hot. I asked the question in an advanced diving forum. After lots of research in Wikipedia and linked references there I concluded that the key was "free expansion" also called "Joule expansion." I found myself in a minority of one - being repeatedly ridiculed that i didn't understand what was happening. I laid out my analysis as best I could - referring to formulas for each stage and asking some simple questions: 1) Did it take energy to compress the gas into the donor tank? 2) Could we get some of that energy back by putting a pneumatic motor/generator in the whip line between the tanks and driving the generator by the pressure differential during the fill? 3) Would the recipient tank and donor tank equalize pressure regardless of whether we put a pneumatic motor/generator in the whip line? 4) What happens to the energy we could have extracted from the gas with the pneumatic motor/generator if we don't put the pneumatic motor/generator in the whip line? The answers to those questions led me to the answers to these: 5) What would happen to the temperature of the gas in the receiving tank if we do extract energy by putting a pneumatic motor/generator in the whip line? 6) What would happen to the temperature of the gas in the receiving tank if we don't extract energy by putting a pneumatic motor/generator in the whip line? As far as I can tell the answers to those questions lead inexorably to the conclusion I reached. It took me a lot of research to figure this out and perhaps I made some fatal errors. I just can't be sure, so I'm here. My ultimate conclusion was essentially that the gas in the donor tank is expanding roughly adiabatically and isentropically. It is doing work on the departing gas, resulting in a temperature drop and a transfer of energy to the departing gas. The entire gas system has no energy added or subtracted. The departing gas expands roughly isothermally via "free expansion" or "Joule expansion" at constant enthalpy without change to its internal energy (at least not until its kinetic energy from the donor gas tank is converted into heat). The energy released by the isentropically expanding gas in the donor tank appears as heat energy in the gas in the receiving tank, resulting in heating above room temperature. I'm not totally sure about how the energy is carried or transferred and converted to heat, but my simple answer is basically that it's carried as kinetic energy and when the departing gas impacts the walls of the receiving tank, that energy is released as heat. If the two gases were allowed to freely mix or exchange heat energy, the total gas would come to the same original room temperature. (with some minor second order effects from the non-ideal nature of air as compared to an ideal gas.) I really do want to know the answer to this. However, I'm the only one who thinks that the answer above is right. Despite the fact I think I can show it mathematically, and I think the physics above is fundamentally right, not one expert in the advanced diving forum agreed with me. I stood alone, and that was a worrisome sign that I'm doing something seriously wrong. I did notice that only one person would try to answer the questions above (the first four) and those answers seemed to match mine, so if I am doing something seriously wrong, no one there could tell me what - at least not in a way that made sense to me. I would try to give you more info on what the competing answers were, but generally they boiled down to increasing pressure in the second tank means the gas is being compressed there and compressed gas always gets hot. Another answer was that there is residual air in the second tank in the real world and the compression of that gas produces the heat so we should ignore the "free expansion" idea. Some said I had the initial gas volume wrong. They pointed to the two tanks and said it was the volume of the full tank plus the volume of the empty tank that was the correct volume to start with. Not one person would agree with me that gas that expands from one high pressure tank into twice the volume (two tanks) is undergoing expansion. If you want to see the thread, I'll link it here. When I asked for the best answer from those who disagreed with me, it was post #2 at the link above. I did put some basic equations and links in the argument/explanation together in some later posts, but I suspect people here can do it better than I did. Here are my best answers to the first four questions. Here is my best summary of how I would explain the heating and the physics mathematically. I should say that I'd never heard of "enthalpy" when I started this, nor "free expansion" or "Joule expansion" nor "internal energy" of gas. My understanding of gas thermodynamics is all recent and shaky. I'd heard of entropy, but only vaguely - as in it always increases and the universe dies in some sort of maximum entropy heat death. I knew what degrees of freedom meant, but had no idea it related to internal energy of gas or heat capacity ratios (constant pressure to constant volume). I had never even fully understood why gas was heated when compressed with a compressor until I read about internal energy and heat capacity ratios, so I won't be upset if you tell me I'm full of it, as long as you tell me why. Am I way off base or do I have the physics right? If I'm wrong, where did I go wrong? Is the gas in the second tank expanding and getting hotter or is it being compressed as everyone else says? I'd appreciate it if you would answer the above questions for me, or if they aren't relevant, let me know why. Thank you very much for any assistance you can give me in understanding this. BTW, if the answers are significantly different when the receiving tank starts at "empty" 1 bar pressure, but not vacuum empty, I'd appreciate comments on that.