4 Classical Thermodynamics

“Thermodynamics is a funny subject. The first time you go through it, you don’t understand it at all. The second time you go through it, you think you understand it, except for one or two small points. The third time you go through it, you know you don’t understand it, but by that time you are used to it, so it doesn’t bother you any more.”

Arnold Sommerfeld, making excuses

So far we’ve focussed on a statistical mechanics, studying systems in terms of their microscopic constituents. In this section, we’re going to take a step back and look at classical thermodynamics. This is a theory that cares nothing for atoms and microscopics. Instead it describes relationships between the observable macroscopic phenomena that we see directly.

In some sense, returning to thermodynamics is a retrograde step. It is certainly not as fundamental as the statistical description. Indeed, the “laws” of thermodynamics that we describe below can all be derived from statistical physics. Nonetheless, there are a number of reasons for developing classical thermodynamics further.

First, pursuing classical thermodynamics will give us a much deeper understanding of some of the ideas that briefly arose in Section 1. In particular, we will focus on how energy flows due to differences in temperature. Energy transferred in this way is called heat. Through a remarkable series of arguments involving heat, one can deduce the existence of a quantity called entropy and its implications for irreversibility in the Universe. This definition of entropy is entirely equivalent to Boltzmann’s later definition S=kBlogΩ but makes no reference to the underlying states.

Secondly, the weakness of thermodynamics is also its strength. Because the theory is ignorant of the underlying nature of matter, it is limited in what it can tell us. But this means that the results we deduce from thermodynamics are not restricted to any specific system. They will apply equally well in any circumstance, from biological systems to quantum gravity. And you can’t say that about a lot of theories!

In Section 1, we briefly described the first and second laws of thermodynamics as consequences of the underlying principles of statistical physics. Here we instead place ourselves in the shoes of Victorian scientists with big beards, silly hats and total ignorance of atoms. We will present the four laws of thermodynamics as axioms on which the theory rests.

4.1 Temperature and the Zeroth Law

We need to start with a handful of definitions:

  • A system that is completely isolated from all outside influences is said to be contained in adiabatic walls. We will also refer to such systems as insulated.

  • Walls that are not adiabatic are said to be diathermal and two systems separated by a diathermal wall are said to be in thermal contact. A diathermal wall is still a wall which means that it neither moves, nor allows particles to transfer from one system to the other. However, it is not in any other way special and it will allow heat (to be defined shortly) to be transmitted between systems. If in doubt, think of a thin sheet of metal.

  • An isolated system, when left alone for a suitably long period of time, will relax to a state where no further change is noticeable. This state is called equilibrium

Since we care nothing for atoms and microstates, we must use macroscopic variables to describe any system. For a gas, the only two variables that we need to specify are pressure p and volume V: if you know the pressure and volume, then all other quantities — colour, smell, viscosity, thermal conductivity — are fixed. For other systems, further (or different) variables may be needed to describe their macrostate. Common examples are surface tension and area for a film; magnetic field and magnetization for a magnet; electric field and polarization for a dielectric. In what follows we’ll assume that we’re dealing with a gas and use p and V to specify the state. Everything that we say can be readily extended to more general settings.

So far, we don’t have a definition of temperature. This is provided by the zeroth law of thermodynamics which states that equilibrium is a transitive property,

Zeroth Law: If two systems, A and B, are each in equilibrium with a third body C, then they are also in equilibrium with each other

Let’s see why this allows us to define the concept of temperature. Suppose that system A is in state (p1,V1) and C is in state (p3,V3). To test if the two systems are in equilibrium, we need only place them in thermal contact and see if their states change. For generic values of pressure and volume, we will find that the systems are not in equilibrium. Equilibrium requires some relationship between the(p1,V1) and (p3,V3). For example, suppose that we choose p1, V1 and p3, then there will be a special value of V3 for which nothing happens when the two systems are brought together.

We’ll write the constraint that determines when A and C are in equilibrium as

FAC(p1,V1;p3,V3)=0

which can be solved to give

V3=fAC(p1,V1;p3)

Since systems B and C are also in equilibrium, we also have a constraint,

FBC(p2,V2;p3,V3)=0      V3=fBC(p2,V2;p3)

These two equilibrium conditions give us two different expressions for the volume V3,

fAC(p1,V1;p3)=fBC(p2,V2;p3) (4.154)

At this stage we invoke the zeroth law, which tells us that systems A and B must also be in equilibrium, meaning that (4.154) must be equivalent to a constraint

FAB(p1,V1;p2,V2)=0 (4.155)

Equation (4.154) implies (4.155), but the latter does not depend on p3. That means that p3 must appear in (4.154) in such a way that it can just be cancelled out on both sides. When this cancellation is performed, (4.154) tells us that there is a relationship between the states of system A and system B.

θA(p1,V1)=θB(p2,V2)

The value of θ(p,V) is called the temperature of the system. The function T=θ(p,V) is called the equation of state.

The above argument really only tells us that there exists a property called temperature. There’s nothing yet to tell us why we should pick θ(p,V) as temperature rather than, say θ(p,V). We will shortly see that there is, in fact, a canonical choice of temperature that is defined through the second law of thermodynamics and a construct called the Carnot cycle. However, in the meantime it will suffice to simply pick a reference system to define temperature. The standard choice is the ideal gas equation of state (which, as we have seen, is a good approximation to real gases at low densities),

T=pVNkB

4.2 The First Law

The first law is simply the statement of the conservation of energy, together with the tacit acknowledgement that there’s more than one way to change the energy of the system. It is usually expressed as something along the lines of

First Law: The amount of work required to change an isolated system from state 1 to state 2 is independent of how the work is performed.

