Grand canonical ensemble
The grand canonical ensemble treats the system as a collection of microstates.
Unlike the canonical ensemble, the grand canonical ensemble allows the local compositional fluctuation.
For a binary system \(A_{x}B_{1-x}\) or a pseudobinary system \(A_{x}B_{1-x}C\) , the grand canonical partition function, Z, is calculated as follows:
, where \(N_A\) is the number of atom A in \(A_{x}B_{1-x}C\), and
\(\sigma\) indicates a configuration (microstate). \(\mu\) is a chemical potential of a species of atom. Total mixing energy \(\Delta E ^{total}\) is the sum of freely relaxed energy and the strain energy induced by compositional fluctuation.
The probability of a configuration is calculated as:
Then the entropy of this system is
The ensemble average of a property of interest, Y is given as:
When the Y is \(\Delta E\), the average energy is calculated. With the entropy \(S\), the free energy \(F\) at a finite temperature T can be calculated as:
\(\Delta \mu\) is determined by following equation to satisfy the self-consistency for composition.
A detailed explaination is in this paper: J. Phys. D: Appl. Phys. 54, 045104 (2021)