# Gran-canonical ensemble

In this type of ensemble the system can also exchange particles with the reservoir. The equilibrium within respect particles exchange is described by an intensive property of the system, called chemical potential $\mu$ . Condition of equilibrium: ${\frac {dF_{1}}{dN_{1}}}={\frac {dF_{2}}{dN_{2}}}$ . More precisely:

$-{\frac {\partial S}{\partial N}}T=\mu ={\frac {\partial F}{\partial N}}$ The probability that the system has a given energy $E$ and number of particles $N$ is given by:

$P(E,N)={\frac {1}{Z_{GC}}}g(E,N)e^{-\beta (E-\mu N)}$ Where $Z_{GC}$ is the gran-canonical partition function:

$Z_{GC}=\sum _{E,N}g(E,N)e^{-\beta (E-\mu N)}$ In such an ensemble we also have:

$dE=TdS-pdV+\mu dN$ We can evaluate the mean value of energy and number of particles:

• $\left\langle N\right\rangle ={\frac {1}{\beta }}{\frac {\partial \log Z_{GC}}{\partial \mu }}$ • $\left\langle E-\mu N\right\rangle =\left\langle E\right\rangle -\mu \left\langle N\right\rangle =-{\frac {\partial \log Z_{GC}}{\partial \beta }}$ Since $F=-kTN\log \left({\frac {Vn_{Q}}{N!}}\right)$ we can derive an expression for $\mu$ :

$\mu ={\frac {\partial F}{\partial N}}=kT\log \left({\frac {n}{n_{Q}}}\right)$ When we have to evaluate the partition function, we have to distinguish two cases: bosons and fermions.

• $Z_{GC}^{(f)}=1+e^{-\beta (\epsilon -\mu )}$ • $Z_{GC}^{(b)}={\frac {1}{1-e^{-\beta (\epsilon -\mu )}}}$ From where we can derive the mean number of particles per energy level in the two cases. More precisely what we do derive are two distributions: the Fermi-Dirac and the Bose-Einstein distributions.

• $f_{FD}(\epsilon )={\frac {1}{1+e^{\beta (\epsilon -\mu )}}}$ • $f_{BE}(\epsilon )={\frac {1}{e^{\beta (\epsilon -\mu )}-1}}$ 