2 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. As the definition suggests, thermodynamics is concerned with two types of energy: heat and work. A formal definition of these forms of energy is as follows:

  • Work is exchanged if external parameters are changed during the process.
  • Heat is exchanged if only internal parameters are changed during the process.

As we saw in chapter 1, heat and work are not “well-behaved” quantities because they are path functions. On the one hand, 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 origin of thermodynamics dates back to the seventeenth century when people began to use heat and 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.3 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

The mathematical definition that guarantees that thermal equilibrium is an equivalence relation is called the zeroth law of thermodynamics. 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 a fundamental requirement for the mathematical formulation of thermodynamics, so 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 be very hot, 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.

2.3 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.3.1 Processes at constant volume (isochoric)

The heat capacity at constant volume measures the ability of a substance to absorb heat at constant volume. Recasting from general chemistry:

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 simple definition can be written in mathematical terms as:

\[\begin{equation} C_V = \frac{đ Q_V}{n dT} \Rightarrow đ Q_V = n C_V dT. \tag{2.1} \end{equation}\]

Given a known value of \(C_V\), the amount of heat that gets transfered can be easily calculated by measuring the changes in temperature, after integration of eq. (2.1):

\[\begin{equation} đ 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} \end{equation}\]

which, assuming \(C_V\) independent of temperature, simply becomes:

\[\begin{equation} Q_V \cong n C_V \Delta T. \tag{2.3} \end{equation}\]

2.3.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. Recasting 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, this mathematical treatment follows:

\[\begin{equation} 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} \end{equation}\]

which result in the simple formula:

\[\begin{equation} Q_P \cong n C_P \Delta T. \tag{2.5} \end{equation}\]

2.4 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.

Isothermal Expansion of an Ideal Gas Against a Constant External Pressure.

Figure 2.1: Isothermal Expansion of an Ideal Gas Against a Constant External Pressure.

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\).4 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\)):

\[\begin{equation} đ W = - Fdh, \tag{2.6} \end{equation}\]

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). What kind of force is moving the piston? It is the force due to the pressure of the gas. Relying upon another definition from physics, the pressure is the ratio between the force (\(F\)) and the area (\(A\)) that such force acts upon:

\[\begin{equation} P = F/A. \tag{2.7} \end{equation}\]

Obtaining \(F\) from eq. (2.7) and replacing it in eq. (2.6), we obtain:

\[\begin{equation} đ W = - P \underbrace{Adh}_{dV}, \tag{2.8} \end{equation}\]

and considering that \(Adh\) (area times infinitesimal height) is the definition of an infinitesimal volume \(dV\), we obtain:

\[\begin{equation} đ W = - PdV, \tag{2.9} \end{equation}\]

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:

\[\begin{equation} \int_{i}^{f}đ W \neq W_f - W_i, \tag{2.10} \end{equation}\]

but rather:

\[\begin{equation} \int_{\text{path}} đ W = W, \tag{2.11} \end{equation}\]

where the integration is performed along the path. Using eq. (2.11), we can integrate eq. (2.9) as:

\[\begin{equation} \int đ W = W = - \int_{i}^{f} PdV, \tag{2.12} \end{equation}\]

where the integral on the left-hand side is taken along the path,5 while the integral on the right-hand side can be taken between the initial and final states, since \(dV\) is a state function. How do we solve the integral in eq. (2.12)? 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.4.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 following PV diagram (this curve is obtained from an ideal gas at constant \(T=298\) K):

An expansion of the gas will happen between \(P_i\) and \(P_f\). If the expansion happens in a one-step fast process, for example against external atmospheric pressure, then we can consider such final pressure constant (for example \(P_f=P_{\text{ext}} =1\;\mathrm{bar}\)), and solve the integral as:

\[\begin{equation} 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.13} \end{equation}\]

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 work6 represents the red area of the PV-diagram:

\[\begin{equation} \left| W_{\text{1-step}} \right| = P_{\text{ext}} (V_f-V_i) \tag{2.14} \end{equation}\]

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:

\[\begin{equation} \left| W_A \right| = P_1 (V_1-V_i) \tag{2.15} \end{equation}\]

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:

\[\begin{equation} \left| W_B \right| = P_f (V_f-V_1) \tag{2.16} \end{equation}\]

The total absolute value of the work for the 2-step process is given by the sum of the two areas:

\[\begin{equation} \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.17} \end{equation}\]

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 happens 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 the plots in the next Figure, 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, for which the work is calculated as:

\[\begin{equation} \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.18} \end{equation}\]

The integral on the right hand side of eq. (2.18) 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:

\[\begin{equation} \left| W_{\text{max}} \right| = nRT \int_{i}^{f} \frac{dV}{V} = nRT \ln \frac{V_f}{V_i}. \tag{2.19} \end{equation}\]

This example demonstrates why work is a path function. If we perform a fast 1-step expansion, the system will perform an amount of work that is much smaller than the amount of work it can perform if the expansion between the same points happens slowly in an \(\infty\)-step process.

The same considerations that we made up to this point for expansion processes hold specularly for 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 amount of steps will be an upper bound to the minimum amount of work required to compress the system.7 \(\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.18).


  1. In fact, we will not even give a rigorous microscopic definition of temperature within this textbook.↩︎

  2. 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.↩︎

  3. 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.↩︎

  4. we use the absolute value to avoid confusions due to the fact that the expansion work is negative according to Definition 1.1.↩︎

  5. In contrast to a lower bound for expansion processes.↩︎