ensembles in statmech - university of waterlooscienide2.uwaterloo.ca/~nooijen/ensembles_in...
TRANSCRIPT
1
Various ensembles in statistical mechanics and the derivation
of thermodynamic properties.
To make the connection between statistical mechanics and thermodynamics, average
quantities are calculated over a (very large) ensemble of individual systems. The
ensemble itself is always a so-called isolated entity. It contains a specific total number of
particles, it has a precise total volume and a precise total energy. In what follows each
system comprising the ensemble is assumed to be in a particular energy eigenstate jψ ,
and has a particular number of particles jN , a specific energy jE and a specific volume
jV . The possible energies of a particular system are not completely arbitrary: Given the
volume and number of particles in the system, jE is an eigenvalue of the Schrödinger
equation, and depends on jN and jV . ( , )j j j jE E N V= . The states ( , )j j jN Vψ form a
linearly independent basis of energy eigenstates of the Hamiltonian ˆ ( , )j jH N V . This
dependence on ,j jV N is implicit in what follows. The label j summarizes all of the
characteristics of an individual system and it means that it corresponds to a particular
, , ,j j j jV E N ψ . Specifying j defines everything, and this is referred as the “state of the
system”. The basic unknowns are the probabilities to find a system in a particular state.
These probabilities are provided by the partition function. In what follows below, a
(general) partition function O, depending on variables , ,...x y , is defined as a sum over
relative probabilities
O(x, y,...) = !Pj
j! (x, y,...) (1)
and the associated normalized probabilities to find a system of type j (or in state j) in the
ensemble are then given by
Pj (x, y,...) =
!Pj
O(x, y,...) (2)
Knowledge of the probabilities allows one to calculate ensemble averages, notably
2
j jj
j jj
j jj
E P E U
N P N N
V P V V
= =
= =
= =
∑
∑
∑
(3)
In addition the probabilities define the entropy of any type of ensemble as
lnj jj
k P P S− =∑ (4)
The above provides a recipe to calculate ensemble averages, and thermodynamical
quantities. It is not implied that each system in an ensemble is indeed described by an
eigenfunction of the Hamiltonian. The argument is that if we make this assumption, and
calculate the averages in the prescribed fashion, we obtain agreement with the laws of
thermodynamics. The understanding of the precise physical nature of a large number of
molecules in accordance with time-dependent quantum mechanics is a non-trivial
problem. One would like to be able demonstrate that the wave function of a large system
of interacting molecules (in the gas phase for example) evolves in time such that average
values of molecular quantities follow the laws of statistical mechanics, and quickly
become more or less independent of time. On the most fundamental level statistical
mechanics would be expected to derive from quantum mechanics and the time-dependent
Schrödinger equation. There is nothing in the time-dependent Schrödinger equation to
suggest that systems are to be eigenstates of the Hamiltonian. Rather, the argument is
made that thermodynamic properties, for systems in equilibrium, are independent of time.
This is achieved by taking systems to be described by stationary states, i.e. eigenfunctions
of the Hamiltonian, and taking an average to obtain ensemble properties. It will be clear
that the properties calculated in this way, indeed will be independent of time, even if we
would evolve the ensemble in time. In reality, systems do fluctuate and show a time-
dependence. For most intents and purposes their thermodynamic properties are
independent of time, however, and this is described by the ensembles we will consider. It
is good to point out that in an actual experiment we have one system, and this system
itself attains thermodynamic equilibrium. In statistical mechanics the system is replicated
many times, and we calculate averages over the replicas, assuming they are each
described by an eigenstate of the Hamiltonian. This representation of the situation is
3
clearly quite different from the actual situation, and it is a bit of a miracle why this all
works. Let us leave these (poorly understood) fundamental questions behind and return to
the derivation of thermodynamic properties along the conventional lines of statistical
mechanics.
The ensemble can consist of isolated systems, meaning the volume, energy and number
of particles is the same for each element in the ensemble, , ,j j jV V N N E U j= = = ∀ .
This is called the microcanonical ensemble. Another widely used ensemble is the
canonical ensemble, in which each system is closed, meaning it is allowed to exchange
energy, but not matter with neighbouring systems. In a canonical ensemble each system
has the same number of particles jN N= and volume jV V= , but the energy is specific
for each state and is denoted as jE . This is the ensemble discussed in Metiu. In the grand
canonical ensemble the individual systems can differ in both the number of particles jN
and their energies jE , but the volume is fixed, jV V= . We will discuss two more
ensembles, one in which only the number of particles is fixed, while the volume and
energy can vary. In the generalized ensemble, all extensive variables, , ,j j jV N E can vary.
The partition functions either depend on the constant=average value for V, N and/or U, or
they depend on an intensive variable that is a Lagrange multiplier associated with the
constraint that the total number of particles, the total volume or the total energy of the
complete ensemble is constant. The thermodynamic variable conjugate to preserving total
energy is the temperature T. The variable associated with preserving the total volume is
the pressure p, while the variable associated with the number of particles is the chemical
potential µ . Therefore, any partition function “O” has independent variables as follows
( , , )O U orT V or p N or µ , (5)
with the actual choice of variables depending on the extensive variables U, V, N that are
kept constant in each system in the ensemble. The partition functions then relate to a
thermodynamic potential that has precisely the same natural variables as the ensemble,
for example, we have seen already ( , , ) ln ( , , )A T V N kT Q T V N= − . We will find other
4
similar relations. From thermodynamics we know that the Helmholtz free energy is the
suitable thermodynamical potential to consider when a system is kept at constant
temperature through a reservoir. Here the idea is similar. The other systems in the
ensemble act as the heat reservoir, allowing a redistribution of energy, and providing a
resulting partition function that depends on the temperature T, that might be viewed as a
controllable parameter, or, equivalently, a variable in the partition function. The
probabilities of the most likely distribution depend on the value of T, which was used as a
Lagrange multiplier required to keep the total energy constant (as would be the case when
we consider a system in contact with a heat reservoir: the total energy of system +
reservoir would remain constant). We will see that the various types of ensembles we can
create map precisely to the kind of thermodynamic potentials that are generated by
Legendre transformations in thermodynamics.
Thermodynamic properties can be derived from any of these ensembles, and the final
results are equivalent. For example, Metiu discusses the results for the canonical
ensemble and this provides all thermodynamic properties. This feature of statistical
mechanics is reflected in the fact that the thermodynamic potentials, when viewed as
functions of their proper ‘natural variables’ all yield complete thermodynamic
information. We will discuss the derivations in a unified context for the various
ensembles, as it puts the theory in a general framework. It more clearly shows what is
involved, and what freedoms exist to derive the results. Moreover, to derive certain
results in statistical mechanics it may be far more convenient to use a particular
ensemble, as the mathematics is ‘easy’, or even feasible, only for certain ensembles. So it
is good to know about the existence of various ensembles. They are part of the tricks of
the trade. The fact that various ensembles in statistical mechanics lead to basically
identical results hinges from a physical perspective on the fact that even if one allows
volumes, particle numbers and energies to vary per system, the fluctuations around the
mean are very small, for large enough individual systems. This is well known from
experience. For example, we expect temperature, pressure and density only to vary very
little in a macroscopic system in equilibrium.
5
Let me sketch the basic procedure for any type of ensemble, and provide the knowledge
that we assume as input. This summary will be somewhat abstract at first reading, but as
we go through examples, I think this summary may prove useful to you. In the
derivations below I assume that entropy is given by the basic formula
lnj jj
S k P P= − ∑ (6)
The quantities temperature, pressure and chemical potential are defined through the
partial derivatives of entropy, as it was done in the notes on thermodynamics: hence,
, , ,
1 , ,V N U N U V
S S p SU T V T N T
µ∂ ∂ ∂⎛ ⎞ ⎛ ⎞ ⎛ ⎞≡ ≡ ≡ −⎜ ⎟ ⎜ ⎟ ⎜ ⎟∂ ∂ ∂⎝ ⎠ ⎝ ⎠ ⎝ ⎠ (7)
We will restrict ourselves to one component systems here. For all of the ensembles the
procedure is that we maximize entropy subject to the constraints imposed on the
ensemble
j j jj
j j jj
j j jj
E U j or E P U Lagrangemultiplier
V V j or V P V Lagrangemultiplier
N N j or N P N Lagrangemultiplier
β
α
γ
= ∀ = +
= ∀ = +
= ∀ = +
∑
∑
∑
(8)
The constraints indicate that we can create 32 8= different ensembles in principle. From
the maximization procedure for the constrained entropy we will find an expression for the
partition function of the type
; /j j jj
Q P P P Q= =∑ % % , (9)
where the jP% will be simple exponential factors that correspond to unnormalized
probabilities. The logarithm of Q will be found to be related to particular chemical
potentials that have the same natural variables as the variables in Q. We will find that
maximizing the entropy subject to constraints is equivalent to minimizing (or sometimes
maximizing) the chemical potential. We will see that from the procedure we will either
obtain a relation between the Lagrange multiplier and intensive thermodynamic variables
(in particular: 1 ; ,pkT kT kT
µβ α γ= = = − ), or we will find an explicit expression for the
intensive variables as an average over a mechanical variable, e.g.
6
,j jj j
j jN V
E Ep P P
V Nµ
∂ ∂⎛ ⎞ ⎛ ⎞= − = −⎜ ⎟ ⎜ ⎟∂ ∂⎝ ⎠ ⎝ ⎠∑ ∑ (10)
Let us now discuss the various ensembles and establish the connections to
thermodynamical quantities.
1. Microcanonical ensemble
In the microcanonical ensemble all systems defining the ensemble have an identical
energy, volume and number of particles, each element of the ensemble is itself an isolated
system. The partition function is simply the number of (linearly independent) quantum
states, and is written as
( , , )N V EΩ (11)
The probability to find the system in a particular state is given by 1( , , )jP N V E
=Ω
,
which is the same for every state in the ensemble. This is precisely the fundamental
postulate of statistical mechanics: In an isolated system each possible state is equally
likely. The thermodynamic identification proceeds through Boltzmann’s fundamental
law,
ln ( , , )S k N V E= Ω (12)
It is well known that in thermodynamics the condition for a spontaneous process in an
isolated system is that entropy increases. Or: In a spontaneous process the logarithm of
the corresponding partition function increases. The variables of the partition function are
N, V, E, and these are also the natural variables of S in thermodynamics. Identifying E
with U as usual,
(from )dU pdS dV dN dU TdS pdV dNT T T
µ µ= + − = − + (13)
Hence
7
ln
, , , ,,
, , ,
, , ,
ln 1 1 ln;
ln 1 ; ...
ln 1 ; ...
N V N V N V N VN V
N T N T N T
T V T V T V
S eE k U kT E E E kT
S p pV k V kT V kT
SN k N kT N
µ
Ω⎛ ⎞∂ Ω ∂ ∂Ω ∂ ∂ Ω Ω⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞= = = =Ω =⎜ ⎟⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟∂ ∂ ∂ ∂ ∂⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠⎝ ⎠∂ Ω ∂ ∂Ω⎛ ⎞ ⎛ ⎞ ⎛ ⎞= = = =Ω⎜ ⎟ ⎜ ⎟ ⎜ ⎟∂ ∂ ∂⎝ ⎠ ⎝ ⎠ ⎝ ⎠∂ Ω ∂ ∂Ω⎛ ⎞ ⎛ ⎞ ⎛ ⎞= = − = =⎜ ⎟ ⎜ ⎟ ⎜ ⎟∂ ∂ ∂⎝ ⎠ ⎝ ⎠ ⎝ ⎠ kT
µ−Ω
(14)
To unify the microcanonical ensemble with the treatment of other ensembles (see below),
we can proceed alternatively as follows. The partition function for the microscopic
ensemble is defined by finding the most likely distribution for the probabilities by
maximizing
1, 1,
ln ( 1)j j jj jP P Pλ
= Ω = Ω
− − −∑ ∑ (15)
This yields the partition function 1( , , ),( , , )jN V E PN V E
Ω =Ω
. In the most likely
distribution of the ensemble each state occurs equally likely. We can identify
1 1ln ln ln lnj j jj j
S k k k P k P PP
= Ω = = − = −Ω∑ ∑ . (16)
We will verify below that for every possible ensemble
lnj jj
S k P P= − ∑ , (17)
and for every possible ensemble precisely this quantity is maximized under additional
constraints depending on the particulars of the ensemble. At equilibrium the most likely
distribution is reached (within fluctuations), and this is precisely what is meant by stating
that entropy reaches a maximum at equilibrium. The (constrained) maximum of the
quantity lnj jj
k P P− ∑ defines the most likely distribution, and the most likely
distribution defines all thermodynamic quantities, as it is overwhelmingly more likely
than any other distribution, and it is the only distribution that needs to be taken into
account to define the average for the large ensembles under consideration.
8
2. Canonical ensemble.
In the canonical ensemble the individual systems in the ensemble can exchange energy,
but they all have the same number of particles and volume. In thermodynamic language,
each element of the ensemble is a closed system. The total energy of the ensemble is
conserved (or a constant). This provides a Lagrange multiplier, β , associated with the
constraint of energy conservation. The partition function is derived from the most likely
distribution that preserves the average total energy U: i.e. maximize
ln ( ) ( 1)j j j j jj j jP P P E U Pβ λ− − − − −∑ ∑ ∑ , (18)
from which one obtains , 1j j jj jP E U P= =∑ ∑ (stationarity w.r.t. andβ λ )
Slightly more conveniently, we can maximize the unnormalized probabilities, and define
the partition function accordingly. Hence maximize
ln ( )
; ; /j
j j j jj j
Ej j j j
j
P P P E U
P e Q P P P Qβ
β
−
− − −
→ = = =
∑ ∑
∑
% % % %
% % % (19)
where we used the general result from the previous set of notes. Carrying out the
maximization the partition function for the canonical ensemble is given by
( , , ) ; /j jE Ej
jQ N V e P e Qβ ββ − −= =∑ (20)
where j runs over the possible states in the ensemble (see further notes, point 1, for
further discussion). The expression for entropy is hence given by:
ln ( ) ln
ln ln[ ]j
j j j j jj j j
E
j
S k P P k E P k Q P
kU k Q kU k e β
β
β β −
≡ − = − − +
= + = +
∑ ∑ ∑
∑ (21)
To establish the connection with thermodynamics consider the partial derivatives
9
,
,
,
1 1
1 1
1 1
j
j
N V
Ej j jj j
j j jU N
Ej j jj j
j j jU V
S kT U kT
E E Ep S k e P p PT V Q V T V V
E E ES k e P PT N Q N T N N
β
β
β β
β
µ β µ
−
−
∂⎛ ⎞= = → =⎜ ⎟∂⎝ ⎠∂ ∂ ∂⎛ ⎞ ⎛ ⎞ ⎛ ⎞∂⎛ ⎞= = − = − → = −⎜ ⎟ ⎜ ⎟ ⎜ ⎟⎜ ⎟∂ ∂ ∂ ∂⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠∂ ∂ ∂⎛ ⎞ ⎛ ⎞ ⎛ ⎞∂⎛ ⎞− = = − = − → =⎜ ⎟ ⎜ ⎟ ⎜ ⎟⎜ ⎟∂ ∂ ∂ ∂⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠
∑ ∑ ∑
∑ ∑ ∑
(22)
Hence from the partial derivatives we obtain a definition for β , but we also find
expressions for the intensive variables pressure and chemical potential as average values.
Substituting the expression for β in the relation for entropy (Eqn. 21 ) we obtain
/ ln
ln ( , , ) ( , , )S U T k Q
U TS kT Q N V T A N V TdA dU TdS SdT SdT pdV dNµ
= +→ − = − ≡= − − = − − +
(23)
The natural variables for Q are N, V, T, and these are also the natural variables of the
corresponding characteristic function A, the Helmholtz free energy. Since at equilibrium
the entropy takes on a maximum value under the constraint that U is constant, it follows
that the Helmoltz free energy attains a minimum at equilibrium for a system in contact
with a heat reservoir that keeps a constant temperature in the system.
In summary
/ /( , , ) ; /j jE kT E KTj
jQ N V T e P e Q− −= =∑
( , , ) ln ( , , )A N V T kT Q N V T= − (24)
dA SdT pdV dNµ= − − +
and
, ,
, ,
, ,
lnln
ln
ln
N V N V
N T N T
V T V T
A QS k Q kTT T
A Qp kTV V
A QkTN N
µ
∂ ∂⎛ ⎞ ⎛ ⎞= − = +⎜ ⎟ ⎜ ⎟∂ ∂⎝ ⎠ ⎝ ⎠∂ ∂⎛ ⎞ ⎛ ⎞= − =⎜ ⎟ ⎜ ⎟∂ ∂⎝ ⎠ ⎝ ⎠
∂ ∂⎛ ⎞ ⎛ ⎞= = −⎜ ⎟ ⎜ ⎟∂ ∂⎝ ⎠ ⎝ ⎠
(25)
10
3. Grand canonical ensemble.
In the grand canonical ensemble the individual systems in the ensemble can exchange
both energy and matter, hence the number of particles per individual system in the
ensemble can change, while the volume is still the same for every element in the
ensemble. Each element in the ensemble is an open system. The total energy and the total
number of particles of the ensemble is conserved. This provides a Lagrange multiplier, β ,
associated with energy conservation, and a Lagrange multiplier,γ associated with
particle number conservation. This partition function is derived as the most likely
distribution that preserves the total energy and the number of particles: i.e. maximize
ln ( ) ( ) ( 1)
... ; , /j j
j j j j j j jj j j j
E Nj j j j
j
P P P E U P N N P
P e e Z P P P Zβ γ
β γ λ
− −
− − − − − − −
→ → = = =
∑ ∑ ∑ ∑
∑% % %. (26)
And we also find ; , 1j j j j jj j j
U P E N P N P= = =∑ ∑ ∑ from the stationarity condition with
respect to the Lagrange multipliers. The partition function for the grand canonical
ensemble is given by
( , , ) ; /j j j jE N E Nj
jZ V e e P e e Zβ γ β γβ γ − − − −= =∑ (27)
The expression for entropy is hence given by
ln ln
ln
j j j j j j jj j j j
S k P P k E P k N P Z P
k U k N k Z
β γ
β γ
= − = + +
= + +
∑ ∑ ∑ ∑ (28)
where as before, the sum over j runs over the accessible states in the ensemble.
To provide the connection with thermodynamics:
11
,
,
,
1 1
1 [ ]
( )1 [ ]
j j
N V
U V
E Nj j
jU N
j j j jj j
j j
S kT U kT
S kT N kT
E Np S k e eT V Z V V
E N E NP p P
T V V V
β γ
β β
µ µγ γ
β γ
µµ
− −
∂⎛ ⎞= = → =⎜ ⎟∂⎝ ⎠∂⎛ ⎞− = = → = −⎜ ⎟∂⎝ ⎠
∂ ∂⎛ ⎞ ⎛ ⎞∂⎛ ⎞= = − −⎜ ⎟ ⎜ ⎟⎜ ⎟∂ ∂ ∂⎝ ⎠ ⎝ ⎠ ⎝ ⎠∂ ∂ ∂ −⎛ ⎞ ⎛ ⎞ ⎛ ⎞
= − − → = −⎜ ⎟ ⎜ ⎟ ⎜ ⎟∂ ∂ ∂⎝ ⎠ ⎝ ⎠ ⎝ ⎠
∑
∑ ∑
(29)
Hence we obtain expressions for the Lagrange multipliers, but also a different expression
for pressure for the grand canonical ensemble. Substituting the expressions for the
Lagrange multipliers in the expression for S (Eqn. 28), we find
/ / lnln ( , , )
( )
S U T N T k ZU TS N kT Z V T
U TS G pV
µµ µ
= − +− − = −
= − − = − (30)
where the identification N Gµ = is made (see further notes 2). Let me also note that this
slightly unusual thermodynamic potential has been discussed in the notes “Fundamental
Equilibrium Thermodynamics”. The natural variables for the grand canonical partition
function are µ , V, T, and these are also the natural variables of the characteristic function
(pV). From pV N TS Uµ= + − we readily derive
( )d pV Nd dN TdS SdT TdS pdV dN
SdT pdV Ndµ µ µ
µ= + + + − + −= + +
(31)
Summarizing / / / /( , , ) ; /j j j jE kT N kT E kT N kT
jj
Z T V e e P e e Zµ µµ − −= =∑
( ) ln ( , , )pV kT Z V Tµ= (32)
( )d pV SdT pdV Ndµ= + +
and therefore
12
, ,
, ,
, ,
( ) lnln
( ) ln
( ) ln
V V
T T
V T V T
pV ZS k Z kTT T
pV Zp kTV V
pV ZN kT
µ µ
µ µ
µ µ
∂ ∂⎛ ⎞ ⎛ ⎞= = +⎜ ⎟ ⎜ ⎟∂ ∂⎝ ⎠ ⎝ ⎠∂ ∂⎛ ⎞ ⎛ ⎞= =⎜ ⎟ ⎜ ⎟∂ ∂⎝ ⎠ ⎝ ⎠
⎛ ⎞ ⎛ ⎞∂ ∂= =⎜ ⎟ ⎜ ⎟∂ ∂⎝ ⎠ ⎝ ⎠
(33)
Since entropy takes on a maximum at thermodynamic equilibrium under constraints
of constant U and N, it follows that ( )pV also takes on a maximum, and can only
increase in a spontaneous process in which the temperature and chemical potential
remain constant through interactions with suitable reservoirs.
4. Isobaric-Isothermal ensemble.
In this ensemble the individual systems in the ensemble can exchange energy, and the
volume in individual systems can adjust, while the particle number is constant in each
system. The total energy of the ensemble, and the total volume of the ensemble is
conserved. This provides Lagrange multiplier, β , associated with energy conservation,
(and temperature). The second Lagrange multiplier, α , associated with the preservation
of the total volume of the ensemble, is naturally associated with pressure, as this is
equilibrated as the volumes adjust to equilibrium. This partition function can be derived
by maximizing the most likely distribution under the constraints that total volume and
total energy are conserved, i.e. maximize
ln ( ) ( ) ( 1)
... ; ( , , ) , /j j
j j j j j j jj j j j
E Vj j j j
j
P P P E U PV V P
P e e N P P Pβ α
β α λ
β α− −
− − − − − − −
→ → = Δ = = Δ
∑ ∑ ∑ ∑
∑% % % (34)
The partition function for the isobaric-isothermal canonical ensemble is given by
( , , ) ; /j j j jE V E Vj
jN e e P e eβ α β αα β − − − −Δ = = Δ∑ (35)
The expression for entropy is then given by
ln ln
ln
j j j j j jj j j
S k P P k E P k V P k
k U k V k
β α
β α
= − = + + Δ
= + + Δ
∑ ∑ ∑ (36)
13
To provide the connection with thermodynamics:
,
,
,
1 1
1 [ ]
( )1 [ ]
j j
N V
U N
E Vj j
jU V
j j j jj j
j j
S kT U kT
p S pkT V kT
E VS k e eT N N N
E V E pVp P P
T N N N
β α
β β
α α
µ β α
µ
− −
∂⎛ ⎞= = → =⎜ ⎟∂⎝ ⎠∂⎛ ⎞= = → =⎜ ⎟∂⎝ ⎠
∂ ∂⎛ ⎞ ⎛ ⎞∂⎛ ⎞− = = − −⎜ ⎟ ⎜ ⎟⎜ ⎟∂ Δ ∂ ∂⎝ ⎠ ⎝ ⎠ ⎝ ⎠∂ ∂ ∂ +⎛ ⎞ ⎛ ⎞ ⎛ ⎞
= − + → =⎜ ⎟ ⎜ ⎟ ⎜ ⎟∂ ∂ ∂⎝ ⎠ ⎝ ⎠ ⎝ ⎠
∑
∑ ∑
(37)
Substituting the expressions for the Lagrange multipliers, we find
/ / lnln ( , , ) ( , , )
S U T pV T kU pV TS kT p T N G p T N
= + + Δ+ − = − Δ ≡
(38)
Hence, the natural variables for the isobaric-isothermal partition function are N, p, T, and
these are also the natural variables of the characteristic function, the Gibbs free energy G.
A process is spontaneous under the conditions of this ensemble (i.e. p and T remain
constant through interaction with a pressure and temperature reservoir) if the free energy
decreases, again in direct relation to maximizing entropy under the constraints of
preserving total energy and volume. In terms of the natural variables, the partition
function is given by / / / /( , , ) ; /j j j jE kT pV kT E kT pV kT
jj
N p T e e P e e− − − −Δ = = Δ∑
( , , ) ln ( , , )G p T N kT p T N= − Δ (39)
dG SdT Vdp dNµ= − + +
and
, ,
, ,
, ,
lnln
ln
ln
N p N p
N T N T
p T p T
GS k kTT T
GV kTp p
G kTN N
µ
∂ ∂ Δ⎛ ⎞ ⎛ ⎞= − = Δ +⎜ ⎟ ⎜ ⎟∂ ∂⎝ ⎠ ⎝ ⎠
⎛ ⎞ ⎛ ⎞∂ ∂ Δ= = −⎜ ⎟ ⎜ ⎟∂ ∂⎝ ⎠ ⎝ ⎠∂ ∂ Δ⎛ ⎞ ⎛ ⎞= = −⎜ ⎟ ⎜ ⎟∂ ∂⎝ ⎠ ⎝ ⎠
(40)
14
5. The generalized ensemble.
Each system in this ensemble can have a variable number of particles, volume and
energy. The ensemble is constrained such that the total number of particles, total volume
and total energy is conserved. This provides three Lagrange multipliers, denoted , ,α β γ ,
which will be identified with the intensive variables pressure, temperature and chemical
potential respectively. As before this partition function can be derived by maximizing the
most likely distribution under the constraints that total volume, total number of particles
and total energy are conserved, i.e. maximize
ln ( ) ( ) ( )
... ; ( , , ) , /j j j
j j j j j j j jj j j j
E V Nj j j j
j
P P P E U PV V P N N
P e e e Y P P P Nβ α γ
β α γ
α β γ− − −
− − − − − − −
→ → = = =
∑ ∑ ∑ ∑
∑% % % (41)
and we also find
, ,j j j j j jj j j
U P E V PV N P N= = =∑ ∑ ∑
The partition function denoted Y is given by
( , , ) ; /j j j j j jV E N V E Nj
jY e e e P e e e Yα β γ α β γα β γ − − − − − −= =∑ (42)
The expression for entropy is then given by
ln ln
ln
j j j j j j j jj j j j
S k P P k E P k V P k N P Y
kU kV kN k Y
β α γ
β α γ
= − = + + +
= + + +
∑ ∑ ∑ ∑ (43)
To provide the connection with thermodynamics:
,
,
,
1 1
N V
U N
U V
S kT U kT
p S pkT V kT
S kT N kT
β β
α α
µ µγ γ
∂⎛ ⎞= = → =⎜ ⎟∂⎝ ⎠∂⎛ ⎞= = → =⎜ ⎟∂⎝ ⎠∂⎛ ⎞− = = → = −⎜ ⎟∂⎝ ⎠
(44)
and, substituting the expressions for the Lagrange multipliers in the equation for S we
find
15
/ / / ln
0 ln1
S U T pV T N T k YU pV TS N U pV TS G kT Y
Y
µµ
= + − ++ − − = + − − = = −
=
ln ( , , ) ... 0kT Y T p U TS pV Nµ µ− = − + − = = (45)
From this we can derive
( ln )0
d kT Y dU TdS SdT pdV Vdp dN NdSdT Vdp Nd
µ µµ
− = − − + + − −= − + − =
(46)
using the usual expression for dU. This indicates that the thermodynamic variables
, ,p T µ cannot be varied independently, and the above relation is precisely the Gibbs-
Duhem relation. The results for the generalized ensemble are a bit different from the
other ensembles, and the interpretation of the results is not entirely straightforward.
Further discussion can be found in an advanced book, “Statistical mechanics” by Terell
Hill, Chapter 3. Let us write the partition function
/ / / / / /( , , ) 1;j j j j j jE kT pV kT N kT E kT pV kT N kTj
jY T p e e e P e e eµ µµ − − − −= = =∑ (47)
This indicates that the generalized partition function is simply the normalization
condition on the probabilities, and it apparently does not have to be calculated! Despite
this seemingly attractive feature, or perhaps because of it, it is stated in the literature there
is not much use for the generalized partition function (except that it provides the very
useful Gibbs-Duhem equation).
6. Concise summary of all possible ensembles.
From the general ensemble we can deduce the general relation of the partition function to
the Lagrange multipliers and then the thermodynamic quantities. In this section we will
refer to each partition function as ( , , )Y T orU porV or Nµ , depending on the variables
, ,j j jE V N that are held constant in the specific ensemble. We have the most general form
of the probabilities
/
ln ln
j j jE V Nj
j jj
P e e e Y
S k P P kU kV kN k Y
β α γ
β α γ
− − −=
= − = + + +∑ (48)
16
Making the identifications 1/ , / , /kT p kT kTβ α γ µ= = = − this can be written as
ln 0kT Y U pV TS Nµ− = + − − = (49)
This formula can be taken to be more general in the sense that -TS is always present, U
is present if jE is variable, pV is present if the jV are variable in the ensemble, while
Nµ− is present if jN is variable. This can be checked for the actual derivations we did
for the various ensembles. Hence we can make the following 8 types of ensembles
Variable
quantities
Partition function Characteristic
function
Name of
ensembl
e
Thermodynamic Differential
from statistical mechanics
none ln ( , , )kT Y U V N TS Micro-
canonica
l
/ ( / ) ( / )dS dU T p T dV T dNµ= + −
jE - ln ( , , )kT Y T V N TS-U=A canonica
l
dA SdT pdV dNµ= − − +
jV ln ( , , )kT Y U p N TS-pV=U-G ? ( ) ... ... ...d TS pV dU dp dN− = + +
jN - ln ( , , )kT Y U V µ TS Nµ+
=U+pV=H
? ... ... ...dH dU dV dµ= + + !
,j jE V - ln ( , , )kT Y T p N U TS pV G− + = Isobaric-
isotherm
al
dG SdT Vdp dNµ= − + +
,j jE N ln ( , , )kT Y T V µ TS U N pVµ− + = Grand-
canonica
l
( )d pV SdT pdV Ndµ= − + +
,j jV N - ln ( , , )kT Y U p µ TS pV N Uµ− − + = ? 0 0dU dU dp dµ= + + !
, ,j j jE V N ln ( , , )kT Y T p µ 0
TS U pV Nµ− − +=
General 0 SdT Vdp Ndµ= − + −
Gibbs Duhem
17
From the above table, it will be clear that not all results are equally obvious, and not all
cases have their correspondence in commonly known functions of thermodynamics. In
particular the enthalpy function looks a little suspect, as the natural variables appear to U,
V and µ . The interested reader may want to verify the results in this table.
7. Further notes.
1. In the literature one often finds expressions for the partition function in which the sums
are performed not over individual states but over energy levels. To derive equations, it is
much better to start from equations in terms of states. To show the dangers, let us try it
the other way, using sums over levels. Let us consider the example of the canonical
partition function and write
( , ) ( , )1( , , ) ( , , ) ; ( ) ( , , )j j
j
E N V E N Vj j j
EQ N V N V E e P E N V E e
Qβ ββ − −= Ω = Ω∑
and evaluate the derivative of lnQ with respect to V. One might be tempted to write
,
ln 1 ( , , ) ( )j
j j
Ej jj j
E ET N
E EQ N V E e P E pV Q V V
ββ β β−∂ ∂∂⎛ ⎞ = − Ω = − =⎜ ⎟∂ ∂ ∂⎝ ⎠∑ ∑
The end result is correct, but the mathematics is suspect as the number of states
( , , )jN V EΩ (i.e. the partition function of the microcanonical ensemble) explicitly
depends on V and on ( , )jE N V , and its derivatives are not taken into account. Moreover,
it assumes that all states of a given energy have the same derivative with respect to
volume, which is not necessarily true, (certainly if other types of derivatives would be
considered). Instead of the above, following simple rules of mathematics, I would have to
evaluate
,
ln
( , , ) ( , , )1 1 1( , , ) j j j
j j j
T N
E E Ej j j jj
E E E j
QV
E N V E N V E EN V E e e e
Q V Q V Q E Vβ β ββ − − −
∂⎛ ⎞ =⎜ ⎟∂⎝ ⎠∂ ∂Ω ∂Ω ∂
− Ω + +∂ ∂ ∂ ∂∑ ∑ ∑
18
and using the derivatives of Ω as defined in the microcanonical ensemble (see subsection
1), one obtains
1 1 1 1( , , ) ( , , ) ( , , )j j j
j j j
E E Ej jj j j
E E E
E EpN V E e N V E e N V E eQ V kT Q kT Q V
p
β β ββ
β
− − −∂ ∂= − Ω + Ω + Ω
∂ ∂
=
∑ ∑ ∑It follows that taking the derivative of Ω into account, the two terms indeed properly
cancel, such that the proper result is obtained. It still means that the first way of deriving
the result is essentially wrong, if no mention is made of this cancellation. Moreover, the
above identification of the derivatives of ( , , )jN V EΩ for arbitrary energies is dubious,
and it would probably be more appropriate to write for the last two terms
( )1 1 1( , , ) ( , , ) 0( ) ( )
j j
j j
E Ej jj j
E Ej j
p E EN V E e N V E e
Q kT E Q kT E Vβ β− −∂
Ω + Ω =∂∑ ∑
such that cancellation occurs for each energy level jE separately. It is clear that the
above derivation, using sums over energy levels is full of danger. There is an easier
solution. In the development discussed in these notes, we always assume a sum over
individual states, such that
( , )( , , ) jE N V
jQ N V e ββ −=∑
ln 1 j
j
Ej jj
j E
E EQ e P pV Q V V
ββ β β−∂ ∂∂ = − = − =∂ ∂ ∂∑ ∑
There are no ambiguities, and the mathematics is straightforward.
2. There is an interesting perspective to see that G Nµ= . Since ( , , )G N p T and N are
both extensive variables (they scale linearly with the size of the system), we can write
( , , ) ( , )G N p T N g p T= , where ( , )g p T is independent of the size of the system. Hence
,
( , ) ( , , )p T
G g p T G N p T NN
µ µ∂⎛ ⎞= = → =⎜ ⎟∂⎝ ⎠
or, the chemical potential is the Gibbs free energy per particle.