<<

ME346A Introduction to Statistical – Wei Cai – Stanford University – Win 2011 Handout 9. NPT and Grand Canonical Ensembles

January 26, 2011

Contents

1 Summary of NVE and NVT ensembles 2

2 NPT ensemble 3 2.1 Equilibrium distribution ...... 4 2.2 Thermodynamic potential ...... 5 2.3 fluctuations ...... 5 2.4 Ideal example ...... 6

3 Grand 7 3.1 Equilibrium distribution ...... 8 3.2 Thermodynamic potential ...... 8 3.3 Number of particles fluctuations ...... 9 3.4 example ...... 10 3.5 Lattice gas model ...... 11

Reading Assignment: Reif §6.9.

1 1 Summary of NVE and NVT ensembles

Let us start with a quick summary of the microcanonical (NVE) ensemble. It describes isolated systems with fixed number of particles N, volume V and E.

• The is described by a uniform distribution with two constant energy shells.

• The connection with is made through Boltzmann’s : S = kB ln Ω, where Ω is the number of microscopic states consistent with thermody- namic (macroscopic) variables N,V,E.

• Inverting S(N,V,E) we can obtain E(S,V,N). The other thermodynamic quantities are defined through partial derivatives. ∂E  ∂E  ∂E  T ≡ ∂S V,N , p ≡ − ∂V S,N , µ ≡ ∂N S,V

Next, a quick summary of the canonical (NVT ) ensemble. It describes systems in contact with a thermostat at temperature T . As a result, the energy of the system no longer remain constant. The number of particles N and volume V remain fixed.

• The canonical ensemble is described by Boltzmann’s distribution. 1 −βH({pi},{qi}) ρ({qi}, {pi}) = e (1) Z˜ Z 3N ˜ Y −βH({pi},{qi}) Z = dqi dpi e (2) i=1

2 • The connection with thermodynamics is made through the expression of A(N,V,T ) through the partition function Z,

3N 1 Z Y A = −k T ln Z,Z = dq dp e−βH({pi},{qi}) (3) B N!h3N i i i=1

• The other thermodynamic quantities are defined through partial derivatives. ∂A  ∂A  ∂A  entropy S ≡ ∂T V,N , pressure p ≡ − ∂V T,N , chemical potential µ ≡ ∂N T,V • The energy (Hamiltonian) of system is no longer conserved, but fluctuate around its average value. 1 ∂Z ∂ E ≡ hHi = − = − ln Z (4) Z ∂β ∂β ∂E (∆E)2 ≡ hH2i − hHi2 = − = k T 2C = Nk T 2c (5) ∂β B v B v Hence in the N → ∞,

p 2 ∆E 1 ∆E = NkBT cv ∝ √ → 0 (6) E N The difference between microcanonical (NVE) ensemble and canonical (NVT ) ensem- ble vanishes.

2 NPT ensemble

The NPT ensemble is also called the isothermal-isobaric ensemble. It describes systems in contact with a thermostat at temperature T and a bariostat at pressure p. The system not only exchanges with the thermostat, it also exchange volume (and ) with the bariostat. The total number of particles N remains fixed. But the total energy E and volume V fluctuate at .

Q: What is the statistical distribution ρ({qi}, {pi}) at thermal equilibrium? Q: What is the microscopic expression for the thermodynamic potential? Approach: Consider system of interest + thermostat + bariostat all together as a closed system, which can be described using the microcanonical ensemble.

3 2.1 Equilibrium distribution Notice that in the (NPT ) ensemble, the distribution function must also include V as its variable, because the volume can (in principle) take any value at thermal equilibrium.

˜ ρ({qi}, {pi},V ) ∝ number of ways (Ω) the thermostat and the bariostat can rearrange them- selves to allow the system to have energy E = H({qi}, {pi}) and volume V .

Let S˜ be the entropy of the thermostat + bariostat, then ! S˜ Ω˜ = exp (7) kB

