Category:
$\newcommand{\pp}[2][]{\frac{\partial #1}{\partial #2}}$
Introduction
In this section the Gibbs distribution is derived for open systems.Open systems can exchange particle and energy with the environment. The energy of the system and the number of particles does not remain constant.The system and environment taken together forms an isolated system and the results from micro canonical ensemble can used.Two results for isolated systems will be needed here. The first one is the postulate of equal a priori probabilities. The second result is the Clausius statement of the second law of thermodynamics, also called the principle of increase of entropy
Postulate of equal a priori probabilities
This postulate states that all states with a given set of constraints of the system all microstates have equal a priory probability. This means that the probability that a system will be found in a macrostate specified by \(E,V,N, \alpha\) is proportional to the number of {\em microstates} \(\Omega(E,V,N,\alpha)\)
Principle of increase of entropy
The entropy of an \isolated system always increases during a real process ( as distinct from idealized reversible process). In the state of equilibrium the entropy attains its maximum value.
Equilibrium of open systems
The formalism of grand canonical ensemble has wide range of applications. A simple example is the equilibrium of two phases of a pure substance, {\it e.g.} liquid and vapour phases of water. We develop the formalism for a system \(\mathcal S\) consisting of mixture of two phases taken as subsystems \(S_1\) and \(S_2\). it will be assumed that the system is isolated and therefore \(E,V,N\) for the total system \(\mathcal S\) remain constant.
\begin{eqnarray}
E_1+ E_2&=&E\\
V_1+V_2 &=&V\\
N_1+ N_2&=&N.
\end{eqnarray}
The entropy of the system \(\mathcal S\) is a sum of the entropies of the two subsystems.
\begin{equation}
S(E, V,N,E_1,V_1,N_1)= S(E_1, V_1,N_1) + S(E_2, V_2, N_2)
\end{equation}
The entropy of the system \(\mathcal S\) has been written as a function of independent variables \(E, V,N,E_1,V_1,N_1\). Noting that \(E_2,N_2,V_2\) are not independent variables and that \(E,V,N\) are constant, The equilibrium condition implies that the entropy \(S\) must be a maximum as a function of \(E_1, V_1, N_1\). Therefore the requirement \(dS=0\) becomes
\begin{eqnarray}
\pp[S]{E_1}dE_1 + \pp[S]{V_1}dV_1 + \pp[S]{N_1} dN_1 =0.
\end{eqnarray}
Since \(E_1, V_1, N_1\) are independent variables, we arrive at
\begin{equation}
\pp[S]{E_1} =0, \quad \pp[S]{V_1} =0, \quad \pp[S]{N_1}=0.
\end{equation}
Remembering \(\pp{E_1}=-\pp{E_2}\) etc., we get three equations
\begin{eqnarray}
\pp[S]{E_1} &=& \pp[S]{E_2}\\
\pp[S]{V_1} &=& \pp[S]{V_2}\\
\pp[S]{N_1}&=& \pp[S]{N_2}.
\end{eqnarray}
These conditions imply equality of temperature, pressure and chemical potential of two phases.\
\begin{equation}
T_1=T_2, \quad P_1=P_2; \quad \mu_1=\mu_2.
\end{equation}