Jump to content

Partition function (statistical mechanics): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
GreenC bot (talk | contribs)
ESteiner (talk | contribs)
Selectively revert changes made in (22:32, 24 March 2015‎ 142.157.65.107) because they contain fundamentally wrong statements about quantum systems (using states |p,q> outside the classical limit). Restore derivation section.See talk page for details.
Line 10: Line 10:


=== Definition ===
=== Definition ===
As a beginning assumption, 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. This kind of system is 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.
As a beginning assumption, 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. This kind of system is called a [[canonical ensemble]]. Let us label with ''s'' = 1, 2, 3, ... the ''exact'' states ([[Microstate (statistical mechanics)|microstates]]) that the system can occupy, and denote the total energy of the system when it is in microstate ''s'' as ''E<sub>s</sub>''. Generally, these microstates can be regarded as analogous to discrete [[quantum state]]s of the system.


The '''canonical partition function''' is
'''Classical discrete system'''


: <math> Z = \sum_{s} \mathrm{e}^{- \beta E_s}</math> ,
For a canonical ensemble that is classical and discrete, the canonical partition function is defined as
:<math> Z = \sum_{i} \mathrm{e}^{- \beta E_i} </math>
where
:<math> i </math> is the index for the [[Microstate (statistical mechanics)|microstates]] of the system,
:<math> \beta </math> is the [[thermodynamic beta]] defined as <math> \tfrac{1}{k_B T} </math>,
:<math> E_i </math> is the total energy of the system in the respective [[Microstate (statistical mechanics)|microstate]].


