This question comes from a doubt resulting from some physics forums. Similar to and related to this question, I have a doubt on Joule expansion raised by reading too much bad faith arguments.
I'm not going to discuss why a rocket works but I'm going to ask a similar question. Suppose you have a big box with two separate compartments inside. The first (say 1) filled with air and the second one (say 2) is just vacuum. The box is rigid, fixed in place and cannot exchange heat with the exterior. A door suddenly opens and air from compartment 1 can pass to compartment 2 as a "free" "adiabatical" expansion.
There is of course no work done nor heat, $\mathrm{d}U=0$. My question now is related to the momentum of the gas. Before the door opens, the gas has an almost fixed center of mass (in compartment 1) that is still, then when the door opens the center of mass accelerates and moves with a certain speed. Later the COM of the gas just stops again (now it is between 1 and 2).
How is the motion of the COM possible without no change in energy? Is $\mathrm{d}U=0$ only if we compare the initial and final stages?