Lesson 10 of 15

Entropy of Mixing

Entropy of Mixing

When two different ideal gases mix, entropy increases even without any heat exchange. This is called the entropy of mixing and arises purely from the increased number of accessible microstates.

Formula

For a mixture of kk ideal gas components:

ΔSmix=nRixilnxi\Delta S_{\text{mix}} = -nR\sum_{i} x_i \ln x_i

where xi=ni/ntotalx_i = n_i / n_{\text{total}} is the mole fraction of species ii and n=inin = \sum_i n_i is the total number of moles. For two gases:

ΔSmix=R ⁣(n1lnx1+n2lnx2)\Delta S_{\text{mix}} = -R\!\left(n_1 \ln x_1 + n_2 \ln x_2\right)

Since 0<xi<10 < x_i < 1, each lnxi<0\ln x_i < 0, so ΔSmix>0\Delta S_{\text{mix}} > 0 always — mixing is always spontaneous for ideal gases.

Maximum Mixing Entropy

ΔSmix\Delta S_{\text{mix}} is maximised when all mole fractions are equal (xi=1/kx_i = 1/k). For two gases this means x1=x2=0.5x_1 = x_2 = 0.5.

Boltzmann's Entropy Formula

Ludwig Boltzmann connected macroscopic entropy to the microscopic world:

S=kBlnΩS = k_B \ln \Omega

where kB=1.381×1023J/Kk_B = 1.381 \times 10^{-23}\,\text{J/K} is the Boltzmann constant and Ω\Omega is the number of microstates consistent with the macroscopic state. More microstates \Rightarrow higher entropy.

Your Task

Implement the two functions below.

Python runtime loading...
Loading...
Click "Run" to execute your code.