Let V0 and E0 be the total volume and total energy of the thermostat + bariostat + system of interest. Let V and E be the volume and energy of the system of interest. Then the volume and energy left for the thermostat + bariostat are, V0 − V and E0 − E, respectively. ˜ ! ˜ ! ˜ ˜ ˜ ˜ ∂S ∂S S(N,V0 − V,E0 − E) = S(N,V0,E0) − V − E (8) ∂V˜ ∂E˜ N,E N,V

 ∂S˜  1 We recognize ˜ ≡ T where T is the temperature of the thermostat. ∂E N,V  ∂S˜  But what is ˜ ? ∂V N,E This is the to use the second type of Maxwell’s relationship. ! ! ! ∂S˜ ∂E˜ ∂V˜ · · = −1 (9) ∂E˜ ∂V˜ ∂S˜ V,N S,N E,N ! 1 ∂V˜ · (−p) · = −1 (10) T ∂S˜ E,N ! ∂S˜ p =⇒ = (11) ∂V˜ T N,E where p is the pressure of the bariostat. Therefore, p 1 S˜(N,˜ V,˜ E˜) = S˜(N,V˜ ,E ) − V − E (12) 0 0 T T  E + pV  Ω˜ = const · exp − (13) kBT Therefore, the equilibrium distribution of the isothermal-isobaric (NPT ) ensemble is, 1 ρ({q }, {p },V ) = e−β[H({qi},{pi})+pV ] (14) i i Ξ Z ∞ Z 3N Y −β[H({qi},{pi})+pV ] Ξ = dV dqi dpi e (15) 0 i=1

4 2.2 Thermodynamic potential By now, we would expect the normalization factor Ξ should be interpreted as a kind of partition function that will reveal us the fundamental .

To find out the precise expression, we start with the Shanon entropy expression. (Notice here that V is an internal degree of freedom to be integrated over and p is an external variable.)

X S = −kB pi ln pi i Z ∞ Z 3N   Y H({qi}, {pi}) + pV = −k dV dq dp ρ({q }, {p },V ) · − ln Ξ˜ B i i i i −k T 0 i=1 B 1 = (hHi + phV i) + k ln Ξ˜ (16) T B 1 = (E + pV ) + k ln Ξ˜ (17) T avg B Hence ˜ −kBT ln Ξ = E − TS + pVavg ≡ G(N,T,P ) (18)

This is the , which is the appropriate thermodynamic potential as a function of N,T,P ! So everything falls into the right places nicely. We just need to careful that the volume in thermodynamics is the ensemble average Vavg ≡ hV i, because in (N,T,P ) ensemble, V is not a constant.

Of course, we still need to put in the quantum corrections 1/(N!h3N ), just as before. So the final expression for the Gibbs free energy and chemical potential µ is,

µN = G(T, p, N) = −kBT ln Ξ (19) 3N 1 Z ∞ Z Y Ξ(T, p, N) = dV dq dp p e−β[H({qi},{pi})+pV ] (20) N!h3N i i i 0 i=1 Z ∞ Ξ(T, p, N) = dV Z(T,V,N) e−βpV (21) 0 Therefore, Ξ(T, p, N) is the of the partition function Z(T,V,N) of the canonical ensemble!

2.3 Volume fluctuations To obtain the average of volume V and its higher moments, we can use the same trick as in the canonical ensemble and take derivatives of Ξ with respect to p.

5 1 ∂Ξ hV i = −k T B Ξ ∂p 1 ∂2Ξ hV 2i = (k T )2 B Ξ ∂p2 " # ∂V ∂  1 ∂Ξ 1 ∂2Ξ 1 ∂Ξ2 − = k T = k T − ∂p B ∂p Ξ ∂p B Ξ ∂p2 Ξ2 ∂p

" 2  2# 1 2 1 ∂ Ξ 1 ∂Ξ = (kBT ) 2 − kBT kBT Ξ ∂p Ξ ∂p 1 = (hV 2i − hV i2) kBT 1 ≡ (∆V )2 (22) kBT

Define compressibility1 1 ∂V  (∆V )2 βc ≡ − = (23) V ∂p T,N kBTV

Then we have,

