Confusion about Joule expansion for ideal gases We concern the Joule expansion for ideal gases, where the gas is initially kept in one side of the container and the other side is evacuated. Then the partition between the two side is released, letting the gas fill the whole container.
This Wikipedia article argues that the change in internal energy of the whole system is $0$, which I agree. Then, for ideal gases, it says that as the internal energy is a function of temperature alone, the temperature must be unchanged (1).
Here is my confusion. By saying (1), the article considers the internal energy of the whole system and that of the ideal gas the same. While this is true for the final state (where the gas has filled the whole container), I don't understand how it works for the initial state (where only one half contain the gas).
 A: Internal energy is an extensive system property, meaning that it is proportional to the amount of mass of the system. Since the evacuated side of the container initially contains no mass its internal energy is zero, So before the free expansion all of the internal energy of the container is on the side containing the gas
After the expansion the internal energy of the entire container is the same except it is now “spread out” over a larger volume for a reduction in the internal energy density, $U/V$, and an increase in entropy $S$ of the system.
Hope this helps.
A: The ideal gas is the whole system. The void on the initial state contains no energy, since it's void.
I think of the Joule expansion as a "proof" that the internal energy of an ideal gas is a function of its temperature. Internal energy $U$ does not vary since there is no heat $Q$ coming out or into the system and there is no work $W$ done by the system since the external pressure is always $0$. Therefore, $\Delta U = Q + W = 0$. Because there isn't a change of the internal energy when there is a change of volume and pressure, $U = U(T)$.
