In physics, a partition function describes the statistical properties of a system in thermodynamic equilibrium. Partition functions are functions of the thermodynamic state variables, such as the temperature and volume. Most of the aggregate thermodynamic variables of the system, such as the total energy, free energy, entropy, and pressure, can be expressed in terms of the partition function or its derivatives. The partition function is dimensionless.
Each partition function is constructed to represent a particular statistical ensemble (which, in turn, corresponds to a particular free energy). The most common statistical ensembles have named partition functions. The canonical partition function applies to a canonical ensemble, in which the system is allowed to exchange heat with the environment at fixed temperature, volume, and number of particles. The grand canonical partition function applies to a grand canonical ensemble, in which the system can exchange both heat and particles with the environment, at fixed temperature, volume, and chemical potential. Other types of partition functions can be defined for different circumstances; see partition function (mathematics) for generalizations. The partition function has many physical meanings, as discussed in Meaning and significance.
Canonical partition function
Definition
Initially, let us assume that a thermodynamically large system is in thermal contact with the environment, with a temperature T, and both the volume of the system and the number of constituent particles are fixed. A collection of this kind of system comprises an ensemble called a canonical ensemble. The appropriate mathematical expression for the canonical partition function depends on the degrees of freedom of the system, whether the context is classical mechanics or quantum mechanics, and whether the spectrum of states is discrete or continuous.
Classical discrete system
For a canonical ensemble that is classical and discrete, the canonical partition function is defined as
where
is the index for the microstates of the system; is Euler's number; is the thermodynamic beta, defined as where is Boltzmann's constant; is the total energy of the system in the respective microstate.
The exponential factor is otherwise known as the Boltzmann factor.
Classical continuous system
In classical mechanics, the position and momentum variables of a particle can vary continuously, so the set of microstates is actually uncountable. In classical statistical mechanics, it is rather inaccurate to express the partition function as a sum of discrete terms. In this case we must describe the partition function using an integral rather than a sum. For a canonical ensemble that is classical and continuous, the canonical partition function is defined as
where
is the Planck constant; is the thermodynamic beta, defined as ; is the Hamiltonian of the system; is the canonical position; is the canonical momentum.
To make it into a dimensionless quantity, we must divide it by h, which is some quantity with units of action (usually taken to be Planck's constant).
Classical continuous system (multiple identical particles)
For a gas of identical classical particles in three dimensions, the partition function is
where
is the Planck constant; is the thermodynamic beta, defined as ; is the index for the particles of the system; is the Hamiltonian of a respective particle; is the canonical position of the respective particle; is the canonical momentum of the respective particle; is shorthand notation to indicate that and are vectors in three-dimensional space.
The reason for the factorial factor N! is discussed below. The extra constant factor introduced in the denominator was introduced because, unlike the discrete form, the continuous form shown above is not dimensionless. As stated in the previous section, to make it into a dimensionless quantity, we must divide it by h3N (where h is usually taken to be Planck's constant).
Quantum mechanical discrete system
For a canonical ensemble that is quantum mechanical and discrete, the canonical partition function is defined as the trace of the Boltzmann factor:
where: is the trace of a matrix; is the thermodynamic beta, defined as ; is the Hamiltonian operator.
The dimension of is the number of energy eigenstates of the system.
Quantum mechanical continuous system
For a canonical ensemble that is quantum mechanical and continuous, the canonical partition function is defined as