This rather cumbersome sentence is simply telling us that there is another function of state of the system, E(P,V). This is the energy. We could do an amount of work W on an isolated system in any imaginative way we choose: squeeze it, stir it, place a wire and resistor inside with a current passing through it. The method that we choose does not matter: in all cases, the change of the energy is ΔE=W.

However, for systems that are not isolated, the change of energy is not equal to the amount of work done. For example, we could take two systems at different temperatures and place them in thermal contact. We needn’t do any work, but the energy of each system will change. We’re forced to accept that there are ways to change the energy of the system other than by doing work. We write

ΔE=Q+W (4.156)

where Q is the amount of energy that was transferred to the system that can’t be accounted for by the work done. This transfer of energy arises due to temperature differences. It is called heat.

Heat is not a type of energy. It is a process — a mode of transfer of energy. There is no sense in which we can divide up the energy E(p,V) of the system into heat and work. We can’t write “E=Q+W” because neither Q nor W are functions of state.

Quasi-Static Processes

In the discussion above, the transfer of energy can be as violent as you like. There is no need for the system to be in equilibrium while the energy is being added: the first law as expressed in (4.156) refers only to energy at the beginning and end.

From now on, we will be more gentle. We will add or subtract energy to the system very slowly, so that at every stage of the process the system is effectively in equilibrium and can be described by the thermodynamic variables p and V. Such a process is called quasi-static.

For quasi-static processes, it is useful to write (4.156) in infinitesimal form. Unfortunately, this leads to a minor notational headache. The problem is that we want to retain the distinction between E(p,V), which is a function of state, and Q and W, which are not. This means that an infinitesimal change in the energy is a total derivative,

dE=Epdp+EVdV

while an infinitesimal amount of work or heat has no such interpretation: it is merely something small. To emphasise this, it is common to make up some new notation88 8 In a more sophisticated language, dE, -dW and -dQ are all one-forms on the state space of the system. dE is exact; -dW and -dQ are not.. A small amount of heat is written -dQ and a small amount of work is written -dW. The first law of thermodynamics in infinitesimal form is then

dE=-dQ+-dW (4.157)

Although we introduced the first law as applying to all types of work, from now on the discussion is simplest if we just restrict to a single method to applying work to a system: squeezing. We already saw in Section 1 that the infinitesimal work done on a system is

-dW=-pdV

which is the same thing as “force × distance”. Notice the sign convention. When -dW>0, we are doing work on the system by squeezing it so that dV<0. However, when the system expands, dV>0 so -dW<0 and the system is performing work.

Figure 24:

Expressing the work as -dW=-pdV also allows us to underline the meaning of the new symbol -d. There is no function W(p,V) which has “dW=-pdV”. (For example, you could try W=-pV but that gives dW=-pdV-Vdp which isn’t what we want). The notation -dW is there to remind us that work is not an exact differential.

Suppose now that we vary the state of a system through two different quasi-static paths as shown in the figure. The change in energy is independent of the path taken: it is 𝑑E=E(p2,V2)-E(p1,V1). In contrast, the work done -dW=-p𝑑V depends on the path taken. This simple observation will prove important for our next discussion.

4.3 The Second Law

“Once or twice I have been provoked and have asked company how many of them could describe the Second Law of Thermodynamics, the law of entropy. The response was cold: it was also negative. Yet I was asking something which is about the scientific equivalent of: ‘Have you read a work of Shakespeare?’ ”

C.P.Snow (1959)

C.P. Snow no doubt had in mind the statement that entropy increases. Yet this is a consequence of the second law; it is not the axiom itself. Indeed, we don’t yet even have a thermodynamic definition of entropy.

The essence of the second law is that there is a preferred direction of time. There are many macroscopic processes in Nature which cannot be reversed. Things fall apart. The lines on your face only get deeper. Words cannot be unsaid. The second law summarises all such observations in a single statements about the motion of heat.

Reversible Processes

Before we state the second law, it will be useful to first focus on processes which can happily work in both directions of time. These are a special class of quasi-static processes that can be run backwards. They are called reversible

A reversible process must lie in equilibrium at each point along the path. This is the quasi-static condition. But now there is the further requirement that there is no friction involved.

Figure 25:

For reversible processes, we can take a round trip as shown to the right. Start in state (p1,V1), take the lower path to (p2,V2) and then the upper path back to (p1,V1). The energy is unchanged because 𝑑E=0. But the total work done is non-zero: p𝑑V0. By the first law of thermodynamics (4.157), the work performed by the system during the cycle must be equal to the heat absorbed by the system, -dQ=p𝑑V. If we go one way around the cycle, the system does work and absorbs heat from the surroundings; the other way round work in done on the system which then emits energy as heat.

Processes which move in a cycle like this, returning to their original starting point, are interesting. Run the right way, they convert heat into work. But that’s very very useful. The work can be thought of as a piston which can be used to power a steam train. Or a playstation. Or an LHC.

The Statement of the Second Law

The second law is usually expressed in one of two forms. The first tells us when energy can be fruitfully put to use. The second emphasises the observation that there is an arrow of time in the macroscopic world: heat flows from hot to cold. They are usually stated as

Second Law à la Kelvin: No process is possible whose sole effect is to extract heat from a hot reservoir and convert this entirely into work

Second Law à la Clausius: No process is possible whose sole effect is the transfer of heat from a colder to hotter body

