ME346A Introduction to Statistical Mechanics – Wei Cai – Stanford University – Win 2011

Handout 6. Thermodynamics
January 26, 2011

Contents
1 Laws of thermodynamics
1.1 The zeroth law . . . . . . . . . . . . . . . . . .
1.2 The first law . . . . . . . . . . . . . . . . . . . .
1.3 The second law . . . . . . . . . . . . . . . . . .
1.3.1 Efficiency of Carnot engine . . . . . . . .
1.3.2 Alternative statements of the second law
1.4 The third law . . . . . . . . . . . . . . . . . . .

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

.
.
.
.
.
.

2
3
4
5
5
7
8

2 Mathematics of thermodynamics
2.1 Equation of state . . . . . . . . . . . .
2.2 Gibbs-Duhem relation . . . . . . . . .
2.2.1 Homogeneous function . . . . .
2.2.2 Virial theorem / Euler theorem
2.3 Maxwell relations . . . . . . . . . . . .
2.4 Legendre transform . . . . . . . . . . .
2.5 Thermodynamic potentials . . . . . . .

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

9
9
11
11
12
13
15
16

3 Worked examples
3.1 Thermodynamic potentials and Maxwell’s relation . . . . . . . . . . . . . . .
3.2 Properties of ideal gas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3 Gas expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21
21
24
28

4 Irreversible processes
4.1 Entropy and irreversibility . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.2 Variational statement of second law . . . . . . . . . . . . . . . . . . . . . . .

32
32
32

1

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

.
.
.
.
.
.
.

In the 1st lecture, we will discuss the concepts of thermodynamics, namely its 4 laws. The
most important concepts are the second law and the notion of Entropy.
(reading assignment: Reif § 3.10, 3.11)
In the 2nd lecture, We will discuss the mathematics of thermodynamics, i.e. the machinery to
make quantitative predictions. We will deal with partial derivatives and Legendre transforms.
(reading assignment: Reif § 4.1-4.7, 5.1-5.12)

1

Laws of thermodynamics

Thermodynamics is a branch of science connected with the nature of heat and its conversion to mechanical, electrical and chemical energy. (The Webster pocket dictionary defines,
Thermodynamics: physics of heat.)
Historically, it grew out of efforts to construct more efficient heat engines — devices for extracting useful work from expanding hot gases (http://www.answers.com/thermodynamics).
Sethna says “Thermodynamics is a zoo of partial derivatives, transformations and relations”.
Thermodynamics is summarized by its Four laws, which are established upon a large number
of empirical observations.
These laws describes what you cannot do, if you are in the business (or game) of converting
heat into work.
• Zeroth law: you CANNOT ignore the temperature of your heat engine.
• First law: you CANNOT win, the best you can do is to break even. Here “winning”
means you extract MORE work than your net in-take of heat.
• Second law: you CANNOT break even, unless you can reach zero temperature.
• Third law: you CANNOT reach zero temperature in your life time.

What is the conclusion on your prospect in this game?

2

1.1

The zeroth law

The zeroth law of thermodynamics established the existence of temperature in macroscopic systems.

Temperature is a state quantity which is unknown in classical mechanics. It is specially
introduced for thermodynamics. — Greiner.

Zeroth law — “transitivity of thermodynamic equilibrium”
If systems A and B are in thermal equilibrium,
and systems B and C are in thermal equilibrium,
then systems A and C are in thermal equilibrium.
Q: What does thermal equilibrium mean?
A: If a closed system is left alone for a long time, it will automatically reach an equilibrium
state and its macroscopic state quantities will no longer change with time.
Suppose system A and B have individually reached equilibrium.
If we bring A and B in thermal contact with each other, i.e. allowing them to exchange
heat, then the state quantities of A and B (generally speaking) will change until the
combined system A + B reaches equilibrium again.
System A and B are said to be in thermal equilibrium if none of the state quantities
change when they are brought in thermal contact with each other. Hence, systems
which are in thermal equilibrium with each other have a common (intensive) quantity,
called temperature.
An extensive property scales linearly with the size of the system, e.g. number of
molecules N , volume V , energy E, entropy S.
An intensive property is independent of the system size. e.g. pressure p, temperature
T.
In other words, if we bring two identical copies of a system together to form a new
system, all the extensive properties will double, while all the intensive properties will
remain unchanged.

Notice that the zeroth law applies to any system, so we can let system B be a thermometer.

3

2 The first law The first law of thermodynamics establishes the total energy as a state variable. There are infinite number of paths (ways) to do this. dW ¯ and dQ ¯ are not complete differentials (they are path dependent). Any living organism cannot be in a state of complete equilibrium.g. A and C) that it can be in thermal contact with. — You wouldn’t tell the doctor your temperature is not well defined since you are still alive. and/or giving it heat dQ. Heat is nothing but a special form of energy — Mayer (1842) First law — “conservation of energy” Statement 1: you can change the total energy of the system by doing work dW ¯ to it. It is often reasonable to speak of thermodynamic equilibrium even if the state quantities still change very slowly.The height of the liquid h can be used to define the temperature values of all other systems (e. Suppose we want to transform the system from an equilibrium state 1 to another equilibrium state 2. yet the doctor still wants to know your temperature. ¯ The change of total energy is dE = dW ¯ + dQ ¯ (1) dE is a complete differential (path independent). 4 . 1.

1 Efficiency of Carnot engine Entropy is usually discussed together with the Carnot cycle — A heat engine using ideal gas and operating between two temperatures.3 H H dE = 0 = dW ¯ + dQ. whereas work and heat are not.e. We can think of T1 as the factor to convert the ¯ rev incomplete differential dQ ¯ rev to a complete differential dS = dQ . Consider two arbitrary reversible paths from state 1 to state 2. ⇒ Energy is a state property.e.3. T 1. ¯ The second law The second law of thermodynamics establishes the entropy as a state variable.The intermediate states along the path do not even need to be equilibrium states! Although it is often convenient to imagine a path that goes through a sequence of equilibrium states. E2 − E1 = ∆E = R dE = a R b dE is independent of the path. T Z Z Z Z dQ ¯ rev dQ ¯ rev S2 − S1 = ∆S = dS = = dS = T T a a b b (2) S is thus a state property called Entropy. the total heat deposited into the system depends on the chosen path. i. we know that ∆Qa = a dQ ¯ rev 6= ∆Qb = b dQ ¯ rev . R R ∆Wa = R a dW ¯ 6= ∆Wb =R b dW ¯ and ∆Qa = a dQ ¯ 6= ∆Qb = b dQ ¯ are dependent on path chosen. experiments confirm that dS = dQ is an exact differential. 5 . i. Statement 2: you can never “gain energy”. ¯ However. 1. R R From the first law.

Hence the efficiency of the Carnot engine is. ∆QI ∆QIII + =0 Th Tc → ∆QIII = − Tc Th Hence. engine release heat ∆QIII < 0.Step I: isothermal expansion at higher temperature Th . ∆S = ∆SI + ∆SIII = 0. Since ∆QII = ∆QIV = 0. ∆Q = ∆QI + ∆QIII (3) Notice that ∆QI > 0 (∆QI is the heat absorbed from high temperature reservoir Th ) and ∆QIII < 0 (|∆QIII | is the heat dumped to low temperature reservoir Tc ). volume from V3 to V4 . |∆W | < ∆QI not all heat absorbed from Th can be converted to useful work. some of them |∆QIII | are wasted and has to be dumped to Tc . η =1− 6 Tc ∆QI Th (6) (7) . the total heat intake for the entire cycle is. Step IV: adiabatic compression ∆QIV = 0. no heat exchange by definition). ∆QIII |∆W | =1+ <1 (5) η= ∆QI ∆QI The efficiency η can be obtained using the fact that entropy S is a state property. Since ∆QII = ∆QIV = 0 (adiabatic steps. T drops to lower temperature Tc . Step II: adiabatic expansion ∆QII = 0. Hence total energy change ∆E = ∆Q + ∆W = 0. engine take in heat ∆QI > 0 and produce work. ∆W = −∆Q = −∆QI − ∆QIII < 0 (4) Since ∆QIII < 0. After the Carnot engine has completed one cycle ∆S = 0. After the Carnot engine has completed one cycle. volume from V1 to V2 . Step III: isothermal compression at low temperature Tc . you break even (η = 1) only if Tc = 0 (or Th → ∞). volume from V2 to V3 . it returns to state 1.

3. an engine coupled to this “magic stone” will no longer need to find another heat reservoir to dump entropy through heat exchange. A system in contact with one thermal reservoir cannot produce positive work in a cycle (Kelvin’s statement).e. according to statement 1. being a reversible engine. heat never flows from a low temperature to a high temperature place unless you have a refrigerator (e. a Carnot engine running backward).1. It has to dump this entropy somewhere else (to Tc ) before it can start a new cycle.2 Alternative statements of the second law The second law has many equivalent statements: 1. 2. Otherwise.g. A system operates in a cycle cannot produce heat flow from a colder body to a hotter body — unless it consumes work (Clausius statement). If there is a “magic stone” that can spontaneously decrease its entropy. having absorbed heat ∆QI . the engine has increased its own entropy. — i. This also means the Carnot engine. For example. The entropy of an isolated system never decreases. the Carnot engine cannot have η = 100% efficiency.3. Statement 3 is probably the most intuitive. Therefore. — The two engines together form a refrigerator that requires no power! One can use similar ideas to show that statements 1 and 2 are both equivalent to statement 3. We all experience spontaneous heat flow from high T to low T but never the opposite. if you have another engine that is more efficient than the Carnot engine. It’s efficiency (work output / heat intake) can then achieve 100%. Then we could give the work produced by this engine to the Carnot engine which now runs backwards . 7 . is the most efficient heat engine between Th and Tc .consuming work and carry heat from Tc to Th without consuming external work.

8 . no matter how idealized. all processes cease and the entropy of the system approaches an minimum value” (which can be defined as zero) — also known as Nernst’s theorem. there is no external work and no heat exchange.4 The third law The third law of thermodynamics is an axiom of nature regarding entropy and the impossibility of reaching absolute zero of temperature. Third law: “As a system approaches absolute zero temperature. Hence entropy only increases during equilibration and reaches maximum at equilibrium.This “magic heat engine” coupled with a Carnot engine running in reverse. would lead to refrigerator requiring no power. the system can only occupy the ground state at T = 0. Hence S2 > S1 . to reduce any system to the absolute zero of temperature in a finite number of operations. when left alone. entropy is related to the number of microscopic states consistent with macroscopic states variables.) Since S = kB ln Ω. In other words.e..” (Unfortunately. there is only one microscopic state. entropy only increases. Alternative statement: “It is impossible by any procedure. During this process. Third low states that at zero temperature. going to equilibrium is a spontaneous process. The process is irreversible. 1. Any system. showing the equivalence between the above two statements of this third law is beyond this class. will go to equilibrium. i. In an adiabatic (∆Q = 0) irreversible process.

Notice that S. From 2nd law of thermodynamics. For example. containing N gas molecules. MIT (2003) T = 4. Doug Osheroff.) NIST (1994) T = 7 × 10−7 K. The fourth one then has to be a function of these three. V. Therefore. S(N. V. V. the total energy of the gas molecules is E. (Osheroff is currently a physics professor at Stanford.e. For a given type of gas. the equation of state of ideal gas can be written as # "  3/2 ! 5 V 4πmE + S(N. N.) 9 (8) . Any three of them uniquely specifies a state. He won the 1996 Nobel Prize for this discovery.5 × 10−10 K 2 Mathematics of thermodynamics In this lecture. If the gas tank is left alone for a time.Here we list some world records of reaching down to zero K.002K. We will derive it later. V. V. a Cornell graduate student. S must be a function of N.1 Equation of state Let’s start by considering an isolated system — A gas tank of volume V . E) = N kB log N 3N h2 2 (See “microcanonical ensemble” notes. E are all extensive state functions. it should go to a thermal equilibrium state. E i. E stay constant. discovered (in 1970’s) superfluid phase of helium-3 at 0. V. E) — This function is specific to the type of material (gas) that we are studying and can be considered as an “equation of state”. the three variables (N. E) will completely specify the state of this (pure) gas. we also know that every equilibrium state has a well defined entropy S. and N. we will go through the mathematics of thermodynamics. 2.

 p≡− ∂E ∂V 10  (14) S.  T ≡ ∂E ∂S  (13) V. where we pass heat dQ ¯ to the gas tank while keeping N. Then  dE = ∂E ∂S   dS + V.N ∂E ∂V   dV + S. dS = 0.V ∂N E. dE are all complete differentials. V.N — be careful which variables we keep fixed while taking the derivatives.V 1 = T  ∂S ∂E (10)  (11) N. dE = dQ ¯  ¯ ∂S ¯ which leads to dQ = dQ. N ).Now let’s start taking partial derivatives! Because S. Let us now consider a more specific change.V Thus.       ∂S ∂S ∂S dS = dE + dN + dV (9) ∂E N.N Hence we arrive at the definition of pressure. Suppose we do mechanical work dW ¯ to the gas tank by changing its volume (dV ). N.V We can consider this as the definition of temperature — from the equation of state S(N. S. dN. dN = 0. V. ¯ Hence we also know dS = T1 dQ. E). It is perhaps more convenient to rewrite the equation of state as E(S. dV = 0. The above equation is valid for an arbitrary differential change of a equilibrium state.N . E are all state functions. dS. so −p dV = ∂V dV . T ∂E N. The work will be done adiabatically (¯ dQ = 0). V.N ∂E ∂N  dN (12) S. In this case dN = 0. dE = dW  ∂E We also know that dW = −p dV . dV. V fixed.V ∂V E. Hence.N Let us now consider a different (reversible) change of state.

V.V E.  µ≡ ∂E ∂N  (15) S. E(λS. entropy S. dE = T dS − p dV + µ dN Summary: Equation of state E(S. µ dN = ∂E ∂N S.V  dN . N ) should have the following property. volume V . Again. dE = dW So. This means that the equation of state function E(S. The result is a system that should have energy λE. N ) — material specific       ∂E ∂E ∂E . entropy λS. Next we will apply Virial theorem (Euler’s theorem) to show some “surprising” properties. S. V. In this case. N ) (19) This means E(S. p. V.N ∂N S. and put them together to form a big gas tank.N ∂V S. (17) T. dW = µ dN . V.We can also do “chemical work” to the gas tank by injecting more gas molecules (dN ). N are extensive variables.2 (16) (18) Gibbs-Duhem relation Let’s prove some mathematical identities now! 2. p≡− . Hence we arrive at the definition of chemical potential. and number of molecule N . µ is called chemical potential. λN ) = λE(S. volume λV and number of molecule λN . V. each having energy E. µ≡ T ≡ ∂S V. dS = 0.2. N ) is a “homogeneous function of 1st order”. λV. dE = T dS − p dV + µ dN 2.1 Homogeneous function Suppose we collect λ gas tanks.V Therefore. dN = 0. 11 . µ are intensive variables.

V.V (24) (25) In other words. x2 .N ∂N S.2. x2 . xn ) which is homogeneous of 1st order. V.2 Virial theorem / Euler theorem Consider function f (x1 . un ) = · = · xi ∂λ ∂u ∂λ ∂x i i i=1 i=1 (22) n X ∂f f (x1 . u2 . N ). n X ∂f f (x1 . · · · . x2 .N ∂N S. N ) = ·S+ ·V + ·N ∂S V. x2 . x2 .N ∂V S. u2 . N ) = T · S − p · V + µ · N (26) dE = T · dS − p · dV + µ · dN (27) Recall that (Both the above two equations are true!) Let’s push the math one step further!       ∂E ∂E ∂E E(S.N ∂V S. · · · . · · · . E(S. un ) = f (x1 . · · · . f (x1 . · · · .V ⇒ dE = T dS + S dT − p dV − V dp + µ dN + N dµ But dE = T dS − p dV + µ dN 12 (28) (29) . · · · . V. xn ) = xi ∂xi i=1 (23) Take λ = 1. therefore f (u1 . u2 . n n X ∂f ∂ui X ∂f ∂ f (u1 . · · · . xn ) ∂λ (21) At the same time. xn ) (20) ∂ f (u1 . V.2. · · · . N ) = ·S+ ·V + ·N ∂S V. we get This is the Virial Theorem: for a homogenous function of 1st order. · · · . un ) = λf (x1 . xn ) = · xi ∂xi i=1 Applying this theorem to function E(S. x2 . xn ). Define ui = λxi .       ∂E ∂E ∂E E(S.

y ∂f ∂y  (31) x then. we get  because they both equal to ∂a ∂y   = x ∂b ∂x  (32) y ∂2f .This leads to the Gibbs-Duhem relation S dT − V dp + N dµ = 0 (30) Consequence of the Gibbs-Duhem relation: It is impossible to vary all the intensive variables freely. This is contrary to extensive variables (N. a 2D surface in 3D space. ∂f ∂x   b≡ . z). z) and y(x. E). ∂x∂y Mathematical identity 2: Consider a function z(x. which can be changed freely. The same relation can also be expressed by x(y. If you vary T and p. y.3 Maxwell relations Mathematical identity 1: Consider a function f (x. y) This function defines a relation between x. Then  ∂x ∂y   =− z ∂x ∂z   y ∂z ∂y  (33) x (Shouldn’t be confused with the chain rule! Note the minus sign!) Equivalently. i. y). z. we can write  ∂x ∂y   · z ∂y ∂z   · x 13 ∂z ∂x  = −1 y (34) .e. 2. then µ will change in a predictable manner.  a≡ df = a dx + b dy. V.

N ∂V E. The following Maxwell relation appears. algebraic way to prove this identity is the following. we can fix S. b  ∂y ∂z  x b =− . We can now apply these two identities to function E(S.  dz =  dx = ∂z ∂x  ∂x ∂y   dx + y  dy + z ∂z ∂y  ∂x ∂z  dy (36) dz (37) x y Plug the second equation into the first.V ∂S V.N     ∂p ∂µ = − ∂N S. dE = T dS − pdV + µdN the first identity leads to the following Maxwell’s relations. z). N ). c  ∂z ∂x  =− y c a (35) An alternative.S ∂V E.N Similarly. V.S 14 .V ∂V S.e. N ) as x(y.This is because  ∂x ∂y  z a =− . z). we have proved the identity of interest. Because.N (40) (41) (42) (43) Let’s fix N . − p = −T · (44) ∂V S.S ∂N V. S) is similar to x(y. we obtain.N ∂S V. #     "    ∂z ∂x ∂x ∂z dz = · dy + dz + dy ∂x y ∂y z ∂z y ∂y x The dz term cancel and we have       ∂z ∂x ∂z dy + dy = 0 ∂x y ∂y z ∂y x (38) (39) Because this has to be true for arbitrary dy.N ∂S V. and consider E(V. The second identity leads to the following Maxwell’s relation.         ∂E ∂E ∂S ∂S =− · i.N ∂V E.     ∂T ∂p = − ∂V S.N     ∂µ ∂T = ∂N S.       ∂E ∂E ∂N =− · (45) ∂V N. then E(V.

T ≡ ∂E ∂S  (47) V. p). Start with E(S. V.All of these Maxwell relations are mathematically true. N ) is not convenient to work with. N ). V. But the physical meaning of some of them is not obvious. Here. N ) dA = −SdT − pdV + µdN 15 (49) (50) . N ) → A(T. we know dE = T dS − pdV + µdN Define A = E − TS (48) What is A a function of? dA = dE − d(T S) = dE − T dS − SdT = T dS − pdV + µdN − T dS − SdT = −SdT − pdV + µdN So A is a function of T . we want the following Legendre transformation. V . q) ˙ → H(q. The Legendre transform allows us to work with a different equation of state A(T.4 Legendre transform The equation of state E(S.  E(S. V. This is because we usually do not do experiments at adiabatic conditions (¯ dQ = 0). the energy E is transformed to Helmholtz free energy A.N As we change variable S to its conjugate variable T . The sample is allowed to exchange heat with a thermostat at temperature T . So some of them are not very useful. V. the Lagrangian L is transformed to Hamiltonian H. N ) where A is called the Helmholtz free energy — another very important concept in thermodynamics and statistical mechanics (as important as entropy S) Recall the same Legendre transformation in classical mechanics L(q. 2. N ). V. Very often. N ! A(T. V. p≡ ∂L ∂ q˙ (46) Notice that as we change variable q˙ to its conjugate variable p. experiments are performed at constant temperature T .

N ) and A(T. We can also formulate thermodynamics starting from A(T. N ) → G(T.. µ as       ∂A ∂A ∂A . N ) is convenent to use when experimental condition is at constant temperature T .     ∂p ∂S = ∂V T. V. V.g.g. p. p. N ). volume V and number of particles N (e. V. gas tank at room temperature).N . p ≡ − ∂V T. e. (52) (53) (54) This Legendre transform is fun! We can continue the Legendre transform with other variables. and we will get more and more mathematical identities. In thermodynamics.5 Thermodynamic potentials Both E(S.N ∂N T. we can obtain another set of Maxwell relations. we have ⇒ together with A = −pV + µN dA = −SdT − pdV + µdN From A(T. Recall Euler’s theorem: E = T S − pV + µN . V.N ∂V T. V and N . N ) are thermodynamic potentials... N ).V these definitions are completely consistent with earlier equations.N ∂T V. we would like to allow volume to adjust automatically but want to keep the pressure p as well as temperature T constant. V. N ) and define S. Instead..g. Notice here that p and µ are defined as derivatives with T fixed! — this is easier to do in experiments than to keep S fixed. and the definition A ≡ E − T S.N 16 (55) . V. . What a harvest! Suppose we no longer keep our gas tank at constant volume. 2.The equation of state A(T. p≡− . this correspond to another Legendre transform   ∂A A(T. e. µ≡ (51) S≡− ∂T V.

V. N ) and define S.Legendre transform again: A(T. N ) dG = −SdT + V dp + µdN (62) (63) G(T. µ as       ∂G ∂G ∂G S≡− . V.p This seems a little bit of a stretch. G N Therefore. therefore G = µN (65) Hence. N ! G(T. chemical potential is the same as Gibb’s free energy per particle! µ= Recall  µ≡ ∂G ∂N (both the above two expressions for µ are true) 17 (66)  (67) T. p. Recall: E = T S − pV + µN and A = −pV + µN Now G = A + pV . µ≡ (64) ∂T p. p. V ≡ . because the volume V doesn’t require such an obscure definition — “It is obvious what is the volume of my gas tank!” But these definitions are mathematically exact and completely consistent with the previous definitions. N . p.N ∂p T. N ) dA = −SdT − pdV + µdN (56) (57) Define G = A + pV = E − T S + pV (58) dG = dA + d(pV ) = −SdT − pdV + µdN + pdV + V dp = −SdT + V dp + µdN (59) (60) (61) G is a function of T. N ) is an equation of state useful at constant T. p. p.p .N ∂N T. We can also formulate thermodynamics starting from G(T.

N ) (68) (69) H is called enthalpy and is good for constant S (adiabatic) and constant p. p. H = T S − µN dH = T dS + V dp + µdN   ∂H T ≡ . N ). p. N conditions.From G(T. we can derive more Maxwell relations! Another Legendre transform H = E + pV H(S.··· ∂S p.N more Maxwell relations! 18 (70) (71) (72) .

Let’s get really “energetic” about the Legendre transform and consider . µ= G N But it does not have to be that way. G form a square. because they are the only ones for which we can write G = µN. A. µ seem special.. As a result. H. G..The four thermodynamic potentials consider above: E. Here we have always kept N fixed. 19 (73) .

we can’t get any Maxwell relation out of it. T = . — Hey. µ). V.The “thermodynamic-potential Cube”! The thermodynamic potentials I(S.. Notice that G J K . you cannot specify all 3 intensive variables as free variables. Recall the Gibbs-Duhem relation SdT − V dp + N dµ = 0. it is not a useful thermodynamic potential. e. p=− (74) N S V So µ and G are not that special after all! Well.. µ= What happened to L(T. p.g.. V. except that nobody uses J and K. because nobody uses them (yet).. µ)? It is zero! So. That’s why L(T.. p. and K(T. µ). p. you can get more Maxwell relations out of them. µ) has no meaning! 20 . J(S. µ) do not have names (that I know of).

N Helmoltz Free Energy: A(T.V   =− T. S. E(S. V. and µ. for E(S.3 Worked examples 3.V 21   . V.N ∂p ∂N ∂E ∂N  S. V. µ) (75) (76) (77) (78) (79) (80) (81) write down the corresponding 3 conjugate variables.N .N ∂p ∂T ∂A ∂T  p=− . For example.V   µ≡ .N ∂µ ∂S   .N ∂p ∂N ∂A ∂N  T.V T.V ∂µ ∂V  ∂µ ∂V  S. V.N ∂T ∂N ∂E ∂V   = S. There should be 7 × (3 + 3) = 42 equations in total. N ) H(S. they are the definitions of T . p.N  ∂S ∂N ∂A ∂V   =− T.V. p.N ∂E ∂S ∂p ∂S   p≡− .N   . N ) A(T. For all 7 thermodynamic potentials.N ∂µ ∂T   . µ) J(S. µ= T. p. Solution Energy: E(S. µ) K(T. V. p.N) A = E − TS dA = dE − T dS − SdT = −SdT − pdV + µdN  S=−  ∂S ∂V   = T. N ) I(S.V   =− S. N ) G(T. Also write down 3 Maxwell relations for each thermodynamic potential.1 Thermodynamic potentials and Maxwell’s relation Consider a gas tank of volume V containing N gas molecules with total energy E.N) dE = T dS − pdV + µdN  T ≡  ∂T ∂V   =− S. V. V.V. V. N ). V. V. V.N   .

Enthalpy: H(S. S.V.V N =− .p   = T.N I(S.µ) J = H − µN dJ = dH − µdN − N dµ = T dS + V dp − N dµ 22 S.N) H = E + pV dH = dE + pdV + V dp = T dS + V dp + µdN  T =  ∂T ∂p   = S.N) G = A + pV dG = dA + pdV + V dp = −SdT + V dp + µdN  S=−  ∂S ∂p   ∂G ∂T ∂V ∂T =− T.p.N ∂G ∂N ∂V ∂N  T. p.µ   .N  =− T.p ∂µ ∂T   . µ= S.N  = S.V S.p.p  ∂V ∂N  = S.N   .µ ∂p ∂S   p=− .µ ∂I ∂µ ∂p ∂µ    = S.µ .p ∂µ ∂p  ∂N ∂V  T.N ∂S ∂N ∂G ∂p    . V. V. µ= T. p.N   .N  ∂H ∂N S.p ∂µ ∂S   .p.N   .µ ∂T ∂µ ∂I ∂V     =− S. V = p.µ ∂N ∂S   .µ) I = E − µN dI = dE − µdN − N dµ = T dS − pdV − N dµ  T =  ∂T ∂V  ∂I ∂S  =− S. p.N ∂H ∂p  ∂T ∂N   . V = p. V.p ∂µ ∂p  S.V J(S.N ∂H ∂S ∂V ∂S   . p.N Gibbs Free Energy: G(T.

p.µ   . V.µ . V = p. V. V.µ ∂T ∂µ ∂J ∂p    N =− . T =  ∂T ∂p   = S.p ∂N ∂p  S.µ ∂S ∂µ ∂K ∂V   = T.µ ∂J ∂S ∂V ∂S   .p   =− S.µ  =− S.V.µ ∂N ∂T   .µ ∂V ∂µ ∂J ∂µ  S.V T.µ ∂K ∂T  ∂p ∂T   p=− .p ∂N ∂S   .µ K(T. T.µ  .µ ∂p ∂µ ∂K ∂µ    = T.V ∂N ∂V  T.µ) K = A − µN dK = dA − µdN − N dµ = −SdT − pdV − N dµ  S=−  ∂S ∂V   = T.V 23   N =− . p. S.

the property thermodynamic potential is E(S. and µ.N   1 ∂V α = (85) V ∂T p. V. " #  3/2 ! V 4πmE 5 S = kB N ln + (82) N 3N h2 2 (a) Invert this equation to obtain E(S.N 3V V  µ = ∂E ∂N  S.N   dQ ¯ Cp = (84) dT p. coefficient of thermal expansion α and compressibility β. N .N   1 ∂V (86) β = − V ∂p T. N ). p. (c) Obtain G(T. Verify the ideal gas law pV = N kB T . N ). which are defined as follows   dQ ¯ (83) CV = dT V. Solution (a) At fixed S. N ) = 4πm  N V 2/3  2S 5 exp − 3N kB 3    ∂E 2 3N kB T T = =E ⇒ E= ∂S V. V. Derive the expression for T . (d) Compute the heat capacity at constant volume CV . V. p. V. N ) and recompute S from A(T. V . N ). N ) and compare it with µ N . (b) Obtain A(T. heat capacity at constant pressure Cp .3. 3N h2 E(S.N 3N kB 2   ∂E 2 N kB T p = − =E = ⇒ pV = N kB T ∂V S.V   E 5 2S = − N 3 3N kB 24 .2 Properties of ideal gas The Sackur-Tetrode equation gives the analytic expression for the entropy of an ideal gas. V.N Verify that Cp − CV = α2 V T /β (this relation is valid for arbitrary thermodynamic system).

Recall that A = E − T S. p. (87) leads to   5 2S 5N kB T µN = E − = − TS 3 3N kB 2 " #  3/2 ! kB T 2πmkB T 5 5N kB T − N kB T ln + = 2 p h2 2 "  3/2 !# kB T 2πmkB T = −N kB T ln p h2 Comparing Eqs. V . the property thermodynamic potential is G(T. p. V . (c) At fixed T . (87). (88) and (89). the property thermodynamic potential is A(T. N now.(b) At fixed T . Eq. V. we have G = µN 25 (88) (89) .N T 2T T 2 # " !  3/2 V 2πmkB T 5 = N kB ln + 2 N h 2 which reproduces Eq. " #  3/2 ! kB T 2πmkB T A = −N kB T ln +1 p h2 p V = N kB T G = A + pV " = −N kB T ln kB T p  2πmkB T h2 3/2 !# At the same time. N . 3 N kB T E = 2 " #  3/2 ! V 2πmkB T 5 S = N kB ln + (87) N h2 2 " #  3/2 ! V 2πmkB T 5 3N kB T − N kB T ln + A(T. N ). Recall that G = A + p V . But we need to be careful about rewriting everything in terms of T . N now. But we need to be careful about rewriting everything in terms of T . N ). V. N . N ) = E − T S = 2 N h2 2 " ! #  3/2 V 2πmkB T = −N kB T ln +1 N h2   ∂A A 3 A 3N kB S = − = − + N kB T =− + ∂T V. p.

N ) = N kB ln V N  2πmkB T h2 3/2 ! 5 + 2 # we have  CV = T ∂S ∂T  V. Cp .N      2  dQ ¯ ∂S ∂ A CV = =T = −T dT V.N 5 = N kB 2 = N kB To compute coefficient of thermal expansion.N 3 = N kB 2 To compute heat capacity at constant pressure. N ). p.N ∂ T 2 V. the proper thermodynamic potential to consider is G(T.N p   1 ∂V 1 ∂ 2G α = = V ∂T p. with   ∂A S = − ∂T V. p. N ). the proper thermodynamic potential to consider is A(T.N From " S(T. N ) = N kB ln kB T p   ∂S ∂T 2πmkB T h2 3/2 ! 5 + 2 # we have Cp = T Cp − CV  p.N V ∂ p∂ T 26 .N ∂T p.N      2  dQ ¯ ∂S ∂ G Cp = =T = −T dT p. the proper thermodynamic potential to consider is G(T.N ∂ T 2 p. p. CV .N Recall that " S(T. N ). with   ∂G S = − ∂T p.(d) To compute heat capacity at constant volume. with   ∂G N kB T V = = ∂p T. V. V. α.N ∂T V.

with   1 ∂V 1 ∂ 2G β = − =− V ∂p T. β. N ).n V ∂ p2 Therefore p N kB T 1 = 2 N kB T −p p 1 = V T p = N k B = Cp − CV T2 β = − α2 V T β 27 . the proper thermodynamic potential to consider is also G(T. p.Therefore α = p N kB 1 = N kB T p T To compute compressibility.

entropy S2 .3. Helmholtz free energy A2 . H2 . Mark the initial and final states in the p-V plot and the T -S plot. After some time the system settles down to equilibrium again. A2 . V1 V2 . pressure. N idea gas molecules are initially confined within volume V1 by a piston and the remaining volume V2 − V1 is in vacuum. E2 . G1 be the temperature. pressure p2 . energy E2 . and Gibbs free energy of the ideal gas at this state. H1 . respectively. (b) Suppose we move the piston infinitely slowly (a reversible process) to let the gas expand to the full volume V2 . entropy. the change of total energy is zero.3 Gas expansion Consider an insulated container of volume V2 . enthalpy H2 . Helmholtz free energy. Solution: (a) Because there is no heat flow or work done to the system during the free expansion. G2 in the final equilibrium state? Express them in terms of the thermodynamic functions of state 1 and V2 /V1 . Let T1 . and Gibbs free energy G2 in the new equilibrium state? Mark the initial and final states in the p-V plot and the T -S plot. S1 A1 . The gas container is thermally insulated during this process. p2 . What are the temperature T2 . energy. p1 . E2 = E1 From the Sackur-Tetrode equation for the entropy of ideal gas # " 3/2 !  5 V 4πmE + S = kB N ln N 3N h2 2 Hence S2 = S1 + kB N ln V2 V1 Because temperature is defined as  T = ∂S ∂E −1 = V. What is the work done ∆W to the system? What are T2 . E1 .N 28 2E 3N kB (90) .V1 (a) Imagine that the piston is suddenly removed so that the gas has volume V2 . enthalpy.

we have p2 = p1 V 1 N kB T2 = V2 V2 Change of Helmholtz free energy. Hence the entropy change should be zero.we have. S2 = S1 29 . T2 = T1 = 2E1 3N kB Because p V = N kB T . G2 − G1 = (H2 − T2 S2 ) − (H1 − T1 S1 ) = −T1 (S2 − S1 ) V2 G2 = G1 − N kB T1 ln V1 Table 1: Change of thermodynamic properties if the piston suddenly disappears and the gas settle down to the new equilibrium state with volume V2 . 5 H2 = E2 + p2 V2 = N kB T1 = H1 2 Change of Gibbs free energy. A2 − A1 = (E2 − T2 S2 ) − (E1 − T1 S1 ) = −T1 (S2 − S1 ) V2 A2 = A1 − N kB T1 ln V1 Enthalpy. T2 − T1 p2 − p1 E2 − E1 S2 − S1 A2 − A1 H2 − H1 G2 − G1 0 p1 (V1 /V2 − 1) 0 N kB ln(V2 /V1 ) −N kB T ln(V2 /V1 ) 0 −N kB T ln(V2 /V1 ) (b) Here the piston expansion is a reversible and adiabatic (no heat flow) process.

 T2 = V1 V2 2/3 T1 (91) Eq. therefore dE = 32 N kB dT . 3 N kB dT 2 3 dT 2 T Z T2 3 dT 2 T1 T 3 T2 ln 2 T1 N kB T dV V dV − V Z V2 dV − V V1 V2 − ln V1  2/3 V1 T1 V2 = − = = = T2 = Because  p2 V2 = N kB T2 =  p2 = V1 V2 5/3 p1 30 V1 V2 2/3 p1 V1 . 3/2 V1 E1 E2 3/2 = V2 E2  2/3 V1 = E1 V2 Because E = 32 N kB T . (91) can also be obtained from the ideal gas law. E = 32 N kB T . (90). the energy change corresponding to a differential change of volume dV is.From Eq. so that. p V = N kB T . dE = dW ¯ = −p dV = − N kB T dV V At the same time. During the expansion process.

enthalpy and Gibbs free energy.Helmholtz free energy. T2 /T1 p2 /p1 E2 /E1 S2 /S1 A2 /A1 H2 /H1 G2 /G1 (V1 /V2 )2/3 (V1 /V2 )5/3 (V1 /V2 )2/3 1 (V1 /V2 )2/3 (V1 /V2 )2/3 (V1 /V2 )2/3 31 .  2/3  2/3 V1 V1 A2 = E2 − T2 S2 = E1 − T1 S1 V2 V2  2/3 V1 = A1 V2 3 H2 = E2 + p2 V2 = N kB T2 + N kB T2 2  2/3 V1 5 5 N kB T2 = N kB T1 = 2 V2 2  2/3 V1 = H1 V2 G2 = A2 + p2 (V1 + V2 ) = A2 + N kB T2  2/3 V1 = (A1 + N kB T1 ) V2  2/3 V1 = G1 V2 Table 2: Change of thermodynamic properties if the piston moves very slowly and adiabatically expand the volume to V2 .

g. R For a non-adiabatic and reversible process SB = SA + dQ ¯ rev /T . If certain constraint is removed in the system. e. SB = SA .. 4. Interpretation: When a system is in a thermal equilibrium state A. dS > dQ/T ¯ In summary.g.2 Variational statement of second law Let η represent an internal constraint. The system will (irreversibly) reach a new equilibrium state B. e. or whether the process is reversible. SB ≥ SA . In the above example. entropy is related to both heat and irreversibility. consider the sudden removal of a separator between the gas and the rest of the container. dS = dQ ¯ rev /T . the position of the separator. For a non-adiabatic. For an adiabatic and reversible process. non-reversible process. For an adiabatic process. 32 . V. which is a function of N. which has entropy SB .4 4.1 Irreversible processes Entropy and irreversibility Second Law: The entropy of an isolated system never decreases. the process is adiabatic (no heat exchanges). it has a definite entropy SA . We can make the following statement about the entropy depending on whether heat is exchanged. The second law says: SB ≥ SA . E.

First. V. V. we can write dZ ¯ ≡ dE − T dS + pdV − µdN < 0 (95) dZ ¯ =0 (96) whereas for reversible processes. V. η). N ) = min A(T. E(S. S(E. N ) A(T. Usually. V. when we remove a constraint. S(E. we must extract heat from the system. η) η (93) Care must be taken to interpret the physical meaning of this equation. V. V. V. which will lead to a decrease of energy. N ) = min E(S. V. N . η) be the entropy of the system subjected to constraint η. N . dQ ¯ < T dS. 33 . N . it if we want to restore entropy S to its original value. dE = dQ ¯ + dW ¯ = dQ ¯ − pdV + µdN dE < T dS − pdV + µdN (for irreversible processes) Therefore.N E(S. N ) = max S(E. V. we have the following minimum principle for the entropy function Since ∂E V. V. From first law. However. let us recall some relations: For a reversible process: dS = dQ ¯ rev /T For a irreversible process: dS > dQ/T ¯ . The minimum energy principle becomes much easier to use and to interpret after Legendre transform to A(T. for irreversible processes. E remains constant while S will spontaneously increase. η) (94) η In the following we will prove this and other minimum principles. η) η (92)  ∂S > 0.Let S(E. N . N ) is the entropy when the constraint is removed and is the global maximum of S(E. N . N ). V.

The above two equations can be used as a general criteria for irreversible processes. V. N . p. (¯ dZ = dG). then for an irreversible process dH < 0. then for an irreversible process dE < 0. • If we keep T. V. then for an irreversible process dG < 0. N ) = min G(T. p. V. i. 34 . N constant. N ) = min H(S. N constant. its Helmholtz/Gibbs free energy will be at a global minimum. (¯ dZ = dH). N constant. η). the proper thermodynamic potential to use is the Helmholtz free energy A(T. p. • If we keep T. p. then dZ = dE. E(S. V. ⇒ H(S. V. η) (minimum enthalpy principle) (99) η This one is not easy to use. dA < 0. for an irreversible process. V. N ) = min A(T. N )/(T. p. (We noted earlier that it is quite different to keep S constant in an irreversible process). N ) = minη E(S.e. N constant. N ). • If we can keep S. V. p. because it is difficult to keep S constant in an irreversible process. ⇒ G(T. ⇒ A(T. p. N . N ) conditions. η) (minimum Gibbs free energy principle) η (100) Summary: A system (when given a chance) will evolve toward minimizing its Helmholtz/Gibbs free energy at constant (T. N . N . When equilibrium is reached. η) (minimum Helmholtz free energy principle) (98) η • If we can keep S. A dA dE dZ ¯ = = = = E − TS dE − T dS − SdT dA + T dS + SdT dA + SdT + pdV − µdN = dA (97) Hence. V.