In The canonical ensemble we have relaxed the constraint of having a fixed value of the energy, and thus defined the canonical ensemble. However, we still supposed that the number of particles of our system was fixed: we can remove also this constraint, and so consider systems that exchange not only energy but also particles.
The statistical ensemble of such systems is called grand canonical ensemble.
We therefore consider a system like the one represented below:
We again have a heat bath at temperature and a small subsystem that this time can also exchange particles with the bath; let us call the number of particles of the heat bath, the particles of the subsystem (which can both vary from instant to instant), the total number of particles of the system (which is instead fixed) and the total volume.
As we have done for the canonical ensemble, we rely on the tools of the microcanonical ensemble, namely we must determine the phase space volume of the system taking also into account that the number of particles is not fixed. This volume is:
is the total energy of the system, and the sum is taken exactly because the number of particles in the system is not fixed and in principle can run from zero to the largest possible value, i.e.
; furthermore all the quantities with the subscript "s" are relative to the subsystem while those with "b" to the heat bath, and it is implied that the former are computed for
particles while the latter for
we can write
If we now divide both sides by
we recognise, in analogy to what we have seen in The microcanonical ensemble
, that now the phase space probability density is:
where the subscript
has been added in order to remember that this probability density depends on the number of particles that are in the subsystem, and the normalization condition requires that we must not only integrate
, but also sum over all the possible numbers of particles.
Now, just like we have done for the canonical ensemble we can use the fundamental postulate of statistical mechanics to write:
and since the subsystem we are considering is again macroscopic but much smaller than the heat bath we have
, so we can expand
in the exponential:
From thermodynamics we know that:
is the chemical potential, and in the end we get (removing the subscript "s" to have a more general notation):
is called grand partition function
Just like we have done for the canonical ensemble, we could wonder what relations does this newly found ensemble have with the ones that we already know, in particular the canonical one; what we are now going to show is that they are equivalent when the system considered is macroscopic, since this time the (relative) fluctuations of the number of particles will be incredibly small.