It’s worth elaborating on the meaning of these statements. Firstly, we all have objects in our kitchens which transfer heat from a cold environment to a hot environment: this is the purpose of a fridge. Heat is extracted from inside the fridge where it’s cold and deposited outside where it’s warm. Why doesn’t this violate Clausius’ statement? The reason lies in the words “sole effect”. The fridge has an extra effect which is to make your electricity meter run up. In thermodynamic language, the fridge operates because we’re supplying it with “work”. To get the meaning of Clausius’ statement, think instead of a hot object placed in contact with a cold object. Energy always flows from hot to cold; never the other way round.

Figure 26:

The statements by Kelvin and Clausius are equivalent. Suppose, for example, that we build a machine that violates Kelvin’s statement by extracting heat from a hot reservoir and converting it entirely into work. We can then use this work to power a fridge, extracting heat from a cold source and depositing it back into a hot source. The combination of the two machines then violates Clausius’s statement. It is not difficult to construct a similar argument to show that “not Clausius” “not Kelvin”.

Our goal in this Section is to show how these statements of the second law allow us to define a quantity called “entropy”.

Figure 27: The Carnot cycle in cartoon.

4.3.1 The Carnot Cycle

Kelvin’s statement of the second law is that we can’t extract heat from a hot reservoir and turn it entirely into work. Yet, at first glance, this appears to be in contrast with what we know about reversible cycles. We have just seen that these necessarily have -dQ=-dW and so convert heat to work. Why is this not in contradiction with Kelvin’s statement?

The key to understanding this is to appreciate that a reversible cycle does more than just extract heat from a hot reservoir. It also, by necessity, deposits some heat elsewhere. The energy available for work is the difference between the heat extracted and the heat lost. To illustrate this, it’s very useful to consider a particular kind of reversible cycle called a Carnot engine. This is series of reversible processes, running in a cycle, operating between two temperatures TH and TC. It takes place in four stages shown in cartoon in Figures 27 and 28.

Figure 28: The Carnot cycle, shown in the p-V plane and the T-S plane.
  • Isothermal expansion AB at a constant hot temperature TH. The gas pushes against the side of its container and is allowed to slowly expand. In doing so, it can be used to power your favourite electrical appliance. To keep the temperature constant, the system will need to absorb an amount of heat QH from the surroundings

  • Adiabatic expansion BC. The system is now isolated, so no heat is absorbed. But the gas is allowed to continue to expand. As it does so, both the pressure and temperature will decrease.

  • Isothermal contraction CD at constant temperature TC. We now start to restore the system to its original state. We do work on the system by compressing the gas. If we were to squeeze an isolated system, the temperature would rise. But we keep the system at fixed temperature, so it dumps heat QC into its surroundings.

  • Adiabatic contraction DA. We isolate the gas from its surroundings and continue to squeeze. Now the pressure and temperature both increase. We finally reach our starting point when the gas is again at temperature TH.

At the end of the four steps, the system has returned to its original state. The net heat absorbed is QH-QC which must be equal to the work performed by the system W. We define the efficiency η of an engine to be the ratio of the work done to the heat absorbed from the hot reservoir,

η=WQH=QH-QCQH=1-QCQH

Ideally, we would like to take all the heat QH and convert it to work. Such an engine would have efficiency η=1 but would be in violation of Kelvin’s statement of the second law. We can see the problem in the Carnot cycle: we have to deposit some amount of heat QC back to the cold reservoir as we return to the original state. And the following result says that the Carnot cycle is the best we can do:

Carnot’s Theorem: Carnot is the best. Or, more precisely: Of all engines operating between two heat reservoirs, a reversible engine is the most efficient. As a simple corollary, all reversible engines have the same efficiency which depends only on the temperatures of the reservoirs η(TH,TC).

Figure 29:

Proof: Let’s consider a second engine — call it Ivor — operating between the same two temperatures TH and TC. Ivor also performs work W but, in contrast to Carnot, is not reversible. Suppose that Ivor absorbs QH from the hot reservoir and deposits QC into the cold. Then we can couple Ivor to our original Carnot engine set to reverse.

The work W performed by Ivor now goes into driving Carnot. The net effect of the two engines is to extract QH-QH from the hot reservoir and, by conservation of energy, to deposit the same amount QC-QC=QH-QH into the cold. But Clausius’s statement tells us that we must have QHQH; if this were not true, energy would be moved from the colder to hotter body. Performing a little bit of algebra then gives

QC-QH=QC-QH      ηIvor=1-QCQH=QH-QCQHQH-QCQH=ηCarnot

The upshot of this argument is the result that we wanted, namely

ηCarnotηIvor

The corollary is now simple to prove. Suppose that Ivor was reversible after all. Then we could use the same argument above to prove that ηIvorηCarnot, so it must be true that ηIvor=ηCarnot if Ivor is reversible. This means that for all reversible engines operating between TH and TC have the same efficiency. Or, said another way, the ratio QH/QC is the same for all reversible engines. Moreover, this efficiency must be a function only of the temperatures, ηCarnot=η(TH,TC), simply because they are the only variables in the game. .

4.3.2 Thermodynamic Temperature Scale and the Ideal Gas

Recall that the zeroth law of thermodynamics showed that there was a function of state, which we call temperature, defined so that it takes the same value for any two systems in equilibrium. But at the time there was no canonical way to decide between different definitions of temperature: θ(p,V) or θ(p,V) or any other function are all equally good choices. In the end we were forced to pick a reference system — the ideal gas — as a benchmark to define temperature. This was a fairly arbitrary choice. We can now do better.

Since the efficiency of a Carnot engine depends only on the temperatures TH and TC, we can use this to define a temperature scale that is independent of any specific material. (Although, as we shall see, the resulting temperature scale turns out to be equivalent to the ideal gas temperature). Let’s now briefly explain how we can define a temperature through the Carnot cycle.

The key idea is to consider two Carnot engines. The first operates between two temperature reservoirs T1>T2; the second engine operates between two reservoirs T2>T3. If the first engine extracts heat Q1 then it must dump heat Q2 given by

Q2=Q1(1-η(T1,T2))

where the arguments above tell us that η=ηCarnot is a function only of T1 and T2. If the second engine now takes this same heat Q2, it must dump heat Q3 into the reservoir at temperature T3, given by

Q3=Q2(1-η(T2,T3))=Q1(1-η(T1,T2))(1-η(T2,T3))

But we can also consider both engines working together as a Carnot engine in its own right, operating between reservoirs T1 and T3. Such an engine extracts heat Q1, dumps heat Q3 and has efficiency η(T1,T3), so that

Q3=Q1(1-η(T1,T3))

Combining these two results tells us that the efficiency must be a function which obeys the equation

1-η(T1,T3)=(1-η(T1,T2))(1-η(T2,T3))

The fact that T2 has to cancel out on the right-hand side is enough to tell us that

1-η(T1,T2)=f(T2)f(T1)

for some function f(T). At this point, we can use the ambiguity in the definition of temperature to simply pick a nice function, namely f(T)=T. Hence, we define the thermodynamic temperature to be such that the efficiency is given by

η=1-T2T1 (4.158)

The Carnot Cycle for an Ideal Gas

We now have two ways to specify temperature. The first arises from looking at the equation of state of a specific, albeit simple, system: the ideal gas. Here temperature is defined to be T=pV/NkB. The second definition of temperature uses the concept of Carnot cycles. We will now show that, happily, these two definitions are equivalent by explicitly computing the efficiency of a Carnot engine for the ideal gas.

We deal first with the isothermal changes of the ideal gas. We know that the energy in the gas depends only on the temperature99 9 A confession: strictly speaking, I’m using some illegal information in the above argument. The result E=32NkBT came from statistical mechanics and if we’re really pretending to be Victorian scientists we should discuss the efficiency of the Carnot cycle without this knowledge. Of course, we could just measure the heat capacity CV=E/T|V to determine E(T) experimentally and proceed. Alternatively, and more mathematically, we could note that it’s not necessary to use this exact form of the energy to carry through the argument: we need only use the fact that the energy is a function of temperature only: E=E(T). The isothermal parts of the Carnot cycle are trivially the same and we reproduce (4.160) and (4.161). The adiabatic parts cannot be solved exactly without knowledge of E(T) but you can still show that VA/VB=VD/VC which is all we need to derive the efficiency (4.162).,

E=32NkBT (4.159)

So dT=0 means that dE=0. The first law then tells us that -dQ=--dW. For the motion along the line AB in the Carnot cycle, we have

QH=AB-dQ=-AB-dW=ABp𝑑V=ABNkBTHV𝑑V=NkBTHlog(VBVA) (4.160)

Similarly, the heat given up along the line CD in the Carnot cycle is

QC=-NkBTClog(VDVC) (4.161)

Next we turn to the adiabatic change in the Carnot cycle. Since the system is isolated, -dQ=0 and all work goes into the energy, dE=-pdV. Meanwhile, from (4.159), we can write the change of energy as dE=CVdT where CV=32NkB, so

CVdT=-NkBTVdV     dTT=-(NkBCV)dVV

After integrating, we have

TV2/3=constant

Applied to the line BC and DA in the Carnot cycle, this gives

THVB2/3=TCVC2/3   ,TCVD2/3=THVA2/3

which tells us that VA/VB=VD/VC. But this means that the factors of log(V/V) cancel when we take the ratio of heats. The efficiency of a Carnot engine for an ideal gas — and hence for any system — is given by

ηcarnot=1-QCQH=1-TCTH (4.162)

We see that the efficiency using the ideal gas temperature coincides with our thermodynamic temperature (4.158) as advertised.

4.3.3 Entropy

Figure 30:

The discussion above was restricted to Carnot cycles: reversible cycles operating between two temperatures. The second law tells us that we can’t turn all the extracted heat into work. We have to give some back. To generalize, let’s change notation slightly so that Q always denotes the energy absorbed by the system. If the system releases heat, then Q is negative. In terms of our previous notation, Q1=QH and Q2=-QC. Similarly, T1=TH and T2=TC. Then, for all Carnot cycles

i=12QiTi=0

Now consider the reversible cycle shown in the figure in which we cut the corner of the original cycle. From the original Carnot cycle ABCD, we know that

QABTH+QCDTC=0

Meanwhile, we can view the square EBGF as a mini-Carnot cycle so we also have

QGFTFG+QEBTH=0

What if we now run along the cycle AEFGCD? Clearly QAB=QAE+QEB. But we also know that the heat absorbed along the segment FG is equal to that dumped along the segment GF when we ran the mini-Carnot cycle. This follows simply because we’re taking the same path but in the opposite direction and tells us that QFG=-QGF. Combining these results with the two equations above gives us

QAETH+QFGTFG+QCDTC=0

By cutting more and more corners, we can consider any reversible cycle as constructed of (infinitesimally) small isothermal and adiabatic segments. Summing up all contributions Q/T along the path, we learn that the total heat absorbed in any reversible cycle must obey

-dQT=0
Figure 31:

But this is a very powerful statement. It means that if we reversibly change our system from state A to state B, then the quantity AB-dQ/T is independent of the path taken. Either of the two paths shown in the figure will give the same result:

PathI-dQT=PathII-dQT

Given some reference state O, this allows us to define a new function of state. It is called entropy, S

S(A)=0A-dQT (4.163)

Entropy depends only on the state of the system: S=S(p,V). It does not depend on the path we took to get to the state. We don’t even have to take a reversible path: as long as the system is in equilibrium, it has a well defined entropy (at least relative to some reference state).

We have made no mention of microstates in defining the entropy. Yet it is clearly the same quantity that we met in Section 1. From (4.163), we can write dS=-dQ/T, so that the first law of thermodynamics (4.157) is written in the form of (1.16)

dE=TdS-pdV (4.164)

Irreversibility

What can we say about paths that are not reversible? By Carnot’s theorem, we know that an irreversible engine that operates between two temperatures TH and TC is less efficient than the Carnot cycle. We use the same notation as in the proof of Carnot’s theorem; the Carnot engine extracts heat QH and dumps heat QC; the irreversible engine extracts heat QH and dumps QC. Both do the same amount of work W=QH-QC=QH-QC. We can then write

QHTH-QCTC = QHTH-QCTC+(QH-QH)(1TH-1TC)
= (QH-QH)(1TH-1TC)0

In the second line, we used QH/TH=QC/TC for a Carnot cycle, and to derive the inequality we used the result of Carnot’s theorem, namely QHQH (together with the fact that TH>TC).

The above result holds for any engine operating between two temperatures. But by the same method of cutting corners off a Carnot cycle that we used above, we can easily generalise the statement to any path, reversible or irreversible. Putting the minus signs back in so that heat dumped has the opposite sign to heat absorbed, we arrive at a result is known as the Clausius inequality,

-dQT0
Figure 32:

We can express this in slightly more familiar form. Suppose that we have two possible paths between states A and B as shown in the figure. Path I is irreversible while path II is reversible. Then Clausius’s inequality tells us that

-dQT=I-dQT-II-dQT0 (4.165)
 I-dQTS(B)-S(A)

Suppose further that path I is adiabatic, meaning that it is isolated from the environment. Then -dQ=0 and we learn that the entropy of any isolated system never decreases,

S(B)S(A) (4.166)

Moreover, if an adiabatic process is reversible, then the resulting two states have equal entropy.

The second law, as expressed in (4.166), is responsible for the observed arrow of time in the macroscopic world. Isolated systems can only evolve to states of equal or higher entropy. This coincides with the statement of the second law that we saw back in Section 1.2.1 using Boltzmann’s definition of the entropy.

4.3.4 Adiabatic Surfaces

The primary consequence of the second law is that there exists a new function of state, entropy. Surfaces of constant entropy are called adiabatic surfaces. The states that sit on a given adiabatic surface can all be reached by performing work on the system while forbidding any heat to enter or leave. In other words, they are the states that can be reached by adiabatic processes with -dQ=0 which is equivalent to dS=0.

In fact, for the simplest systems such as the ideal gas which require only two variables p and V to specify the state, we do not need the second law to infer to the existence of an adiabatic surface. In that case, the adiabatic surface is really an adiabatic line in the two-dimensional space of states. The existence of this line follows immediately from the first law. To see this, we write the change of energy for an adiabatic process using (4.157) with -dQ=0,

dE+pdV=0 (4.167)

Let’s view the energy itself as a function of p and V so that we can write

dE=EpdP+EVdV

Then the condition for an adiabatic process (4.167) becomes

Epdp+(EV+p)dV=0

Which tells us the slope of the adiabatic line is given by

dpdV=-(EV+p)(Ep)-1 (4.168)

The upshot of this calculation is that if we sit in a state specified by (p,V) and transfer work but no heat to the system then we necessarily move along a line in the space of states determined by (4.168). If we want to move off this line, then we have to add heat to the system.

However, the analysis above does not carry over to more complicated systems where more than two variables are needed to specify the state. Suppose that the state of the system is specified by three variables. The first law of thermodynamics is now gains an extra term, reflecting the fact that there are more ways to add energy to the system,

dE=-dQ-pdV-ydX

We’ve already seen examples of this with y=-μ, the chemical potential, and X=N, the particle number. Another very common example is y=-M, the magnetization, and X=H, the applied magnetic field. For our purposes, it won’t matter what variables y and X are: just that they exist. We need to choose three variables to specify the state. Any three will do, but we will choose p, V and X and view the energy as a function of these: E=E(p,V,X). An adiabatic process now requires

dE+pdV+ydX=0      Epdp+(EV+p)dV+(EX+y)dX=0 (4.169)

But this equation does not necessarily specify a surface in 𝐑3. To see that this is not sufficient, we can look at some simple examples. Consider 𝐑3, parameterised by z1, z2 and z3. If we move in an infinitesimal direction satisfying

z1dz1+z2dz2+z3dz3=0

then it is simple to see that we can integrate this equation to learn that we are moving on the surface of a sphere,

z12+z22+z32=constant

In contrast, if we move in an infinitesimal direction satisfying the condition

z2dz1+dz2+dz3=0 (4.170)

Then there is no associated surface on which we’re moving. Indeed, you can convince yourself that if you move in a such a way as to always obey (4.170) then you can reach any point in 𝐑3 from any other point.

In general, an infinitesimal motion in the direction

Z1dz1+Z2dz2+Z3dz3=0

has the interpretation of motion on a surface only if the functions Zi obey the condition

Z1(Z2z3-Z3z2)+Z2(Z3z1-Z1z3)+Z3(Z1z2-Z2z1)=0 (4.171)

So for systems with three or more variables, the existence of an adiabatic surface is not guaranteed by the first law alone. We need the second law. This ensures the existence of a function of state S such that adiabatic processes move along surfaces of constant S. In other words, the second law tells us that (4.169) satisfies (4.171).

