Consider a so-called canonical ensemble consisting of a system , a heat bath
, and the total closed system
containing
and
, with corresponding energies
,
and
respectively so that
with fixed. For example,
could represent a single 1-D lattice of spins in the Ising Model,
could consist of a heat bath with which
is in thermal contact, and
would be the closed system containing
and
.
With regard to the 1-D lattice of spins, different spin configurations will have different energies and for a given energy there will be a multiplicity of
spin configurations with that same energy (i.e., if
is the macrostate, there will be
different microstates yielding that same macrostate). Similarly, if the energy
is the macrostate of the heat bath, there will be
different microstates yielding that same macrostate. Since
is fixed, we see that the total number of microstates for the combined system,
, is a function of
:
Suppose we pick one particular spin configuration of the 1-D lattice of spins with associated energy . Then
and
because we have picked a particular microstate for system
. We will now obtain from this setup the probability of the combined system being in this state. The total number of microstates for the combined system is now
The entropy of the combined system using Boltzmann’s entropy equation is
where is the Boltzmann constant.
To obtain an expression for the temperature of the heat bath, we can use the first law of thermodynamics which in the absence of any work done by the system reduces to
where is the internal energy of the system and
is energy added via heat. Using the differential form of the definition of entropy in thermodynamics, namely
we get from (5) that
Using (7) with (4) we then have
Integrating gives
where is an integration constant. Therefore, we have
This calculation is for one particular energy level, , of the 1-D lattice of spins. Summing over all possible energy levels, the total number of microstates of the combined system is
The probability of the combined system being in state is then obtained by dividing (10) by (11):
This is the Boltzmann probability distribution, with
being the partition function. Note that all terms involving the heat bath end up dropping out. The only relevance of the heat bath is to define the temperature of the system. Everything else about it is irrelevant.
The 1-D lattice of spins does not have constant energy when it is in contact with a heat bath. The energy of the system fluctuates with probabilities governed by the Boltzmann distribution. We can obtain a formula for the average entropy of the 1-D lattice of spins in the canonical ensemble, called the Gibbs-Shannon entropy, in terms of Boltzmann probabilities. Imagine taking many measurements of the energy of the 1-D lattice of spins. Interpreting as a relative frequency, the multiplicity of microstates giving energy
is
The entropy of the configuration giving rise to energy is then
The Gibbs-Shannon average entropy is obtained from (15) as
Note that (16) simplifies to Boltzmann’s formula for the entropy when all the probabilities are equal, say
for all , since then we have
Finally, we can obtain the Helmholtz free energy by taking logarithms of the Boltzmann probability in (12) to get
Substituting this into the Gibbs-Shannon entropy formula in (16) we get
which can be rewritten as
The quantity is the average value of the Helmholtz free energy,
, which is a function of state, i.e., it is a function only of macroscopic thermodynamic variables. The equation
linking the free energy to the partition function is therefore of vital importance since it relates the large-scale properties of the system to its microscopic energy states. The partition function acts like a bridge between these two regimes.
