Gas expanding into vacuum Two vessels,  of equal volume are connected with each other through a gas tube containing a valve.  The first vessel is filled with an ideal gas and has temperature $T$ while the other one is maintained at vacuum. Now suddenly the valve is opened leading to transfer of gas.  Now since the pressure in the first chamber is bound to decrease,  hence its temperature must also decrease and as a result of this and the temperature in the vacuum valve must increase.  But one more thing that crossed my mind while solving this is that the work done in expansion of gas against vacuum is zero and hence there must be no change is temperature since no new heat has been provided and there is vacuum in the second vessel.  Can anybody please tell me, which line of thought is correct and why? 
 A: When there is a valve that offers significant resistance to gas flow between the two tanks, the gas will flow relatively slowly from the high pressure tank to the lower pressure tank. So the gas pressure on the high pressure side is changing slowly, and the gas remaining on the high pressure side is doing work on the gas ahead of it to force the gas ahead of it through the valve. It is doing this work by expanding adiabatically and reversibly against the back pressure of the gas ahead of it. So the gas in the high pressure tank cools adiabatically and nearly reversibly. We see this all the time in practice. 
A: "Now since the pressure in the first chamber is bound to decrease, hence its temperature must also decrease and as a result of this"
The above is wrong.
For ideal gas, $U=\frac{3}{2}PV=\frac{3}{2}nRT$ and so this is true when when, say, volume is constant. But you can see that if you double the volume and halved the pressure, the temperature remains the same. In fact for free expansion, $U$ is bound to be constant because there is no work done and no heat flow.
