The Canonical Partition Function
The Canonical Partition Function
ChE210A
Earlier in the course, we discussed the microscopic basis for the entropy and Boltzmanns equation, ln . Some of these statistical mechnical concepts that we encountered in those discussions are listed below: A microstate is just one configuration of the system. In a classical system of spherically symmetric particles, one microstate is characterized by a list of the 3 positions and 3 momenta , for a total of 6 pieces of information.
For any microstate or , we can calculate the total, potential, and kinetic energies. In a classical system, this is because a microstate specifies the positions and momenta of all the atoms. The potential energy function depends on the positions and the kinetic energy function depends on the momenta . In an isolated system at equilibrium, the system visits each microstate consistent with the total energy with equal probability. That is, the system spends an equal amount of time in each of the , , microstates. This is the rule of equal a priori probabilities. If two systems can share energy, volume, and/or particles, the number of microstates for the combined system (which is isolated) is given by a simple multiplicity for choosing different microstates in each: , ,
, ,
, ,
In this equation, we are summing over all possible values of general case that the systems can exchange with fixed total
Generally speaking, the sum for , , is extremely sharply peaked around some values , , and/or . That means, for these values, the number of microstates is extremely large and the system spends almost all of its time in these states. Therefore, from a macroscopic perspective, we almost always see single, precise values of , , and because the fluctuations away from these dominant values are small and rare.
M. S. Shell 2008
1/15
ln
, and
ln
These conditions ensure equality of temperatures, pressures, and chemical potentials between the two systems. In subsequent lectures, we considered the properties of the entropy at a macroscopic level. We found the conditions for equilibrium when systems were coupled to various kinds of baths, and we showed that these scenarios resulted in alternative thermodynamic potentials. Here, we will take a similar examination of the properties of the entropy. This time, however, we will take a microscopic perspective. What is a microscopic perspective? Simply put, it means we want to know the probabilities with which each microstate is visited. In other words, A macroscopic perspective is interested in the relevant thermodynamic potential at the conditions of interest and its derivatives, which interrelate macroscopic quantities like , , , , , and . On the other hand, a microscopic perspective wants to know the probability associated with each microstate . From these probabilities, various averages can be constructed, such as the average energy . Microscopic equilibrium in isolated systems We have already discussed much of the properties of isolated systems, reviewed above. For these systems, , , and are constant and cannot change. At a macroscopic level, the relevant thermodynamic functions are , , , or alternatively, , , . At a microscopic level, the probabilities of each microstate can be written compactly as: , ,
1 if is true 0 otherwise
M. S. Shell 2008
2/15
Recall that a particular set of microstates and their probabilities constitutes an ensemble. For isolated systems, we have a special name for the ensemble described by the probabilities above, and it is called the microcanonical ensemble. The microcanonical ensemble corresponds to an isolated system at equilibrium with constant , , and . In this ensemble, each microstate that has the same energy as the specified energy appears with equal probability; other microstates are not visited. One way to express the density of states for a system is to run through every possible microstate at a given and , and add a value 1 for each microstate that has energy equal to the specified energy: , ,
all microstates at ,
, then we
see that the density of states is the normalizing factor that ensures the probabilities add up to one, 1. Such probability normalizing factors have a special name in statistical mechanics, called partition functions. Therefore, The density of states , , is the microcanonical partition function.
We will see later on that partition functions are always related to thermodynamic potentials. In this case, the logarithm of the microcanonical partition function gives / , as we have seen before. Microscopic equilibrium at constant temperature We now examine the microscopic behavior of a system that is not isolated, but which is at constant temperature. Recall from earlier lectures that: A system at constant temperature is one that is connected to a very large bath with which it can exchange energy. At constant temperature, the composite of a system and a bath constitutes an isolated system. Here, we want to compute the probabilities of each microstate in the system. Let be the energy of the system, that of the bath, and the fixed total. Let the index denote a microstate of the system, and a microstate of the bath. One microstate for the whole system is given by a combination of a particular microstate in the system and a particular microstate in the bath, denoted . Therefore, the number of microstates for the
M. S. Shell 2008
3/15
total system (system plus bath), for a specific set of energies and , is just ; . Here we are leaving off the and terms since these are fixed (there is no volume or particle exchange). The total number of microstates if we consider all possible exchanges of energy between the system and bath can be written as:
The sum here simply runs through different values of the amount of energy in the system. The bath energy always takes the difference with the total energy, which is constant. The probability of a composite microstate is given by: Here, is the energy of microstate the bath. 1 if if
,B
,B
What if we dont care about which microstate the bath is in? In other words, what if we dont care about which we have? Here, we can compute the probability , which is the sum of over all , that is, the probability for a specific system microstate combined with any bath microstate :
all
Because the probability is zero for any state for which form the sum over all of the microstates that have an energy exactly of these states. Therefore, we arrive at
,B
Note that depends on , which can fluctuate because the system is in contact with the bath. This contrasts the microcanonical, isolated system case in which the energy of the system was fixed. Since the denominator in the expression for perspective for now: is the same for every , we can take a simpler
M. S. Shell 2008
4/15
Because the bath is very large, it turns out that we can simplify this expression substantially. First we will Taylor expand the logarithm of . Why the logarithm? This is because we will be able to show that the terms in the expansion will involve different powers of , since ln is linear in due to extensivity: ln
Now, we will replace the entropy of the bath with an intensive version scaled by the size of the bath, : ln 1 / / 2 /
The trick here is to hold the system size constant but let the size of the bath grow to infinity, since this is an idealized heat bath. In this limit, we have lim
lim ln
The higher order terms in the Taylor expansion drop out, since they are preceded by raised to negative powers. We also notice that the entropy derivative for the bath is the inverse temperature of the bath, 1/ . Here we will simply indicate the temperature by , dropping the subscript, since it is through the bath that the temperature is ultimately defined for the system. Plugging this limiting expression for back into the expression for exp gives:
Note that the first term in the exponential is independent of the microstate absorb it into the constant of proportionality. This gives: exp
last modified 11/4/2009 M. S. Shell 2008
, so we can
5/15
This important result shows that the probability with which a microstate of the system will be visited, at constant temperature, is proportional to an exponential involving the energy and temperature. There are some important points to make about this equation: The relative probability of a microstate for the system has nothing to with the bath beyond the temperature that it establishes. That is, no other property of the bath affects the distribution of energies in the system. Ultimately, this is because the bath is so large. When coupled to a bath, the energy of the system is no longer fixed (constant), as it was in the isolated case. Instead, the energy can fluctuate as different microstates are vi. sited according to Microstates with higher energies are visited with exponentially less frequency than those with low energies. The degree of exponential damping is controlled by the inverse temperature. At very low temperatures, the microstates with the lowest energies have the highest relative probabilities. In principle, as 0, the probability of the lowest energy microstate (or microstates) dominates and all other probabilities are infinitely small. At very high temperatures, the differences in probabilities for microstates with different energies begin to disappear. In principle, as , all microstates have the same probability, regardless of energy.
This exponential giving the relative probability of microstates at constant temperature is called the Boltzmann factor, and it appears frequently in statistical mechanics. Moreover, the combioccurs so frequently that a simpler variable has been defined in nation of variables 1/ terms of them: 1
Here, is called the thermodynamic beta, and it has units of inverse energy. When this variable is used, the Boltzmann expression becomes: exp Recall that, a particular set of microstates and their probabilities constitutes an ensemble. Here, in the constant temperature case, there is a specific name for the ensemble called the canonical ensemble.
M. S. Shell 2008
6/15
So far, we have not talked about the constant of proportionality in the canonical probabilities. We absorbed into it many factors that involved properties of the bath. Does this mean that the absolute value of the probabilities depend on the bath? It turns out that the answer is no. The probabilities are constrained because their sum over all microstates of the system must equal one. Therefore, we can immediately write that the probabilities must have this exact form: exp exp
The canonical ensemble occurs when a system with fixed and is at constant temperature (connected to an infinite heat bath). In the canonical ensemble, the probability of each microstate is proportional to exp .
where the sum in the denominator is performed over all microstates in the system. This sum 1. ensures the condition that
In the discussion of the microcanonical ensemble, we commented that the normalizing factor for microstate probabilities is called a partition function in statistical mechanics. Here, since we are in the canonical ensemble, we define a canonical partition function: , ,
all at ,
Here, is a function of , , and because and specify the list of microstates used in the sum, and provides a value of . Using , we can then easily write that the microstate probabilities are given by: exp
exp
Why is it so important to give this normalizing factor its own variable and name? As we commented previously, partition functions relate to thermodynamic potentials. We can start to see this for by computing the average energy in the canonical ensemble:
exp
M. S. Shell 2008
7/15
Notice, however, that the expression in the sum looks similar to except that there is a factor for the microstate energy. In fact, this sum can be written in terms of a derivative of : 1 ln
Substituting 1/ and performing some careful rearrangement, we arrive at the particularly informative equation: ln
Compare this equation to one that we derived from the macroscopic point of view of equilibrium at constant temperature:
Note that, at a macroscopic level, the average is the single, macroscopic value of we observe and that we have discussed in the past lectures on macroscopic thermodynamic calculus. The similarity between these two equations therefore suggests that: , , ln , ,
Indeed this is the case, and it can be shown with more rigorous arguments as well. Therefore, the canonical partition function is related to the Helmholtz free energy. Intuitively, one might anticipate this result on the basis that is the relevant thermodynamic potential at constant , , conditions. There are significant implications of this relationship between Helmholtz free energy and the canonical partition function. The most important is: If we can compute the canonical partition function , then we can obtain the Helmholtz free energy , which is a fundamental thermodynamic potential of the system. From that, we can obtain all other thermodynamic properties. Thus, provides an alternative way of evaluating the thermodynamics of a microscopic model. As we have seem many times, one approach is to compute the entropy from the density of states, ln . This gives the entropy in fundamental form. On the other hand, we could compute at a given temperature and obtain ln in fundamental form. Either
M. S. Shell 2008
8/15
way, we can obtain the entire macroscopic thermodynamic properties of the model. So we find that, Switching from one partition function to another, such as going from to the microscopic analogy of a Legendre transform. , is
Here well try an example to show the equivalence of the two approaches. EXAMPLE: Consider the two-state model: a system of non-interacting particles which can each occupy one of two energy levels, with energies 0 and . For the two-state model, compute the microcanonical and canonical partition functions, and use both to find the energy as a function of .
0 First we proceed with the microcanonical approach. If we specify a total energy , the number of particles in the up position is / . The number of microstates is ! ! ! 1
Applying Stirlings approximation and taking the logarithm, we can compute the entropy: 1 The temperature is given by the -derivative: 1
M. S. Shell 2008
9/15
The sum over is a sum over all microstates, i.e., a sum over all possible combinations of particles in the up or down positions. Consider what we would have if we had only two particles. In that case, there would be four total microstates in the system and the partition function would be:
In general for
up,down
Here each sum is just for a single particle and includes only two terms: one for the up state ( ) and one for the down state ( 0). Notice that the particles are non-interacting, so that . That means that we can rewrite the sum as:
up,down up,down
up,down
Whenever nested sums involve a product of individual terms that are separable with respect to each of the sum indices, we can rewrite the sum as follows:
up,down
up,down
up,down
Here, each summation is identical, since all the particles are identical. Therefore, we can simplify the evaluation,
up,down
0
10/15
M. S. Shell 2008
1 1
using:
ln exp exp
Thus we find that we recover the same expression for the average energy as a function of in the microcanonical case.
exp 1 exp
exp
as
Though it may not seem like it from this example, often computing the properties of model systems in the canonical ensemble is much easier than that in the microcanonical ensemble. The reason is that the constraint of constant total energy in the microcanonical ensemble is often a complicating factor that requires deep consideration of combinatorics in order to evaluate which microstates have the given energy and how many there are. On the other hand, in the canonical ensemble, every microstate enters into the partition sum, but with a different probability weight. That is, if we can sum over every microstate, there are no combinatorics involved. Lets compare the two ensembles weve studied thus far:
property constant conditions microstate probabilities partition function thermodynamic potential , , microcanonical ensemble , , canonical ensemble exp
all
, ,
at ,
, ,
ln
all
, ,
, ,
, ,
ln
at ,
exp , ,
M. S. Shell 2008
11/15
Microstates and degrees of freedom In order to compute the canonical partition function, one needs to perform a sum over all microstates of the system. Lets consider this set of microstates in more detail: In simple models, like the two-state model in the example above, the complete set of microstates is the set of all configurations of the system. Frequently in such simple models, the set of microstates is discrete. In quantum mechanics, Schrodingers equation leads to a discrete set of quantum states, often described by a set of quantum numbers. In classical mechanics, a microstate is defined by a set of position and momenta variables. Microstates are continuous, and there are an infinite number of them. Therefore, the partition sum in this case becomes an integral. We will talk more about classical systems in a subsequent lecture.
In general we can say, A microstate is defined by specific values for all of the microscopic degrees of freedom in the system. A sum over all microstates is a sum over all possible combinations of values of degrees of freedom in the system. For degrees of freedom that are continuous, this sum is an integral. Think of the set of degrees of freedom as all the numbers you would need to write down to completely specify the microscopic configuration of a system, such that if you sent that description to a friend, they would be able to reconstruct the configuration exactly. Considering this in the microcanonical and canonical cases, we can rewrite the partition function sum over microstates as sums over the degrees of freedom of all the particles: , ,
DOF for DOF for DOF for DOF for
, ,
Here, DOF indicates degrees of freedom and the numbers are particle indices. Each sum means that we loop through all possible values for the degrees of freedom of each particle (such as all possible values of a particles position or momentum). Note that, in general, the energy of the system is a function of all of the degrees of freedom.
M. S. Shell 2008
12/15
What if we can write the energy function as a sum of two different terms, depending on mutually exclusive subsets of the total set of degrees of freedom? This might look like: all DOF DOF subset 1, DOF subset 2 mutually exclusive
DOF subset 1 DOF subset 1
DOF subset 1
DOF subset 2
, ,
, ,
DOF subset 1
DOF subset 2
This derivation shows that any time the energy function can be split into multiple terms involving different degrees of freedom, the partition function can be factored into separate partition functions for each degree of freedom subset. For energy functions which are linearly separable in the system degrees of freedom, the canonical partition function can be written as a product of canonical partition functions for the individual components of the energy function. Due to the constraint of total energy, however, a simple factorization such as this is not generally possible in the microcanonical ensemble. The canonical partition function for independent molecules In the two-state example we worked above, we found a particular simplification when particles have no energetic interactions with each other. Lets consider this in more detail. Assume we can write the energy function as all DOF DOF for
where is just the part of the energy function that depends on the degrees of freedom associated with particle . In other words, s degrees of freedom dont affect the energies of any other particles. This means that they are non-interacting, or independent. In contrast, if two
M. S. Shell 2008
13/15
particles experienced a pairwise interaction, such as an attraction or repulsion, this expression would not apply and they would not be independent. For independent particles, the canonical partition function is separable in each of the particles:
DOF for
DOF for
DOF for
DOF for
We notice that each term in the partition sum is just the product of individual one-particle terms that are independent of each other. This enables us to factor the sum as follows:
DOF for
DOF for
The last equation shows that the total partition function can be written as a product of singleparticle partition functions: where
DOF for
If all of the particles are the same, then all of the total partition function can be written as:
(independent distinguishable particles) Here, we have qualified this expression as applying to distinguishable particles. Distinguishable particles are ones for which, if we were shown a snapshot of the system, we would be able to identify the index number of each particle (e.g., what the values of are). In contrast, we cannot perform such an identification for indistinguishable particles. It turns out that quantum mechanics says that a configuration of indistinguishable particles does not change when we swap the places of two particles. In other words, there is only one microstate for a particular configuration, regardless of the swaps we perform among the particle identities. For indistinguishable particles, the canonical partition function derived above overcounts the number of microstates by the total number of possible swaps among particle identities, !. Correcting for this, we find !
last modified 11/4/2009
This expression readily generalizes to multicomponent systems. If we have two types of particles A and B, for example, we can write ! !
since As are distinguishable from Bs but not from each other, etc. We will discuss the topic of distinguishable and indistinguishable particles at more length in subsequent lectures. The important concept to keep in mind at this point is: For independent molecules, the canonical partition function can be written as a product of individual, single-particle partition functions. If the particles are indistinguishable, then we have to introduce correction factors of 1/ ! for each distinct species.
M. S. Shell 2008
15/15