Second Year Thermodynamics M. Coppins

1.1 Basic Concepts 1.1.1 Jargon Microscopic: on the atomic scale; involving very few or single particles (atoms, molecules, electrons, etc). Macroscopic: on the everyday scale or larger; involving very large numbers of particles. Thermodynamics is a macrocscopic theory. System: thing whose properties we are interested in, e.g., in container. Surroundings: things outside the system; can interact with system. System + surroundings often called “the universe” in thermodynamics text books. Isolated system: amount of matter and total of system is fixed, e.g., gas in closed rigid, thermally insulating container. Closed system: amount of matter in system is fixed, but energy can enter or leave system, e.g., gas in closed rigid container with walls which conduct heat. Energy can enter as heat ⇒ P (= ) increases. Open system: matter and energy can enter and leave it, e.g., gas in open container. If heated P stays constant (e.g., 1 atm) but number of molecules in container decreases.

1.1.2 Equilibrium = state which things settle into if left alone. In equilibrium the macroscopic properties don’t change with time. Even when macroscopic properties have settled into their equilibrium values the microscopic properties (e.g., velocity of a given molecule) are not constant.

• Could have mixture with several chemically different components. Ni = number of molecules of component i. Chemical reactions ⇒ Ni’s change. Eventually chemical reac- tions stop, and the system settles into chemical equilibrium: Ni’s are constant.

• Could have unbalanced forces, e.g., push piston into a container of gas → V (= volume) gets smaller. Eventually settles into mechanical equilibrium: V is constant.

• Could put system into thermal contact with something at different T (= ). Eventually settles into thermal equilibrium: T is constant.

Chemical + mechanical + thermal = thermodynamic equilibrium. 1.1.3 State variables In equilibrium macroscopic properties are • constant in time (if left alone), • uniform in space (if no external force field present1). If an external force field is acting the macroscopic properties can vary spatially, e.g., in an isothermal atmosphere (→ 1st Year SoM course, Lecture 5) the density falls with height due to gravity. State variable = a macroscopic property of a system in equilibrium (e.g., for a gas the state variables include: P , V , T , N = number of molecules). Extensive state variables are proportional to the amount of material. Intensive state variables are independent of amount of material. Combine 2 identical volumes of gas.

Produces a volume of gas with 2N, 2V , P , T , i.e., N and V double (extensive), but P and T are unchanged (intensive). Specific value: extensive variable per unit mass. Denoted with lower case letters. Chemists use “moles” instead of kilograms. 1 mole is amount of stuff that contains as many particles as there are atoms in 12 g of 12C. Chemists’ specific values are therefore “molar” values. We won’t use moles in the Thermodynamics course.

The most familiar state variables are P , V , N, and T . There are many others, e.g., U = , β = thermal expansion coefficient.

1.1.4 Equation of state ...is a relationship between state variables (usually P , V , N, and T ). It might be derived theoretically or found experimentally.

: PV = NkBT (1.1.4.1) −23 −1 (where kB = Boltzmann’s constant = 1.38 × 10 JK ).

Chemists write the ideal gas equation of state in terms of moles: PV = NmRT , where Nm = the number of moles and R is the “universal gas constant”.

• Van der Waals gas: N 2 P + a (V − Nb) = NkBT (1.1.4.2)  V 2  (where a and b are constants; → 1st Year SoM course, Lecture 9)

1This will assumed throughout the Thermodynamics course Thermodynamics applies to other macroscopic systems than , in which case the state variables P and V can be replaced with other more appropriate variables, e.g.,

• Stretched metal wire: In this case P is replaced with J = tension, and V is replaced with L = length.

Under certain conditions the equation of state has the form: J L = L0 1 + + α(T − T0) (1.1.4.3)  YA 

where Y = Young’s modulus, A = cross-sectional area, α = coefficient of linear expansion, T0 = reference temperature, and L0 = length when T = T0 and J = 0.

1.1.5 Independent state variables Of the four state variables P , V , N, and T , we can specify any three; the equation of state then gives the value of the fourth one, e.g., ideal gas with P = 1.01 × 105 Pa (1 atm), N = 1025 molecules, T = 298 K → V = 0.41 m3 In thermodynamics we are usually interested in what happens when things change, e.g., change volume by ∆V , what is ∆T ? How many state variables can we vary independently?

(1) Closed system: N = given constant. Can vary 2 of P , V , T , → equation of state gives 3rd one. Equation of State defines PVT surface, e.g. ideal gas

Any point on this surface represents an equilibrium.

Real substances have more complicated PVT surface, e.g., [Picture from University Physics (9th edition) by Young and Freedman.]

(2) Open system: N = can change → 3 independent state variables.

(3) N fixed, but two different phases (e.g., solid and liquid).

Phase diagram is the projection of the PVT surface on the PT plane (→ 1st Year SoM course, Lecture 4).

Two phases can only coexist in equilibrium along the lines on this diagram → extra constraint → only 1 independent state variable. [We consider the situation of two coexisting phases in detail in Lecture 3.5.]

(4) Several chemically distinct components present ⇒ more independent state variables → chemistry.

Most of the Thermodynamics course (Lectures 1.2 – 3.3) deals with a single component, single phase, closed system → 2 independent state variables. We will mostly concentrate on a fixed mass of gas in a container, partly because this par- ticular system is intrinsically important, and partly because it is easy to visualize what is happening. Remember, however, that thermodynamics doesn’t just apply to gases, but also to other macroscopic systems. Second Year Thermodynamics M. Coppins

1.2 T , U, S 1.2.1 Definitions The most important state variables in thermodynamics are: • T = temperature, • U = interal energy, • S = . Like other state variables (e.g., P ) these are measurable macroscopic properties of things in equilibrium. T is in the equation of state (→ Lecture 1.1). U and S can be found from the other state variables.

In thermodynamics we are usually concerned with changes in things, e.g., ∆T = Tfinal −Tinit. First law deals with ∆U (→ Lecture 1.4). Second law deals with ∆S (→ Lecture 2.3). Although thermodynamics is a macroscopic theory, this lecture will include a brief and very superficial look at T , U and S from a microscopic viewpoint. The microscopic theory will be covered in detail next term in the Statistical Physics course.

1.2.2 Temperature

Microscopic view: T describes how particles of a system are distributed with respect to energy. Boltzmann law (→ 1st Year SoM course, Lecture 5): probability of particle having energy close to E, in −βE equilibrium, is proportional to e , where β = 1/kBT . From a theoretical point of view it would be better to replace the state variable T with β, but we are too used to temperature in everyday life. Example: gas molecules in Maxwell-Boltzmann velocity distribution function

1/2 2 m mvx f(vx) = exp − . 2πkBT   2kBT 

The probability that the x component of any given molecule’s velocity is between vx and vx +dvx is f(vx)dvx.

Increase T ⇒ particles spread out more with respect to energy. We always use absolute . If β was used instead of T then absolute zero would correspond to β = ∞. Looked at this way the inaccessibility of absolute zero seems very natural. Macroscopic view: Two systems are in thermal equilibrium if they have the same T . T is sometimes approximately constant during some process. The theoretical idealization of this is an isothermal process, in which T is kept constant by placing the system in contact with a heat reservoir (i.e., an object so large that heat flow in or out of it does not change its temperature). Example: isothermal compression.

Tgas stays equal to Tres during the compression because heat flows from the the gas into the reservoir.

1.2.3 Internal energy

Microscopic view: U = total (kinetic + potential) energy of all the particles in the system. Ideal gas: particles do not interact (i.e., no potential energy of interaction) n ⇒ can use theorem of equipartition of energy: U = N d k T 2 B (nd = number of degrees of freedom: → 1st Year SoM course, Lecture 3)

For a fixed mass of ideal gas it can be proved thermodynamically that the internal energy depends only on its temperature (→ Lecture 3.2). Microscopic theory required to obtain the functional form. Equipartition predicts n U = d Nk T (1.2.3.1) 2 B

(nd = constant for give material, e.g., nd = 3 for a monatomic gas). Ideal gas: U = constant ⇔ T = constant. 3 N 2 Van der Waals gas: U = Nk T − a (depends on both T and V ). 2 B V Real gas: U depends on both T and V .

1.2.4 Entropy

Microscopic view: S = kB ln W , where W = number of microstates corresponding to given macrostate. Increasing W ⇒ increasing disorder at microscopic level. Consider a system consting of N gas molecules in a box of volume V . Divide the box into a number of equal sized cells. Microscopic view: we know which cell each individual molecule is in. Macroscopic view: we know how many molecules there are in each cell, but not which ones they are. In this simple model we describe the macrostate by the density in each cell: ρi = number of molecules in cell i/volume of cell. Example: 4 molecules, 2 cells.

Macrostate I: all 4 molecules in cell 1: ρ1 = 4, ρ2 = 0. Only one microstate corresponds to this macrostate (i.e. W = 1).

Macrostate II: 3 molecules in cell 1, 1 molecule in cell 2: ρ1 = 3, ρ2 = 1. There are 4 microstates corresponding to this macrostate (i.e., W = 4).

Macrostate III: 2 molecules in cell 1, 2 molecule in cell 2: ρ1 = 2, ρ2 = 2. There are 6 microstates corresponding to this macrostate (i.e., W = 6). All the microstates are equally probable ⇒ probability of given macrostate occuring ∝ W . We could initialize the system in macrostate I by placing all four molecules in left hand side of box. After the molecules have spread out it is 6× more likely that the system is in macrosate III than back in I. In macrostate III ρ = uniform = N/V , i.e., unlike the other macrostates (in which ρ is non-uniform) this macrostate can be completely specified by the values of the state variables N and V . Real systems have N >> 4 (e.g., 1 mm3 of air at atmospheric pressure contains ∼ 2.7 × 1016 molecules). Macrostate with uniform density is overwhelmingly more probable (much higher W ) than macrostate with highly non-uniform density. If left to itself the system will settle into the macrostate with maximum W . This is equilibrium state (→ Lecture 2.6) Macroscopic view: increasing S ⇒ particles and/or energy become more dispersed. Once things become dispersed it is hard to get them back together again ⇒ increasing S associated with irreversible changes (→ Lecture 2.1). Ideal gas: nd S = S0 + Nk ln T + Nk ln V (1.2.4.1) 2 B B where S0 is a constant (→ Lecture 3.2) S increases if • V increases ⇒ particles spread out more in space. • T increases ⇒ particles spread out more with respect to energy. Place hot and cold objects in thermal contact. • initial state: energy more concentrated in hot object. • final state: thermal equilibrium, same T everywhere, energy more spread out. Everyone is aware of the “energy crisis”, and that we should try to conserve energy. But, of course, energy is conserved. We are not runing out of energy, we are running out of usable energy. The energy in a barrel of oil does not vanish when the oil is burnt, but it becomes very much harder to use because it has been dispersed ⇒ entropy increases. Rather than an energy crisis, it would be more true to say we have an entropy crisis. Second Year Thermodynamics M. Coppins

1.3 Mathematical methods Thermodynamics has a reputation for being a hard subject. There are basically three reasons for this. Thermodynamics is hard, reason 1: It is inherently strange because we don’t use the reductionist world-view. It is quite unlike anything else in physics. We will encounter the other two reasons in this lecture.

1.3.1 Changes in state variables Closed system: N = fixed. But V can vary, and energy can enter or leave. ⇒ U, T , P , S can all change. Example: gas in cylinder with piston. Piston moves out ⇒ ∆V = Vfinal − Vinit > 0. Can we find ∆U, ∆T , ∆P ...? We need to specify 2 independent variables. 5 3 Example: ideal gas, Pinit = 10 Pa, Vinit = 1.0 m , Tinit = 298K (⇒ N = 2.43 × 1025 molecules). Change V and T : ∆V = −1.0 × 10−2 m3, ∆T = +1.0 K. What is ∆P ? 3 Vfinal = 0.99 m , Tfinal = 299 K. 3 Pfinal = NkBTfinal/Vfinal ⇒ ∆P = Pfinal − Pinit = +1.35 × 10 Pa. [We could also calculate the changes in other state variables, e.g., ∆U = +503 J, ∆S = −1.69 J K−1 (→ Problem Sheet 1).]

We started in equilibrium with state variables Pinit, Vinit, Tinit... and ended in equilibrium with state variables Pinit + ∆P , Vinit + ∆V , Tinit + ∆T ... We didn’t specify what caused this change. Given: • initial state variables, and • any 2 of ∆P , ∆V , ∆T , ∆U, ∆S... we can find the final state. Thermodynamics is hard, reason 2: There are usually many different ways of solving a given problem (different choices of the pair of independent state variables). It often difficult to tell which way is best.

1.3.2 Small changes

Reminder of some basic maths: y = y(x) = function of 1 variable. dy Make a small change ∆x in x. Corresponding change in y is: ∆y ≃ ∆x. dx dy Make an infinitesimal change dx in x. Corresponing infinitesimal change in y is: dy = dx. dx If z = z(x, y) is a function of 2 variables then making small changes ∆x and ∆y in x and y results in a small change in z given by ∂z ∂z ∆z ≃ ∆x + ∆y ∂xy ∂y x

∂z where = the partial derivative of z with respect to x, keeping y constant. ∂xy This suggests an alternative approach to find ∆P given ∆T and ∆V .

• Choose T and V as the two independent state variables. ∂P ∂P • We then have: ∆P ≃ ∆T + ∆V . ∂T V ∂V T Nk T ∂P Nk ∂P Nk T • B ⇒ B − B For an ideal gas: P = = , = 2 . V ∂T V V ∂V T V Nk Nk T • Therefore: ∆P ≃ B ∆T − B ∆V . V V 2 • Putting in the values we find ∆P ≃ +1.33 × 103 Pa (∼ 1% error).

This approach is more accurate for smaller changes. In the limit of infinitesimal changes in state variables we have ∂P ∂P dP = dT + dV . ∂T V ∂V T Whatever we choose for our two independent state variables, we can always express the infinitesimal change in some other state variable by an equation like this. We do this a lot in thermodynamics. Thermodynamics is hard, reason 3: Lots of pertial derivatives are involved. This makes it look math- emtically abstruse, although, in fact, once you get used to it the required maths is very straightforward.

1.3.3 Mathematical summary

To do all the manipulations involving partial derivatives in thermodynamics we use just four mathematical results. These are the boxed results below. Given a function z = z(x, y) of two variables:

∂z ∂z dz = dx + dy (1.3.3.1) ∂xy ∂y x

We could rewrite the functional dependence as y = y(x, z) or x = x(y, z). Thus there are 6 ∂z ∂z ∂y ∂y ∂x ∂x possible 1st order partial derivatives: , , , , , . ∂xy ∂y x ∂xz ∂z x ∂y z ∂z y These partial derivatives are related to each other by two identities. The reciprocal rule: ∂x 1 = (1.3.3.2) ∂y z ∂y

∂xz The cyclic rule: ∂x ∂y ∂z = −1 (1.3.3.3) ∂y z ∂z x ∂xy Finally, mixed 2nd derivatives obey:

∂2z ∂2z = (1.3.3.4) ∂x∂y ∂y∂x

∂2z ∂ ∂z where means . ∂x∂y ∂x ∂y xy For the Thermodynamics course you should be familiar with the use of the four boxed relationships, but you don’t need to be able to derive them. For those interested, a non-examinable proof of the reciprocal and cyclic rules is given here. For a function z = z(x, y): ∂z ∂z dz = dx + dy (1.3.3.5) ∂xy ∂y x Rewriting this as y = y(x, z) we have

∂y ∂y dy = dx + dz (1.3.3.6) ∂xz ∂z x Substituting Eq. 1.3.3.6 into Eq. 1.3.3.5 and rearranging we obtain:

∂z ∂z ∂y ∂z ∂y − ( + ) dx + 1 dz = 0 ∂xy ∂y x ∂xz ∂y x ∂z x 

Since dx and dz are independent the coefficients of dx and dz in this equation must both be zero. Setting the coefficient of dz to zero gives the reciprocal rule, and setting the coefficient of dx to zero (and using the reciprocal rule) gives the cyclic rule.

1.3.4 Path independence

If we make successive very small changes dP the total change in P is

∆P = dP Z But if we start in a state A and end in state B

∆P = PB − PA i.e., ∆P is the same for any process between A and B. We say it is path independent. The change of any state variable between two equilibria is path independent. We can re-express the condition for path independence in the following way. If we start in state A and do some process at the end of which we are back in state A then

dP = dP = PA − PA = 0 . ZA→A I For any state variable, e.g. entropy S

dS = 0 (1.3.4.1) I where the integral is round any closed path. If the concept of path independence seems a bit abstract consider the following analogy. Suppose there are various paths (actual paths, which you can walk along) by which we could climb a hill. The sketch shows two of them, starting at point A at the bottom (altitude: hA = 10 m), and ending at point B at the top (altitude: hB = 300 m).

The change in altitude from A to B is path independent:

dh = dh = hB − hA = 290m . ZA→B, path 1 ZA→B, path 2

If we start from A, go up one path and then come back to A along the other one then dh = total change I in altitude for the round trip = 0. But the distance travelled is not path independent.:

dl =6 dl . ZA→B, path 1 ZA→B, path 2

If we start from A, go up one path and then come back to A along the other one then dl = total distance I travelled for the round trip =6 0. h is an intrinsic property of the location, e.g., point B has an altitude h = 300 m. In thermodynamic-speak h is a “state variable” l is not a property of the location (not a “state variable”). dh = very small change in altitude. dl = very small distance (not a change in something). In thermodynamics we have • very small changes in state variables, e.g., dT , dS,... • very small quantities which are not changes in state variables. These are denoted by a crossedd ¯. For instancedQ ¯ = a very small amount of heat going into our system (→ Lecture 1.4). Second Year Thermodynamics M. Coppins

1.4 The first law 1.4.1 Statement of the 1st law ∆U = Q + W (1.4.1.1) where ∆U = change in internal energy, Q = heat into system, W = work done on system. !! Take care !! Some books (e.g., Young and Freedman) define W = work done by system, so the 1st law becomes ∆U = Q − W .

Microscopic view: Q is energy transferred by random particle motion, W is energy transferred by ordered particle motion.

Macroscopically, heat is energy transferred as a result of a temperature difference. Energy conservation is built into the 1st law.

∆U = Ufinal − Uinit is path independent (→ Lecture 1.3). W is path dependent (→ Section 1.4.2). Therefore Q = ∆U − W is also path dependent. An infinitesimal change in the internal energy is given by

dU =dQ ¯ +dW ¯ (1.4.1.2) wheredQ ¯ anddW ¯ are infinitesimal amounts of heat and work. We denote them with ad ¯ because they are not changes in things. They are path dependent. Mathematically, dU, dP , dT , etc are examples of exact or perfect differentials. They are changes in some property (in thermodynamics, changes in state variables). dQ¯ anddW ¯ are inexact or imperfect differentials.

1.4.2 Work Work is done compressing a gas. Assume • friction is negligible • the compression is done very slowly (these conditions will be relaxed in the next lecture). Compress the gas by applying a force F to a piston. In equilibrium: F = PA. Increase force by small amount: Force = F + δF . ⇒ piston moves small distance δx.

δW = Small amount of work done = (F + δF )δx = P Aδx + δF δx .

1 2 | {z } | {z } 1 = −P δV where δV = change in volume = −Aδx (− sign because V decreases), 2 = 2nd order in small quantities ⇒ negligible, i.e., infinitesimal work done on gas is :

dW¯ = −P dV . (1.4.2.1)

Therefore Vfinal W = − P dV . (1.4.2.2) ZVinit On a PV diagram (→ 1st Year SoM course, Lecture 3)

Vfinal Area under curve = P dV = −W = work done by the gas. ZVinit The PV diagram was originally invented by James Watt in the 1790’s. He considered it so useful that he regarded it as a trade sectret which helped to give his steam engines a competitive edge. It only entered mainstream thermodynamics after being re-invented by Emile´ Clapeyron in 1834.

W is path dependent.

Can do work on systems other than gases, e.g.: • Work done stretching metal wire:d ¯W = JdL (J = tension, L = length). [Note opposite sign from the gas case. This is because W > 0 if length of wire in increased or if volume of gas is decreased.]

• Work done charging capacitor:dW ¯ = φdq (φ = voltage, q = charge).

1.4.3 Adiabatic process = process in whichdQ ¯ = 0, e.g., adiabatic compression of a gas

Nk T n n For an ideal gas: P = B , and U = d Nk T ⇒ dU = d Nk dT (→ Lecture 1.2). V 2 B 2 B n dV The 1st law withdQ ¯ = 0 therefore gives: d Nk dT = −Nk T 2 B B V dT 2 dV 2 2 ⇒ = − ⇒ ln T = − ln V /nd + const ⇒ TV /nd = const T nd V i.e., an ideal gas undergoing an adiabatic process satisfies the following equation1

TV γ−1 = constant, or PV γ = constant. (1.4.3.1) where γ = (nd + 2)/nd = constant. On a PV diagram adiabatic processes are steeper than isothermal processes, e.g., monatomic ideal gas (γ = 5/3).

1This statement will be qualified in Lecture 2.3. 1.4.4 Heat capacities Heat capacity = C is defined by equation:dQ ¯ = CdT Specific heat = c = heat capacity per unit mass (intensive variable). dQ¯ is path dependent ⇒ so is C e.g., CV = heat capacity at constant volume, CP = heat capacity at constant pressure.

We can derive a general equation linking CV and CP . !! This is the first bit of serious thermodynamic maths in the course !! ∂U ∂U Choose V and T as independent state variables ⇒ dU = dV + dT ∂V T ∂T V 1st law:dQ ¯ = dU + P dV ⇒ ∂U ∂U dQ¯ = P + dV + dT . (1.4.4.1)  ∂V T  ∂T V

∂U At constant volume dV = 0 ⇒ dQ¯ = dT But at constant volume:dQ ¯ = CV dT . ∂T V Therefore ∂U CV = . (1.4.4.2) ∂T V

At constant pressure:dQ ¯ = CP dT . To get an expression for CP we want an equation like Eq. 1.4.4.1 but with a term multiplying dP instead of dV on the right hand side. ✟ ∂V ∂V ✟✟ Write V = V (T,P ) ⇒ dV = dT + ✟ dP (since dP = 0). ✟✟  ∂T P ✟∂P T ∂U ∂V ∂U Substitute into Eq. 1.4.4.1 ⇒ dQ¯ = P + dT + dT .  ∂V T   ∂T P ∂T V ∂U ButdQ ¯ = CP dT and = CV . Therefore ∂T V ∂U ∂V CP = P + + CV . (1.4.4.3)  ∂V T   ∂T P

nd CP For an ideal gas: CV = NkB, CP = CV + NkB, γ = (→ Problem Sheet 2). 2 CV Second Year Thermodynamics M. Coppins

2.1 Reversibility 2.1.1 Reversible process = a process in which the system and its surroundings can be restored to their original state without any changes anywhere else. It is a theoretical concept (cf frictionless plane in mechanics, or a point charge in electro- magnetism). All real processes are irreversible, but there are processes which are reversible to a good approximation.

2.1.2 Dissipation Energy in ordered motion is converted into “heat” (i.e., internal energy) ⇒ temperature rise. Examples

• Pendulum. Energy falls with time due to friction at pivot and air resistance.

• Joule heating. Energy in electric current lost due to electrical resistance.

Dissipation ⇒ energy is dispersed ⇒ entropy increases (→ Lecture 1.2). Processes involving dissipation are irreversible. For instance, we could set the pendulum swinging at its initial amplitude again by giving it a push periodically with a motor, and cool the surrounding air to restore it to its initial temperature. BUT this would involve changes in the motor and cooling system (e.g., using up fuel). We cannot get the pendulum and its surroundings back to their original state without chang- ing something else. 2.1.3 Qusai-static process = a process which is so slow that the system stays in equilibrium at all times. Gas in container. • Initially in state (Pinit,Vinit). • Compress it with piston to final state (Pfinal,Vfinal). (1) Very slow (qusai-static) compression: at any stage the gas has well defined values of state variables. Can plot this process on a PV diagram.

(2) Very fast compression to Vfinal, and then allowed to settle into equilibrium: state variables not well defined during compression (e.g., pressure is not uniform). Can plot initial and final states on a PV diagram, but not the process joining them.

2.1.4 Reversible work To identify the conditions for work to be done reversibly we again consider our standard example: gas in a container with a piston.

Apply force F ⇒ piston moves small distance δx = −δV/A ⇒ small amount of work done δW = F δx = −F δV/A.

(1) Finite friction. F must be larger than PA by a finite amount in order to overcome friction ⇒ δW > −P δV . Dissipation involved ⇒ process is not reversible. (Can restore the gas to its original volume but doing so does not recover the energy dissipated by the friction.) (2) Zero friction. Apply force F larger than PA ⇒ piston accelerates. Then either: (a) piston oscillates in and out for ever ⇒ does not reach an equilibrium, or (b) oscillations are damped out by dissipation in gas ⇒ not reversible. While piston is oscillating the system is not in equilibrium ⇒ not qusai-static ⇒ cannot be plotted on PV diagram. Now consider a situation in which • there is a very small amount of friction, and • a force is applied which is larger than PA by a very small amount. The piston is displaced a very small distance and the gas reaches a new equilibrium with a slightly larger pressure. A very small amount of work is done δW = −P δV (→ Lecture 1.4). Large number of very small displacements ⇒ large total displacement. This process would be very nearly reversible. In the limit of “very small” → “infinitesimal” we have: • no friction, • gas is in equilibrium throughtout process (i.e., quasi-static), • dW¯ = −P dV , • process is reversible.

This is a theoretical concept, but it can be closely approximated by reducing friction and pushing the piston slowly. Of course, if the friction was exactly zero and we applied a force exactly equal to PA the piston would not move. Reversible compression is an idealization of the situation with very small friction, in which the force is very slowly increased, so that at any time it is only very slightly larger than PA. In practical terms this means that the time over which the compression takes place must be much longer than the time over which the gas settles into equilibrium.

2.1.5 Reversible heat Heat flows between objects at different temperatures.

Consider a fixed volume of gas in thermal contact with a reservoir at T1: Tgas = T1.

Now place it in thermal contact with a reservoir at T2 > T1. Heat Q flows from the reservoir into the gas and eventually equilibrium is reached in which Tgas = T2.

This process is

• not quasi-static. When first placed in contact with Reservoir 2 the gas is not in equi- librium (e.g., temperature is not uniform, convection currents are probably occuring).

• not reversible. We could restore the gas to its original state by putting it back in contact with Reservoir 1. Heat Q would flow from the gas to the reservoir and Tgas → T1. But the reservoirs have changed: a net amount of heat Q has been transferred from Reservoir 2 to Reservoir 1. We could move Q back to Reservoir 2, but that would require a change somewhere else (e.g., a heat pump, → Lecture 2.2.)

Now place the gas successively in contact with a sequence of reservoirs, each of which has a temperture larger than the last one by a very small amount δT .A very small amount of heat δQ flows into the gas from each reservoir, and the gas very quickly reaches equilibrium. Large number of reservoirs ⇒ large total temperature difference ∆T = δT and large total X heat flow ∆Q = δQ. X Going back through the sequence of reservoirs in reverse order ⇒ gas is restored to its original state, and most reservoirs are restored to their original states. The only irreversible aspect is a very small net amount of heat δQ transferred from the hottest reservoir to the coolest. In the limit of “very small” → “infinitesimal” we have an infinite number of reservoirs, and: • heat flow takes place between objects with infinitesimal temperature difference, • gas is in equilibrium throughtout process (i.e., quasi-static), • process is reversible. (→ Lecture 2.6)

2.1.6 Isothermal work

Allow a gas to expand while in thermal contact with a reservoir at Tres. • Heat Q flows from the reservoir to the gas, to keep Tgas = Tres. • The gas does work W .

If the expansion is quasi-static and there is no friction, this process is reversible (heat flows between objects at the same temperature). Second Year Thermodynamics M. Coppins

2.2 Engines, fridges and heat pumps 2.2.1 Heat engines ...convert heat into work. They are the technological foundation of our society (e.g., power stations, transportation). In a heat engine • internal energy of a gas is increased by heat and work, • some of that added internal energy is used to do work (e.g., turn turbine), • the rest is thrown away. Example: jet engine. This is a type of gas turbine.

1: Intake. Low temperature gas (air) is sucked in. 2: Compressor. Gas is compressed (work is done on it). 3: Combustion chamber. Fuel is added and ignited. The gas is rapidly heated at constant pressure. 4: Turbine. The expanding hot gas does work on turbine blades. This drives the compreesor. 5: Exhaust. The hot gas is expelled (energy is lost). [Picture from Wikipedia]

2.2.2 Cycles Theoretical model: heat engine operates in a cycle with a fixed mass of gas (= “the system”). Represent 1 cycle schematically:

Qin = heat into system in 1 cycle, Qout = heat out of system in 1 cycle. Both of these quantities are defined to be positive. E W = Wout − Win = net work done by engine in 1 cycle > 0. After 1 cycle the system returns to its initial state, i.e., after 1 cycle all state variables return to their initial values. ∆U = change in internal energy in 1 cycle = 0. E E 1st law: ∆U = −W + Qin − Qout ⇒ W = Qin − Qout.

Qout = energy thrown away. E A perfect engine would completely convert Qin to work, i.e., Qout = 0 and W = Qin. This is not possible (→ Lecture 2.3). Define efficiency of heat engine: W E η = fraction of Qin which is converted into work = . Qin Using 1st law: Qout η = 1 − . (2.2.2.1) Qin

2.2.3 Brayton cycle = idealized gas turbine/jet engine.

A → B: low temperature gas compressed adiabatically B → C: gas heated at constant pressure (Qin during this stage). C → D: hot gas expands adiabatically and does work. D → A: gas is cooled at constant pressure (Qout during this stage). The jet engine is an open system: hot gas is expelled and a fresh supply of low temperature gas is taken in. Some fraction of the energy put into the gas is lost in exhaust. If we suppose that the hot gas is cooled and recirculated we can account for the lost energy, The sections of the Brayton cycle correspond to the sections of the jet engine: A: air intake (1), A → B: compressor (2), B → C: combustion chamber (3), C → D: turbine (4), D: exhaust (5). Area under B → D = Wout = work done by gas. Area under D → B = Win = work done on gas. E Area enclosed by cycle = W = Wout −Win net work done by gas (this is true for any cycle).

2.2.4 Two reservoir engine

= theoretical heat engine in which the heat source is a hot reservoir at TH and the heat sink is a cold reservoir at TC . Define: QH = heat in from hot reservoir in 1 cycle (= Qin), QC = heat out to cold reservoir in 1 cycle (= Qout). Example: coal fired power station: • system: water/steam, • hot reservoir: furnace, TH ∼ 800 K, • cold reservoir: outside environment (e.g., cooling towers), TC ∼ 300 K. E Heat QH is transferred from hot reservoir, work W is done by system, and heat QC is transferred to cold reservoir. Schematic diagram of 1 cycle of a 2-reservoir engine:

E 1st law: W = QH − QC . 2.2.5 Refrigerator = heat engine run in reverse. F Work W is done on system, heat QC is transferred from cold reservoir, and heat QH is transferred to hot reservoir. Cold reservoir = contents of fridge, hot reservoir = air around fridge. Schematic diagram of 1 cycle of a fridge:

In this case QH = Qout and QC = Qin. [Remember: “in” and “out” refer to the system.] F 1st law: W = net work done on system in 1 cycle = QH − QC .

A perfect fridge would transfer QC from cold reservoir to hot reservoir without any work F being done, i.e., W = 0 and QC = QH . This is not possible (→ Lecture 2.3). Define coefficient of performance of a fridge: QC ωF = fraction of W F which is used to cool cold reservoir = . W F F F Note: QC can be larger than W , i.e., ω can be larger than 1.

2.2.6 Heat pump = fridge used to heat a building. Cold reservoir = ground outside building, hot reservoir = interior of building. The schematic diagram of 1 cycle of a fridge also applies to a heat pump. Define coefficient of performance of a heat pump: QH ωP = fraction of W F which is used to heat hot reservoir = . W F F P Note: 1st law ⇒ QH > W ⇒ ω > 1. What you get out η, ωF and ωP all have the form What you put in We don’t use the the word efficiency for ωF or ωP because they can exceed 100%. Second Year Thermodynamics M. Coppins

2.3 The second law 2.3.1 Alternative statements The 2nd law concerns a fundamental asymmetry in the universe. This asymmetry manifests itself in many different ways, and there are, therefore, many different ways of expressing the 2nd law. • Kelvin statement. No process is possible in which the sole effect is the absorption of heat from a reservoir and its complete conversion into work (i.e., a perfect engine is impossible, → Lecture 2.2). • Clausius statement. No process is possible in which the sole effect is the transfer of heat from a colder reservoir to a hotter reservoir (i.e., a perfect fridge is impossible, → Lecture 2.2). • Mathematical form. dQ¯ = , in a reversible process dS  T dQ¯ (2.3.1.1) > , in an irreversible process T  The phrase sole effect in the Kelvin and Clausius statements is very important. Various processes might appear to violate the 2nd law, but there is always something else happening (→ Sec. 2.3.5)

Perpetual motion machines are usually classified into: • perpetual motion machines of the first kind: these violate the 1st law of thermodynamics. • perpetual motion machines of the second kind: these violate the 2nd law of thermodynamics.

2.3.2 Equivalence of Kelvin and Clausius statements We can show that the Kelvin and Clausius statements of the 2nd law are equivalent by (1) showing that if the Kelvin statement is violated, then so is the Clausius statement, and (2) showing that if the Clausius statement is violated, then so is the Kelvin statement. Here we carry out stage (1), and relegate stage (2) to Problem Sheet 3. Suppose a perfect heat engine exists which completely converts heat from a hot reservoir E E (QH ) into work (W ), with no other effect, i.e., it violate the Kelvin statement. We use the work from this engine to run a fridge which discharges heat into the same hot reservoir.

We adjust the engine so that it produces exactly the amount of work required to run the fridge, i.e., W E = W F . The net effect of the engine + fridge combination is:

F F − E From the 1st law we have QC = QH QH . The sole effect is thus the transfer of heat from the cold reservoir reservoir to the hot one, i.e., it violates the Clausius statement.

2.3.3 Reversible, adiabatic process dQ¯ Reversible process: dS = , adiabatic process:dQ ¯ = 0. T ⇒ Reversible, adiabatic process is isentropic (i.e., S = constant, dS = 0). In Lecture 1.4 we derived the ideal gas adiabatic law:

PV γ = constant .

The derivation assumed: (1) state variables well defined at all times during the process (i.e., quasi-static), (2)dW ¯ = −P dV . i.e., the process is reversible. The ideal gas adiabatic law describes an isentropic process. 2.3.4 Calculating entropy changes dQ¯ • Reversible process. ∆S = (example → Sec. 2.3.5). Z T dQ¯ • Irreversible process. dS > .So how do we calculate ∆S? T S is a state variable

⇒ ∆S = Sfinal − Sinit depends only on initial and final states (i.e., path independent).

Thermodynamic trick: Choose a reversible path between the initial and final states and calculate ∆S along that (example → Sec. 2.3.6).

2.3.5 Reversible isothermal volume change

Reversible volume change of ideal gas in thermal contact with reservoir at temperature Tres.

• Heat Q flows into the gas from the reservoir, to keep Tgas = Tres. • The gas does work W . Ideal gas: T = constant ⇒ U = constant (→ Lecture 1.2) ⇒ Q = W , i.e., heat from the reservoir is completely converted into work ⇒ violates Kelvin statement of 2nd law? NO!! This is not the sole effect. The volume of the gas changes. Nk T U = constant ⇒ dQ¯ = −dW¯ (1st law) = P dV (reversible process) = B gas dV . V If the gas expands from volume V0 to V1 the entropy change is: V1 dQ¯ NkB V1 ∆Sgas = = dV = NkB ln . Z Tgas ZV0 V V0  V1 > V0 ⇒ ∆S > 0. 2.3.6 Adiabatic free expansion Consider a gas in a thermally insulated container. The container is divided into two parts by a removable partition. Initially the left hand part is filled with gas, while there is a vacuum in the right hand part. We remove the partition and allow the gas to fill the entire container.

The process is adiabatic (thermally insulated container) ⇒ dQ¯ = 0 ⇒ ∆S = 0? NO!! The process is irreversible ⇒ dS > 0. Use thermodynamic trick to find ∆S. Assume: • ideal gas, • partition can be removed without doing any work on the gas (i.e.,dW ¯ = 0). dQ¯ =dW ¯ = 0 ⇒ ∆U = 0 (1st law). Ideal gas: U = constant ⇒ T = constant (→ Lecture 1.2).

Gas expands from initial state with volume V0 (= volume of left hand part) to final state with volume V1 (= volume of whole container). Initial and final states have same temperature. Same initial and final states as in reversible isothermal expansion (→ Sec. 2.3.5). V1 ⇒ same entropy change, i.e., ∆Sgas = NkB ln (> 0). V0 

Suppose partition divided the container in half, i.e., V1 = 2V0 ⇒ ∆Sgas = NkB ln 2

Microscopic view of entropy (→ Lecture 1.2): S = kB ln W where W = number of microstates corresponding to given macrostate.

⇒ ∆S = kB (ln Wfinal − ln Winit) = kB ln (Wfinal/Winit) Probability of given macrostate occuring ∝ W . 1 Probability that any 1 gas molecule is in left hand half of container = . 2 2 1 1 1 Probability that any 2 gas molecules are in left hand half of container = × = . 2 2 2    1 N Winit/Wfinal = probability that N gas molecules are in left hand half of container = . 2 N Therefore ∆Sgas = kB ln 2 = NkB ln 2 Second Year Thermodynamics M. Coppins

2.4 The Carnot cycle 2.4.1 Reversible, two-reservoir engine The most basic theoretical heat engine: • is reversible (works just as well as a fridge), • has only two reservoirs (→ Lecture 2.2).

[Remember: the “system” here is the working substance, e.g., the gas in a gas turbine, the steam in a steam engine, etc.] During reversible heat flow

• the temperature of the system stays constant (isothermal) and heat flows to/from a reser- voir at the same temperature, or

• the temperature of the system changes by a finite amount, requiring an infinite number of infinitesimally different reservoirs.

This is because reversible heat flow only takes place between objects at the same temperature or at infinitesimally different temperatures (→ Lecture 2.1) In our theoretical engine the temperature of the system must stay constant when heat flows, otherwise we would need an infinite number of reservoirs.

During Qin (= QH ) system stays on T = TH isotherm. During Qout (= QC ) system stays on T = TC isotherm. These two isotherms must be connected to make a closed cycle. During the connecting processes T changes (from TH to TC or vice versa), ⇒ Q = 0 during these processes because we only have 2 reservoirs. ⇒ the connecting processes must be adiabats. The complete cycle, formed by 2 isotherms and 2 adiabats is a... 2.4.2 Carnot cycle Assuming the system is a gas, for which P and V are appropriate state variables, the PV diagram of a Carnot cycle has the basic form shown.

A → B: isothermal expansion, heat Qin = QH from hot reservoir at TH . B → C: adiabatic expansion. C → D: isothermal compression, heat Qout = QC to cold reservoir at TC . D → A: adiabatic compression.

!! Take care !! Here the subscript C can refer to the cold reservoir (e.g., TC , QC ) or to point C on the cycle (e.g., VC would be the volume of the system at that point in the cycle). By a lucky coincidence the temperature of the system at point C is TC = temperature of the cold reservoir. The Carnot cycle shares the basic properties of all two-reservoir engines (→ Lecture 2.2): • the net work done in one cycle (WE) is the area enclosed on the PV diagram, Q • the efficiency is given by η = 1 − C . QH

2.4.3 Efficiency of a Carnot engine with an ideal gas Ideal gas: T = constant ⇒ U = constant (→ Lecture 1.2)

Therefore ∆UA→B = 0. B ⇒ QH − P dV = 0 (1st law). ZA B B NkBT dV VB ⇒ QH = dV = NkBTH = NkBTH ln . ZA  V  ZA V VA 

Similarly ∆UC→D = 0. D ⇒ −QC − P dV = 0 (1st law; note that QC is heat out of system, hence the − sign). ZC

VD VC ⇒ QC = −NkBTC ln = NkBTC ln . VC  VD  Q T ln (V /V ) ⇒ C = C C D . (2.4.3.1) QH TVH ln (VB/ A)

TV γ−1 = constant along a reversible adiabat in an ideal gas (→ Lecture 1.4). → γ−1 γ−1 B C: TH VB = TC VC → γ−1 γ−1 D A: TH VA = TC VD −1 −1 V γ V γ V V Divide: B = C ⇒ B = C . VA  VD  VA VD Therefore Eq. 2.4.3.1 reduces to: Q T C = C (2.4.3.2) QH TH and the efficiency (η = 1 − QC /QH ) is given by

TC ηCarnot = 1 − . (2.4.3.3) TH

2.4.4 TS diagram A reversible process must be quasi-static. Therefore it can be plotted on a PV diagram. Alternatively it can be plotted on a TS diagram. Isotherms are just lines of constant T on a TS diagram. In a reversible processdQ ¯ = T dS (→ Lecture 2.3). Lines of constant S (isentropes) on a TS diagram are therefore adiabats.

The area under a curve on a PV diagram is the work done (→ Lecture 1.4). The area under a curve on a TS diagram also has a physical meaning. Sfinal Area under curve = T dS = dQ¯ = Q = heat into the system. ZSinit Z Plotted on a TS diagram a Carnot cycle is a rectangle

Area under A → B = Qin = QH . Area under C → D = Qout = QC . E Area enclosed by cycle = QH − QC = W (→ Lecture 2.2) = net work done by system (true for any cycle). Second Year Thermodynamics M. Coppins

2.5 Carnot’s theorem 2.5.1 Proof of the theorem, part 1 This proof is similar to the proof of the equivalence of the Kelvin and Clausius statements of the 2nd law (→ Lecture 2.3). Carnot engine (→ Lecture 2.4): 2 reservoir reversible engine.

Assume our Carnot engine has an efficiency ηCarnot, and in 1 cycle takes in heat QH from the hot reservoir, expels heat QC to the cold reservoir, and does net work W = ηCarnotQH (definition of efficiency, → Lecture 2.2).

The Carnot engine is reversible. Run in reverse it is a Carnot fridge. In 1 cycle: heat QH out, heat QC in, and net work W in.

We now run our Carnot fridge with the work produced by a second engine operating between the same 2 reservoirs. ∗ ∗ This new engine has an efficiency η , and in 1 cycle it takes in heat QH from the hot reservoir, ∗ ∗ expels heat QC to the cold reservoir, and does net work W . We connect it to our Carnot fridge and adjust it so that W = W ∗. The net effect of the Carnot fridge + engine combination is:

∗ i.e., a device which in 1 cycle transfers heat Qnet = QH − QH from the hot reservoir to the cold one. ∗ ∗ W W ηCarnot ηCarnot But QH = = = QH ⇒ Qnet = QH − 1 . η∗ η∗ η∗  η∗  ∗ • η > ηCarnot

⇒ Qnet < 0 ⇒ sole effect is heat from cold reservoir to hot one ⇒ violates 2nd law ⇒ impossible. ∗ • η = ηCarnot

⇒ Qnet = 0 ⇒ after 1 cycle no net effect, everthing is back in its initial state ⇒ reversible. ∗ • η < ηCarnot

⇒ Qnet > 0 ⇒ sole effect is heat from hot reservoir to cold one ⇒ 2nd law OK, but to restore reservoirs to their initial state would need external device to transfer Qnet back ⇒ irreversible. ∗ Thus we see that the efficiency of the second engine must satisfy the condition η ≤ ηCarnot, ⇒ no heat engine operating between two reservoirs can be more efficient than a Carnot engine. This is the 1st part of Carnot’s theorem. 2.5.2 Proof of the theorem, part 2 Suppose the second engine used in the proof of Carnot’s theorem was, in fact, another Carnot engine. It too would be reversible, and we could run either engine as the fridge.

Reversing engine 1 ⇒ η2 ≤ η1. Reversing engine 2 ⇒ η1 ≤ η2.

These two conditions can only be satisfied if η1 = η2 ⇒ all Carnot engines operating between the same two reservoirs have the same efficiency. This is the 2nd part of Carnot’s theorem. TC Carnot engine with ideal gas as working substance: ηCarnot = 1 − (→ Lecture 2.4). TH This equation therefore must apply to any Carnot engine. There is a very simple alternative proof of this result using entropy.

The heat in/out (QH and QC ) in 1 cycle of any Carnot engine can be represented as areas on TS diagrams (→ Lecture 2.4).

QC TC Comparing these areas we see = . QH TH

Qout The efficiency of any heat engine is given by η = 1 − (→ Lecture 2.2). Qin Since Qin = QH and Qout = QC , we find that the efficiency of any Carnot engine is

TC ηCarnot = 1 − . (2.5.2.1) TH

Our first proof of this result, involving a thought experiment with engines and fridges, did not use entropy. We could therefore ask if, having proved the result without entropy, we can use it to deduce that entropy must exist. We return to this interesting question in Lecture 3.1.

2.5.3 Implications of Carnot’s theorem We have shown that the 2nd law imposes an upper limit on the efficiency of any 2-reservoir engine, given by Eq. 2.5.2.1. This is a remarkable result. It is completely independent of the mechanical details or choice of working substance in any particular engine. For instance, consider a power station in which the hot reservoir is a furnace at TH = 800 K and the cold reservoir is the outside environment at TC = 300 K. No matter what technological improvements we make, or what new working substances we use, the 2nd law tells us that the efficiency can never exceed 62.5%. Carnot’s theorem also allows us to define an absolute thermodynamic temperature scale. Traditionally a temperature scale is defined in terms of a property of some given material which changes with temperature. For instance, it is found experimentally that the pressure of a given fixed volume of dilute gas is always the same if it is placed in thermal contact with objects at the same temperature (how we detect if two objects are at the same temperature before we have defined a temperature scale will be discussed in Lecture 3.1). We could therefore define the temperature of a given object as the ratio of the measured pressure, P , of the gas when placed in thermal contact with the object, and the measured pressure when placed in thermal contact with some reference object. A convenient choice of reference object is water at its triple point. If we denote the measured pressure of the fixed volume of gas when in thermal contact with this reference object by PTP then we can define the temperature of any other object as T = 273.16(P/PTP ). The constant volume gas thermometer, which employs this approach, is one of the devices used in establishing the international temperature calibration standard ITS-90. Notice that we have actually used two reference points: the triple point of water and a zero-point where P = 0. As we know, very dilute gases behave as ideal gases, so P → 0 at absolute zero. Alternatively, we can define a theoretical thermodynamic temperature in terms of the heat in and out of a Carnot engine. We use as our 2 reservoirs (1) water at its triple point, and, (2) the object whose temperature we wish to find. Any Carnot engine has the property that in 1 cycle (TC /TH ) = (QC /QH ). Thus if we measure the heat to/from the two reservoirs in one cycle of our Carnot engine, then we can define the temperature of the object to be T = 273.16(|Q2|/|Q1|), where we have defined the temperature of the triple point of water to be exactly 273.16 K. The advantage of this as a theroretical definition of absolute temperature is that it is equally valid for any Carnot engine, i.e., it is independent of the working substance. Second Year Thermodynamics M. Coppins

2.6 The arrow of time 2.6.1 Entropy and equilibrium • dQ¯ = 0 for an isolated system. • dS =dQ/T ¯ in a reversible process. ⇒ The entropy of an isolated system is constant in a reversible process. • dS > dQ/T¯ in an irreversible process. • All real processesd are irreversible. ⇒ The entropy of an isolated system increases in any real process. The system can have many different parts which interact with each other. Even though the total entropy (= the sum of the of all the parts) must increase in any real process, the entropy of some parts might decrease while the entropy of other parts increases. Much of this lecture involves a detailed thermodynamic analysis of a simple isolated system which is initially not in equilibrium: a fixed volume of gas initially at temperature T0, placed in thermal contact with reservoir at TR > T0. System = gas + reservoir An irreversible process takes place (the temperature of the gas increases). Nothing else is involved in this process: the gas + reservoir form an isolated system.

During the process the total entropy Stot = Sgas + Sres increases.

Eventually Stot reaches its maximum value ⇒ process stops. But we know that the process stops when the system reaches equilibrium. For an isolated system equilibrium corresponds to a state of maximum entropy.

2.6.2 Heat flow across a finite temperature difference To analyze this situation we need to be able to find the entropy changes involved when heat flows from the reservoir to the gas. The reservoir and gas have different temperatures ⇒ irreversible process (→ Lecture 2.1). T1 Heat Q into gas ⇒ T rises. Suppose T reaches a value T1 then Q = CV dT = CV (T1 − T0) ZT0 (assuming CV = constant volume heat capacity, is independent of T ).

Irreversible ⇒ use thermodynamic trick (→ Lecture 2.3) to calculate ∆Sgas.

Reversible process between initial state of gas (V0, T0) and final state of gas (V0, T1): use an infinite number of infinitesimally different reservoirs (→ Lecture 2.1)

At each reservoirdQ ¯ = heat into gas from reservoir = CV dT . dQ¯ ⇒ dS = (where T = temperature of that particular reservoir). gas T T1 CV dT T1 ⇒ ∆Sgas = = CV ln . ZT0 T T0  The entropy of the reservoir also changes. res Initial state of reservoir (TR, U0 ). res Final state of reservoir (TR, U0 + Qres), where Qres = heat into the reservoir.

Qres For any reversible process between these two states the entropy change would be ∆Sres = . TR

Thermodynamic trick ⇒ same ∆Sres if the process is irreversible.

For our situation the 1st law (i.e., energy conservation) ⇒ Qres = −Q = − heat into gas.

CV (T1 − T0) Therefore ∆Sres = − . TR

2.6.3 Thermal equilibrium

T1 CV (T1 − T0) ∆Stot = ∆Sgas + ∆Sres = CV ln − T0  TR What temperature does the gas reach at equilibrium? i.e., what T1 maximizes entropy? d∆Stot CV CV = − = 0 when T1 = TR. dT1 T1 TR 2 d ∆Stot CV 2 = − 2 < 0, i.e., T1 = TR at maximum of Stot. dT1 T1 We have deduced that at equilibrium the gas reaches the same temperature as the reservoir simply by imposing the conditions • energy is conserved, • entropy is maximized.

2.6.4 Entropy changes

Define δT = TR − T0 = initial temperature difference between the gas and the reservoir.

T1 TR δT ∆Sgas = CV ln = CV ln = CV ln (1 + x), where x = . T0   T0  T0

CV (T1 − T0) CV (TR − T0) −1 −1 ∆Sres = − − = −CV δT (T0 + δT ) = −CV x(1 + x) . TR T0 + δT Now suppose δT << T0. i.e., x << 1. x2 ∆S ≃ C x − + ·· · > 0 gas V  2 

∆Sres ≃ −CV x (1 − x + ···) < 0 x2 x2 ∆S ≃ C x − − x + x2 = C > 0 tot V  2  V 2 Entropy of the gas increases. Entropy of the reservoir decreases. Total entropy increases. [Can show that this is true for arbitrary δT → Problem Sheet 4.]

δT → 0: ∆Sgas → CV x, ∆Sres → −CV x

⇒ ∆Stot → 0 ⇒ process is reversible ⇒ heat flow between objects with infinitesimal temperature difference is reversible.

2.6.5 Energy degradation

Consider two possible ways in which an ideal gas can go from an initial state (V0,T0) to a final state (V1,T0), where V1 > V0, i.e., the gas expands but its final temperature is the same as its initial temperature.

1. Reversible, isothermal expansion (→ Lecture 2.1)

Gas is in thermal contact with reservoir.

Total entropy change ∆Stot = ∆Sgas + ∆Sres = 0 (reversible process).

V1 Work done by gas = NkBT0 ln (→ Assessed Problem Sheet 2). V0  We could use this energy for some useful purpose (generate electricity, move a plane, etc). 2. Adiabatic free expansion (→ Lecture 2.3)

The gas is the only thing involved in this process

V1 ⇒ ∆Stot = ∆Sgas = NkB ln (→ Lecture 2.3). V0 

⇒ ∆Stot > 0 (irreversible process).

The gas expanded without doing any work. Compared to the reversible, isothermal expan- V1 sion we wasted the opportunity for extracting an amount of useful work = NkBT0 ln V0  Energy has been degraded. To recover the opportunity for the gas to do some work, we would need to compress it back to volume V0, which would require at least the same amount of work to be done on the gas.

In an irreversible process ∆Stot ∝ energy degradation. 2.6.6 The arrow of time dQ¯ In any real (irreversible) process dS > things , where things T dQ¯ things = heat into all the things involved in the process from the rest of the universe = 0 since the rest of the universe is not involved in the process.

The total change in entropy of the things involved ∆Sthings = dSthings > 0. Z The entropy of the universe always increases in real processes. This defines the arrow of time. Events occur in the direction of increasing entropy. Second Year Thermodynamics M. Coppins

3.1 Classical thermodynamics 3.1.1 Scope of this lecture Thermodynamics is a purely macroscopic theory. Nothing illustrates this point more vividly than the fact that the whole thermodynamic formalism was developed in the nineteenth century, before people were even sure that atoms existed. It is hard to believe that a so- phisticated theory involving concepts like internal energy can be derived without knowing anything about the microscopic world. Yet that is exactly what Carnot, Kelvin, Clausius and others managed to do, and it represents one of the most impressive achievements of classical physics. Anyone studying thermodynamics should have some awareness how this was done, partly because of its historical importance, and partly because it demonstrates that physics need not be constrained by the fetters of the reductionist world-view. In this lecture we therefore start again and go back over what we have already done, but follow a purely macroscopic approach, carefully avoiding any reference to the underlying mechanism. Done this way the subject is usually referred to as classical thermodynamics. The main purpose of this lecture is to illuminate the subject and provide extra insight. The only thing in it which forms part of the examinable, core course material is the Clausius inequality (Sec. 3.1.7, below). The lecture will therefore depart from the usual format, and be given on Powerpoint. For this reason the notes go over the usual 4 page limit.

3.1.2 Preliminaries To start we assume that we can measure mechanical properties: mass, length and force. Example: for a fixed mass of gas we can measure V = volume and P = pressure. Alternative properties could be measured for other systems, e.g., in the case of a stretched metal wire we could measure L = length and J = tension. We can also measure W = work done on system, e.g., do the work with a mechanism driven by a mass m which falls through a distance h; work done = mgh. Initially we can measure V , P , W .

3.1.3 The zeroth law and temperature Zeroth law of thermodynamics: if object A is in thermal equilibrium with object B, and object B is in thermal equilibrium with object C, then A is in thermal equilibrium with C. How do we tell if two systems are in thermal equilibrium? Example: object B is a fixed volume of gas in a container with a pressure gauge. Place it in contact with object A. If they are not in thermal equilibrium, PB will change. Eventually PB settles down to a constant value ⇒ A and B are in thermal equilibrium. Now place B in contact with object C. If PB does not change ⇒ A and C are in thermal equilibrium.

Zeroth law ⇒ can define a new (macroscopic) property called temperature such that, if two objects are in thermal equilibrium they have the same value of this property. TP TP We could use PB to ascribe a value to this new property; T = 273.16PB/PB , where PB = pressure measured when in thermal equilibrium with water at its triple point Note that this purely macroscopic approach provides a way of measuring T , but doesn’t provide any insight into what T is. The microscopic approach provides good insight (T describes way particles are distributed with respect to energy), but doesn’t provide a way of measuring T .

We can now measure V , P , W , T .

3.1.4 The first law and internal energy Certain materials act as thermal insulators. Consider two identical vol- umes of gas, A and B, at different temperatures (i.e., PA =6 PB). A ther- mally insulating material prevents them reaching thermal equilibrium. Any process which takes place on a system enclosed in thermal insulation is called adiabatic.

Consider an object initially in state P0, V0, T0 [remember: we can measure these properties]. We enclose the object in thermal insulation and do some work [remember: we can also measure work] as a result of which the object ends up in state P1, V1, T1. Experimentally we find the following: First law of thermodynamics: to take a given object from a given initial state to a given final state adiabatically always requires the same amount of work. Example: assume the object is a thermally insulated container of gas, and do work either by pushing in a piston, or by stirring the gas with a paddle wheel. First law ⇒ we can define a new (macroscopic) property, internal energy, U, such that the change in this property is the adiabatic work done. Note that this purely macroscopic approach provides a way of measuring ∆U, but doesn’t provide any insight into what U is. The microscopic approach provides good insight (U = total energy of all the particles), but doesn’t provide a way of measuring ∆U.

We can now measure V , P , W , T , ∆U. 3.1.5 Heat Now suppose we measure the work required to take the system from the given initial state to the given final state (1) with thermal insulation (i.e., adiabatically): work required = W1. (2) without thermal insulation: work required = W2.

In general W1 =6 W2. Define: Q = heat into system = W1 − W2. Note that this purely macroscopic approach provides a way of measuring Q, but doesn’t provide any insight into what Q is. The microscopic approach provides good insight (Q = energy transferred by random particle motion), but doesn’t provide a way of measuring Q.

We can now measure V , P , W , T , ∆U, Q.

3.1.6 Carnot cycle We are now in a position to be able to construct a heat engine with two reservoirs, and which runs in a Carnot cycle, i.e. a single cycle has the following 4 stages:

(1) Place the working substance in thermal contact with the hot reservoir (at temperature TH ), and allow it to undergo a frictionless, quasi-static expansion. Heat QH enters the working substance from the reservoir.

(2) Thermally insulate the working substance and allow it to undergo a further frictionless, quasi-static expansion (this part of the cycle is adiabatic, by definition).

(3) Place the working substance in thermal contact with the cold reservoir (at temperature TC ), and allow it to undergo a frictionless, quasi-static compression. Heat QC leaves the working substance and goes into the reservoir.

(4) Thermally insulate the working substance and allow it to undergo a further frictionless, quasi-static compression (this part of the cycle is adiabatic, by definition).

After 1 cycle the working substance has returned to its original state (but the reservoirs E haven’t). The 1st law ⇒ the net work done by the working substance is W = QH − QC . Note: W E could be negative, i.e., net work is done on the working substance. In this case we would be running the engine in reverse, as a fridge, and in the above description of the cycle the words expansion and compression should be interchanged. Q T If we use an ideal gas as the working substance (→ Lecture 2.4) ⇒ C = C . QH TH

This equation is valid for QH and QC either positive (engine) or negative (fridge). [Of course we know that this equation is valid for any Carnot cycle, with any working substance. However, the proof of that result follows from the 2nd law, which we haven’t yet encountered in our development of classical thermodynamics, in this lecture.] 3.1.7 The second law and the Clausius inequality We now construct a theoretical device for converting heat into work. This device includes a small Carnot engine as one of its components. We can derive a very important thermody- namic result, the Clausius inequality, by insisting that our device does not violate: Second law of thermodynamics (Kelvin statement): no process is possible in which the sole effect is the absorption of heat from a reservoir and its complete conversion into work. The main part of our device is some arbitrary system which undergoes a cyclic process (main cycle) comprising many separate stages;

Stage 1 Place the system in thermal contact with a reservoir at temperature T1. The system takes in heat δQ1 from the reservoir, and does some work δW1. As a result it moves to another equilibrium.

Stage 2 Place the system in thermal contact with a reservoir at temperature T2. The system takes in heat δQ2 from the reservoir, and does some work δW2. As a result it moves to another equilibrium. and so on. Note: some of the δQi’s and δWi’s could be negative. A 3-stage cycle is shown schematically below, although, of course, we can envisage a cycle with many more than 3 stages.

At the end of the main cycle the system has returned to its initial state, and sys − ∆Utot = (δQi δWi) = 0, Xi sys i.e., the total work done by the system is W = δWi = δQi. Xi Xi If W sys > 0 we might appear to have violated the 2nd law, but this is not neccessarily the case. The Kelvin statement specifically forbids the conversion of heat from a single reservoir into work. If we have more than one reservoir the heat flow from some of them can be sys negative (δQi < 0). In this case we can have W > 0 and still satisfy Kelvin (e.g., in any two-reservoir engine). Thus before making use of the 2nd law we “top-up” all the reservoirs with heat from a single external reservoir. This is where the Carnot engine comes in. We use it to transfer heat from the external reservoir (at temperature T ∗) to each of reservoirs 1, 2, ··· in turn, and restore them to their original states. This process is shown schematically for the ith reservoir below.

For each reservoir we run the Carnot engine so that it deposits exactly the same amount of heat, δQi, which had previously been transferred to the arbitrary system. This will require ∗ an amount of heat δQi from the external reservoir, and will result in the Carnot engine ∗ ∗ − doing some work δWi = δQi δQi. For some reservoirs this will mean running the Carnot ⇒ ∗ ∗ engine in reverse ( δQi < 0 and δWi < 0), but that is not a problem.

δQi Ti ∗ ∗ δQi Each time we use our Carnot engine we know ∗ = ∗ , i.e., δQi = T δQi T Ti At the end of the whole process (main cycle plus reservoir top-ups) the arbitrary system and all the reservoirs apart from the external one are back in their original states. The total sys work done by the system is W = δQi, while the total work done by the Carnot engine Xi E ∗ ∗ − is W = δWi = (δQi δQi). Thus the total work done by the composite device is Xi Xi δQ W = W sys + W E = δQ + (δQ∗ − δQ ) = δQ∗ = T ∗ i . tot i i i i T Xi Xi Xi Xi i δQ Now we can make use of the 2nd law: W ≤ 0, i.e., i ≤ 0. tot T Xi i δQ • If i = 0 then W = δQ∗ = 0, i.e., the external reservoir (along with everthing T tot i Xi i Xi else involved) has returned to its original state ⇒ process was reversible. δQ • If i < 0 then W = δQ∗ < 0, i.e., net heat flow into the external reservoir T tot i Xi i Xi ⇒ process was not reversible (to get everthing involved back to its original state we need to extract this heat from the external reservoir ⇒ involve changes in some other device). In limit of infinite number of infinitesimally different reservoirs → Clausius inequality:

dQ¯ = 0, for a reversible cycle I T (< 0, for an irreversible cycle 3.1.8 Entropy We made no assumptions about the form of the main cycle which our arbitrary system was dQ¯ taken round. Thus any cycle which is reversible will satisfy the condition = 0. I T In the Clausius inequality T = reservoir temperature. But if the infinitesimal heat flow dQ¯ is reversible the system and reservoir must be at the same (or infintesimally different) temperature (→ Lecture 2.1). Thus T can also be taken as the system temperature.

All this implies thatdQ ¯ rev/T (wheredQ ¯ rev is a reversible infinitesimal heat flow) must be the infinitesimal change in some new state variable of the system, S, which we will call entropy.

Clausius inequality ⇒ round any reversible cycle dS = 0. I Consider an irreversible cycle consisiting of an irreversible process from state A to state B, followed by a reversible process from B back to A.

dQ¯ B dQ¯ A dQ¯ Clausius inequality ⇒ < 0 ⇒ + < 0. IA→B→A T ZA  T irrev ZB  T rev A dQ¯ A B dQ¯ But = dS = SA − SB ⇒ < SB − SA. ZB  T rev ZB ZA  T irrev dQ¯ Applying this result to an infinitesimal irreversible process we obtain: < dS T i.e., the Clausius inequality can be re-expressed as:

=dQ/T, ¯ in a reversible process dS (3.1.8.1) (> dQ/T,¯ in an irreversible process

This is the mathematical form of the 2nd law. Note that this purely macroscopic approach provides a way of measuring ∆S: in any re- dQ¯ versible process ∆S = . However, it doesn’t provide any insight into what S is. Z T

The microscopic approach provides good insight (S = kB ln W → Lecture 1.2), but doesn’t provide a way of measuring ∆S.

We can now measure V , P , W , T , ∆U, Q, ∆S. Second Year Thermodynamics M. Coppins

3.2 The fundamental equation 3.2.1 The first law revisited For a reversible process:dQ ¯ = T dS (→ Lecture 3.1) anddW ¯ = −P dV (→ Lecture 2.1). So, for a reversible process the 1st law becomes: dU = T dS − P dV . BUT U, T , S, P and V are all state variables. If we change S and V by given amounts dS and dV , then the corresponding change in internal energy, dU, will be the same whether the process is reversible or irreversible, ⇒ this form of the 1st law must be valid even for an irreversible process.

dU = T dS − P dV Fundamental equation of thermodynamics (3.2.1.1)

For an irreversible process:dQ ¯ < T dS (→ Lecture 3.1) anddW ¯ > −P dV (→ Lecture 2.1). When they are added the differences cancel. The fundamental equation is always true for a closed system (N = constant) for which P and V are the appropriate basic state variables. We will use this equation a great deal in the rest of the course.

3.2.2 Entropy of an ideal gas 1 Fundamental equation ⇒ dS = (dU + P dV ). T nd NkBT Ideal gas: dU = NkBdT (→ Lecture 1.4), P = 2 V nd dT dV nd ⇒ dS = NkB + NkB ⇒ S = S0 + NkB ln T + NkB ln V 2 T V 2 where S0 is an integration constant.

3.2.3 The fundamental equation in action ∂U ∂U Write U = U(S,V ) ⇒ dU = dS + dV .  ∂S V ∂V S ∂U ∂U Compare with fundamental equation ⇒ T = and P = − .  ∂S V ∂V S Note: in this case we choose S and V as the 2 independent state variables because we want to compare with the fundamental equation, which has terms with dS and dV on the right hand side. ∂2U ∂2U Use relationship for mixed 2nd derivatives (→ Lecture 1.3): = ∂V ∂S ∂S∂V ∂T ∂P ⇒ = − . ∂V S  ∂S V This is the first Maxwell relation (there are 3 more). ∂U ∂U ∂T ∂P The 3 equations we have just derived, namely T = , P = − and = − ,  ∂S V ∂V S ∂V S  ∂S V follow directly from the fundamental equation. They are therefore always true. It would be very hard, if not impossible, to derive them, and demonstrate their general validity, using a microscopic theory. But once we know the fundamental equation the thermodynamic proof is simplicity itself.

3.2.4 Thermodynamic potentials Internal energy is one of four thermodynamic potentials. These are four extensive state variables, all of which have the dimensions of energy. They will be discussed more fully in the next lecture. Here we state their definitions and derive some mathematical results. The thermodynamic potentials are: U = internal energy, H = = U + PV , F = Helmholtz function = U − TS, G = Gibbs function = U + PV − TS. Corresponding to each of the thermodynamic potentials there is a different form of the fundamental equation: • dU = T dS − P dV , • dH = dU + P dV + V dP ⇒ dH = T dS + V dP , • dF = dU − T dS − SdT ⇒ dF = −SdT − P dV , • dG = dU + P dV + V dP − T dS − SdT ⇒ dG = −SdT + V dP . In Sec. 3.2.3, above, we derived equations for T and P , together with the first Maxwell relation, from the form of the fundamental equation involving dU. We can apply the same procedure to the other forms of the fundamental equation. The form of the fundamental equation for dH has terms involving dS and dP on the right hand side. Choose S and P as our 2 independent state variables: ∂H ∂H H = H(S,P ) ⇒ dH = dS + dP .  ∂S P  ∂P S ∂H ∂H Compare with dH = T dS + V dP ⇒ T = and V = .  ∂S P  ∂P S ∂2H ∂2H ∂T ∂V = ⇒ (Maxwell relation 2): = . ∂P ∂S ∂S∂P ∂P S  ∂S P The form of the fundamental equation for dF has terms involving dT and dV on the right hand side. Choose T and V as our 2 independent state variables: ∂F ∂F F = F (T,V ) ⇒ dF = dT + dV .  ∂T V ∂V T ∂F ∂F Compare with dF = −SdT − P dV ⇒ S = − and P = − .  ∂T V ∂V T ∂2F ∂2F ∂S ∂P = ⇒ (Maxwell relation 3): = . ∂V ∂T ∂T ∂V ∂V T ∂T V ∂G ∂G Using the same method with the equation for dG we find: S = − , V = ,  ∂T P ∂P T ∂S ∂V and (Maxwell relation 4): = − . ∂P T  ∂T P [You will have an opportunity to derive these 3 equations on Problem Sheet 5.]

3.2.5 Energy equation Using the equation for P obtained in the previous section, we find ∂F ∂ ∂U ∂S P = − = − (U − TS) = − + T . ∂V T ∂V T ∂V T ∂V T Use the 3rd Maxwell relation to obtain:

∂U ∂P = T − P. (3.2.5.1) ∂V T ∂T V This is the thermodynamic energy equation. Apply this equation to a system for which PV ∝ T (i.e., an ideal gas). ∂P P ∂U In this case = , and the energy equation ⇒ = 0. ∂T V T ∂V T Integrating ⇒ U = U(T ), i.e., internal energy of an ideal gas depends only on its temperature. This is a classic example the thermodynamic approach. Although the energy equation is completely general and accurate, on its own it doesn’t tell us very much. However, if we give it some small scrap of information about something (e.g., we have a gas for which PV ∝ T ) it can process the information to yield other, unexpected, facts about the thing. This is why I use the phrase “thermodynamic machine”: the mathematical formalism of thermodynamics allows us to discover new properties of things once we know a small amount about them. Notice that the “machine” doen’t care about the origin of the information which was fed into it. In our example, we could have obtained the relationship PV ∝ T from kinetic theory, or from experiments with dilute gases, or it might just be a made-up property of a hypothetical substance. 3.2.6 Other systems

The infinitesimal heat flow in a reversible process is alwaysdQ ¯ rev = T dS. For a gas, in which the appropriate basic state variables are P and V , the infinitesimal work done in a reversible process isdW ¯ rev = −P dV . In other systems we have other basic state variables, and different expressions fordW ¯ . For instance, for a stretched metal wire or elastic band the infinitesimal work done in a reversible process isdW ¯ rev = JdL, where J = tension and L = length. In this case, therefore, the fundamental equation becomes dU = T dS + JdL. All the equations derived from the fundamental equation for a gas can be applied directly to a stretched metal wire/elastic band simply by making the substitutions: P → −J and V → L. For instance, using the fundamental equation in the form dU = T dS − P dV we obtained the ∂U ∂T ∂P equations P = − and = − (→ Section 3.2.3, above). ∂V S ∂V S  ∂S V Without doing any more maths we can immediately write down the following equations for ∂U ∂T ∂J a stretched metal wire/elastic band: J = and = .  ∂L S ∂LS ∂S L Trying to derive these equations from a microscopic theory of solid objects under tension would be an extremely formidable challenge. Second Year Thermodynamics M. Coppins

3.3 Thermodynamic potentials 3.3.1 What do they mean? The thermodynamic potentials were introduced in Lecture 3.2. They are defined as follows: U = internal energy, H = enthalpy = U + PV , F = Helmholtz function = U − TS, G = Gibbs function = U + PV − TS. What do these state variables “mean”? From a microscopic perspective the internal energy is the total energy of all the particles of the system. The other three, however, do not have simple microscopic interpretations. It is best to regard H, F , and G as highly useful, purely macroscopic variables. It is often more convenient to formulate the analysis of a given situation in terms of one of these functions instead of the microscopically more meaningful internal energy. In this lecture we briefly consider a few situations of this kind.

3.3.2 The Joule-Thomson process This process is used to cool and liquify gases. The gas is forced through a porous plug (e.g., a barrier with a small hole) by a pressure difference, i.e., the pressure is lower after the plug (P2) than before it (P1).

The internal energy of the gas changes because work is done on the gas pushing it through the plug, and then the gas does work on the gas ahead of it, pushing it away. The internal energy is increased on one side of the plug (work done on the gas) and then reduced on the other (work done by the gas). So it is not obvious that this process produces a decrease in temperature rather than an increase. In fact, it is only at low temperatures that the temperature is reduced. Above a threshold value, called the inversion temperature, the Joule-Thomson process produces a temperature rise.

Consider a parcel of gas, of fixed mass, which is forced through the plug by a pressure difference produced by pistons on either side.1

Initially the gas is on the left hand side. It has a pressure P1, volume V1 and internal energy U1. The right hand piston is in contact with the plug.

1In fact the pressure difference is usually produced by a pump, but this does not affect the argument here. Both pistons now move slowly to the right so as to maintain a steady flow. During this process the P1 and P2 remain constant, with P2 < P1.

Eventually all the gas is in the right hand side, with pressure P2, volume V2 and internal energy U2, and the left hand piston is in contact with the plug.

0 The work done on the gas while on the left hand side is − P1dV = P1V1. ZV1

V2 The work done on the gas after it reaches the right hand side is − P2dV = −P2V2. Z0 Assuming the process is adiabatic (Q = 0) the 1st law ⇒ ∆U = U2 − U1 = P1V1 − P2V2, where U1 = internal energy before passing through the plug, and U2 = internal energy after passing through the plug.

Therefore U1 + P1V1 = U2 + P2V2, i.e., H1 = H2, ⇒ the enthalpy of the gas remains constant in the Joule-Thomson process. The Joule-Thomson process is an example of a situation in which a fluid moves as a result of a force exerted on it by a pressure difference. In general fluids experience a force whenever there is a pressure gradient. The motion of a fluid which is inviscid and incompressible (liquids and gases at low flow speeds) can be described by Bernoulli’s principle: the speed, v, of a small parcel of the fluid satisfies the equation v2 P + gz + = constant, 2 ρ where g = acceleration due to gravity, z = height, and ρ = density of the fluid. For a compressible fluid Bernoulli’s principle becomes: v2 + gz + h = constant, 2 where h = specific enthalpy (= enthalpy per unit mass). In the Joule-Thomson process there is no change in height, and it is sufficiently slow that v ≃ 0 ⇒ enthalpy of fixed mass of gas = constant.

3.3.3 Enthalpy and heat dH = T dS + V dP (→ Lecture 3.2). In reversible process:dQ ¯ = T dS ⇒ in reversible, constant P process:dQ ¯ = dH. But dH = change in state variable.

Can calculate heat in/out in reversible, constant P process from Hinit and Hfinal.

Qout = heat out of system = − dQ¯ = − T dS = −∆H Z Z

But −∆H = Hinit − Hfinal = decrease in H. Can visualise the system’s enthalpy being extracted as heat. For this reason H is sometimes called the heat content. But don’t forget that enthalpy is a state variable and heat isn’t. Two hundred years ago people believed that heat was a fluid (called caloric) and that one could meaningfully talk about the amount of heat contained in something. We now know that the caloric theory of heat is rubbish. So when using the expression “heat content” bear in mind it is • a metaphor, • only applicable for a reversible, constant P process.

Chemical reactions are usually • reversible, • at constant P .

∆Hreaction = heat absorbed in reaction, where ∆Hreaction = Hfinal − Hinit, and Hfinal = enthalpy of products, and Hinit = enthalpy of reactants, i.e., ∆H > 0 ⇒ endothermic reaction, ∆H < 0 ⇒ exothermic reaction.

3.3.4 Free energy dF = −SdT − P dV (→ Lecture 3.2). In reversible process:dW ¯ = −P dV ⇒ in reversible, isothermal process:dW ¯ = dF . But dF = change in state variable.

Can calculate work done in reversible, isothermal process from Finit and Ffinal.

Wout = work done by system = − dW¯ = P dV = −∆F Z Z

But −∆F = Finit − Ffinal = decrease in F . Can visualise the system’s Helmholtz function being extracted as work. For this reason F is sometimes called the free energy. In irreversible process:dW ¯ > −P dV (→ Lecture 2.1).

Wout = − dW¯ < P dV ⇒ Wout < −∆F , Z Z i.e., decrease in F = maximum work that can be extracted.

3.3.5 The link to the microscopic world Statistical physics describes the macroscopic properties of matter in terms of the underlying microscopic properties. The link between microscopic and macroscopic is provided by the partition function, Z (→ Statistical Physics course, next term). Once Z has been evaluated the macroscopic properties are found by:

• calculating the Helmholtz function using F = −NkBT ln Z (→ Statistical Physics), • using the equations derived in Lecture 3.2: ∂F ∂F ∂F S = − , P = − , U = F + T S = F − T .  ∂T V ∂V T  ∂T V 3.3.6 Specific Gibbs function Like the other thermodynamic potentials, G is an extensive state variable. It is often more useful to define an intensive variable: g = specific Gibbs function = Gibbs function per unit mass = G/M, where M = Nmp = mass of the system, mp = mass of 1 particle (atom, molecule, etc). In a given equilibrium state: • value of g is independent of the amount of material, • G = Mg. We can obtain intensive versions of the equations for V and S derived in Problem Sheet 5, by dividing throughout by M: ∂G ∂g S = − ⇒ s = − ,  ∂T P ∂T P ∂G ∂g V = ⇒ v = , ∂P T ∂P T where s = S/M = specific entropy, and v = V/M = specific volume = ρ−1 (ρ = density).

Alternatively we can define the Gibbs function per particle:g ˆ = G/N = mpg. [These equations will be used in Lectures 3.4 and 3.5.] Second Year Thermodynamics M. Coppins

3.4 Open systems 3.4.1 N =6 constant So far we have considered closed systems in which N = constant. The thermodynamic formalism is slightly modified if N =6 constant. Examples (1) Open container. N (= number of particles in container) can change.

(2) Phase changes (e.g., liquid condensing from gas). Two different phases can coexist, and Ni (= number of particles of part in phase i) can change.

th (3) Chemical reactions. Ni (= number of particles of i component) changes during reac- tion.

In this course we consider situations (1) and (2).

3.4.2 One component, one phase Closed system: N = constant ⇒ 2 independent state variables. Fundamental equation: dU = T dS − P dV Change S by dS and V by dV ⇒ change in U is specified. Open system: N =6 constant ⇒ 3 independent state variables. Fundamental equation: dU = T dS − P dV + µdN, µ = = increase in internal energy per particle added if dS = dV = 0. Write fundamental equation in terms of Gibbs function: G = U + PV − TS (→ Lecture 3.2): dG = −SdT + V dP + µdN ∂G ∂G ∂G G = G(T,P,N) ⇒ dG = dT + dP + dN  ∂T P,N ∂P T,N ∂N T,P ∂G Comparing ⇒ µ = ∂N T,P Write G(T,P,N) = Ngˆ(T,P ), whereg ˆ = Gibbs function per particle ∂ ⇒ µ = (Ngˆ) = gˆ = mpg ∂N T,P where mp = mass of 1 particle, and g = specific Gibbs function (→ Lecture 3.3). Fermions are particles with half integer (e.g., electrons). They obey the exclusion principle: 2 identical fermions cannot occupy the same quantum state. Consider a system which consists of a collection of fermions.

At T = 0 they fill a range of energy levels up to εF = Fermi energy.

This is still approximately true at finite T if kBT << εF (e.g., for free electrons in a metal). Suppose we add one extra fermion but otherwise leave the system unchanged (dS = dV = 0). The levels are unchanged but the internal energy of the system increases by εF since the extra fermion must have energy εF (all the lower levels are filled). But µ = increase in internal energy per particle added under conditions of dS = dV = 0

⇒ for fermions µ = εF .

3.4.3 Phase transitions We consider equilibrium phase transitions: system stays on the equilibrium PVT surface. Everyday phase-transitions are usually close to this. Examples of exceptions to this condition: (1) placing an ice cube in boiling water, (2) a supercooled (or supersaturated) vapour.

We consider an idealized phase transition from gas to liquid, reducing T at fixed P (e.g., the condensation of water vapour at 1 atm as the temperature falls below 100◦C). In order to ensure that we stay on the PVT surface we will do this process reversibly: keeping the pressure of the gas/liquid constant with a piston, and slowly reducing T by placing it successively in contact with an infinite sequence of infinitesimally different reservoirs.

The process follows a constant P path on the PVT surface. The projection of this path in the PV and the PT planes is shown on the next page. A → B: single phase (gas). Heat from system to reservoir,d ¯Q = CP dT . T and V fall. B → C: two phases coexist in equilibrium. Heat from system to reservoir, butdQ ¯ = ldM, where l = latent heat and dM = mass of substance which has changed phase (i.e., extracting heatdQ ¯ causes a mass of gas dM to condense to a liquid). V continues to fall as more gas condenses into liquid, but T stays constant.

C → D: single phase (liquid). Heat from system to reservoir,dQ ¯ = CP dT . T and V fall.

3.4.4 One component, two phases Focusing on the phase transition itself (B → C), we see from the PT diagram that specifying P (e.g., 1 atm) fixes T (e.g., 100◦C). Thus if we are at a phase transition there is an extra constraint ⇒ only 1 independent state variable, instead of the usual 2. But V changes during this stage ⇒ specifying P does not fix V . So how many independent state variables are there? In situations involving more than one co-existing phase or component it is much more con- venient to use only intensive variables. P and T are intensive, but N, V , U, S, H, F and G are all extensive. For each extensive variable we define a corresponding specific value, by dividing by the mass M = Nmp, where mp = mass of single particle. The separate phases have separate values. Chemists define their intensive varaibles with respect to moles, e.g., the molar enthalpy. In this course we use specific values defined with respect to mass, e.g., the enthalpy per kg.

In general there are two independent intensive state variables, e.g., we could write u = specific internal energy = u(T,P ). If 2 phases co-exist in equilibrium then specifying P gives T ⇒ only one independent intensive state variable.

This is an example of Gibbs’ phase rule: the number of independent intensive state variables = nc − np + 2, where nc = number of chemically independent components and np = the number of phases present.

The total value of any extensive property depends on the masses of each phase present, e.g., U = M1u1 + M2u2, where M1 and u1 are the mass and specific internal energy of phase 1, and M2 and u2 are the mass and specific internal energy of phase 2. Other specific values include: v = specific volume (= ρ−1), s = specific entropy, g = specific Gibbs function. During a phase change in which phases 1 and 2 coexist in equilibrium: • P and T remain constant ⇒ intensive variables remain constant. • v1 =6 v2, e.g., density of water vapour < density of liquid water. • s1 =6 s2, e.g., specific entropy of water vapour > specific entropy of liquid water (supply heat at constant T to vaporize water). • M1 + M2 remains constant ⇒ dM1 = −dM2.

The change in internal energy can be written: dU = d(M1u1 + M2u2) = u1dM1 + u2dM2 = (u1 − u2)dM1. We assumed that the process was reversible: dQ¯ = T dS = T d(M1s1 + M2s2) = T (s1dM1 + s2dM2) = T (s1 − s2)dM1, dW¯ = −P dV = −P d(M1v1 + M2v2) = −P (v1dM1 + v2dM2) = −P (v1 − v2)dM1.

1st law ⇒ (u1 − u2)dM1 = T (s1 − s2)dM1 − P (v1 − v2)dM1 ⇒ u1 − T s1 + P v1 = u2 − T s2 + P v2 ⇒ g1 = g2. Second Year Thermodynamics M. Coppins

3.5 Phase changes 3.5.1 First order phase changes Consider a situation in which phases 1 and 2 co-exist in equilibrium. Convenient to use only intensive variables (→ Lecture 3.4). Divide extensive variables V , S, and G by mass M → (intensive) specific values v, s and g. In general the specific variables for a given phase of a given substance depend on 2 indepen- dent intensive variables (e.g., P and T ). But at a given pressure two phases only co-exist in equilibrium at a unique temperature ⇒ at a phase transition the intensive variables are functions of a single independent variable (e.g., P ). During the phase transition P and T remain constant. Heat in/out changes the relative proportions of the two phases: dQ¯ = ldM, where l = latent heat and dM = mass of substance which has changed phase. C dQ¯ dQ¯ =6 0 but dT = 0 ⇒ c = constant pressure specific heat = P = → ∞. P M MdT At the given values of P and T the specific volumes, v, and specific entropies, s, of the two phases differ. But the specific Gibbs functions, g, are the same (→ Lecture 3.4), i.e., during a phase transition from phase 1 to phase 2 • v1 =6 v2, • s1 =6 s2, • g1 = g2. ∂g ∂g But v = and s = − (→ Lecture 3.3) ∂P T ∂T P Solid/liquid, liquid/gas, solid/gas transitions are examples of first order phase transitions: • T = constant during transition, and two phases co-exist,

• involve latent heat ⇒ cP → ∞, • g is continuous, ∂g ∂g • and are discontinuous. ∂P T ∂T P The behaviour of various specific variables as the temperature changes through a 1st order phase transition is shown schematically on the next page. Second order phase transitions also occur, e.g., onset of superconductivity: g and its first derivatives are continuous, but second derivatives are discontinuous.

3.5.2 Clausius-Clapeyron equation dP This is an equation for the slope (i.e., ) of the phase boundary P = P (T ). dT Consider part of the phase boundary between phase 1 and phase 2.

A and B are two points on the phase boundary. A g1 = specific Gibbs function of phase 1 at point A. B g1 = specific Gibbs function of phase 1 at point B. A g2 = specific Gibbs function of phase 2 at point A. B g2 = specific Gibbs function of phase 2 at point B. Write g = g(T, P ). Then making small changes dT and dP the corresponding small change in g is ∂g ∂g dg = dT + dP = −sdT + vdP , ∂T P ∂P T ⇒ dg1 = −s1dT + v1dP and dg2 = −s2dT + v2dP , B A A ⇒ g1 = g1 + dg1 = g1 − s1dT + v1dP B A A g2 = g2 + dg2 = g2 − s2dT + v2dP . B B A A Subtract: (g2 − g1 ) = (g2 − g1 ) − (s2 − s1)dT + (v2 − v1)dP . A A B B But g2 = g1 and g2 = g1 , dP ∆s ⇒ Clausius-Clapeyron equation: = dT ∆v where ∆s = s2 − s1 and ∆v = v2 − v1 ∆S 1 Q Can rewrite the Clausius-Clapeyron equation by noting that ∆s = = trans M M  T  where Qtrans = heat absorbed/released during phase change, and T = temperature during phase change = constant. [Remember: we assumed the process was reversible → Lecture 3.4.]

Choosing phases 1 and 2 such that Qtrans > 0 (e.g., 1 = liquid, 2 = gas) then Qtrans = lM l dP l ⇒ ∆s = ⇒ = . T dT T ∆v

3.5.3 Liquid/gas phase boundary

∆v = v2 − v1 = vgas − vliquid. The specific volume of the gas phase is nearly always much larger than the specific volume of the liquid phase, ⇒ ∆v ≃ vgas.

The condition that vgas >> vliquid is valid everywhere along the liquid/gas phase boundary, except very close to the critical point.

Above the critical temperature there is no phase transition between liquid and gas. Increasing the pressure of the gas increases its density. Eventually it becomes so dense that it is “like” a liquid. V V kBT Assuming the gas can be treated as ideal: vgas = = = M Nmp mpP where mp = mass of 1 gas molecule. m P ⇒ ∆v−1 = p kBT dP l m P ⇒ lg p Clausius-Clapeyron equation becomes: = 2 , dT kBT where llg = latent heat of vaporization.

dP llgmp dT Rearranging: = 2 P kB T l m and integrating ⇒ ln P = C − lg p where C = integration constant. kBT Assume that some point (P0,T0) on the phase boundary is known llgmp (e.g., for water, could use P0 = 1 atm, T0 = 373 K) ⇒ C = ln P0 + . kBT0 Then for any other temperature T , the pressure at which the liquid/gas phase transition P l m 1 1 takes place is given by: ln = lg p − . P0  kB T0 T  Second Year Thermodynamics M. Coppins

3.6 Thermodynamics of radiation 3.6.1 gas Any object at finite T emits , ⇒ an “empty” container with a vacuum inside is actually full of photons. We can regard this as a photon gas. This a relativistic, quantum system, but thermodynamics can still be applied to it. Photon gases and ideal gases have many properties in common. In both systems the particles: • don’t collide, • have a distribution of , • have an isotropic distribution of directions, • exert pressure on walls of container (photon gas exerts ). From a classical point of view radiation pressure is the force exerted by the magnetic field of an electromag- netic wave on currents flowing in a solid surface which have been induced by the wave itself.

Photon gases and ideal gases also have significant differences, for instance: • gas molecules have a distribution of speeds, photons all have the same speed (c), • gas molecules are reflected from walls, photons are absorbed and emitted by walls, • the relationship between particle energy (e) and momentum (p) is: p2 e = for gas molecules, e = pc for photons. 2mp

Cavity radiation: equilibrium state of a photon gas in a closed cavity. Unlike a normal gas N (= number of photons in a closed cavity) can vary. To see this, consider a reversible isothermal expansion of a photon gas.

Suppose V = 0 initially (this is not possible for a normal gas) ⇒ no photons (N = 0). As V increases the cavity fills with photons ⇒ N increases. Q = heat into gas, −W = work done by gas. 1st law ⇒ internal energy of photon gas changes: ∆U = Q + W , ⇒ U must depend on T and V (these are the things we can vary). Varying T and V also changes N, i.e., U is a function of 2 independent state variables, even though dN =6 0, ⇒ µdN = 0 ⇒ µ (= chemical potential) = 0 for photon gas (→ Lecture 3.4).

3.6.2 Pressure and energy flux U Defineu ˆ = = internal energy density. V But U = Ne where e = average energy/particle. N ⇒ uˆ = ne where n = = number density of particles (photons). V In a photon gas the photons have an isotropic distribution, i.e., there are photons moving in uˆ all directions. In this case the (radiation) pressure is: P = . 3 We can regard this as a form of the equation of state of the photon gas. As usual in thermodynamics we don’t ask where it came from, merely accept it as an input. In next term’s Electromagnetism course you will derive the expression P =u ˆ for the radiation pressure exerted by a plane electromagnetic wave which is completely absorbed at a surface. Since our surface is also emitting we might have expected an equal contribtion to the pressure from the emitted photons, giving uˆ P = 2ˆu. Instead we have P = . 3 There are two effects to consider here: (1) emission from the outer surface of the container, and (2) the isotropy of the radiation in the cavity. (1) In equilibrium the walls of the container are at a uniform temperature, and emit photons from their inner and outer surfaces. Since the photons are emitted in all directions, the total momentum (vector sum) they impart to the walls of the container is zero. Thus they do not contribute to the radiation pressure. The absorbed photons only impinge on the wall from one side. They therefore do impart net momemntum. (2) In a plane electromagnetic wave all the photons are moving in a single direction. In our case, however, the photons have an isotropic distribution of directions, i.e., they can have any direction of motion. This introduces the factor of 3.

The analagous situation for a monatomic ideal gas would be the comparison between nd = 1 (1 degree of freedom) and nd = 3 (3 degrees of freedom). 1 NkBT • nd = 1. Molecules are constrained to move in 1-dimension: U = N kBT ⇒ uˆ = ⇒ P = 2uˆ. 2 2V 3 3NkBT 2 • nd = 3. Molecules are free to move in any direction: U = N kBT ⇒ uˆ = ⇒ P = uˆ. 2 2V 3 If the ideal gas molecules were absorbed by the walls of the container, rather than reflected from them, the uˆ pressure would be reduced by a factor of 2 ⇒ P = , just like the photon gas. 3

Γ = particle flux onto wall of cavity = number of photons/area/time. Double n ⇒ double the number of photons reaching wall in any given interval of time. ⇒ Γ = αn where α = constant (depends on the speed of the particles, i.e., c in our case). −2 ΓE = energy flux onto wall (SI unit W m ) = Γe. In a normal gas ΓE =6 Γe because the particles have different speeds. In any given interval more of the faster particles reach the wall. These particles have more energy ⇒ ΓE > Γe. 3 For a Maxwellian distribution ΓE = Γ2kBT , but e = kBT . 2

Thus we find ΓE = αne = αuˆ.

3.6.3 Energy density Consider two closed cavities A and B. They differ in most respects (size, shape, material, etc). However, each is in thermal contact with a reservoir at the same temperature T .

The internal energy densities of the photon gases in the 2 cavities areu ˆA andu ˆB. We place the two in contact and open a small hole (area A) between them.

A→B The rate at which energy flows from A to B is ΓE A = αuˆAA. B→A The rate at which energy flows from B to A is ΓE A = αuˆBA. In equilibrium these rates must be equal, otherwise there would be net flow of energy from one reservoir to another reservoir at the same temperature.

⇒ uˆA =u ˆB. ⇒ uˆ depends only on T , and is independent of size, shape, material... ⇒ for a photon gas: U =u ˆ(T )V (i.e., internal energy is a function of both T and V ). This is another way in which ideal gases and photon gases differ: as we know the internal energy of an ideal gas is a function only of temperature.

∂U ∂P We now apply the energy equation (→ Lecture 3.2): = T − P , ∂V T ∂T V ∂ ∂ uˆ uˆ T ∂uˆ uˆ ⇒ (ˆuV ) = T − ⇒ uˆ = − . ∂V T ∂T  3 V 3 3 ∂T V 3 ∂uˆ duˆ Butu ˆ is a function only of T ⇒ → . ∂T V dT T duˆ 4 duˆ dT ⇒ = uˆ ⇒ = 4 . 3 dT 3 uˆ T Integrating ⇒ lnu ˆ = 4 ln T + ln Λ (where Λ = integration constant), ⇒ energy density of a photon gas is given by:u ˆ = ΛT 4, Λ ⇒ internal energy of a photon gas: U = ΛT 4V , pressure of a photon gas: P = T 4. 3 3.6.4 Entropy ∂U ∂U U = U(T, V ) ⇒ dU = dT + dV = 4ΛT 3V dT + ΛT 4dV . ∂T V ∂V T 1 Fundamental equation (→ Lecture 3.2) ⇒ dS = (dU + P dV ). T 1 Λ 4 ⇒ dS = 4ΛT 3V dT + ΛT 4dV + T 4dV = 4ΛT 2V dT + ΛT 3dV . T  3  3 1 4 4 But T 2dT = d(T 3) ⇒ dS = Λ V d(T 3) + T 3dV = Λd(VT 3), 3 3 3  4 ⇒ entropy of a photon gas is given by: S = ΛVT 3. 3 [Note that we set the integration constant to zero here → Lecture 3.7.]

3.6.5 Blackbody radiation Consider two objects at the same temperature. Both objects emit and absorb radiation. Thus they can exchange energy. This is a form of heat flow. In equilibrium each object must emit just as much radiation as it absorbs (otherwise there could be a net heat flow between the two objects and one of them would spontaneously start getting hotter), ⇒ good absorbers are good emitters; poor absorbers are poor emitters. A perfect absorber is called a (it absorbs all incident radiation). It must therefore also be the best possible emitter. We can determine the basic temperature scaling of the power radiated by a black body by placing one inside a cavity in which there is a photon gas in equilibrium at temperature T .

Heat (in the form of radiation) can flow between the reservoir and the black body. In equilibrium the black body must have: • temperature T (otherwise heat to/from reservoir until it is). • Ψ = power/area out of black body = power/area in (from photon gas), Power/area into black body = energy flux = αuˆ = αΛT 4, ⇒ Ψ = power/area emitted by black body at temperature T = σT 4 (Stefan’s law) where σ = constant. We cannot determine the value of σ (Stefan’s constant) from purely thermodynamic considerations. It was originally found experimentally, and can also be obtained from statistical mechanics: σ = 5.67×10−8 W m−2. Second Year Thermodynamics M. Coppins

3.7 The third law 3.7.1 Alternative statements The third law is different from the zeroth, first and second laws. Unlike them it does not introduce a new state variable.

• Macroscopic version. It is impossible to reach absolute zero in a finite number of steps.

• Microscopic version. The entropy of a perfect crystal is zero at absolute zero.

At absolute zero all the wavefunctions of all the atoms of the crystal will be fixed in the ground state ⇒ there is only one microstate corresponding to this macrostate ⇒ S = kB ln 1 = 0.

3.7.2 Ideal gas and photon gas nd Ideal gas S = S0 + NkB ln T + NkB ln V (→ Lecture 3.2). 2 T → 0 ⇒ S → −∞ ⇒ not consistent with 3rd law. The ideal gas equation of state is derived from a classical model of non-interacting particles. Need quantum theory at very low temperatures ⇒ ideal gas equations break down close to absolute zero. Photon gas S ∝ VT 3 (→ Lecture 3.6). T → 0 ⇒ S → 0 ⇒ consistent with 3rd law. The photon gas is inherently quantum. In Lecture 3.6 we derived the equation for the entropy of a photon gas by integrating dS. We now see that the choice of integration constant (= 0) was motivated by the 3rd law.

3.7.3 The unattainability of absolute zero Consider the following two-stage process:

(1) Reversible, adiabatic expansion (¯dQ = 0 = dS). Initial state (V0,T0). Final state (V1,T1).

1st law ⇒ dU = −P dV (¯dQ = 0) ⇒ dU < 0 (since dV > 0) ⇒ T1 < T0.

2dU In an ideal gas |dT | = . ndNkB In a real gas there is an additional effect: V increases ⇒ average inter-particle separation increases ⇒ average particle potential energy increases ⇒ additional decrease in average particle kinetic energy ⇒ |dT | even larger.

(2) Reversible isothermal compression back to volume V0. Plotting these processes on a TS diagram:

We might suppose that by successively alternating these two processes we could reach abso- lute zero. This is illustrated in the figure below, which shows a possible form for the lines of constant volume (V = V0 and V = V1) between which we operate.

Notice that the line V = V1 lies below the line V = V0 on the TS diagram. This is because adiabatic expansion produces a reduction in T .

In fact, however, the macroscopic version of the 3rd law tells us that this is impossible. This fact indicates that the lines of constant V converge at absolute zero, as shown below.

In this case we cannot reach 0K in a finite number of steps. Since we can write S = S(T,V ) and the macroscopic version of the 3rd law indicates that S(T = 0,V0) = S(T = 0,V1), for any V0 and V1, we see that for any given system S has a unique value at absolute zero. This is consistent with the microscopic version of the 3rd law (S = 0 at T = 0). 3.7.4 Paramagnetic materials The atoms of a paramagnetic material behave like tiny current loops (magnetic dipoles): • they have their own intrinsic magnetic field, • they experience a torque if an external magnetic field is applied. This behaviour is actually a quantum effect, due to electron orbital motion, electron spin and nuclear spin.

An external magnetic tends to align the atoms with their dipole moments in the direction of the applied field. Thermal motion ⇒ the alignment is not perfect.

Define B0 = applied magnetic field in the absence of any material (B0 = µ0H).

• Fix B0, increase T : ⇒ atoms become less aligned, ⇒ S increases,

⇒ line of B0 = constant has positive slope on TS diagram.

• Fix T , increase B0: ⇒ atoms become more aligned, ⇒ S decreases,

⇒ line of B0 = higher value lies above line of B0 = lower value on TS diagram.

• B0 = 0, decrease T : ⇒ atoms become more aligned (atoms interact through their self magnetic fields), ⇒ S decreases.

These aspects of the behaviour of paramagnetic materials are illustrated schematically in the TS diagram, below. 3.7.5 Magnetic cooling 1. Isothermal magnetization: Place a sample of paramagnetic material in thermal contact with liquid helium (at 1K) and slowly increase the applied magnetic field from zero to a few Tesla.

2. Adiabatic demagnetization: thermally isolate the sample and slowly reduce the applied magnetic field to zero.

T falls significantly during stage 2. At the start of stage 2 the atoms have thermal motion, but are kept in aligment by the strong applied field. As the applied field is reduced the atomic dipoles become increasingly unaligned. However, work has to be done on any given atomic dipole to change its orientation. The energy to do this work comes from the thermal motion ⇒ T falls.