# Thermodynamic equilibrium, mixing gases of two different temperatures

Consider a container divided into two compartments $A$ and $B$ by a barrier. The walls of the container as well as the barrier are adiabatic.

Initially both compartments contain some gas (not necessarily the same gas in both compartments), at temperatures $T_A$ and $T_B$ respectively. Let's say $T_A>T_B$.

Question 1:

If we consider the system $S$ consisting of the gas in compartment $A$ in conjuction with the gas in compartment $B$, would it be correct to say that $S$ is initially NOT in thermodynamic equilibrium?

I'm a little bit confused about the definition of thermodynamic equilibrium, but as far as I understand,a system in thermodynamic equilibrium must in particular be in thermal equilibrium, i.e it has a well-defined temperature, i.e the temperature of any subsystem is the same (if we measure the mean kinetic energies of any subsystem of the gas particles, they should be equal). This is clearly not the case in our example.

The barrier between the compartments is now suddenly broken, allowing the gases to mix.

Question 2:

Is it true that after some time the system $S$ will reach thermal equilibrium, i.e the mean kinetic energy of the gas particles initially in compartment $A$ will be equal to that of the gas particles initially in $B$? According to what I read in the Feynman lectures, the answer is yes, but I found his explanation to be rather hand wavy.

Question 3:

Assuming the answer to the previous question is yes, is it possible to calculate the new equilibrium temperature of the system?

If there is a barrier present, then each sub-system is individually at thermodynamic equilibrium. It is true that, at some time after the barrier is removed, the combined system will reach thermodynamic equilibrium. This means that there will be a final equilibrium temperature. The final equilibrium temperature can be calculated by taking into account the fact that, with no work being done on the boundary of S and no heat transferring through the boundary of S, the change in internal energy between the initial and final states of S is zero. So, for an ideal gas, you would have that $$(m_A+m_B)u(T_f)=m_Au(T_A)+m_Bu(T_B)$$where u(T) is the internal energy per unit mass at temperature T.

• In other words, assuming the gas is perfect and monoatomic, the final temperature should be $T_f=(n_AT_A+n_BT_B)/(n_A+n_B)$. May 28, 2017 at 17:00

I would try to go through the questions:

1. The definition of thermal equilibrium is quite more general. According to K. Huang (K. Huang, Statistical Mechanics)

Thermodynamic equilibrium prevails when the thermodynamic state of the system does not change with time.

meaning that we may admit safely that the total system in the initial configuration, isolated and made up with two gases with different temperatures separated by adiabatic walls, is in thermodynamic equilibrium. Despite the existence of two different temperatures, due to the presence of the adiabatic barrier which forbids any exchange of heat between the two gases, the system will remain in the same state if nothing happens.

2. Here something happens: the adiabatic barrier is removed in some way. The new situation of the system just after the removal does not represent an equilibrium state, because the two gases are now in thermal contact and they can exchange heat (and they are also free to expand in the whole volume). From the thermodynamics laws we know that if they have different temperatures, than the heat will flow from the hot gas to the cold until they share the same temperature, reaching a new thermodynamic equilibrium.

3. Yes, it is possible and the most simple way is using the conservation of the energy. In the case of a perfect gas the internal energy $U(T)$ depends only on the temperature and is given by $U(T)=C_VT$ where $C_V$ is the heat capacity at constant volume (which is constant with respect to the temperature). Then, equating the energy in the initial configuration with the final one $$C_V^AT_A + C_V^BT_B = C_V^AT_{EQ}+C_V^BT_{EQ}$$ we find $$T_{EQ}=\frac{C_V^AT_A + C_V^BT_B}{C_V^A+C_V^B}$$ where $T_{EQ}$ is the new equilibrium temperature and $C_V^A$ and $C_V^B$ are the heat capacity of the two gases (depending on the number of moles, the whether the gas is monoatomic, biatomic and so on...).