The Space of Physical Frameworks (Part 2)

Azimuth 2024-09-08

I’m trying to work out how classical statistical mechanics can reduce to thermodynamics in a certain limit. I sketched out the game plan in Part 1 but there are a lot of details to hammer out. While I’m doing this, let me stall for time by explaining more precisely what I mean by ‘thermodynamics’. Thermodynamics is a big subject, but I mean something more precise and limited in scope.

Thermostatic systems

A lot of what we call ‘thermodynamics’, or more precisely ‘classical thermodynamics’, has nothing to do with dynamics. It’s really about systems in equilibrium, not changing, so it actually deserves to be called ‘thermostatics’. Here’s one attempt to formalize a core idea:

Definition. A thermostatic system is a convex space X together with a concave function S \colon X \to [-\infty,\infty]. We call X the space of states, and call S(x) the entropy of the state x \in X.

There’s a lot packed into this definition:

  1. The general concept of convex space: it’s roughly a set where you can take convex combinations of points x,y, like a x + (1-a) y where 0 \le a \le 1.
  2. How we make [-\infty,\infty] into a convex space: it’s pretty obvious, except that -\infty beats \infty in convex combinations, like \frac{1}{3} (-\infty) + \frac{2}{3} \infty = -\infty.
  3. What’s a ‘concave’ function S \colon X \to [-\infty,\infty]: it’s a function with
S(a x + (1-a) y) \ge a S(x) + (1-a) S(y)

          for 0 \le a \le 1.

To see all the details spelled out with lots of examples, try this:

• John Baez, Owen Lynch and Joe Moeller, Compositional thermostatics, J. Math. Phys. 64 (2023) 023304. (Blog articles here.)

We actually defined a category of thermostatic systems and maps between them.

What you can do with a thermostatic system

For now I will only consider thermostatic systems where X = \mathbb{R}, made into a convex set in the usual way. The idea here is that a state is solely determined by its energy E, which is some nonnegative number. I’m trying to keep things as simple as possible, and generalize later only if my overall plan actually works.

Here’s what people do in this very simple setting. Our thermostatic system is a concave function

S \colon \mathbb{R} \to [-\infty, \infty]

describing the entropy S(E) of our system when it has energy E. But often entropy is also a strictly increasing function of energy, with S(E) \to \infty as E \to \infty. In this case, it’s impossible for a system to literally maximize entropy. What it does instead is maximize ‘entropy minus how much it spends on energy’ — just as you might try to maximize the pleasure you get from eating doughnuts minus your displeasure at spending money. Thus, if C is the ‘cost’ of energy, our system tries to maximize

S(E) - C E

The rough intuition you should have is this. When it’s hot, energy is cheap and our system’s energy can afford to be high. When it’s cold, energy costs a lot and our system will not let its energy get too high.

If S(E) - C E as a function of E is differentiable and has a maximum, the maximum must occur at a point where

\displaystyle{ \frac{d}{d E} \left(S(E) - C E \right) = 0 }

or

\displaystyle{ \frac{d}{d E} S(E) = C }

Physically, the cost C is the reciprocal of a quantity called temperature:

\displaystyle{ C = \frac{1}{T} }

So, C should be called inverse temperature, and our derivative formula says

\displaystyle{ \frac{d}{d E} S(E) = \frac{1}{T} }

Temperature is more familiar, but the math will work better for us if we use the inverse temperature.

Suppose we have a system maximizing S(E) - C E for some value of C. The maximum value of S(E) - C E is called free entropy and denoted \Phi. In short:

\displaystyle{ \Phi(C) = \sup_E \left(S(E) - C E) \right) }

This way of defining \Phi in terms of S is called a Legendre–Fenchel transform, though conventions vary about the precise definition of this transform, and also its name. Since I’m lazy, I’ll just call it the Legendre transform.

The great thing about Legendre transforms is that if a function is convex and lower semicontinuous, when you take its Legendre transform twice you get that function back! This is part of the Fenchel–Moreau theorem. So under these conditions we automatically get another formula that looks very much like the one we’ve just seen:

\displaystyle{  S(E) = \sup_C \left( \Phi(C) - C E\right) }

When \Phi(C) - C E is differentiable and has a maximum as a function of C, this maximum must occur at a point where

\displaystyle{ \frac{d}{d C} \left(\Phi(C) - C E \right) = 0 }

or

\displaystyle{ \frac{d}{d C} \Phi(C) = E }

Summary

Starting from a thermostatic system S \colon \mathbb{R} \to [-\infty,\infty] we get a beautifully symmetrical pair of relations:

\Phi(C) = \sup_E \left(S(E) - C E \right)   S(E) = \sup_C \left(\Phi(C) - C E \right)

When S is differentiable and the supremum at left is achieved at some unique energy E, then

S'(E) = C

at this value of E, and this formula lets us compute the inverse temperature C as a function of E. Similarly, when \Phi is differentiable and the supremum at right is achieved at some unique C, then

\Phi'(C) = E

at this value of C, and this formula lets us compute E as a function of C.

When we describe a thermostatic system as a limit of classical statistical mechanical systems, these are the formulas we’d like to see emerge in the limit!

Appendix: free energy

If you’ve never heard of ‘free entropy’, you may be relieved to hear it’s a repackaging of the more familiar concept of ‘free energy’. The free energy F, or more specifically the Helmholtz free energy, is related to the free entropy by

\displaystyle{  F = -\Phi/T }

We could rewrite all the formulas above in terms of temperature and free energy instead of inverse temperature and free entropy. We’d get formulas that are more familiar to students of thermodynamics, yet less systematic and symmetrical if we are trying to study thermostatic systems using Legendre transforms. Showing you these would only be helpful to die-hard fans of thermodynamics. The rest of you would only become more confused. So I won’t do it!