# Thermodynamics

I’ve been trying to learn a bit about classical thermodynamics, using Fermi’s lecture notes which are available as a low-cost Dover reprint.

That’s partly just because the subject has always been a bit mysterious to me and I would like to understand it better, but also because the Second Law of thermodynamics often gets invoked in environmental discussions – and I wonder whether it is being used accurately.  (See this blog post for extended discussion about that.)

As a mathematician, I expected the discussion of thermodynamics to be statistical, heavily engaged with probability theory.  But the main text of Fermi’s book is not about statistical mechanics at all.  Instead, it is about classical thermodynamics; the nineteenth century theory that attempted to quantify the properties of that mysterious fluid, “heat”, and its transmission from one body to another.

So what did I learn from Fermi?  Here’s my attempt to explain some of it. We start with the basic idea of a thermodynamic system.   The state space of a system is a finite-dimensional manifold $$M$$: a point of the manifold gives you all the thermodynamically relevant information about the system.  For instance, if the system is a quantity of gas (at rest), the state space is a 2-manifold, and coordinates can be given by the pressure $$p$$ and volume $$V$$ of gas.  If we have two independent systems (without any connection between them) the state space of the joint system is the product of the state spaces of the individual subsystems.

A system may (will!) contain heat,   and the letter $$Q$$ is used to denote a quantity of heat. Heat can flow between systems that are in thermal contact.

Among the states of a thermodynamic system, some are singled out as equilibrium states.  For a single quantity of (thermally isolated) gas, every state is an equilibrium state,   But if we have two such systems in thermal contact, heat may flow from one to the other.   The equilibrium states are those for which heat is not flowing.    The relation “$$X_1$$ and $$X_2$$ are in equilibrium when brought into thermal contact” defines an equivalence relation on states of systems (this is the so-called 0th law of thermodynamics).  There is a numerical parameter $$T$$, the temperature, defined on equilibrium states and such that two states are equivalent iff they have the same temperature.   (This of course does not characterize $$T$$ uniquely.  Later we will see that there is a unique – up to scale – natural choice of $$T$$. )

Example: A volume $$V$$ of an ideal gas at pressure $$p$$ has temperature $$T$$ determined by the ideal gas law

$pV = kRT,$

where $$k$$ is the number of moles of gas (that is, the mass of gas divided by its molecular mass) and $$R\approx 8.3 JK^{-1}\text{mol}^{-1}$$ is the ideal gas constant.  Real gases approximate this law under conditions of low pressure.

Let the state space of a thermodynamic system be a manifold $$M$$.  A transformation of the system is just a piecewise smooth path in $$M$$, which we think of as representing an evolution of the system parameterized by time.  A cyclic transformation is a loop. If we think of a transformation as a physical evolution we must envisage it happening very slowly – because the state space usually describes only systems with negligible kinetic energy.  During such a physical evolution the system might exchange heat with its environment, and it might also do physical work (e.g. as a gas expands).   It is assumed that there are 1-forms, which I will denote $$\alpha$$ and $$\beta$$, on $$M$$ such that the work done by the system on its environment, and the heat supplied by the system to its environment, during a transformation $$\gamma$$, are equal to

$\int_\gamma\alpha,\quad \int_\gamma\beta$

respectively.   For example, for a quantity of gas at pressure $$p$$ and volume $$V$$, we have $$\alpha = p dV$$.

Some special kinds of transformation are reversible (a path in the submanifold of equilibrium states); isochore (not involving work done on the environment);  adiabatic (not involving heat exchange with the environment – i.e. possible in a thermally isolated system); isothermal (constant temperature); etc.

The first law of thermodynamics is the statement: $$\alpha+\beta$$ is an exact 1-form.  (Or perhaps one should say “closed”, I am not really sure what the cohomological issues are here.) To see what this means, consider a “stirrer experiment” involving a beaker of water.  Consider two points $$x,y$$ in the state space, one where the water is at 20 Celsius and one where it is at 50 Celsius.  We assume it occupies the same volume in each case (actually, there is a slight expansion, but this is not significant).   Here are two ways (transformations) to move from $$x$$ to $$y$$. First way, $$\gamma_1$$: Heat the beaker over a flame.   Then a certain quantity of heat passes into the water, $$-\int_{\gamma_1}\beta$$, but no work is done.   Second way, $$\gamma_2$$: Stir vigorously for a long time.   Then work is done, $$-\int_{\gamma_2}\alpha$$, but no heat is transferred.   The first law says that

$\int_{\gamma_1}\alpha = \int_{\gamma_2}\beta;$

In order for this to make sense, heat and work (energy) must be measured in the same units: “heat is work and work is heat”.  The function of state of which $$\alpha+\beta$$ is a differential is (minus) the total energy of the system, denoted $$U$$ by Fermi: $$\alpha+\beta=-dU$$.  (Fermi also denotes my $$\alpha,\beta$$ by $$dL, -dQ$$ respectively but they are not exact forms on the state space; I suppose we should regard them as functions on the path space $${\mathbb L}M$$.  For Fermi, then, the above equation becomes $$dU+dL=dQ$$.)

In the next post I’ll try to follow Fermi by working some examples, and then going on to the Second Law and entropy.