# Computing entropy for two ideal gas systems

I'm trying to show the processes in the following rows are different. On the left column there are two boxes of $$12$$ particles each. Both boxes are divided in three imaginary and equal rooms with $$V_1=\frac{V_b}{3}$$, where $$V_b$$ is the box volume.

In the first-row experiment a box is attached the particles re-distribute over. Then we separate the boxes. The final number of particles is $$6$$ in each one, in average.

In the second-row process we complicate things a little bit:

1. An empty room with $$V=\frac{V_b}{3}$$ is attached,
2. Then separate the room,
3. This process is repeated twice.

Conclusion

If it is supposed that particles spread over the whole box on each time, then more particles are lost in the second process.

Why?

First hypothesis: if it is an ideal gas, to compute what process is 'more spontaneous' we need this formula $$S\times dT=P\times dV$$

Second: I have calculated the second process is higher in entropy. We are at the same temperature in each case, so it is the only contribution to gibbs free energy.

Is this reasoning correct?

Let's label your two processes process A and process B.

At the end of process B, the system's free energy is higher than at the end of process A. Which you can see by connecting all boxes (at the end of process B) to each other - the number of particles will stabilize as 2 per small box (on average).

You can calculate the free energies using the formula $$G = U + PV - TS$$. For this simple experiment, we assume everything happens at constant temperature. So $$U = n k_B T$$, $$P V = n R T$$, and $$S = n k_S \ln V$$, where $$k_S$$ is some constant. Thus:

$$G = n k_B T + n R T - n k_S T \ln V = n T (k_B + R - k_S \ln V)$$

And so when allowing the gas to expand into a larger volume:

$$\Delta G = -n T k_S \ln \frac{V_2}{V_1}$$

Since we have assumed constant temperature, choose our units such that $$T = 1$$ and $$k_S = 1$$, thus:

$$\Delta G = -n \ln V$$

Now we can calculate the free energy change for each of the processes. For process A, we go from $$V_1$$ to $$2V_1$$, while the number of particles is 12, so:

$$\Delta G = -12 \frac{2 V_1}{V_1} \approxeq -8.31$$

Process B happens in 3 steps. In step 1, we increase the volume by $$\frac{1}{3}V_1$$ while $$n=12$$:

$$\Delta G = -12 \ln \frac{4 V_1}{3 V_1} = -12 \ln \frac{4}{3}$$

In step 2, we increase the volume by the same amount, while the number of particles is $$n=9$$ (as 3 particles are now in the removed box; note that $$n$$ is the average number of particles):

$$\Delta G = -9 \ln \frac{4}{3}$$

And for step 3, $$n = 6.75$$:

$$\Delta G = -6.75 \ln \frac{4}{3}$$

Finally, summing these contributions, we see that the total change in free energy for process B is $$-27.75 \ln \frac{4}{3} \approxeq -7.98$$, which is a smaller change than in process A.

• We need the differential form. When the gas is expanding pressure varies, $S=RT \ln \frac{V_f}{V_i}$ – santimirandarp Sep 24 '18 at 22:54
• We actually don't need the differential form but you are right that the entropy is proportional to $\log V$, not $V$; I've edited the answer. – Al Nejati Sep 24 '18 at 23:28
• Oh I got it! The Gibbs free energy is smaller but the number of particles is larger! Could you expand to an infinite number of small boxes? :) haha this is very very useful in chemistry. – santimirandarp Sep 25 '18 at 0:00
• Yes; with an infinite number of small boxes, the number of particles converges to 0 and the free energy converges to a finite value. – Al Nejati Sep 25 '18 at 0:01