2 (∆V ) = kBT βcV (24) p ∆V = kBT βcV (25) ∆V 1 ∝ √ → 0 as V → ∞ (26) V V In other words, in the thermodynamic limit (V → ∞), the relative fluctuation of volume is negligible and the difference between (NPT ) ensemble and (NVT ) ensemble vanishes.

2.4 Ideal gas example To describe ideal gas in the (NPT ) ensemble, in which the volume V can fluctuate, we introduce a potential function U(r,V ), which confines the partical position r within the volume V . Specifically, U(r,V ) = 0 if r lies inside volume V and U(r,V ) = +∞ if r lies outside volume V .

The Hamiltonian of the ideal gas can be written as,

3N N X p2 X H({q }, {p }) = i + U(r ,V ) (27) i i 2m i i=1 j=1

1 Not to be confused with β ≡ 1/(kBT ).

6 Recall the ideal gas partition function in the (NVT ) ensemble.

V N V N Z(T,V,N) = (2πmk T )3N/2 = (28) N!h3N B N!Λ3N √ where Λ ≡ h/ 2πmkBT is the thermal de Broglie wavelength. Z ∞ Ξ(T, p, N) = dV · Z(T,V,N) · e−βpV 0 Z ∞ 1 N −βpV = 3N dV · V · e N!λ 0 Z ∞ 1 1 N −x = 3N N+1 dx · x · e N!λ (βp) 0 1 1 = N! N!λ3N (βp)N+1 k T N+1 1 = B (29) p Λ3N

In the limit of N → ∞,

k T N (2πmk T )3N/2 Ξ(T, p, N) ≈ B · B (30) p h3N

The Gibbs free energy is

k T  (2πmk T )3/2  G(T, p, N) = −k ln Ξ = −Nk T ln B · B (31) B B p h3

This is consistent with Lecture Notes 6 Thermodynamics §3.2,

G k T  (2πmk T )3/2  µ = = −k T ln B · B (32) N B p h3

3

The grand canonical ensemble is also called the µV T ensemble. It describes systems in contact with a thermostat at temperature T and a particle reservoir that maintains the chemical potential µ. The system not only exchanges heat with the thermostat, it also exchange particles with the reservoir. The volume V remains fixed.2 But the number of particles N and energy E fluctuate at thermal equilibrium.

2Remember the Gibbs-Duhem relation. We cannot specify all three variables T , p, µ simultaneously.

7 Q: What is the statistical distribution ρ({qi}, {pi}) at thermal equilibrium? Q: What is the microscopic expression for the thermodynamic potential?

Approach: Consider system of interest + thermostat + particle reservoir all together as a closed system, which can be described using the microcanonical ensemble.

3.1 Equilibrium distribution Notice that int the grand canonical (µV T ) ensemble, the function must also include N as its variable, because the number of particle can (in principle) be any non-negative integer at thermal equilibrium.

Following the same approach as in the (NPT ) ensemble, we obtain the equilibrium distri- bution of the grand canonical (µV T ) ensemble as the following. 1 −β(H({qi},{pi})−µN) ρ({qi}, {pi},N) = e (33) Z˜ where ∞ Z 3N ˜ X Y −β(H({qi},{pi})−µN) Z = dqi dpi e (34) N=0 i=1 ∞ X = eβµN Z˜(N,V,T ) (35) N=0

ρ is grand canonical distribution and Z˜(N,V,T ) is the normalization factor in the canonical ensemble for N particles.

3.2 Thermodynamic potential Again, we should expect the normalization factor to give us the thermodynamic potential for µ, V, T , which is the , or Landau potential,3

Φ(µ, V, T ) = E − TS − µN = −pV (36)

3We called it K in Lecture Notes 6 Thermodynamics.

8 Starting from Shanon’s entropy expression, we can show that

Φ(µ, V, T ) = −kBT ln Z , pV = kBT ln Z (37)

where Z is the grand partition function,

∞ Z 3N X Y −β(H({qi},{pi})−µN) Z = dqi dpi e (38) N=0 i=1 ∞ X = eβµN Z(N,V,T ) (39) N=0 where Z(N,V,T ) is the partition function of the canonical ensemble. Notice that we have removed the˜sign, meaning that we have applied the quantum correction 1/(N!h3N ).

