In statistical mechanics, the grand canonical ensemble is the statistical ensemble that is used to represent the possible states of a mechanical system of particles that are in thermodynamic equilibrium (thermal and chemical) with a reservoir. The system is said to be open in the sense that the system can exchange energy and particles with a reservoir, so that various possible states of the system can differ in both their total energy and total number of particles. The system's volume, shape, and other external coordinates are kept the same in all possible states of the system.

The thermodynamic variables of the grand canonical ensemble are chemical potential (symbol: ) and absolute temperature (symbol: . The ensemble is also dependent on mechanical variables such as volume (symbol: , which influence the nature of the system's internal states. This ensemble is therefore sometimes called the ensemble, as each of these three quantities are constants of the ensemble.

Basics

In simple terms, the grand canonical ensemble assigns a probability to each distinct microstate given by the following exponential:

where is the number of particles in the microstate and is the total energy of the microstate. is the Boltzmann constant.

The number is known as the grand potential and is constant for the ensemble. However, the probabilities and will vary if different are selected. The grand potential serves two roles: to provide a normalization factor for the probability distribution (the probabilities, over the complete set of microstates, must add up to one); and, many important ensemble averages can be directly calculated from the function .

In the case where more than one kind of particle is allowed to vary in number, the probability expression generalizes to

where is the chemical potential for the first kind of particles, is the number of that kind of particle in the microstate, is the chemical potential for the second kind of particles and so on ( is the number of distinct kinds of particles). However, these particle numbers should be defined carefully (see the note on particle number conservation below).

The distribution of the grand canonical ensemble is called generalized Boltzmann distribution by some authors.

Grand ensembles are apt for use when describing systems such as the electrons in a conductor, or the photons in a cavity, where the shape is fixed but the energy and number of particles can easily fluctuate due to contact with a reservoir (e.g., an electrical ground or a dark surface, in these cases). The grand canonical ensemble provides a natural setting for an exact derivation of the Fermi–Dirac statistics or Bose–Einstein statistics for a system of non-interacting quantum particles (see examples below).

Note on formulation An alternative formulation for the same concept writes the probability as , using the grand partition function rather than the grand potential. The equations in this article (in terms of grand potential) may be restated in terms of the grand partition function by simple mathematical manipulations.

Applicability

The grand canonical ensemble is the ensemble that describes the possible states of an isolated system that is in thermal and chemical equilibrium with a reservoir (the derivation proceeds along lines analogous to the heat bath derivation of the normal canonical ensemble, and can be found in Reif). The grand canonical ensemble applies to systems of any size, small or large; it is only necessary to assume that the reservoir with which it is in contact is much larger (i.e., to take the macroscopic limit).

The condition that the system is isolated is necessary in order to ensure it has well-defined thermodynamic quantities and evolution. In practice, however, it is desirable to apply the grand canonical ensemble to describe systems that are in direct contact with the reservoir, since it is that contact that ensures the equilibrium. The use of the grand canonical ensemble in these cases is usually justified either 1) by assuming that the contact is weak, or 2) by incorporating a part of the reservoir connection into the system under analysis, so that the connection's influence on the region of interest is correctly modeled. Alternatively, theoretical approaches can be used to model the influence of the connection, yielding an open statistical ensemble.

Another case in which the grand canonical ensemble appears is when considering a system that is large and thermodynamic (a system that is "in equilibrium with itself"). Even if the exact conditions of the system do not actually allow for variations in energy or particle number, the grand canonical ensemble can be used to simplify calculations of some thermodynamic properties. The reason for this is that various thermodynamic ensembles (microcanonical, canonical) become equivalent in some aspects to the grand canonical ensemble, once the system is very large.To quote Reif, "For purposes of calculating mean values of physical quantities, it makes no noticeable difference whether a macroscopic system is isolated, or in contact with a reservoir with which it can only exchange energy, or in contact with a reservoir with which it can exchange both energy and particles. [...] In some problems where the constraint of a fixed number of particles is cumbersome, one can thus readily circumvent the complication by approximating the actual situation with [...] the grand canonical distribution." Of course, for small systems, the different ensembles are no longer equivalent even in the mean. As a result, the grand canonical ensemble can be highly inaccurate when applied to small systems of fixed particle number, such as atomic nuclei.

Properties

Grand potential, ensemble averages, and exact differentials

The partial derivatives of the function give important grand canonical ensemble average quantities:

Exact differential: From the above expressions, it can be seen that the function has the exact differential

