The canonical ensemble is an ensemble that is not isolated from the environment, but is in thermal equilibrium with a larger system that acts as a heat reservoir (i.e., the environment). The energy is subject to fluctuation, but the number of particles is constant. Its density function is
where , is the Hamiltonian, is the Boltzmann constant and is the temperature. The normalization factor is the partition function1
Here, is a constant to make the function dimensionless. It is usually assumed to be the Planck constant when working with quantum objects like atoms and molecules, but it should be emphasized that there is no a priori reason why it should be precisely that. Its value depends on the what is being considered as components of the system.
It differs from the microcanonical ensemble, which has constant energy with no fluctuations, and the grand canonical ensemble, which has fluctuations in both energy and particle number. For most solid and liquid systems, the canonical ensemble is the most convenient description, as it takes the interaction with the environment into account. Compared to the microcanonical, energy is derived from the equilibrium temperature instead of the other way around. In fact, in the canonical ensemble, temperature serves much of the same role as energy does in the microcanonical, being the quantity that's conserved.
Derivation from the microcanonical ensemble#
Let's consider the system (1) and the reservoir (2) separately, each with a large and constant number of particles and . Combined, they make up an isolated system which can be described by a microcanonical ensemble2 of energy that obeys
where is the energy of the system + reservoir and is a small amount of energy (to account for uncertainty). For clarity: is constant, but and are not. We ignore the interaction between the two system beyond the transfer of energy, so that the total Hamiltonian is separable:
The reservoir's energy and number of particle is taken to be much larger than that of the system, so and .
Now, we really only care about the state of system 1, regardless of what reservoir 2 is doing. The Probability of system 1 being in a volume element centered on in its own phase space is proportional to
since is the only state the reservoir is likely to be in at equilibrium. The density function of system 1 is going to be determined by its most likely state
We want to find the number of microstates at energy , and to do so we can start from the Boltzmann entropy formula . Remember that , so we can approximate using a Taylor series in centered in and truncate at the first order without much error:
where we used the Maxwell relation , the fact that always because that's how reservoirs work. If we pull out we get
The first exponential is a constant, so we can drop it by redefining the normalization constant. By writing , using the inverse temperature and dropping the index 1, we can write the density function:
Note that it is not yet normalized. The normalization factor is the partition function below.
This is the density function of the canonical ensemble and is an incredibly important result in and out of physics because it essentially encodes a universal method to find a state of equilibrium from an extremely complex system. In statistical physics, of course, it represents a huge number of particles needing to thermalize. But it may also represent cities in the traveling salesman problem or many other systems completely detached from physics. The function here is the Hamiltonian, but it is more generally a cost function the minimum of which is the most stable equilibrium state.
Partition function#
The partition function of the canonical ensemble is
The comes from correct Boltzmann counting1, meanwhile keeps the function dimensionless by canceling the dimensions of . Integration happens over the entire phase space. The following important result also holds:
where is the Helmholtz free energy (needs to be proven; see below). Since is an equation of state, it encodes all information about the system. If one can calculate the partition function, the free energy can be extracted from it, and from the free energy we get everything about the system.
> If we differentiate by $\beta$ on both sides we get > $$\int \frac{e^{\beta (A-H)}}{h^{3N}N!} \left[ A(V,T)+\beta \frac{ \partial A(V,T) }{ \partial \beta } -H(\mathbf{q},\mathbf{p}) \right]\ d^{3N}q\,d^{3N}p=0> But the first integral is equal to $1$ because of equation $(1)$, whereas the second integral is equal to the internal energy (see below, just using a modified density function because of $A$). As such, we get > $$A+\beta \frac{ \partial A }{ \partial \beta } -U=0The first two terms in the brackets are independent of and so we can pull them out of the integral
> and so > $$A-T\frac{ \partial A }{ \partial T } -U=0But since we can write
> but this just gives us > $$A=U-TSIf really is the Helmholtz free energy, then the Maxwell relation must apply to it:
which is exactly the free energy, proving our point.
Energy#
The internal energy of the system is the ensemble average of the Hamiltonian
as is variable due to fluctuations. We also have
Energy fluctuations#
The difference between the canonical ensemble and the microcanonical ensemble is that in the former, energy is allowed to fluctuate, whereas in the latter it is fixed and has no communication with the outside environment.
Let's find how the energy fluctuates by computing its Variance (up to a constant). Start by differentiating the internal energy:
So the variance is just another derivative, with an additional minus in front:
We can rewrite this to be
Using the definition of heat capacity we can see that fluctuations are connected to it:
The right hand side goes like for large particle numbers, as is constant and is intensive, so only contributes. As such, the variance goes like asymptotically. If we compare it to the square mean of the energy , which goes like , we can see that it gets nullified:
So, in the thermodynamic limit, energy fluctuations tend to vanish or, better, they increase but become insignificant with respect to the total energy. This makes the internal energy basically constant up to a tiny margin of uncertainty. But that's just what the definition of the microcanonical ensemble is, and so in the thermodynamic limit, the two are equivalent. For canonical ensembles with a realistic number of particles , we might as well write and therefore .
Another thing that can we can see from variance equation is that the energy fluctuations are seemingly directly correlated with the heat capacity of a system. Though it might seem a bit odd at first, think of it like this: the heat capacity is the ability of a system to absorb and dissipate energy without large change in temperature. If an energy fluctuation occurs, a system with large heat capacity will scarcely respond it, whereas one with small heat capacity will feel it much more. As such, it's pretty natural to see that the system's fluctuations are dependent on how "good" it is at absorbing and dissipating energy. The bigger the heat capacity, the bigger the fluctuations are allowed to be without having a tangible effect. This is a specific case of a more universal result known as the fluctuation-dissipation theorem.
Alternative argument for equivalence#
Another possible argument for equivalence starts from the partition function, using the function defined in the > Minimization of free energy section below.
We can use Laplace's method here. Since .
with . But the fact that the specific heat must be positive (it would break conservation of energy if it weren't), implies that there is a maximum of entropy in . Expanding in series
So back to the integral we get
The distribution energy for the states is a Gaussian distribution centered on , with uncertainty dependent on the number of particles, . The relative error goes to zero at high particle counts:
So for large particle counts, the energy distribution tends to become a Dirac-delta-esque spike centered on , which means that all of the energy becomes associated with just one possible state, specifically the most likely one. So the integral can be readily approximated as
A third argument for equivalence is purely qualitative. Consider a body in thermal equilibrium. Necessarily, the temperature of any piece of it has to be equal to the average temperature, as if it weren't, it wouldn't be in equilibrium. More generally, a body at equilibrium with the Universe must have the same temperature of the Universe. (TODO: Finish this discussion)
Minimization of free energy#
In thermodynamics, a system will spontaneously converge to the state of lowest free energy. This can be derived from the canonical partition function using the Helmholtz free energy. The partition function can be rewritten
We use a Dirac delta to select only the states with energy and split the integral into two. Since the Dirac delta only permits integrals where , the left integral evaluates to , which returns the original form. The integral with the delta is a density of states (DOS) function with respect to :
Since it counts states, we can get its Boltzmann entropy:
which we can invert to express the states as a function of entropy:
With this, the partition function becomes
by using the definition of Helmholtz free energy. Mathematically, the most impactful contribution to the integral is given by the highest exponent, which occurs when is lowest. Since is constant, we're left with a minimization problem for .
This kind of integral is well suited for approximation with Laplace's method. Under the assumption that this minimum exists, we call the energy value at which it occurs . Thus, is a stationary point:
Unpacking the definition , we get
which gives us the well-known entropy-temperature relation
The neat part of this specific relation is that it shows that the equilibrium temperature is determined exclusively by the energy state at which free energy is minimized. We can also examine the second derivative:
since the heat capacity is . Since absolute temperature and heat capacity are both strictly positive, this is also a strictly positive quantity, which guarantees that is a minimum. We can expand in a Taylor series about up to the second order:
We can substitute this in the partition function to get
Since the integrand is very sharply peaked around , we can extend the lower integration bound from to without much error. We are now left with a Gaussian integral, we can be solved as
and the natural logarithm, for convenience, is
In the thermodynamic limit, the first term is of order (since inside of ), whereas the second is of order (since ). Thus, when is large, the second term becomes vanishingly small in comparison to the first and can be neglected without error. In this case, we finally find:
The only term left is the minimum energy state.
Footnotes#
-
If the objects the system is made up of are distinguishable, the must be omitted. ↩ ↩2
-
Remember that the fluctuations we consider for a canonical ensemble are between the system itself and an external reservoir. If we consider them as one singular block, the fluctuations become internal and can be ignored, which leaves us with a microcanonical. ↩