## The Geometry of Thermodynamics

Thermodynamics is the study of heat. Originally developed to understand steam engines and such, it led to a revolution in physics. It showed that time has a preferred direction. Also, that physics is not fully deterministic: the best we can do for large systems is to predict averages of physical quantities and probabilities of events. But with the even greater revolutions of quantum mechanics and relativity that happened soon after , thermodynamics lost some of its original wonder. Nowadays it is thought of a staid old field, barely taught in physics departments anymore ( except as a preparation for a Stat Mech course). This is a pity, because thermodynamics is perhaps the most remarkable of all physical theories. We have none other than Albert Einstein vouching for this1:

A theory is the more impressive the greater the simplicity of its premises is, the more different kinds of things it relates, and the more extended is its area of applicability. Therefore the deep impression which classical thermodynamics made upon me. It is the only physical theory of universal content concerning which I am convinced that, within the framework of the applicability of its basic concepts, it will never be overthrown (for the special attention of those who are skeptics on principle).

In thinking about this subject in a recent paper the main problem I had was to find out information about good old fashioned classical thermodynamics. Except for some treatments by V. I. Arnold2 and Chandrashekhar3, I had to go all the way back to the literature of almost a hundred years ago to find a sophisticated discussion on the subject. J. W. Gibbs4 is the main hero of the story. His ideas were developed by Pfaff and Caratheodory into a beautiful if under-appreciated subject.

The Law of Thermodynamics

The language of differential forms allows us to combine the first and second laws of thermodynamics into a single statement in a natural way. This should not be surprising because differential forms were developed (by Pfaff and others) to give mathematical meaning to the ideas of Gibbs on thermodynamics.

To be concrete let us consider the most familiar thermodynamic system, a gas; it has five thermodynamic variables
$U,T,S,P,V$:
the internal energy, temperature, entropy, pressure and volume. These variables come in conjugate pairs, one being intensive (i.e., invariant under changing the overall size of the system) and the other extensive (scales proportional to the size of the system): pressure/volume, temperature/entropy.Yet there are always an odd number of variables. The first and second laws of thermodynamics can be combined into a single law of thermodynamics on the infinitesimal variations of these quantities
$\alpha\equiv dU-TdS+PdV=0.$
The conjugate pairs appear together as $PdV$ or $TdS$,except for internal energy which has no conjugate. ( A better point of view is that the constant function equal to unity is the conjugate of $U$.)

An equivalent form would be

$dS-T^{-1} dU-{P\over T}dV=0.$

This can be thought of the condition to maximize entropy while keeping energy and volume fixed: $T^{-1}$ and ${P\over T}$ are the Lagrange multipliers enforcing these conditions.

Indeed, any variable can be chosen to be in the privileged position as the fundamental variable’ in the first term, with unity as the conjugate. This symmetry resolves the apparent contradiction of having an odd variables, while at the same having variables that
come in pairs. $\alpha$ is only determined modulo multiplication by a non-zero function: only its kernel (zero set) has a physical significance.

The differential constraint above means that the five variables are not independent;in fact there are only two independent variables.More precisely, the maximum dimension of a Lagrange submanifold in $R^5$ (i.e., a submanifold all of whose tangent vectors are annihilated by $\alpha$) is two. This follows from the fact that $\alpha$ violates the condition for Froebenius integrability maximally ( i.e., it is a contact form):
$\alpha\wedge[d\alpha]^2\neq 0.$
The particular two dimensional surface is determined by the properties of the gas. See below for examples.

We can abstract out of the above a mathematical structure that captures the essence of thermodynamics. A differential form $\alpha$ on a manifold of dimension $2n+1$ is called a contact form if

$\alpha\wedge[d\alpha]^n\neq 0$

everywhere. A contact structure $[\alpha]$ is an equivalence class of contact forms that differ by multiplication by a non-zero function:
$\alpha\sim f\alpha, \quad f\neq 0.$

A contact manifold is just a manifold with a contact structure $[\alpha]$ on it. This notion has its origins in Huyghens’s approach to ray optics. It is somewhat surprising that ray optics and thermodynamics share the same mathematical formalism: they don’t seem to have anything in common at first. See below for an example of how to look at thermodynamics through the eye of optics.

In most cases the manifold of interest in physics is just $R^{2n+1}$.(However a Josephson junction has thermodynamic manifold $R^4\times S^1$.)Clearly the form can be expressed in many equivalent forms, by a change of variables. In the case of a gas, some of these are

$\alpha=dU-TdS+PdV=dH+SdT+PdV, \quad H=U-TS$

$dG+SdT-VdP=0,\quad G=U-TS+PV$

$dS={1\over T}dU+{P\over T}dV.$