In fact, there is a more direct way to infer the existence of adiabatic surfaces which uses the second law but doesn’t need the whole rigmarole of Carnot cycles. We will again work with a system that is specified by three variables, although the argument will hold for any number. But we choose our three variables to be V, X and the internal energy E. We start in state A shown in the figure. We will show that Kelvin’s statement of the second law implies that it is not possible to reach both states B and C through reversible adiabatic processes. The key feature of these states is that they have the same values of V and X and differ only in their energy E.

Figure 33:

To prove this statement, suppose the converse: i.e. we can indeed reach both B and C from A through means of reversible adiabatic processes. Then we can start at A and move to B. Since the energy is lowered, the system performs work along this path but, because the path is adiabatic, no heat is exchanged. Now let’s move from B to C. Because dV=dX=0 on this trajectory, we do no work but the internal energy E changes so the system must absorb heat Q from the surroundings. Now finally we do work on the system to move from C back to A. However, unlike in the Carnot cycle, we don’t return any heat to the environment on this return journey because, by assumption, this second path is also adiabatic. The net result is that we have extracted heat Q and employed this to undertake work W=Q. This is in contradiction with Kelvin’s statement of the second law.

The upshot of this argument is that the space of states can be foliated by adiabatic surfaces such that each vertical line at constant V and X intersects the surface only once. We can describe these surfaces by some function S(E,V,X)=constant. This function is the entropy.

The above argument shows that Kelvin’s statement of the second law implies the existence of adiabatic surfaces. One may wonder if we can run the argument the other way around and use the existence of adiabatic surfaces as the basis of the second law, dispensing with the Kelvin and Clausius postulates all together. In fact, we can almost do this. From the discussion above it should already be clear that the existence of adiabatic surfaces implies that the addition of heat is proportional to the change in entropy -dQdS. However, it remains to show that the integrating factor, relating the two, is temperature so -dQ=TdS. This can be done by returning to the zeroth law of thermodynamics. A fairly simple description of the argument can be found at the end of Chapter 4 of Pippard’s book. This motivates a mathematically concise statement of the second law due to Carathéodory.

Second Law à la Carathéodory: Adiabatic surfaces exist. Or, more poetically: if you want to be able to return, there are places you cannot go through work alone. Sometimes you need a little heat.

What this statement is lacking is perhaps the most important aspect of the second law: an arrow of time. But this is easily remedied by providing one additional piece of information telling us which side of a surface can be reached by irreversible processes. To one side of the surface lies the future, to the other the past.

4.3.5 A History of Thermodynamics

The history of heat and thermodynamics is long and complicated, involving wrong turns, insights from disparate areas of study such as engineering and medicine, and many interesting characters, more than one of which find reason to change their name at some point in the story1010 10 A longer description of the history of heat can be found in Michael Fowler’s lectures from the University of Virginia: http://galileo.phys.virginia.edu/classes/152.mf1i.spring02/HeatIndex.htm.

Although ideas of “heat” date back to pre-history, a good modern starting point is the 1787 caloric theory of Lavoisier. This postulates that heat is a conserved fluid which has a tendency to repel itself, thereby flowing from hot bodies to cold bodies. It was, for its time, an excellent theory, explaining many of the observed features of heat. Of course, it was also wrong.

Lavoisier’s theory was still prominent 30 years later when the French engineer Sadi Carnot undertook the analysis of steam engines that we saw above. Carnot understood all of his processes in terms of caloric. He was inspired by mechanics of waterwheels and saw the flow of caloric from hot to cold bodies as analogous to the fall of water from high to low. This work was subsequently extended and formalised in a more mathematical framework by another French physicist, Émile Clapeyron. By the 1840s, the properties of heat were viewed by nearly everyone through the eyes of Carnot-Clapeyron caloric theory.

Yet the first cracks in caloric theory has already appeared before the turn of 19th century due to the work of Benjamin Thompson. Born in the English colony of Massachusetts, Thompson’s CV includes turns as mercenary, scientist and humanitarian. He is the inventor of thermal underwear and pioneer of the soup kitchen for the poor. By the late 1700s, Thompson was living in Munich under the glorious name “Count Rumford of the Holy Roman Empire” where he was charged with overseeing artillery for the Prussian Army. But his mind was on loftier matters. When boring cannons, Rumford was taken aback by the amount of heat produced by friction. According to Lavoisier’s theory, this heat should be thought of as caloric fluid squeezed from the brass cannon. Yet is seemed inexhaustible: when a cannon was bored a second time, there was no loss in its ability to produce heat. Thompson/Rumford suggested that the cause of heat could not be a conserved caloric. Instead he attributed heat correctly, but rather cryptically, to “motion”.

Having put a big dent in Lavoisier’s theory, Rumford rubbed salt in the wound by marrying his widow. Although, in fairness, Lavoisier was beyond caring by this point. Rumford was later knighted by Britain, reverting to Sir Benjamin Thompson, where he founded the Royal Institution.

The journey from Thompson’s observation to an understanding of the first law of thermodynamics was a long one. Two people in particular take the credit.

In Manchester, England, James Joule undertook a series of extraordinarily precise experiments. He showed how different kinds of work — whether mechanical or electrical – could be used to heat water. Importantly, the amount by which the temperature was raised depended only on the amount of work, not the manner in which it was applied. His 1843 paper “The Mechanical Equivalent of Heat” provided compelling quantitative evidence that work could be readily converted into heat.

But Joule was apparently not the first. A year earlier, in 1842, the German physician Julius von Mayer came to the same conclusion through a very different avenue of investigation: blood letting. Working on a ship in the Dutch East Indies, Mayer noticed that the blood in sailors veins was redder in Germany. He surmised that this was because the body needed to burn less fuel to keep warm. Not only did he essentially figure out how the process of oxidation is responsible for supplying the body’s energy but, remarkably, he was able to push this to an understanding of how work and heat are related. Despite limited physics training, he used his intuition, together with known experimental values of the heat capacities Cp and CV of gases, to determine essentially the same result as Joule had found through more direct means.

The results of Thompson, Mayer and Joule were synthesised in an 1847 paper by Hermann von Helmholtz, who is generally credited as the first to give a precise formulation of the first law of thermodynamics. (Although a guy from Swansea called William Grove has a fairly good, albeit somewhat muddled, claim from a few years earlier). It’s worth stressing the historical importance of the first law: this was the first time that the conservation of energy was elevated to a key idea in physics. Although it had been known for centuries that quantities such as “12mv2+V” were conserved in certain mechanical problems, this was often viewed as a mathematical curiosity rather than a deep principle of Nature. The reason, of course, is that friction is important in most processes and energy does not appear to be conserved. The realisation that there is a close connection between energy, work and heat changed this. However, it would still take more than half a century before Emmy Noether explained the true reason behind the conservation of energy.

With Helmholtz, the first law was essentially nailed. The second remained. This took another two decades, with the pieces put together by a number of people, notably William Thomson and Rudolph Clausius.

William Thomson was born in Belfast but moved to Glasgow at the age of 10. He came to Cambridge to study, but soon returned to Glasgow and stayed there for the rest of his life. After his work as a scientist, he gained fame as an engineer, heavily involved in laying the first trans-atlantic cables. For this he was made Lord Kelvin, the name chosen for the River Kelvin which flows nearby Glasgow University. He was the first to understand the importance of absolute zero and to define the thermodynamic temperature scale which now bears his favourite river’s name. We presented Kelvin’s statement of the second law of thermodynamics earlier in this Section.

In Germany, Rudolph Clausius was developing the same ideas as Kelvin. But he managed to go further and, in 1865, presented the subtle thermodynamic argument for the existence of entropy that we saw in Section 4.3.3. Modestly, Clausius introduced the unit “Clausius” (symbol Cl) for entropy. It didn’t catch on.

4.4 Thermodynamic Potentials: Free Energies and Enthalpy

We now have quite a collection of thermodynamic variables. The state of the system is dictated by pressure p and volume V. From these, we can define temperature T, energy E and entropy S. We can also mix and match. The state of the system can just as well be labelled by T and V; or E and V; or T and p; or V and S

While we’re at liberty to pick any variables we like, certain quantities are more naturally expressed in terms of some variables instead of others. We’ve already seen examples both in Section 1 and in this section. If we’re talking about the energy E, it is best to label the state in terms of S and V, so E=E(S,V). In these variables the first law has the nice form (4.164).

Equivalently, inverting this statement, the entropy should be thought of as a function of E and V, so S=S(E,V). It is not just mathematical niceties underlying this: it has physical meaning too for, as we’ve seen above, at fixed energy the second law tells us that entropy can never decrease.

What is the natural object to consider at constant temperature T, rather than constant energy? In fact we already answered this way back in Section 1.3 where we argued that one should minimise the Helmholtz free energy,

F=E-TS

The arguments that we made back in Section 1.3 were based on a microscopic viewpoint of entropy. But, with our thermodynamic understanding of the second law, we can easily now repeat the argument without mention of probability distributions. We consider our system in contact with a heat reservoir such that the total energy, Etotal of the combined system and reservoir is fixed. The combined entropy is then,

Stotal(Etotal) = SR(Etotal-E)+S(E)
SR(Etotal)-SREtotalE+S(E)
= SR(Etotal)-FT

The total entropy can never decrease; the free energy of the system can never increase.

One interesting situation that we will meet in the next section is a system which, at fixed temperature and volume, has two different equilibrium states. Which does it choose? The answer is the one that has lower free energy, for random thermal fluctuations will tend to take us to this state, but very rarely bring us back.

We already mentioned in Section 1.3 that the free energy is a Legendre transformation of the energy; it is most naturally thought of as a function of T and V, which is reflected in the infinitesimal variation,

dF=-SdT-pdV      FT|V=-S,FV|T=-p (4.172)

We can now also explain what’s free about this energy. Consider taking a system along a reversible isotherm, from state A to state B. Because the temperature is constant, the change in free energy is dF=-pdV, so

F(B)-F(A)=-ABp𝑑V=-W

where W is the work done by the system. The free energy is a measure of the amount of energy free to do work at finite temperature.

Gibbs Free Energy

We can also consider systems that don’t live at fixed volume, but instead at fixed pressure. To do this, we will once again imagine the system in contact with a reservoir at temperature T. The volume of each can fluctuate, but the total volume Vtotal of the combined system and reservoir is fixed. The total entropy is

Stotal(Etotal,Vtotal) = SR(Etotal-E,Vtotal-V)+S(E,V)
SR(Etotal,Vtotal)-SREtotalE-SRVtotalV+S(E,V)
= SR(Vtotal)-E+pV-TST

At fixed temperature and pressure we should minimise the Gibbs Free Energy,

G=F+pV=E+pV-TS (4.173)

This is a Legendre transform of F, this time swapping volume for pressure: G=G(T,p). The infinitesimal variation is

dG=-SdT+Vdp

In our discussion we have ignored the particle number N. Yet both F and G implicitly depend on N (as you may check by re-examining the many examples of F that we computed earlier in the course). If we also consider changes dN then each variations gets the additional term μdN, so

dF=-SdT-pdV+μdN   and   dG=-SdT+Vdp+μdN (4.174)

While F can have an arbitrarily complicated dependence on N, the Gibbs free energy G has a very simple dependence. To see this, we simply need to look at the extensive properties of the different variables and make the same kind of argument that we’ve already seen in Section 1.4.1. From its definition (4.173), we see that the Gibbs free energy G is extensive. It a function of p, T and N, of which only N is extensive. Therefore,

G(p,T,N)=μ(p,T)N (4.175)

where the fact that the proportionality coefficient is μ follows from variation (4.174) which tells us that G/N=μ.

The Gibbs free energy is frequently used by chemists, for whom reactions usually take place at constant pressure rather than constant volume. (When a chemist talks about “free energy”, they usually mean G. For a physicist, “free energy” usually means F). We’ll make use of the result (4.175) in the next section when we discuss first order phase transitions.

4.4.1 Enthalpy

There is one final combination that we can consider: systems at fixed energy and pressure. Such systems are governed by the enthalpy,

H=E+pV      dH=TdS+Vdp

The four objects E, F, G and H are sometimes referred to as thermodynamic potentials.

4.4.2 Maxwell’s Relations

Each of the thermodynamic potentials has an interesting present for us. Let’s start by considering the energy. Like any function of state, it can be viewed as a function of any of the other two variables which specify the system. However, the first law of thermodynamics (4.164) suggests that it is most natural to view energy as a function of entropy and volume: E=E(S,V). This has the advantage that the partial derivatives are familiar quantities,

ES|V=T   ,EV|S=-p

We saw both of these results in Section 1. It is also interesting to look at the double mixed partial derivative, 2E/SV=2E/VS. This gives the relation

TV|S=-pS|V (4.176)

This result is mathematically trivial. Yet physically it is far from obvious. It is the first of four such identities, known as the Maxwell Relations.

The other Maxwell relations are derived by playing the same game with F, G and H. From the properties (4.172), we see that taking mixed partial derivatives of the free energy gives us,

SV|T=pT|V (4.177)

The Gibbs free energy gives us

Sp|T=-VT|p (4.178)

While the enthalpy gives

Tp|S=VS|p (4.179)

The four Maxwell relations (4.176), (4.177), (4.178) and (4.179) are remarkable in that they are mathematical identities that hold for any system. They are particularly useful because they relate quantities which are directly measurable with those which are less easy to determine experimentally, such as entropy.

It is not too difficult to remember the Maxwell relations. Cross-multiplication always yields terms in pairs: TS and pV, which follows essentially on dimensional grounds. The four relations are simply the four ways to construct such equations. The only tricky part is to figure out the minus signs.

Heat Capacities Revisted

By taking further derivatives of the Maxwell relations, we can derive yet more equations which involve more immediate quantities. You will be asked to prove a number of these on the examples sheet, including results for the heat capacity at constant volume, CV=TS/T|V, as well as the heat capacity at capacity at constant pressure Cp=TS/T|p. Useful results include,

CVV|T=T2pT2|V   ,Cpp|T=-T2VT2|p

You will also prove a relationship between these two heat capacities,

Cp-CV=TVT|ppT|V

This last expression has a simple consequence. Consider, for example, an ideal gas obeying pV=NkBT. Evaluating the right-hand side gives us

Cp-Cv=NkB

There is an intuitive reason why Cp is greater than CV. At constant volume, if you dump heat into a system then it all goes into increasing the temperature. However, at constant pressure some of this energy will cause the system to expand, thereby doing work. This leaves less energy to raise the temperature, ensuring that Cp>CV.

4.5 The Third Law

The second law only talks about entropy differences. We can see this in (4.163) where the entropy is defined with respect to some reference state. The third law, sometimes called Nernst’s postulate, provides an absolute scale for the entropy. It is usually taken to be

limT0S(T)=0

In fact we can relax this slightly to allow a finite entropy, but vanishing entropy density S/N. We know from the Boltzmann definition that, at T=0, the entropy is simply the logarithm of the degeneracy of the ground state of the system. The third law really requires S/N0 as T0 and N. This then says that the ground state entropy shouldn’t grow extensively with N.

The third law doesn’t quite have the same teeth as its predecessors. Each of the first three laws provided us with a new function of state of the system: the zeroth law gave us temperature; the first law energy; and the second law entropy. There is no such reward from the third law.

One immediate consequence of the third law is that heat capacities must also tend to zero as T0. This follows from the equation (1.10)

S(B)-S(A)=AB𝑑TCVT

If the entropy at zero temperature is finite then the integral must converge which tells us that CVTn for some n1 or faster. Looking back at the various examples of heat capacities, we can check that this is always true. (The case of a degenerate Fermi gas is right on the borderline with n=1). However, in each case the fact that the heat capacity vanishes is due to quantum effects freezing out degrees of freedom. In contrast, when we restrict to the classical physics, we typically find constant heat capacities such as the classical ideal gas (2.58) or the Dulong-Petit law (3.104). These would both violate the third law. In that sense, the third law is an admission that the low temperature world is not classical. It is quantum.

Thinking about things quantum mechanically, it is very easy to see why the third law holds. A system that violates the third law would have a very large – indeed, an extensive – number of ground states. But large degeneracies do not occur naturally in quantum mechanics. Moreover, even if you tune the parameters of a Hamiltonian so that there are a large number of ground states, then any small perturbation will lift the degeneracy, introducing an energy splitting between the states. From this perspective, the third law is a simple a consequence of the properties of the eigenvalue problem for large matrices.