A system consists of the volume ($V_1+V_2$) within a container with a partition separating it into two volumes $(𝑉_1, 𝑉_2)$. In $V_1$, $𝑛$ moles of an ideal gas are present, and the surrounding is the rigid adiabatic wall of the container. Upon removal of the partition, the gas expands to fill both volumes.
The expansion of the gas is an irreversible process between the initial and final equilibrium states. Therefore, we may replace the process with a reversible, isothermal expansion of the (ideal) gas between the same two equilibrium states. The work done by the gas on the surroundings in this reversible process is $nRT\log[(V_1+V_2)/V_1]$.
However, the work done by the ideal gas in the irreversible process is zero, since the container is rigid. Is there a contradiction here ?
The following query does not address the issue: Internal Energy Change for a free adiabatic expansion