$H$ is the Helmholtz Free Energy which is the convenient quantity to study a gas at constant temperature and volume. The Gibbs Free Energy $G$ is useful to understand a gas at constant pressure and temperature.

Ideal Gas

For example, a monatomic ideal gas satisfies the laws
$Pv=RT,\quad u={3\over 2}RT$
where $v$ is the volume of one mole of the gas, $u$ the internal energy per mole and
$R\approx 8.3 {\rm JK}^{-1}{\rm mol^{-1}$
is the gas constant. The remaining relation needed to fix the two dimensional surface of the ideal gas is obtained by integrating the differential equation $\alpha=0$.

Set $S=nRs$, where $n$ is the number of moles of the gas. (We put in the gas constant so that $s$ is dimensionless.)
$Rds -Pdv-{1\over T} du=0\Rightarrow s=\log\left[{u^{3\over 2}v}\right].$
This holds up to an additive constant of integration; i.e., a quantity independent of $u$ and $v$.

Once this fundamental relation’ between extensive variables is given the intensive variables are determined by
${1\over T}=R\left({\partial s\over \partial u}\right)_v,\quad {P\over T}=R\left({\partial s\over \partial v}\right)_u$
which are the other equations of state.

Non-Ideal Gases

A simple model of a non-ideal gas is due to van der Waals.
$P={RT\over v-b}-{a\over v^2}$
where $v$ is again the volume of one mole of gas. $a$ and $b$ are constant parameters. We can regard $b$ as the excluded volume, because of the finite size of the molecules of the gas. The constant $a$ measures the strength of the short range attraction among the molecules.

Thus the volume is the solution of a cubic whose coefficients depend on pressure and temperature:
$Pv^3-(bP+RT)v^2+av-ab=0.$
At high temperatures there is only one real solution: there is only one phase. At low temperatures, there are three real solutions. But the middle solution is always unstable and should be discarded. The small volume solution is interpreted as the liquid phase and the large volume solution the gas phase. There is a curve on the surface defined by the van der Waals equation, along which the discriminant of the cubic vanishes: two of the solutions coincide. On this curve there is a critical point at which all three solutions coincide. See the figure at the top of the article. Imagine the surface defined by the van der Waals as a mountain. Then the discriminant curve consists of two pieces, a valley’ where the two smaller volume soluions coincide and a ridge’ along which the two larger volume solutions coincide; the point where the valley and the ridge meet is the critical point. The region in the $(P,T)$ plane bounded by this curve contain metastable states. The stable configuration is a mixture of gas and liquid. There is a prescription due to Maxwell for finding the proportion of gas to liquid at equilibrium.

Let us now find the entropy from
$Rds-{du\over T}-{P\over T}dv=0$
$ds={P\over RT}dv+{du\over RT}={dv\over v-b}+{du-{a\over v^2}dv\over RT}$
Thus $T$ is an integration factor which must make the last term an exact differential. A moments thought gives
$RT={2\over 3}$u+{a\over v}$.$
We fix the constant of integration by noting that the low density limit $v\to \infty$ must be the ideal gas. Thus,
$s=\log\left[(v-b)\left(u+{a\over v}\right)^{3\over 2}\right]$

The Hypersurface of van der Waals Gases

To pass to the quantum theory, the formulation of classical mechanics in terms of Hamilton-Jacobi equation is much better suited than that in terms of Newton’s laws. Similarly, the wave effects are easiest to understand in terms of the eikonal equation rather than in the ODEs for light rays in optics. In the same spirit, there is a formulation of classical thermodynamics in terms of first order partial differential equations, whose solution is the equation of state. This `Hamilton-Jacobi’ or eikonal form of thermodynamics is not as well understood. In fact, I have found only tangential references to it in the standard references on the subject.

For each value of $a$ and $b$, there is a two-dimensional surface picked out by the equations of state of the gas. If we allow the parameters to vary as well, we get a hypersurface of dimension four in the five dimensional thermodynamic manifold. Conversely, given a hypersurface
$F(S,T^{-1},{P\over T},U,V)=0$
a Lagrange sub-manifold is determined by the solution to the eikonal or Hamilton-Jacobi equation
$F\left(S,{\partial S\over \partial U},{\partial S\over \partial V},U,V
\right)=0.$

$a$ and $b$ are constants of integration of this Partial Differential Equation.

This points up a profound analogy between geometrical optics and thermodynamics. Both are based on the same geometry, that of contact manifolds. In geometrical optics, the analogue of the thermodynamic potential is the eikonal which is the phase of the light wave. This analogy of thermodynamics to optics was noted by Buchdahl5 but it does not look like it has been explored much. Let us find the equation for this van der Waals hypersurface as an example of this idea6.

With a little algebra we can eliminate the parameters $a$ and $b$ from the above equations and get a relation among the thermodynamic co-ordinates:

$${P\over T} v-{1\over T}u+{3\over 2}$^2T^{-3}={27\over 8}v^2e^{-2s}.$

This one equation describes the whole family of van der Waals gases. The equations of states can be derived by solving the PDE obained by expressing the extensive variables as derivatives of entropy by the intensive variables,

$$v{\partial s\over \partial v}-u{\partial s\over \partial u}+{3\over 2}$^2$${\partial s\over \partial u}$$^{3}={27\over 8}v^2e^{-2s}$
This is the Hamilton-Jacobi equation for van der Waals gases. The general solution will involve two integration constants that characterize each gas. It is just the formula above for $s$ .

It would be interesting to find such a hypersurface equation for all the usual examples of thermodynamic systems. It is the natural starting point for7 quantum thermodynamics. But that is another story..

Endnotes

1. A. Einstein, Autobiographical notes, quoted in Albert Einstein, Philosopher-Scientist: The Library of Living Philosophers Volume VII by Paul Arthur Schilpp, Published by Open Court ISBN-10: 0875482864 (1998).

2. V. I. Arnold and A. B. Giventhal Symplectic Geometry in Vol. IV of Encyclopedia of Mathematical Sciences ed. by V. I. Arnold and S. P. Novikov, Springer (2001); V. I. Arnold and B. Khesin Topological Methods in Hydrodynamics Springer, New York (1998).

3. S. Chandrashekhar An Introduction to the Study of Stellar Structure New York, Dover (1967).

4. J. W. Gibbs Graphical Methods in the Thermodynamics of Fluids in Scientific Papers of J Willard Gibbs, 2 vols. ed. by Bumstead, H. A., and Van Name, R. G., New York. Dover (1961).

5. H. A. Buchdahl The Concepts of Classical Thermodynamics, Cambridge U. Press, London (1966);An Introduction to Hamiltonian Optics, Cambridge University Press (1970).

6. I thank Anosh Joseph for discussions on this topic.

7. S. G. Rajeev Quantization of Contact Manifolds and Thermodynamics http://www.arxiv.org/math-ph/0703061, to appear in Annals of Physics.

8. For a marvelous historical-scientific account of the work of the Dutch school on non-ideal gases, see the online book
J. Levelt Sengers, How Fluids Unmix: Discoveries by the School of Van der Waals and Kamerlingh Onnes Royal Dutch Academy http://www.knaw.nl/waals/book.html

Oct 15 2007

I simplified the derivation of the Hamilton-Jacobi equation.

More important, I found a paper by Mark Peterson, American Journal of Physics 47,488 (1979) which comes the closest to my point of view here. However, the analogy with classical mechanics is not as close as Peterson suggests: the thermodynamic phase space is odd-dimensional so the correct structures are not Poisson brackets but Lagrange brackets. Nevertheless it is refreshing to see someone else share similar views in such an old subject:

Oct 22 2007

The book by Steve Omohundro:
Geometric Perturbation Theory in Physics discusses some similar connections between mechanics and thermodynamics. He says,

I explored the symplectic and contact structures underlying thermodynamics and their correspondence to similar structures in classical mechanics. I was especially interested in how these geometric structures emerge via asymptotics from the deeper underlying theories of statistical mechanics and quantum mechanics via the methods of steepest descents and stationary phase. The roles of entropy and action are quite parallel in these theories. There’s also a strong connection to simple mechanical systems with fast degrees of freedom that get averaged over.

Thanks to Rob Salgado for bringing this book to my attention.
There seems to be a lot more to understand in this old subject.

### 8 Responses to “The Geometry of Thermodynamics”

1. Some more thermodynamics « Entertaining Research Says:

[…] Didn’t I tell you about the bit of thermodynamics in every researcher’s life? Rajeev, at his Almanack, writes about the geometry of thermodynamics, the close analogy between thermodynamics and geometric optics, and geometrisation of […]

2. uk web hosting reviews Says:

uk web hosting reviews…

Solitary Wave » Blog Archive » The Geometry of Thermodynamics…

3. leistungen der gesetzlichen krankenversicherung Says:

leistungen der gesetzlichen krankenversicherung…

Solitary Wave » Blog Archive » The Geometry of Thermodynamics…

4. Search Engine Ranking Says:

Search Engine Ranking…

Solitary Wave » Blog Archive » The Geometry of Thermodynamics…

5. krankenkasse gesetzlich oder privat Says:

krankenkasse gesetzlich oder privat…

Solitary Wave » Blog Archive » The Geometry of Thermodynamics…

6. outlet metzingen Says:

outlet metzingen…

Solitary Wave » Blog Archive » The Geometry of Thermodynamics…

7. best Island vacations for families Says:

best Island vacations for families…

Solitary Wave » Blog Archive » The Geometry of Thermodynamics…

8. linked web-site Says: