Skip to content
Tutorials Center
My learning

Topics

Lesson 16 of 39 ยท Partition Functions and Thermodynamics

Helmholtz Free Energy

Connect the partition function to thermodynamics with F = -k_B T ln Z, derive S, U, P from F, and see why systems at fixed T and V minimize their free energy.

The partition function becomes thermodynamics through a single formula. The Helmholtz free energy F is the thermodynamic potential natural to a system at fixed temperature, volume and particle number, exactly the canonical ensemble's conditions.

The key formula

Text
F = โˆ’k_B T ln Z

Why this? From the previous chapter, the Gibbs entropy of the canonical distribution is S = U/T + k_B ln Z. Multiply by T and rearrange: U โˆ’ TS = โˆ’k_B T ln Z. So F = U โˆ’ TS, the thermodynamic definition of the Helmholtz free energy, equals โˆ’k_B T ln Z.

Everything from F

The thermodynamic differential for a system with N fixed is dF = โˆ’S dT โˆ’ P dV (and + ฮผ dN if N varies). Therefore:

Text
S = โˆ’(โˆ‚F/โˆ‚T)_(V,N)
P = โˆ’(โˆ‚F/โˆ‚V)_(T,N)
ฮผ = (โˆ‚F/โˆ‚N)_(T,V)
U = F + TS = F โˆ’ T (โˆ‚F/โˆ‚T) = โˆ‚(ฮฒF)/โˆ‚ฮฒ
C_V = (โˆ‚U/โˆ‚T)_V

So the recipe is: compute Z(T, V, N), take F = โˆ’k_B T ln Z, then differentiate. In practice you can compute S and P in just a couple of lines.

Python Thermodynamics from F for a two-level system

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

F is minimized at equilibrium

For a system at fixed T, V and N, spontaneous changes lower F; at equilibrium F is a minimum. The reasoning: the total entropy of system plus bath is maximal at equilibrium, and a bit of algebra shows this is equivalent to minimizing F = U โˆ’ TS.

This is a competition between energy and entropy: U wants to be low (favoring ordered, low-energy states) and โˆ’TS wants entropy high (favoring disorder). Temperature sets the balance: at low T energy wins, at high T entropy wins. Almost every phase transition is such a competition.

Example: free energy of a constrained two-level system

Consider N two-level particles with a fraction x excited, which has energy U = Nฮตx and entropy S = โˆ’N k_B [x ln x + (1 โˆ’ x) ln(1 โˆ’ x)]. The free energy of this constrained macrostate is F(x) = U โˆ’ TS. Minimizing over x should give the known equilibrium value x = 1/(e^(ฮต/(k_B T)) + 1).

Python Minimize F over the excited fraction

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

At low temperature the minimum is near x = 0 (energy wins); at higher temperatures it moves toward x = 1/2 (entropy wins).

Additivity

For independent systems Z = Z_A Z_B, so F = F_A + F_B. Free energy is extensive: for N independent identical distinguishable particles F = โˆ’N k_B T ln Z_1.

Free energy and work

The decrease of F at constant T equals the maximum work the system can do on its surroundings in a reversible isothermal process: W_max = โˆ’ฮ”F. That is why F is "free" energy: the part of the internal energy available for work, with TS unavailable.

Other ensembles have their own free energies: the Gibbs free energy G = F + PV (fixed T and P) and the grand potential ฮฆ = F โˆ’ ฮผN (fixed T, V, ฮผ). Chemistry usually uses G because experiments are run at fixed pressure.

Python Pressure from F: the idea in a toy model

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. The Helmholtz free energy in terms of the partition function is:

    F = -k_B T ln Z, which equals U - TS.
  2. 2. Which derivative gives entropy from F?

    From dF = -S dT - P dV + mu dN, S = -(dF/dT) at fixed V, N.
  3. 3. At very low temperature, equilibrium at fixed T, V is dominated by:

    F = U - TS: as T goes to 0 the TS term vanishes and minimizing F means minimizing U.
  4. 4. What does a decrease of F at constant T represent?

    W_max = -Delta F for reversible isothermal processes.

Summary

  • F = โˆ’k_B T ln Z = U โˆ’ TS.
  • S = โˆ’โˆ‚F/โˆ‚T, P = โˆ’โˆ‚F/โˆ‚V, ฮผ = โˆ‚F/โˆ‚N, U = F + TS.
  • At fixed T, V, N equilibrium is the minimum of F: energy versus entropy.
  • F is additive for independent systems and gives the maximum isothermal work.

Next: The Harmonic Oscillator and the Einstein Solid