βµ Define fugacity z ≡ e (so that µ = kBT ln z) we can write,

∞ X Z = zN Z(N,V,T ) (40) N=0 Therefore, the grand partition function Z(µ, V, T ) is the unilateral Z-transform of the partition function Z(N,V,T ) of the canonical ensemble.4

3.3 Number of particles fluctuations Average number of particles 1 ∂Z ∂ ∂ hNi = k T = k T (ln Z) = z (ln Z) (41) B Z ∂µ B ∂µ ∂z 1 ∂2Z hN 2i = (k T )2 (42) B Z ∂µ2 ∂hNi 1 (∆N)2 = (hN 2i − hNi2) = (43) ∂µ kBT kBT

hNi Define density ρ ≡ V , hNi = ρV ∂ρ (∆N)2 V · = (44) ∂µ kBT 2 (∆N) = kBT (∂ρ/∂µ)V (45) p ∆N = kBT (∂ρ/∂µ)V (46) ∆N pk T (∂ρ/∂µ)V 1 = B ∝ √ → 0 (as V → ∞) (47) hNi ρV V 4No wonder it is called the Z-transform. See http://en.wikipedia.org/wiki/Z-transform for proper- ties of the Z-transform.

9 3.4 Ideal gas example Recall the ideal partition function in the canonical ensemble,

V N V N Z(N,V,T ) = (2πmk T )3N/2 = (48) N!h3N B N!Λ3N (49)

From this we obtain the grand partition function,

∞ ∞ N X V N X 1 zV  Z = zN = (50) N!Λ3N N! Λ3 N=0 N=0 zV  Z = exp (51) Λ3

Next the grand potential Φ = −pV , zV pV = k T ln Z = k T (52) B B Λ3 z p 3 p = kBT 3 , z = Λ (53) Λ kBT p  h2 3/2 eβµ = (54) kBT 2πmkBT " #  p   h2 3/2 µ = kBT ln · (55) kBT 2πmkBT

This is consistent with the results from the NPT ensemble, as it should!

We now can obtain an explicit expression of the density fluctuation of the ideal gas.

∂ ∂ zV  zV pV hNi = z ln Z = z 3 = 3 = ln Z = (56) ∂z ∂z Λ Λ kBT eβµV hNi = (57) Λ3 ∂hNi eβµβV pV = 3 = β · hNi = 2 (58) ∂µ Λ (kBT )

2 ∂hNi pV (∆N) = kBT = = hNi (59) ∂µ kBT (60)

Hence the variance of N equals the expectation value of N. The standard deviation of N is

∆N = phNi (61)

10 The relative fluctuation of N is ∆N 1 = (62) N phNi

From the above we also obtain how density ρ = N/V changes with the chemical potential,

∂ρ 1 ∂hNi p = = 2 (63) ∂µ V ∂µ (kBT )

3.5 Lattice gas model From the previous sections, we see ∆N = hNi (64)

Q: Is this result reasonable?

Ideal gas means no correlation between . Hence we can build a lattice gas model as a further simplification to the ideal gas model.

Imagine we divide the volume V into Nc cells. Each cell can have either 1 or 0 molecule.

Assume Nc  hNi, so that we can ignore the possibility that two molecules occupy the same cell.

Define a random variable for each cell,

 1 cell i contains 1 molecule, probability p n = (65) i 0 cell i contains 0 molecule, probability (1 − p) ni and nj are independent of each other (for i 6= j)

The total number of molecules in volume V is

N Xc N = ni, (66) i=1

11 The average number of molecules is

N Xc hNi = hnii = hnii · Nc (67) i=1

Notice that

hnii = p (68) 2 hni i = p (69) 2 2 2 hni i − hnii = p − p = p (1 − p) (70)

Hence

hNi = Nc p (71)   2 2 hNi hN i − hNi = Nc p (1 − p) = hNi 1 − (72) Nc

5 In the limit of Nc  hNi,

(∆N)2 = hN 2i − hNi2 = hNi (73)

This is consistent with the prediction from the grand canonical ensemble.

5 Nc can be arbitrarily large and hence much larger than N.

12