where the "inverse temperature", ''[[Thermodynamic beta|&beta;]]'', is conventionally defined as
:{| class="toccolours collapsible collapsed" width="60%" style="text-align:left"
!Derivation of canonical partition function (classical, discrete)
|-
|
There are multiple approaches to deriving the partition function. The following derivation follows the powerful and general [[information theory|information-theoretic]] [[Edwin Thompson Jaynes|Jaynesian]] [[maximum entropy thermodynamics|maximum entropy]] approach.


: <math>\beta \equiv \frac{1}{k_BT}</math>
According to the [[second law of thermodynamics]], a system assumes a configuration of [[maximum entropy thermodynamics|maximum entropy]] at [[thermodynamic equilibrium]]. We seek a probability distribution of states <math> \rho_i </math> which maximizes the discrete [[entropy (statistical thermodynamics)#Gibbs entropy formula|Gibbs entropy]]

:<math> S = - k_B \sum_i \rho_i \ln(\rho_i) </math>

subject to two physical constraints:

:1. The probabilities of all states add to unity.

:::<math>
\sum_i \rho_i = 1
</math>

:2. In the [[canonical ensemble]], the average energy is fixed.

:::<math>
\langle E \rangle = \sum_i \rho_i E_i \equiv U
</math>

Using the method of [[Lagrange multipliers]], we write the Lagrangian (or Lagrange function) <math> \mathcal{L} </math> as:

:<math>
\mathcal{L} = \left( - k_B \sum_i \rho_i \ln(\rho_i) \right) + \lambda_1 \left( \sum_i \rho_i - 1 \right) + \lambda_2 \left( \sum_i \rho_i E_i - U \right)
</math>

Differentiating and extremizing <math> \mathcal{L} </math> with respect to <math> \rho_i </math> leads to:

:<math>
0 = \frac{\partial \mathcal{L}}{\partial \rho_i} = -k_B \ln(\rho_i) - k_B + \lambda_1 + \lambda_2 E_i
</math>

Isolating for <math> \rho_i </math> yields:

:<math>
\rho_i = \exp \left( \frac{-k_B + \lambda_1 + \lambda_2 E_i}{k_B} \right)
</math>

To obtain <math> \lambda_1 </math>, one substitutes the probability into the first constraint:

:<math>
\begin{align}
1 & = \sum_i \rho_i \\
& = \exp \left( \frac{-k_B + \lambda_1}{k_B} \right) Z
\end{align}
</math>

where <math> Z </math> is defined as the canonical ensemble partition function:

:<math>
Z \equiv \sum_i \exp \left( \frac{\lambda_2}{k_B} E_i \right)
</math>

Rewriting <math> \rho_i </math> in terms of <math> Z </math> gives:

:<math>
\rho_i = \frac{1}{Z} \exp \left( \frac{\lambda_2}{k_B} E_i \right)
</math>

Rewriting <math> S </math> in terms of <math> Z </math> gives:

:<math>
\begin{align}
S & = - k_B \sum_i \rho_i \ln(\rho_i) \\
& = - k_B \sum_i \rho_i \left( \frac{\lambda_2}{k_B} E_i - \ln(Z) \right) \\
& = - \lambda_2 \sum_i \rho_i E_i + k_B \ln(Z) \sum_i \rho_i \\
& = - \lambda_2 U + k_B \ln(Z)
\end{align}
</math>

To obtain <math> \lambda_2 </math>, we differentiate <math> S </math> with respect to the average energy <math> U </math> and apply the [[first law of thermodynamics]]:

:<math>
\frac{\partial S}{\partial U} = -\lambda_2 \equiv \frac{1}{T}
</math>

Thus, the canonical partition function <math> Z </math> becomes:

:<math>
Z \equiv \sum_i \mathrm{e}^{- \beta E_i}
</math>

where <math> \beta \equiv 1/(k_B T) </math> is the [[thermodynamic beta]]. Finally, the probability distribution <math> \rho_i </math> and entropy <math> S </math> are respectively:

:<math>
\begin{align}
\rho_i & = \frac{1}{Z} \mathrm{e}^{- \beta E_i} \\
S & = \frac{U}{T} + k_B \ln(Z)
\end{align}
</math>

|}

'''Classical continuous system'''

For a canonical ensemble that is classical and continuous, the canonical partition function is defined as
:<math> Z = \frac{1}{h^3} \int \mathrm{e}^{- \beta H(q,p)} ~d^{3}q ~d^{3}p </math>
where
:<math> h </math> is the [[Planck constant]],
:<math> \beta </math> is the [[thermodynamic beta]] defined as <math> \tfrac{1}{k_B T} </math>,
:<math> H(q,p) </math> is the [[Hamiltonian mechanics|Hamiltonian]] of the system,
:<math> q </math> is the [[Canonical coordinates|canonical position]],
:<math> p </math> is the [[Canonical coordinates|canonical momentum]].

'''Quantum mechanical discrete system'''

For a canonical ensemble that is quantum mechanical and discrete, the canonical partition function is defined as
:<math> Z = \operatorname{tr} (\mathrm{e}^{- \beta \hat{H}}) </math>
where
:<math> \beta </math> is the [[thermodynamic beta]] defined as <math> \tfrac{1}{k_B T} </math>,
:<math> \hat{H} </math> is the [[Hamiltonian (quantum mechanics)|Hamiltonian operator]].
:The dimension of <math> \mathrm{e}^{- \beta \hat{H}} </math> 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:
:<math> Z = \frac{1}{h} \int \langle q,p | \mathrm{e}^{- \beta \hat{H}} | q,p \rangle ~dq ~dp </math>
where
:<math> h </math> is the [[Planck constant]],
:<math> \beta </math> is the [[thermodynamic beta]] defined as <math> \tfrac{1}{k_B T} </math>,
:<math> \hat{H} </math> is the [[Hamiltonian (quantum mechanics)|Hamiltonian operator]],
:<math> q </math> is the [[Canonical coordinates|canonical position]],
:<math> p </math> is the [[Canonical coordinates|canonical momentum]].


The [[Exponential function|exponential]] factor exp(−''βE<sub>s</sub>'') is known as the [[Boltzmann factor]].
with ''k''<sub>B</sub> denoting [[Boltzmann's constant]]. The [[Exponential function|exponential]] factor exp(−''βE<sub>s</sub>'') is known as the [[Boltzmann factor]].


In systems with multiple quantum states ''s'' sharing the same ''E<sub>s</sub>'', it is said that the energy levels of the system are degenerate. In the case of degenerate energy levels, we can write the partition function in terms of the contribution from energy levels (indexed by ''j'') as follows:
In systems with multiple quantum states ''s'' sharing the same ''E<sub>s</sub>'', it is said that the energy levels of the system are degenerate. In the case of degenerate energy levels, we can write the partition function in terms of the contribution from energy levels (indexed by ''j'') as follows:
Line 269: Line 140:


This provides us with a method for calculating the expected values of many microscopic quantities. We add the quantity artificially to the microstate energies (or, in the language of quantum mechanics, to the Hamiltonian), calculate the new partition function and expected value, and then set ''λ'' to zero in the final expression. This is analogous to the [[source field]] method used in the [[path integral formulation]] of [[quantum field theory]]. {{cn|date=December 2015}}
This provides us with a method for calculating the expected values of many microscopic quantities. We add the quantity artificially to the microstate energies (or, in the language of quantum mechanics, to the Hamiltonian), calculate the new partition function and expected value, and then set ''λ'' to zero in the final expression. This is analogous to the [[source field]] method used in the [[path integral formulation]] of [[quantum field theory]]. {{cn|date=December 2015}}

=== Derivation ===

There are multiple approaches to deriving the partition function. The following derivation follows the powerful and general [[information theory|information-theoretic]] [[Edwin Thompson Jaynes|Jaynesian]] [[maximum entropy thermodynamics|maximum entropy]] approach.

According to the [[second law of thermodynamics]], a system assumes a configuration of [[maximum entropy thermodynamics | maximum entropy]] at [[thermodynamic equilibrium]]. We seek to find a probability distribution of states <math> p_i </math> which maximizes the entropy

:<math> S = - k_B \sum_i p_i \ln(p_i) </math>

subject to two physical constraints:

:1. The probabilities of all states add to unity.

:::<math> \sum_i p_i = 1 </math>

:2. In the canonical ensemble, the average energy is fixed.

:::<math> \langle E \rangle = \sum_i p_i E_i = U </math>


Using the method of [[Lagrange multipliers]], we rewrite <math> S </math> as:

:<math> S = - k_B \sum_i p_i \ln(p_i) + \lambda_1 (\sum_i p_i - 1) + \lambda_2 (\sum_i p_i E_i - U) </math>

To immediately obtain <math> \lambda_2 </math>, we differentiate <math> S </math> with respect to the average energy <math> U </math> and apply the [[first law of thermodynamics]]:

:<math> \frac{\partial S}{\partial U} = -\lambda_2 = \frac{1}{T} </math>

Differentiating and extremizing <math> S </math> with respect to <math> p_i </math> leads to:

:<math>
\begin{align}
0 & = \frac{\partial S}{\partial p_i} = -k_B \sum_i \ln(p_i) - k_B \sum_i 1 + \lambda_1 \sum_i 1 - \frac{1}{T} \sum_i E_i \\
& = \sum_i (-k_B \ln(p_i) - k_B + \lambda_1 - \frac{E_i}{T}) \\
0 & = -k_B \ln(p_i) - k_B + \lambda_1 - \frac{E_i}{T}
\end{align}
</math>

Isolating for <math> p_i </math> yields:

:<math>
\begin{align}
p_i & = \mathrm{e}^{\frac{1}{k_B} (-1 + \lambda_1 - \frac{E_i}{T})} \\
& = \mathrm{e}^{\frac{1}{k_B} (-1 + \lambda_1)} \mathrm{e}^{-\beta E_i}
\end{align}
</math>

where <math> \beta := \frac{1}{k_B T} </math>. To obtain <math> \lambda_1 </math>, we substitute the probability into the first constraint:

:<math>
\begin{align}
1 & = \sum_i p_i \\
& = \mathrm{e}^{\frac{1}{k_B} (-1 + \lambda_1)} \sum_i \mathrm{e}^{-\beta E_i}
\end{align}
</math>
:<math>
\mathrm{e}^{\frac{1}{k_B} (-1 + \lambda_1)} = \frac{1}{\sum_i \mathrm{e}^{-\beta E_i}}
</math>

We now define the partition function:

:<math> Z = \sum_i \mathrm{e}^{-\beta E_i} </math>


Rewriting <math> p_i </math> in terms of <math> Z </math> gives:

:<math>
\begin{align}
p_i & = \mathrm{e}^{\frac{1}{k_B} (-1 + \lambda_1)} \mathrm{e}^{-\beta E_i} \\
& = \frac{1}{Z} \mathrm{e}^{-\beta E_i}
\end{align}
</math>

Rewriting <math> U </math> in terms of <math> Z </math> gives:

:<math>
\begin{align}
U & = \sum_i p_i E_i \\
& = \frac{1}{Z} \sum_i \mathrm{e}^{-\beta E_i} E_i
\end{align}
</math>

Finally, rewriting <math> S </math> in terms of <math> Z </math> gives:

:<math>
\begin{align}
S & = - k_B \sum_i p_i \ln(p_i) \\
& = \frac{k_B}{Z} \sum_i \mathrm{e}^{-\beta E_i} (\beta E_i + k_B \ln(Z)) \\
& = \frac{U}{T} + k_B \ln(Z)
\end{align}
</math>


=== Relation to thermodynamic variables ===
=== Relation to thermodynamic variables ===

Revision as of 14:54, 19 November 2016

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.

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

As a beginning assumption, 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. This kind of system is called a canonical ensemble. Let us label with s = 1, 2, 3, ... the exact states (microstates) that the system can occupy, and denote the total energy of the system when it is in microstate s as Es. Generally, these microstates can be regarded as analogous to discrete quantum states of the system.

The canonical partition function is

,

where the "inverse temperature", β, is conventionally defined as

with kB denoting Boltzmann's constant. The exponential factor exp(−βEs) is known as the Boltzmann factor.

In systems with multiple quantum states s sharing the same Es, it is said that the energy levels of the system are degenerate. In the case of degenerate energy levels, we can write the partition function in terms of the contribution from energy levels (indexed by j) as follows:

,

where gj is the degeneracy factor, or number of quantum states s which have the same energy level defined by Ej = Es.

The above treatment applies to quantum statistical mechanics, where a physical system inside a finite-sized box will typically have a discrete set of energy eigenstates, which we can use as the states s above. In classical statistical mechanics, it is not really correct to express the partition function as a sum of discrete terms, as we have done. In classical mechanics, the position and momentum variables of a particle can vary continuously, so the set of microstates is actually uncountable. In this case we must describe the partition function using an integral rather than a sum. For instance, the partition function of a gas of N identical classical particles is

where

pi indicate particle momenta
xi indicate particle positions
d3 is a shorthand notation serving as a reminder that the pi and xi are vectors in three-dimensional space, and
H is the classical Hamiltonian.

The reason for the factorial factor N! is discussed below. For simplicity, we will use the discrete form of the partition function in this article. Our results will apply equally well to the continuous form. The extra constant factor introduced in the denominator was introduced because, unlike the discrete form, the continuous form shown above is not dimensionless. To make it into a dimensionless quantity, we must divide it by h3N where h is some quantity with units of action (usually taken to be Planck's constant).

In quantum mechanics, the partition function can be more formally written as a trace over the state space (which is independent of the choice of basis):

 ,

where Ĥ is the quantum Hamiltonian operator. The exponential of an operator can be defined using the exponential power series. The classical form of Z is recovered when the trace is expressed in terms of coherent states [1] and when quantum-mechanical uncertainties in the position and momentum of a particle are regarded as negligible. Formally, one inserts under the trace for each degree of freedom the identity:

where |x, p⟩ is a normalised Gaussian wavepacket centered at position x and momentum p. Thus,

A coherent state is an approximate eigenstate of both operators and , hence also of the Hamiltonian Ĥ, with errors of the size of the uncertainties. If Δx and Δp can be regarded as zero, the action of Ĥ reduces to multiplication by the classical Hamiltonian, and Z reduces to the classical configuration integral.

Consider a system S embedded into a heat bath B. Let the total energy of both systems be E. Let pi denote the probability that the system S is in microstate i with energy Ei. According to the fundamental postulate of statistical mechanics (which states that all attainable microstates of a system are equally probable), the probability pi will be proportional to the number of microstates in the total closed system where S is in microstate i with energy Ei. Equivalently, pi will be proportional to the number of microstates of the heat bath B with energy E - Ei:

The number of microstates of the heat bath at a given energy E is denoted by Ω(E). Assuming that the heat bath's internal energy is much larger than the energy of S (E>>Ei), we can Taylor expand Ω to first order in Ei and use the thermodynamic relation :

Since the total probability to find the system in some microstate (the sum of all pi) must be equal to 1, we can define the partition function as the normalisation constant:

Meaning and significance

It may not be obvious why the partition function, as we have defined it above, is an important quantity. First, let us consider what goes into it. The partition function is a function of the temperature T and the microstate energies E1, E2, E3, etc. The microstate energies are determined by other thermodynamic variables, such as the number of particles and the volume, as well as microscopic quantities like the mass of the constituent particles. This dependence on microscopic variables is the central point of statistical mechanics. With a model of the microscopic constituents of a system, one can calculate the microstate energies, and thus the partition function, which will then allow us to calculate all the other thermodynamic properties of the system.

The partition function can be related to thermodynamic properties because it has a very important statistical meaning. The probability Ps that the system occupies microstate s is

Thus, as shown above, the partition function plays the role of a normalizing constant (note that it does not depend on s), ensuring that the probabilities sum up to one:

This is the reason for calling Z the "partition function": it encodes how the probabilities are partitioned among the different microstates, based on their individual energies. The letter Z stands for the German word Zustandssumme, "sum over states". The usefulness of the partition function stems from the fact that it can be used to relate macroscopic thermodynamic quantities to the microscopic details of a system through the derivatives of its partition function.

Calculating the thermodynamic total energy

In order to demonstrate the usefulness of the partition function, let us calculate the thermodynamic value of the total energy. This is simply the expected value, or ensemble average for the energy, which is the sum of the microstate energies weighted by their probabilities:

or, equivalently,

Incidentally, one should note that if the microstate energies depend on a parameter λ in the manner

then the expected value of A is

This provides us with a method for calculating the expected values of many microscopic quantities. We add the quantity artificially to the microstate energies (or, in the language of quantum mechanics, to the Hamiltonian), calculate the new partition function and expected value, and then set λ to zero in the final expression. This is analogous to the source field method used in the path integral formulation of quantum field theory. [citation needed]

Derivation

There are multiple approaches to deriving the partition function. The following derivation follows the powerful and general information-theoretic Jaynesian maximum entropy approach.

According to the second law of thermodynamics, a system assumes a configuration of maximum entropy at thermodynamic equilibrium. We seek to find a probability distribution of states which maximizes the entropy

subject to two physical constraints:

1. The probabilities of all states add to unity.
2. In the canonical ensemble, the average energy is fixed.


Using the method of Lagrange multipliers, we rewrite as:

To immediately obtain , we differentiate with respect to the average energy and apply the first law of thermodynamics:

Differentiating and extremizing with respect to leads to:

Isolating for yields:

where . To obtain , we substitute the probability into the first constraint:

We now define the partition function:


Rewriting in terms of gives:

Rewriting in terms of gives:

Finally, rewriting in terms of gives:

Relation to thermodynamic variables

In this section, we will state the relationships between the partition function and the various thermodynamic parameters of the system. These results can be derived using the method of the previous section and the various thermodynamic relations.

As we have already seen, the thermodynamic energy is

The variance in the energy (or "energy fluctuation") is

The heat capacity is

The entropy is

where A is the Helmholtz free energy defined as A = UTS, where U = ⟨E⟩ is the total energy and S is the entropy, so that

Partition functions of subsystems

Suppose a system is subdivided into N sub-systems with negligible interaction energy, that is, we can assume the particles are essentially non-interacting. If the partition functions of the sub-systems are ζ1, ζ2, ..., ζN, then the partition function of the entire system is the product of the individual partition functions:

If the sub-systems have the same physical properties, then their partition functions are equal, ζ1 = ζ2 = ... = ζ, in which case

However, there is a well-known exception to this rule. If the sub-systems are actually identical particles, in the quantum mechanical sense that they are impossible to distinguish even in principle, the total partition function must be divided by a N! (N factorial):

This is to ensure that we do not "over-count" the number of microstates. While this may seem like a strange requirement, it is actually necessary to preserve the existence of a thermodynamic limit for such systems. This is known as the Gibbs paradox.

Grand canonical partition function

We can define a grand canonical partition function for a grand canonical ensemble, which describes the statistics of a constant-volume system that can exchange both heat and particles with a reservoir. The reservoir has a constant temperature T, and a chemical potential μ.

The grand canonical partition function, denoted by , is the following sum over microstates

Here, each microstate is labelled by , and has total particle number and total energy . This partition function is closely related to the Grand potential, , by the relation

This can be contrasted to the canonical partition function above, which is related instead to the Helmholtz free energy.

It is important to note that the number of microstates in the grand canonical ensemble may be much larger than in the canonical ensemble, since here we consider not only variations in energy but also in particle number. Again, the utility of the grand canonical partition function is that it is related to the probability that the system is in state :

An important application of the grand canonical ensemble is in deriving exactly the statistics of a non-interacting many-body quantum gas (Fermi–Dirac statistics for fermions, Bose–Einstein statistics for bosons), however it is much more generally applicable than that. The grand canonical ensemble may also be used to describe classical systems, or even interacting quantum gases.

The grand partition function is sometimes written (equivalently) in terms of alternate variables as[2]

where is known as the absolute activity (or fugacity) and is the canonical partition function.

See also

References

  1. ^ J. R. Klauder, B.-S. Skagerstam, Coherent States --- Applications in Physics and Mathematical Physics, World Scientific, 1985, p. 71-73.
  2. ^ Baxter, Rodney J. (1982). Exactly solved models in statistical mechanics. Academic Press Inc. ISBN 9780120831807.