Rigorous reason behind internal energy change being zero while mixing

A container is divided in two parts: one part contains oxygen gas $$(n_1$$ moles, at temperature $$T_1)$$ and the other part contains helium gas $$(n_2$$ moles, at temperature $$T_2).$$ The partition separating them is removed. Find the final temperature of the mixture $$(T).$$

While solving this (multiple choice exam) question, since I was constrained by time, I started to look for hints within the question. I realized the question has explicitly mentioned the gases, i.e. it gave us information about their degrees of freedom (since oxygen is diatomic and helium is monoatomic). So my instinct was that this had to do something with $$C_V.$$ At the time, I hypothesized $$\Delta{U}_\mathrm{sys} = 0.$$ Thus:

$$n_1\frac{5R}{2}(T - T_1) + n_2\frac{3R}{2}(T - T_2) = 0$$ $$T = \frac{5n_1T_1 + 3n_2T_2}{5n_1 + 3n_2}$$

Which was indeed one of the options, and in fact, the correct one.

However, is there any rigorous method/reasoning that tells us why exactly is it that $$\Delta{U}_\mathrm{sys} = 0?$$ I can't think of a satisfactory explanation. I tried to analyze it using the first law of thermodynamics, but that clearly seems to be the wrong approach.

The system here is defined as the container, initially partitioned and then united.

The process in question is presumably adiabatic ($$q=0$$), since we are told that the temperature changes and are not given any information about the temperature of the surroundings (adiabaticity can sometimes also be assumed if gases are mixed rapidly).

Also, the final volume of the system (that of the entire container) is the same as its initial volume. It follows that $$w=-\int_{V_\textrm{ini}}^{V_\textrm{fin}} p_{\textrm{ext}}dV_{\textrm{system}}=0$$.

Therefore overall neither heat nor work exchanges between system and surroundings during the process, which means that in accordance with the first law the change in the internal energy of the system $$\Delta U = q+w=0+0=0$$.

The internal energy of the individual gases changes during mixing. That is described by the individual terms in the sum $$n_1\frac{5R}{2}(T - T_1) + n_2\frac{3R}{2}(T - T_2)$$ The internal energy of one gas (the colder one) increases at the expense of the hotter one. The volumes available to the individual gases also changes (both gases expand freely but this is ultimately not critical to the analysis). Accordingly the entropy and free energy content of the individual gases changes (guaranteeing that the process of mixing is spontaneous).
Regarding the reversible Carnot process: this is not an isolated process. In this case both heat and work are exchanged with the surroundings. Since it is a cyclic process it is also true that $$\Delta U=0$$ so that $$w=-q$$. This is true in the present case also, it just happens that here $$q=-w=0$$.
• @BuckThorn. This is in reference to your statement $\delta(V)$=0 and therefore no total work. Consider a cyclic process (for instance a carnot cycle). There too, $\delta(V)$=0, but obviously there is work done. Jul 7 '20 at 6:40