Content deleted Content added
Tags: Mobile edit Mobile web edit Advanced mobile edit |
|||
Line 13:
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 mathematics|discrete]] or [[Probability distribution#Continuous probability distribution|continuous]].{{Citation needed|reason=definition of partition function requires referencing|date=December 2016}}
For a canonical ensemble that is classical and discrete, the canonical partition function is defined as
<math display="block"> Z = \sum_i e^{-\beta E_i}, </math>
where
* <math> i </math> is the index for the [[Microstate (statistical mechanics)|microstates]] of the system;
* <math> e </math> is [[e (mathematical constant)|Euler's number]];
* <math> \beta </math> is the [[thermodynamic beta]], defined as <math> \tfrac{1}{k_\text{B} T} </math>;
* <math> E_i </math> is the total energy of the system in the respective [[Microstate (statistical mechanics)|microstate]].
The [[Exponential function|exponential]] factor <math> e^{-\beta E_i} </math> is otherwise known as the [[Boltzmann factor]].
{{math proof | title = Derivation of canonical partition function (classical, discrete)
| proof =
There are multiple approaches to deriving the partition function. The following derivation follows the more 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]]{{Citation needed|reason=important statement with profound consequences|date=December 2016}}. We seek a probability distribution of states <math> \rho_i </math> that maximizes the discrete [[entropy (statistical thermodynamics)#Gibbs entropy formula|Gibbs entropy]]
<math display="block"> S = - k_\text{B} \sum_i \rho_i \ln \rho_i </math>
subject to two physical constraints:
Line 48 ⟶ 42:
Applying [[calculus of variations|variational calculus]] with constraints (analogous in some sense to the method of [[Lagrange multipliers]]), we write the Lagrangian (or Lagrange function) <math> \mathcal{L} </math> as
<math display="block">
\mathcal{L} = \left( -k_\text{B} \sum_i \rho_i \ln \rho_i \right) + \lambda_1 \left( 1 - \sum_i \rho_i \right) + \lambda_2 \left( U - \sum_i \rho_i E_i \right) .</math>
Varying and extremizing <math> \mathcal{L} </math> with respect to <math> \rho_i </math> leads to
<math display="block">\begin{align}
0 & \equiv \delta \mathcal{L} \\
&= \delta \left( - \sum_i k_\text{B} \rho_i \ln \rho_i \right) + \delta \left( \lambda_1 - \sum_i \lambda_1 \rho_i \right) + \delta \left( \lambda_2 U - \sum_i \lambda_2 \rho_i E_i \right) \\
Line 62 ⟶ 52:
&= \sum_i \left[ \frac{\partial}{\partial \rho_i } \Big( - k_\text{B} \rho_i \ln \rho_i \Big) \, \delta ( \rho_i ) + \frac{\partial}{\partial \rho_i } \Big( \lambda_1 \rho_i \Big) \, \delta ( \rho_i ) + \frac{\partial}{\partial \rho_i } \Big( \lambda_2 E_i \rho_i \Big) \, \delta ( \rho_i ) \right] \\
&= \sum_i \bigg[ -k_\text{B} \ln \rho_i - k_\text{B} + \lambda_1 + \lambda_2 E_i \bigg] \, \delta ( \rho_i ) .
\end{align}</math>
Since this equation should hold for any variation <math> \delta ( \rho_i ) </math>, it implies that
<math display="block"> 0 \equiv - k_\text{B} \ln \rho_i - k_\text{B} + \lambda_1 + \lambda_2 E_i .</math>
Isolating for <math> \rho_i </math> yields
<math display="block">\rho_i = \exp \left( \frac{-k_\text{B} + \lambda_1 + \lambda_2 E_i}{k_\text{B}} \right) .</math>
To obtain <math> \lambda_1 </math>, one substitutes the probability into the first constraint:
<math display="block">\begin{align}
1 &= \sum_i \rho_i \\
&= \exp \left( \frac{-k_\text{B} + \lambda_1}{k_\text{B}} \right) Z ,
\end{align}</math>
where '''<math> Z </math> is a constant number defined as the canonical ensemble partition function''':
<math display="block">Z \equiv \sum_i \exp \left( \frac{\lambda_2}{k_\text{B}} E_i \right) .</math>
Isolating for <math> \lambda_1 </math> yields <math> \lambda_1 = - k_\text{B} \ln(Z) + k_\text{B} </math>.
Rewriting <math> \rho_i </math> in terms of <math> Z </math> gives
<math display="block"> \rho_i = \frac{1}{Z} \exp \left( \frac{\lambda_2}{k_\text{B}} E_i \right) .</math>
Rewriting <math> S </math> in terms of <math> Z </math> gives
<math display="block">\begin{align}
S &= - k_\text{B} \sum_i \rho_i \ln \rho_i \\
&= - k_\text{B} \sum_i \rho_i \left( \frac{\lambda_2}{k_\text{B}} E_i - \ln(Z) \right) \\
&= - \lambda_2 \sum_i \rho_i E_i + k_\text{B} \ln(Z) \sum_i \rho_i \\
&= - \lambda_2 U + k_\text{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> dU = T dS - P dV </math>:
<math display="block">\frac{dS}{dU} = -\lambda_2 \equiv \frac{1}{T} .</math>
Thus the canonical partition function <math> Z </math> becomes
<math display="block">Z \equiv \sum_i e^{-\beta E_i} ,</math>
where <math> \beta \equiv 1/(k_\text{B} T) </math> is defined as the [[thermodynamic beta]]. Finally, the probability distribution <math> \rho_i </math> and entropy <math> S </math> are respectively
<math display="block">\begin{align}
\rho_i & = \frac{1}{Z} e^{-\beta E_i} , \\
S & = \frac{U}{T} + k_\text{B} \ln Z .
\end{align}</math>
}}
====Classical continuous system====
In [[classical mechanics]], the [[Position (vector)|position]] and [[Momentum vector|momentum]] variables of a particle can vary continuously, so the set of microstates is actually [[uncountable set|uncountable]]. In ''classical'' statistical mechanics, it is rather inaccurate to express the partition function as a [[Sum (mathematics)|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
<math display="block"> Z = \frac{1}{h^3} \int e^{-\beta H(q, p)} \, \mathrm{d}^3 q \, \mathrm{d}^3 p, </math>
where
* <math> h </math> is the [[Planck constant]];
To make it into a dimensionless quantity, we must divide it by ''h'', which is some quantity with units of [[action (physics)|action]] (usually taken to be [[Planck's constant]]).
For a gas of <math> N </math> identical classical particles in three dimensions, the partition function is
<math display="block"> Z=\frac{1}{N!h^{3N}} \int \, \exp \left(-\beta \sum_{i=1}^N H(\textbf q_i, \textbf p_i) \right) \; \mathrm{d}^3 q_1 \cdots \mathrm{d}^3 q_N \, \mathrm{d}^3 p_1 \cdots \mathrm{d}^3 p_N </math>
where
* <math> h </math> is the [[Planck constant]];
* <math> \mathrm{d}^3 </math> is shorthand notation to indicate that <math> q_i </math> and <math> p_i </math> are vectors in three-dimensional space.
The reason for the [[factorial]] factor ''N''! is discussed [[#Partition functions of subsystems|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 ''h''<sup>3''N''</sup> (where ''h'' is usually taken to be Planck's constant).
For a canonical ensemble that is quantum mechanical and discrete, the canonical partition function is defined as the [[trace (linear algebra)|trace]] of the Boltzmann factor:
<math display="block"> Z = \operatorname{tr} ( e^{-\beta \hat{H}} ), </math>
where:
* <math> \operatorname{tr} ( \circ ) </math> is the [[trace (linear algebra)|trace]] of a matrix;
* <math> \beta </math> is the [[thermodynamic beta]], defined as <math> \tfrac{1}{k_\text{B} T} </math>;
* <math> \hat{H} </math> is the [[Hamiltonian (quantum mechanics)|Hamiltonian operator]].
====Quantum mechanical continuous system====
For a canonical ensemble that is quantum mechanical and continuous, the canonical partition function is defined as
<math display="block"> Z = \frac{1}{h} \int \langle q, p | e^{-\beta \hat{H}} | q, p \rangle \, \mathrm{d} q \, \mathrm{d} p, </math>
where:
* <math> h </math> is the [[Planck constant]];
In systems with multiple [[quantum states]] ''s'' sharing the same energy ''E<sub>s</sub>'', it is said that the [[energy levels]] of the system are [[Degenerate energy levels|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:
<math display="block"> Z = \sum_j g_j \cdot e^{-\beta E_j},</math>
where ''g<sub>j</sub>'' is the degeneracy factor, or number of quantum states ''s'' that have the same energy level defined by ''E<sub>j</sub>'' = ''E<sub>s</sub>''.
The above treatment applies to ''quantum'' [[statistical mechanics]], where a physical system inside a [[Particle in a box|finite-sized box]] will typically have a discrete set of energy eigenstates, which we can use as the states ''s'' above. In quantum mechanics, the partition function can be more formally written as a trace over the [[mathematical formulation of quantum mechanics|state space]] (which is independent of the choice of [[basis (linear algebra)|basis]]):
<math display="block">Z = \operatorname{tr} ( e^{-\beta \hat{H}} ),</math>
where {{math|''Ĥ''}} is the [[Hamiltonian (quantum mechanics)|quantum Hamiltonian operator]]. The exponential of an operator can be defined using the [[Characterizations of the exponential function|exponential power series]].
The classical form of ''Z'' is recovered when the trace is expressed in terms of [[coherent state]]s<ref>{{cite book |first1=John R. |last1=Klauder |first2=Bo-Sture |last2=Skagerstam |title=Coherent States: Applications in Physics and Mathematical Physics |publisher=World Scientific |date=1985 |pages=71–73 |isbn=978-9971-966-52-2 }}</ref>
and when quantum-mechanical [[uncertainty principle|uncertainties]] in the position and momentum of a particle
are regarded as negligible. Formally, using [[bra–ket notation]], one inserts under the trace for each degree of freedom the identity:
<math display="block"> \boldsymbol{1} = \int |x, p\rangle \langle x,p| \frac{dx \,dp}{h},</math>
where {{ket|''x'', ''p''}} is a [[Normalizing constant|normalised]] [[Wave packet#Gaussian wave packets in quantum mechanics|Gaussian wavepacket]] centered at
position ''x'' and momentum ''p''. Thus
Z = \int \operatorname{tr} \left(
= \int \langle x,p|
</math>
A coherent state is an approximate eigenstate of both operators <math> \hat{x} </math> and <math> \hat{p} </math>, hence also of the Hamiltonian {{math|''Ĥ''}}, with errors of the size of the uncertainties. If {{math|Δ''x''}} and {{math|Δ''p''}} can be regarded as zero, the action of {{math|''Ĥ''}} reduces to multiplication by the classical Hamiltonian, and {{math|''Z''}} reduces to the classical configuration integral.
=== Connection to probability theory ===
Line 229 ⟶ 168:
Consider a system ''S'' embedded into a [[heat bath]] ''B''. Let the total [[energy]] of both systems be ''E''. Let ''p<sub>i</sub>'' denote the [[probability]] that the system ''S'' is in a particular [[Microstate (statistical mechanics)|microstate]], ''i'', with energy ''E<sub>i</sub>''. According to the [[Statistical mechanics#Fundamental postulate|fundamental postulate of statistical mechanics]] (which states that all attainable microstates of a system are equally probable), the probability ''p<sub>i</sub>'' will be inversely proportional to the number of microstates of the total [[Closed system (thermodynamics)|closed system]] (''S'', ''B'') in which ''S'' is in microstate ''i'' with energy ''E<sub>i</sub>''. Equivalently, ''p<sub>i</sub>'' will be proportional to the number of microstates of the heat bath ''B'' with energy ''E'' − ''E<sub>i</sub>'':
<math display="block">p_i = \frac{\Omega_B(E - E_i)}{\Omega_{(S,B)}(E)}.</math>
Assuming that the heat bath's internal energy is much larger than the energy of ''S'' (''E'' ≫ ''E<sub>i</sub>''), we can [[Taylor expansion|Taylor-expand]] <math>\Omega_B</math> to first order in ''E<sub>i</sub>'' and use the thermodynamic relation <math>\partial S_B/\partial E = 1/T</math>, where here <math>S_B</math>, <math>T</math> are the entropy and temperature of the bath respectively:
<math display="block">\begin{align}
k \ln p_i &= k \ln \Omega_B(E - E_i) - k \ln \Omega_{(S,B)}(E) \\[5pt]
&\approx -\frac{\partial\big(k \ln \Omega_B(E)\big)}{\partial E} E_i + k \ln\Omega_B(E) - k \ln \Omega_{(S,B)}(E)
Line 243 ⟶ 177:
&\approx -\frac{\partial S_B}{\partial E} E_i + k \ln \frac{\Omega_B(E)}{\Omega_{(S,B)}(E)} \\[5pt]
&\approx -\frac{E_i}{T} + k \ln \frac{\Omega_B(E)}{\Omega_{(S,B)}(E)}
\end{align}</math>
Thus
<math display="block">p_i \propto e^{-E_i/(kT)} = e^{-\beta E_i}.</math>
Since the total probability to find the system in ''some'' microstate (the sum of all ''p<sub>i</sub>'') must be equal to 1, we know that the constant of proportionality must be the [[Normalizing constant|normalization constant]],
<math display="block"> Z = \sum_i e^{-\beta E_i} = \frac{\Omega_{(S,B)}(E)}{\Omega_B(E)}.</math>
=== 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:
<math display="block">\langle E \rangle = \sum_s E_s P_s = \frac{1}{Z} \sum_s E_s
e^{- \beta E_s} = - \frac{1}{Z} \frac{\partial}{\partial \beta}
Z(\beta, E_1, E_2, \cdots) = - \frac{\partial \ln Z}{\partial \beta}
</math>
or, equivalently,
<math display="block">\langle E\rangle = k_\text{B} T^2 \frac{\partial \ln Z}{\partial T}.</math>
Incidentally, one should note that if the microstate energies depend on a parameter λ in the manner
<math display="block">E_s = E_s^{(0)} + \lambda A_s \qquad \text{for all}\; s </math>
then the expected value of ''A'' is
<math display="block">\langle A\rangle = \sum_s A_s P_s = -\frac{1}{\beta}
\frac{\partial}{\partial\lambda} \ln Z(\beta,\lambda).</math>
Line 286 ⟶ 208:
As we have already seen, the thermodynamic energy is
<math display="block">\langle E \rangle = - \frac{\partial \ln Z}{\partial \beta}.</math>
The [[variance]] in the energy (or "energy fluctuation") is
<math display="block">\langle (\Delta E)^2 \rangle \equiv \langle (E - \langle
E\rangle)^2 \rangle = \frac{\partial^2 \ln Z}{\partial \beta^2}.</math>
The [[heat capacity]] is
<math display="block">C_v = \frac{\partial \langle E \rangle}{\partial T} = \frac{1}{k_\text{B} T^2} \langle (\Delta E)^2 \rangle.</math>
In general, consider the [[extensive variable]] X and [[intensive variable]] Y where X and Y form a pair of [[conjugate variables]]. In ensembles where Y is fixed (and X is allowed to fluctuate), then the average value of X will be:
<math display="block">\langle X \rangle = \pm \frac{\partial \ln Z}{\partial \beta Y}.</math>
The sign will depend on the specific definitions of the variables X and Y. An example would be X = volume and Y = pressure. Additionally, the variance in X will be
<math display="block">\langle (\Delta X)^2 \rangle \equiv \langle (X - \langle
X\rangle)^2 \rangle = \frac{\partial \langle X \rangle}{\partial \beta Y} = \frac{\partial^2 \ln Z}{\partial (\beta Y)^2}.</math>
In the special case of [[entropy]], entropy is given by
<math display="block">S \equiv -k_\text{B}\sum_s P_s \ln P_s = k_\text{B} (\ln Z + \beta \langle E\rangle) = \frac{\partial}{\partial T} (k_\text{B} T \ln Z) = -\frac{\partial A}{\partial T}</math>
where ''A'' is the [[Helmholtz free energy]] defined as {{math|1=''A'' = ''U'' − ''TS''}}, where {{math|1=''U'' = {{langle}}''E''{{rangle}}}} is the total energy and ''S'' is the [[entropy]], so that
<math display="block">A = \langle E\rangle -TS= - k_\text{B} T \ln Z.</math>
Furthermore, the heat capacity can be expressed as
<math display="block">C_v = T \frac{\partial S}{\partial T} = -T \frac{\partial^2 A}{\partial T^2}.</math>
=== 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 ''ζ''<sub>1</sub>, ''ζ''<sub>2</sub>, ..., ''ζ''<sub>N</sub>, then the partition function of the entire system is the ''product'' of the individual partition functions:
<math display="block">Z =\prod_{j=1}^{N} \zeta_j.</math>
If the sub-systems have the same physical properties, then their partition functions are equal, ζ<sub>1</sub> = ζ<sub>2</sub> = ... = ζ, in which case <math display="block">Z = \zeta^N.</math>
However, there is a well-known exception to this rule. If the sub-systems are actually [[identical particles]], in the [[quantum mechanics|quantum mechanical]] sense that they are impossible to distinguish even in principle, the total partition function must be divided by a ''N''! (''N'' [[factorial]]):
<math display="block">Z = \frac{\zeta^N}{N!}.</math>
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]].
Line 340 ⟶ 249:
The partition function can be related to thermodynamic properties because it has a very important statistical meaning. The probability ''P<sub>s</sub>'' that the system occupies microstate ''s'' is
<math display="block">P_s = \frac{1}{Z} e^{- \beta E_s}. </math>
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:
<math display="block">\sum_s P_s = \frac{1}{Z} \sum_s e^{- \beta E_s} = \frac{1}{Z} Z
= 1. </math>
|