First law of thermodynamics: Substituting the above relationship for into the exact differential of , an equation similar to the first law of thermodynamics is found, except with average signs on some of the quantities:

Thermodynamic fluctuations: The variances in energy and particle numbers are

Correlations in fluctuations: The covariances of particle numbers and energy are

Example ensembles

The usefulness of the grand canonical ensemble is illustrated in the examples below. In each case the grand potential is calculated on the basis of the relationship

which is required for the microstates' probabilities to add up to 1.

Statistics of noninteracting particles

Bosons and fermions (quantum)

In the special case of a quantum system of many non-interacting particles, the thermodynamics are simple to compute. Since the particles are non-interacting, one can compute a series of single-particle stationary states, each of which represent a separable part that can be included into the total quantum state of the system. For now let us refer to these single-particle stationary states as orbitals (to avoid confusing these "states" with the total many-body state), with the provision that each possible internal particle property (spin or polarization) counts as a separate orbital. Each orbital may be occupied by a particle (or particles), or may be empty.

Since the particles are non-interacting, we may take the viewpoint that each orbital forms a separate thermodynamic system. Thus each orbital is a grand canonical ensemble unto itself, one so simple that its statistics can be immediately derived here. Focusing on just one orbital labelled , the total energy for a microstate of particles in this orbital will be , where is the characteristic energy level of that orbital. The grand potential for the orbital is given by one of two forms, depending on whether the orbital is bosonic or fermionic:

In each case the value gives the thermodynamic average number of particles on the orbital: the Fermi–Dirac distribution for fermions, and the Bose–Einstein distribution for bosons. Considering again the entire system, the total grand potential is found by adding up the for all orbitals.

Indistinguishable classical particles In classical mechanics it is also possible to consider indistinguishable particles (in fact, indistinguishability is a prerequisite for defining a chemical potential in a consistent manner; all particles of a given kind must be interchangeable). We can consider a region of the single-particle phase space with approximately uniform energy to be an "orbital" labelled .

Two complications arise since this orbital actually encompasses many (infinite) distinct states. Briefly:

An overcounting correction of is needed since the many-particle phase space contains copies of the same actual state (formed by the permutation of the particles' different exact states). The chosen width of the orbital is arbitrary, thus there is a further proportionality factor that is independent of .

Due to the overcounting correction, the summation now takes the form of an exponential power series,

the value corresponding to Maxwell–Boltzmann statistics.

Ionization of an isolated atom

The grand canonical ensemble can be used to predict whether an atom prefers to be in a neutral state or ionized state. An atom is able to exist in ionized states with more or fewer electrons compared to neutral. As shown below, ionized states may be thermodynamically preferred depending on the environment. Consider a simplified model where the atom can be in a neutral state or in one of two ionized states (a detailed calculation also includes excited states and the degeneracy factors of the states): charge neutral state, with electrons and energy . an oxidized state ( electrons) with energy a reduced state ( electrons) with energy Here and are the atom's ionization energy and electron affinity, respectively; is the local electrostatic potential in the vacuum nearby the atom, and is the electron charge.

The grand potential in this case is thus determined by

The quantity is critical in this case, for determining the balance between the various states. This value is determined by the environment around the atom.

If a lone atom is placed in metal box, then , the work function of the box lining material. If then the atom prefers to exist as a positive ion. This spontaneous surface ionization effect has been used as a cesium ion source. If the atom is surrounded by an ideal electron gas with density , then , and substituting this in yields the Saha ionization equation. In semiconductors, where the ionization of a dopant atom is well described by this ensemble. In the semiconductor, the conduction band edge plays the role of the vacuum energy level (replacing ), and is known as the Fermi level. Of course, the ionization energy and electron affinity of the dopant atom are strongly modified relative to their vacuum values. A typical donor dopant in silicon, phosphorus, has .

Meaning of chemical potential, generalized "particle number"

In order for a particle number to have an associated chemical potential, it must be conserved during the internal dynamics of the system, and only able to change when the system exchanges particles with an external reservoir.

If the particles can be created out of energy during the dynamics of the system, then an associated term must not appear in the probability expression for the grand canonical ensemble. In effect, this is the same as requiring that for that kind of particle. Such is the case for photons in a black cavity, whose number regularly change due to absorption and emission on the cavity walls. (On the other hand, photons in a highly reflective cavity can be conserved and caused to have a nonzero .)

In some cases the number of particles is not conserved and the represents a more abstract conserved quantity: