2 Temperature, Heat, and Work
In chapter 1, we introduced the tools that we need to study thermodynamics: a bit of calculus, the definition of a system, and the distinction between state and path functions. In this chapter, we will define the two ways in which a system can exchange energy with its surroundings, heat and work, and we will learn how to calculate them. Before we do that, however, we need a solid definition of temperature, which comes from the zeroth law of thermodynamics.
2.1 What Is Thermodynamics?
Thermodynamics is the branch of science that deals with heat and work, and their relation to energy. These are the two ways in which energy can be transferred between a system and its surroundings:
- Work is exchanged when the system changes one of its external, macroscopic parameters against a force. The typical example in chemistry is a gas that changes its volume by pushing a piston against an external pressure.
- Heat is exchanged because of a temperature difference between the system and its surroundings, without any change in the external parameters. Heat flows through the random collisions between the molecules at the boundary, from the hotter side to the colder one.
As we saw in chapter 1, heat and work are not “well-behaved” quantities because they are path functions. While it might be simple to measure the amount of heat and/or work experimentally, these measured quantities cannot be used to define the state of a system. Since heat and work are path functions, their values depend directly on the methods used to transfer them (their paths). Understanding and quantifying these energy transfers is the reason why thermodynamics was developed in the first place. The origins of thermodynamics date back to the eighteenth and nineteenth centuries, when steam engines started to be used to convert heat into work for technological applications. These early scientists needed a mathematical tool to understand how heat and work were related to each other, and how they were related to the other variables that they were able to measure, such as temperature and volume.
Before we even discuss the definition of energy and how it relates to heat and work, it is crucial to introduce the essential concept of temperature. Temperature is an intuitive concept that has a surprisingly complex definition at the microscopic level.1 However, for all our purposes, it is not essential to have a microscopic definition of temperature, as long as we have the guarantee that this quantity can be measured unambiguously. In other words, we only need a mathematical definition of temperature that agrees with the physical existence of thermometers.
2.2 The Zeroth Law of Thermodynamics
We all know from experience that if we put a hot object in contact with a cold one, after some time they reach the same temperature, and heat stops flowing between them. When this happens, we say that the two objects are in thermal equilibrium. The zeroth law of thermodynamics states that if two thermodynamic systems are each in thermal equilibrium with a third one, then they are in thermal equilibrium with each other. The law might appear trivial and possibly redundant, but it is exactly what makes thermometers possible: the thermometer is the third system, and if it reads the same temperature when in contact with two different objects, we can conclude that the two objects are in thermal equilibrium with each other, even if they have never touched. For this reason, the zeroth law is a fundamental requirement for the mathematical formulation of thermodynamics, and it needs to be stated. The zeroth law can be summarized by the following simple mathematical relation:
Definition 2.1 Zeroth Law of Thermodynamics: If \(T_A = T_B\), and \(T_B = T_C\), then \(T_A = T_C\).
Notice that when we state the zeroth law, it appears intuitive. However, this is not necessarily the case. Let’s, for example, consider a pot of boiling water at \(P=1\;\mathrm{bar}\). Its temperature, \(T_{H_2O}\), is about 373 K. Let’s now submerge in this water a coin made of wood and another coin made of metal. After some sufficient time, the wood coin will be in thermal equilibrium with the water, and its temperature \(T_W = T_{H_2O}\). Similarly, the metal coin will also be in thermal equilibrium with the water, hence \(T_M = T_{H_2O}\). According to the zeroth law, the temperature of the wood coin and that of the metal coin are precisely the same \(T_W = T_M = 373\;\mathrm{K}\), even if they are not in direct contact with each other. Now here’s the catch: since wood and metal transmit heat in different manners, if I take the coins out of the water and put them immediately in your hands, one of them will feel just warm, but the other will burn you. If you had to guess the temperature of the two coins without a thermometer, and without knowing that they were immersed in boiling water, would you suppose that they have the same temperature? Probably not.
The zeroth law tells us that temperature can be measured, but not which numbers to assign to it. The Celsius scale uses two arbitrary reference points, the freezing and boiling points of water, at \(0\) and \(100\;°\text{C}\). A more natural choice comes from gases: at constant pressure, the volume of a gas decreases linearly as it cools, and, if we extrapolate, every gas reaches zero volume at the same temperature, \(-273.15\;°\text{C}\). Since a negative volume makes no sense, this temperature is the lowest possible one, called absolute zero. The Kelvin scale, which we use throughout this book, starts from it: \(T\,[\text{K}] = t\,[°\text{C}] + 273.15\), and absolute temperatures are never negative. We will see in chapter 4 that the second law gives this zero a meaning that does not depend on gases at all. We will then see in chapter 6 that absolute zero can never be reached, and in chapter 11 why all gases point to the same zero, and how real gases behave when they are cooled down.
2.3 Equilibrium, Stationary States, and Quasi-Static Processes
In the rest of this chapter, we will compare processes that happen “fast” with processes that happen “slowly.” These words are vague on their own: is one second fast or slow? A second is an eternity for a molecule, and an instant for a galaxy. To use them with precision, we need to compare the speed of a process with something that belongs to the system itself. In other words, we need an internal property of the system that we can use as a yardstick to compare external stimuli to. That something is how quickly the system can return to equilibrium. Let’s start by defining exactly what we mean by equilibrium.
Definition 2.2 Equilibrium state: A state in which the macroscopic variables of the system (such as \(T\), \(P\), \(V\), and the composition) do not change with time, and there are no net flows of energy or matter, neither inside the system nor between the system and its surroundings.
The second part of the definition is important. A system can have variables that do not change with time, and still not be at equilibrium. Consider a metal rod with one end on a hot plate and the other end in a bucket of ice. After a while, the temperature at each point of the rod stops changing: it is high near the plate and low near the ice. Heat, however, flows continuously through the rod, from the plate to the ice. A state like this is called a stationary state (or steady state):
Definition 2.3 Stationary state: A state in which the macroscopic variables of the system do not change with time, but which is maintained by a continuous flow of energy or matter through the system.
The rod in a stationary state does not have a temperature: it has a different temperature at every point. Only at equilibrium are the intensive variables, such as \(T\) and \(P\), uniform throughout the system, so that a single value describes the whole system. This is why the thermodynamics in this book deals with equilibrium states: they are the only states that we can describe with a handful of variables, and the only ones that we can represent as points in a diagram such as the \(PV\) plots in this chapter. Stationary states are just as important in nature (a living cell is a stationary state, not an equilibrium one), but they are the subject of non-equilibrium thermodynamics, which is beyond the scope of this course.
When we disturb a system at equilibrium, for example by suddenly moving a piston, the system goes through a series of states that are not at equilibrium: for a short while, the gas near the piston has a different pressure than the gas far from it, and pressure waves bounce around the container. Eventually, these differences die out, and the system reaches a new equilibrium state. The time this takes is called relaxation time:
Definition 2.4 Relaxation time: The time, \(\tau\), that a system needs to return to equilibrium after a disturbance.
The relaxation time depends on the system and on the variable that is relaxing. Pressure differences in a gas travel at the speed of sound, so in a container that is a few centimeters wide, the pressure becomes uniform in a fraction of a millisecond. Temperature differences, instead, are smoothed out by heat conduction, which is much slower: a cold glass of water in a warm room takes tens of minutes to reach the temperature of the room. Some chemical reactions have relaxation times longer than the age of the universe: diamond is not at equilibrium with graphite, but nobody has ever seen a diamond turn into graphite at room temperature.
We now have the yardstick that we were looking for. A process is fast if the conditions of the system change on a time scale that is shorter than, or comparable to, its relaxation time, so that the system has no time to adjust and is driven away from equilibrium. A process is slow if the conditions change on a time scale much longer than the relaxation time, so that the system has always enough time to re-equilibrate. Notice that the same process can be slow for one variable and fast for another. Pushing a piston in one second is slow for the pressure of the gas, which equalizes in less than a millisecond, but it is fast for the exchange of heat through the walls of the container, which takes minutes. In the limit of a process that is slow compared to all the relevant relaxation times, we have:
Definition 2.5 Quasi-static process: A process that happens slowly enough, compared to the relaxation time of the system, that the system passes through a continuous sequence of equilibrium states.
A few things to notice about this definition:
- A quasi-static process can be drawn as a line. Since every intermediate state is an equilibrium state, it has well-defined values of \(P\), \(V\), and \(T\), and the whole process is a continuous line in a \(PV\) diagram. A process that is not quasi-static, instead, has well-defined initial and final states only: in between, the gas does not have a single pressure, and the process cannot be drawn as a line. We will see an example of this in the one-step expansion below.
- A quasi-static process is an idealization. Any real process takes a finite time, so it is never perfectly quasi-static. However, many real processes are slow enough to be treated as quasi-static to an excellent approximation, and, as we will see in this chapter, we can approach the quasi-static limit as closely as we want by splitting a process into more and more smaller steps.
- Quasi-static does not mean “at equilibrium with the surroundings.” The system is at equilibrium internally at every moment, but it may still exchange energy with the surroundings. In chapter 3, we will see that when the system is also balanced with its surroundings at every moment, the process becomes reversible.
2.4 Calculation of Heat
Heat (\(Q\)) is a property that gets transferred between substances. Similarly to work, the amount of heat that flows through a boundary can be measured, but its mathematical treatment is complicated because heat is a path function. As you probably recall from general chemistry, the ability of a substance to absorb heat is given by a coefficient called the heat capacity, which is measured in SI in \(\frac{\text{J}}{\text{mol K}}\). However, since heat is a path function, these coefficients are not unique, and we have different ones depending on how the heat transfer happens.
2.4.1 Processes at Constant Volume (Isochoric)
The heat capacity at constant volume measures the ability of a substance to absorb heat at constant volume. Recalling from general chemistry, the molar heat capacity at constant volume has the following formal definition:
The molar heat capacity at constant volume is the amount of heat required to increase the temperature of 1 mol of a substance by 1 K at constant volume.
This is a procedural definition that defines how we can measure \(C_V\) in practice. While this procedure is useful in laboratory settings and in introductory chemistry courses, we need to go beyond it to understand its origin and its meaning. Have you ever wondered why you need to increase the temperature by 1 K? What if you want to increase it by 2? Or 1/2, or 1/1000? Also, the definition is highly imprecise, as there certainly has to be a difference when we increase the temperature of a substance from 1 K to 2 K, to when we increase it from 1001 K to 1002 K. Those situations certainly cannot lead to the same results. How are we going to circumvent this poor definition? We need to apply calculus to remove those arbitrary units and arbitrary increments (remember that differentials are all the same size, and unitless):
\[ C_V = \frac{đ Q_V}{n dT} \Rightarrow đ Q_V = n C_V dT. \tag{2.1}\]
This new differential definition of \(C_V\) is independent of the unit we use to measure it, and does not require a procedural definition. Given a known value of \(C_V\), the amount of heat that gets transferred can be easily calculated by measuring the changes in temperature, after integration of eq. 2.1:
\[ đ Q_V = n C_V dT \rightarrow \int đ Q_V = n \int_{T_i}^{T_f}C_V dT \rightarrow Q_V = n C_V \int_{T_i}^{T_f}dT, \tag{2.2}\]
which, assuming \(C_V\) independent of temperature, simply becomes:
\[ Q_V \cong n C_V \Delta T. \tag{2.3}\]
2.4.2 Processes at Constant Pressure (Isobaric)
Similarly to the previous case, the heat capacity at constant pressure measures the ability of a substance to absorb heat at constant pressure. Recalling again from general chemistry:
The molar heat capacity at constant pressure is the amount of heat required to increase the temperature of 1 mol of a substance by 1 K at constant pressure.
And once again, applying calculus to obtain a differential definition of \(C_P\), we get:
\[ C_P = \frac{đ Q_P}{n dT} \Rightarrow đ Q_P = n C_P dT \rightarrow \int đ Q_P = n \int_{T_i}^{T_f}C_P dT, \tag{2.4}\]
which results in the simple formula:
\[ Q_P \cong n C_P \Delta T. \tag{2.5}\]
2.5 Calculation of Work
In thermodynamics, work (\(W\)) is the ability of a system to transfer energy by exerting a force on its surroundings. Work can be measured simply by evaluating its effects, such as displacing a massive object by some amount of space. The mathematical treatment of work, however, is complicated because work is a path function. In the following sections, we will analyze how work is calculated in some prototypical situations commonly encountered in the thermodynamical treatment of systems.
Let’s consider the situation in Figure 2.1, where a special beaker with a piston that is free to move is filled with an ideal gas. The beaker sits on a desk, so the piston is not subject to any external forces other than the external pressure, \(P_{\text{ext}}\), and the internal pressure of the gas, \(P\).2 The piston is initially compressed to a position that is not in equilibrium \((i)\). After the process, the piston reaches a final equilibrium position \((f)\). How do we calculate the work (\(W\)) performed by the system?
From basic physics, we recall that the infinitesimal amount of work associated with an object moving in space is given by the force acting on the object (\(F\)) multiplied by the infinitesimal amount it gets displaced (\(d h\)):
\[ đ W = - Fdh, \tag{2.6}\]
where the negative sign comes from the chemistry sign convention, Definition 1.1, since the work in Figure 2.1 is performed by the system (expansion). Which force should we use? When the gas expands, the work it performs is the energy needed to push back the surroundings, so the relevant force is the one that the surroundings exert on the piston. Relying upon another definition from physics, the pressure is the ratio between the force (\(F\)) and the area (\(A\)) that such force acts upon, so the force exerted by the surroundings is related to the external pressure, \(P_{\text{ext}}\), by:
\[ P_{\text{ext}} = F/A. \tag{2.7}\]
Obtaining \(F\) from eq. 2.7 and replacing it in eq. 2.6, we obtain:
\[ đ W = - P_{\text{ext}} \underbrace{Adh}_{dV}, \tag{2.8}\]
and considering that \(Adh\) (area times infinitesimal height) is the definition of an infinitesimal volume \(dV\), we obtain:
\[ đ W = - P_{\text{ext}}dV. \tag{2.9}\]
The external pressure is not necessarily the same as the pressure of the gas, \(P\). In an expansion that is fast compared to the relaxation time of the gas, the gas inside the beaker does not even have a single pressure, and the part near the piston can be at a very different pressure than the surroundings. However, if the expansion is quasi-static (definition 2.5) and the piston is always balanced, \(P_{\text{ext}}=P\) at every moment, and the work can be written using the pressure of the gas:
\[ đ W = - PdV \qquad \text{(when } P_{\text{ext}}=P\text{)}. \tag{2.10}\]
If we want to calculate the amount of work performed by a system, \(W\), from eq. 2.9, we need to recall that \(đ W\) is an inexact differential. As such, we cannot integrate it from initial to final as for the (exact) differential of a state function, because:
\[ \int_{i}^{f}đ W \neq W_f - W_i, \tag{2.11}\]
but rather:
\[ \int_{\text{path}} đ W = W, \tag{2.12}\]
where the integration is performed along the path. Using eq. 2.12, we can integrate eq. 2.9 as:
\[ \int đ W = W = - \int_{i}^{f} P_{\text{ext}}dV, \tag{2.13}\]
where the integral on the left-hand side is taken along the path,3 while the integral on the right-hand side can be taken between the initial and final states, since \(V\) is a state function. How do we solve the integral in eq. 2.13? It turns out that there are many different ways to solve this integral (perhaps not surprisingly, since the left-hand side depends on the path), which we will explore in the next section.
2.5.1 \(| W_{\text{max}} |\) and \(| W_{\text{min}} |\) in Processes at Constant Temperature (Isothermal)
At constant temperature, the piston in Figure 2.1 moves along the isotherm in figure 2.2, obtained for 1 mol of an ideal gas at \(T=298\) K.
An expansion of the gas will happen between \(P_i\) and \(P_f\). If the expansion happens in one step, for example by suddenly releasing the piston against the external atmospheric pressure, the process is not quasi-static: only the initial and final states are equilibrium states, and the gas in between has no single pressure. The external pressure, however, is well defined and constant, and we can use it (for example \(P_f=P_{\text{ext}} =1\;\mathrm{bar}\)), and solve the integral as:
\[ W_{\text{1-step}} = - \int_{i}^{f} P_{\text{ext}}dV = -P_{\text{ext}} \int_{i}^{f} dV = -P_{\text{ext}} (V_f-V_i). \tag{2.14}\]
Notice how the work is negative, since during an expansion the work is performed by the system (recall the chemistry sign convention). The absolute value of the work4 represents the red area in figure 2.3:
\[ \left| W_{\text{1-step}} \right| = P_{\text{ext}} (V_f-V_i) \tag{2.15}\]
If the process happens in two steps by pausing at an intermediate position (1) until equilibrium is reached, then we should calculate the work by dividing it into two separate processes, \(A\) and \(B\), and solve each one as we did in the previous case. The first process is an expansion between \(P_i\) and \(P_1\), with \(P_1\) constant. The absolute value of the work, \(W_A\), is represented by the blue area in figure 2.4:
\[ \left| W_A \right| = P_1 (V_1-V_i) \tag{2.16}\]
The second process is an expansion between \(P_1\) and \(P_f\), with \(P_f=P_{\text{ext}}\) constant. The absolute value of the work for this second process is represented by the green area in figure 2.5:
\[ \left| W_B \right| = P_f (V_f-V_1) \tag{2.17}\]
The total absolute value of the work for the 2-step process is given by the sum of the two areas, as in figure 2.6:
\[ \left| W_{\text{2-step}} \right| = \left| W_A \right| + \left| W_B \right| = P_1 (V_1-V_i)+P_f (V_f-V_1). \tag{2.18}\]
As can be easily verified by comparing the shaded areas in the plots, \(\left| W_{\text{2-step}} \right| > \left| W_{\text{1-step}} \right|\).
We can easily extend this procedure to consider processes that happen in 3, 4, 5, …, \(n\) steps. What is the limit of this procedure? In other words, what happens when \(n \rightarrow \infty\)? A simple answer is given by figure 2.7, which clearly demonstrates that the maximum value of the area underneath the curve \(\left| W_{\text{max}}\right|\) is achieved in an \(\infty\)-step process. In this limit, each step is infinitesimally small, the external pressure is always equal to the pressure of the gas, and we can use eq. 2.10 to calculate the work as:
\[ \left| W_{\infty \text{-step}} \right| = \left| W_{\text{max}} \right| = \sum_{n}^{\infty} P_n(V_n-V_{n-1}) = \int_{i}^{f} PdV. \tag{2.19}\]
The integral on the right hand side of eq. 2.19 can be solved for an ideal gas by calculating the pressure using the ideal gas law \(P=\frac{nRT}{V}\), and solving the integral since \(n\), \(R\), and \(T\) are constant:
\[ \left| W_{\text{max}} \right| = nRT \int_{i}^{f} \frac{dV}{V} = nRT \ln \frac{V_f}{V_i}. \tag{2.20}\]
This example demonstrates why work is a path function. If we perform the expansion in a single step, which is not quasi-static, the system performs an amount of work that is much smaller than the amount of work it can perform if the expansion between the same points happens in an \(\infty\)-step process. Each step of the \(\infty\)-step process is infinitesimally small, so the gas is always at equilibrium: the \(\infty\)-step process is quasi-static, and it is the only one that follows the isotherm as a line.
The same considerations that we made up to this point for expansion processes apply in reverse to compression ones. The only difference is that the work associated with compressions will have a positive sign since it must be performed onto the system. As such, the amount of work for a transformation that happens in a finite number of steps will be an upper bound to the minimum amount of work required to compress the system.5 \(\left| W_{\text{min}} \right|\) for compressions is calculated as the area underneath the \(PV\) curve, exactly as \(\left| W_{\text{max}} \right|\) for expansions in eq. 2.19.
2.6 Chapter Review
2.6.1 Key Ideas
- The zeroth law: two systems in thermal equilibrium with a third one are in thermal equilibrium with each other. This is what makes thermometers possible.
- Heat is exchanged because of a temperature difference. At constant volume or pressure, it is calculated from the heat capacities: \(Q_V = n\int C_V\,dT\) and \(Q_P = n\int C_P\,dT\).
- Work of expansion is \(W=-\int P_{\text{ext}}\,dV\), negative for an expansion (the system does work) and positive for a compression.
- Equilibrium vs. stationary states: at equilibrium, the variables do not change and nothing flows; a stationary state has constant variables maintained by a steady flow. “Fast” and “slow” are measured against the relaxation time, \(\tau\), and a quasi-static process is slow enough to pass only through equilibrium states.
- Work depends on the path. Between the same two states, a one-step, a two-step, and an infinitely-many-step expansion give different amounts of work.
- Maximum work: for an isothermal ideal gas expansion, the most work is extracted in infinitely many steps, \(|W_{\max}| = nRT\ln\frac{V_f}{V_i}\), and the least work is needed for a compression performed in the same way.
2.6.2 Study Questions
1. What does the zeroth law of thermodynamics state?
- If two systems are each in thermal equilibrium with a third one, then they are in thermal equilibrium with each other.
- The energy of the universe is conserved.
- The entropy of the universe increases.
- Heat always flows from hot to cold objects.
- The entropy of a perfect crystal is zero at 0 K.
2. What is a quasi-static process?
- A process that happens in less than one second.
- A process in which the system is always in a stationary state, with a steady flow of heat through it.
- A process in which the temperature of the system does not change.
- A process slow enough, compared to the relaxation time of the system, that the system passes only through equilibrium states.
- A process in which no work is exchanged.
3. What is the differential definition of the molar heat capacity at constant volume?
- \(C_V = \frac{Q_V}{\Delta T}\).
- \(C_V = \frac{đQ_V}{n\,dT}\).
- \(C_V = n\,đQ_V\,dT\).
- \(C_V = \frac{dT}{đQ_V}\).
- \(C_V = \frac{đQ_P}{n\,dT}\).
4. How is the heat exchanged at constant pressure calculated, assuming \(C_P\) independent of temperature?
- \(Q_P = n C_V \Delta T\).
- \(Q_P = P \Delta V\).
- \(Q_P = nRT \ln \frac{V_f}{V_i}\).
- \(Q_P = 0\).
- \(Q_P = n C_P \Delta T\).
5. Why is the work of an expansion negative in the chemistry sign convention?
- Because the volume decreases.
- Because the pressure is negative.
- Because the work is performed by the system, which loses energy.
- Because the temperature decreases.
- Because work is a path function.
6. What is the work for a one-step expansion against a constant external pressure?
- \(W = -P_{\text{ext}}(V_f-V_i)\).
- \(W = P_{\text{ext}}(V_f-V_i)\).
- \(W = -nRT \ln \frac{V_f}{V_i}\).
- \(W = 0\).
- \(W = n C_V \Delta T\).
7. A gas expands isothermally between the same initial and final states in one step, in two steps, or in infinitely many steps. In which case is the absolute value of the work the largest?
- One step.
- Two steps.
- It is the same in all cases.
- Infinitely many steps.
- It depends on the gas.
8. What is the absolute value of the maximum work for the isothermal expansion of an ideal gas?
- \(\left|W_{\text{max}}\right| = P_{\text{ext}}\Delta V\).
- \(\left|W_{\text{max}}\right| = nRT \ln \frac{V_f}{V_i}\).
- \(\left|W_{\text{max}}\right| = nR\Delta T\).
- \(\left|W_{\text{max}}\right| = n C_V \Delta T\).
- \(\left|W_{\text{max}}\right| = nRT\frac{V_f}{V_i}\).
9. What do the one-step, two-step, and infinitely-many-step expansions demonstrate?
- That work is a state function.
- That the temperature changes during an isothermal process.
- That heat and work are the same thing.
- That the ideal gas law is not valid.
- That work depends on how the process is carried out between the same initial and final states.
10. How must a compression be performed to require the minimum amount of work?
- As fast as possible, in one step.
- In two steps.
- Quasi-statically, in infinitely many steps.
- At constant volume.
- Against zero external pressure.
In fact, we will not even give a rigorous microscopic definition of temperature within this textbook.↩︎
For this simple thought experiment, we will ignore any external force that is not significant. In other words, we will not consider the friction of the piston on the beaker walls or any other foreign influence.↩︎
from here on we will replace the notation \(\int_{\text{path}}\) with the more convenient \(\int\) and we will keep in mind that the integral of an inexact differential must be taken along the path.↩︎
we use the absolute value to avoid confusions due to the fact that the expansion work is negative according to Definition 1.1.↩︎
In contrast to a lower bound for expansion processes.↩︎