On this page
Put hot helium and cold nitrogen in one insulated box, with a thin metal wall between them. Heat flows through the wall until both gases reach the same temperature. What is that temperature? It depends on something that has nothing to do with the wall's metal: which parts of the box are allowed to move. Fix everything and you get one answer. Let the nitrogen push up a piston and you get a lower one. Let the wall slide as well and you get a higher one. This post shows why, with one heat balance and the right choice between C_v and C_p.
How do two gases share heat through a conducting wall?
The box is insulated, so no heat enters or leaves it from outside. Every joule the hot gas gives up crosses the wall into the cold gas:
heat lost by the hot gas = heat gained by the cold gas
For gas i with n_i moles, heat capacity C_i per mole and starting temperature T_i, both end at the same T, so:
n₁C₁(T − T₁) + n₂C₂(T − T₂) = 0, which gives T = (n₁C₁T₁ + n₂C₂T₂)/(n₁C₁ + n₂C₂)
The final temperature is a weighted mean, and the weights are the heat capacities, not just the moles. The gas that needs more heat per kelvin moves less, so it pulls the final temperature towards its own.
Two assumptions sit underneath. The heat flows slowly, so each gas is always close to equilibrium. And the box, wall and piston have negligible heat capacity of their own.
When do you use C_v and when C_p?
The molar heat capacity of a gas is not one number. It depends on what the gas is allowed to do while it is heated.
Fixed volume: all the heat goes into internal energy, so C = C_v.
Fixed pressure: the gas also expands and does work, so it needs more heat per kelvin: C = C_p = C_v + R.
From equipartition of energy and degrees of freedom: helium, a monatomic gas, has C_v = 1.5R and C_p = 2.5R. Nitrogen, a diatomic gas, has C_v = 2.5R and C_p = 3.5R. At room temperature nitrogen's molecules hardly vibrate, so these values hold. The NIST Chemistry WebBook gives C_p ≈ 29.1 J/(mol·K) for nitrogen at 298 K, which is 3.50R, and about 29.3 J/(mol·K) at 400 K, still within 0.5% of 3.5R.
So the question for each gas is simple: is its volume held fixed, or its pressure?
Worked example: helium at 600 K, nitrogen at 300 K
An insulated box holds 1 mol of helium at 600 K in the lower part and 1 mol of nitrogen at 300 K in the upper part, separated by a thin metal wall. Take R = 8.314 J/(mol·K).
(a) Wall fixed, top fixed
Both gases are at fixed volume, so use C_v for both.
T = (1.5 × 600 + 2.5 × 300)/(1.5 + 2.5) = 1650/4 = 412.5 K.
Heat through the wall: 1.5 × 8.314 × (600 − 412.5) = 2,338 J.
No work is done, so the total internal energy stays the same. This is the same answer you would get by removing the wall and letting the gases mix, the case solved in Q8 of our thermodynamics practice questions with solutions.
(b) Wall fixed, a free piston with a load on top of the nitrogen
The helium still has fixed volume: C = 1.5R.
The load keeps the nitrogen's pressure constant: C = 3.5R.
T = (1.5 × 600 + 3.5 × 300)/(1.5 + 3.5) = 1950/5 = 390.0 K.
Heat through the wall: 1.5 × 8.314 × 210 = 2,619 J.
Work done by the nitrogen in lifting the piston: nRΔT = 8.314 × 90 = 748 J.
Check: the nitrogen's internal energy rises by 2.5 × 8.314 × 90 = 1,871 J, and 1,871 + 748 = 2,619 J, which is exactly the heat it received.
(c) The wall can slide too
Now the wall is a frictionless, light piston. The two pressures must stay equal at every instant, and the load on top fixes that pressure. So both gases are at constant pressure.
C = 2.5R for helium and 3.5R for nitrogen.
T = (2.5 × 600 + 3.5 × 300)/(2.5 + 3.5) = 2550/6 = 425.0 K.
Heat through the wall: 2.5 × 8.314 × 175 = 3,637 J.
Work by helium: 8.314 × (−175) = −1,455 J. Work by nitrogen: 8.314 × 125 = +1,039 J.
Total work by the gases: −416 J.
The helium shrinks by more than the nitrogen grows, so the load sinks and does 416 J of work on the gases. That energy ends up as internal energy, which is why the final temperature is higher than in (a). If the sliding wall had mass, the helium's pressure would be higher than the nitrogen's by a fixed amount, but it would still be constant, so the answer does not change.
A short step-by-step simulation, passing a small amount of heat across at each step in proportion to the temperature difference, settles at the same three temperatures.
Why does the final temperature change when walls can move?
Compare (a) and (b). Letting the nitrogen expand raises its heat capacity from 2.5R to 3.5R. It now soaks up more heat per kelvin, so it pulls the shared temperature down towards its own 300 K: 412.5 K falls to 390 K. Some of the helium's energy has left the gases as work done on the load.
In (c) the helium's heat capacity also rises, from 1.5R to 2.5R. Now it is the hot gas that gets heavier in the balance, and the shared temperature rises to 425 K.
This is different from a cylinder split by an insulating piston, where no heat crosses at all and the energy moves only as work. That set-up is worked through in heating one side of a cylinder split by an insulating piston.
How does this appear in JEE Advanced?
JEE Advanced 2014 Paper 2 had a paragraph with two gases in an insulated container, a conducting partition and a movable piston. One question asked for the final temperature with the partition fixed, and the next asked for the total work once the partition could move. Those are cases (b) and (c) here, with different numbers. If you are preparing for JEE, Fermi Test Prep offers personalised preparation for JEE Main & Advanced with an AI tutor, live classes, adaptive mocks, mentorship and a study plan that updates based on mastery.
Quick checklist
Insulated box: heat lost by one gas = heat gained by the other.
T = Σ n_iC_iT_i / Σ n_iC_i, weighted by heat capacity, not a plain average.
Fixed volume: C_v. Fixed pressure: C_p = C_v + R.
Helium 1.5R and 2.5R; nitrogen 2.5R and 3.5R.
Work at constant pressure is nRΔT for each gas.
Check the energy: ΔU of the two gases plus the work they do must add to zero.



