David Bauer Physics & Astronomy · UCLA

Irreversible processes

Irreversible processes

We know from experience that heat flows spontaneously from a hot system to a cold system, but never in the opposite direction. Why is this?

The first law of thermodynamics tells us that energy is conserved, so if the internal energy of one system changes then the energy of the other system must change by the same amount. However, the first law does not constrain the direction of heat flow. As long as the total energy stays constant, heat could flow in either direction. Evidently, the first law alone does not determine how energy is transferred between macroscopic systems. We will need another principle to explain the direction of heat flow and similar processes.

Heat flow is an example of an irreversible process. An irreversible process is one that cannot be completely undone, in that restoring the system to its initial state requires a net change in the environment.

Note that it is not impossible to move energy from a cold system to a hot system: we can accomplish this with a refrigerator or air conditioner. However, to move energy from the cold interior to the hot exterior, a refrigerator needs to take in electrical energy and output additional waste heat, changing the state of the environment.

You can probably think of many other examples of irreversible processes, like breaking an egg, baking a cake, or burning a log. In fact, essentially any realistic macroscopic process is irreversible.

Irreversible processes and the second law

We have already established that the irreversibility of heat flow is not explained by the first law of thermodynamics. In general, if we want to explain why a process is irreversible, we will need another physical principle: the second law of thermodynamics.

To state the second law, we will need to introduce a new thermodynamic state function called entropy, denoted $S$. We can state the second law in terms of entropy as follows:

\[\text{the total entropy of an isolated system cannot decrease.}\]

In the following sections, we will see how to calculate the entropy change in a process and discuss the connection between entropy and irreversibility.

Calculating entropy changes

Entropy change in an isothermal process

The simplest case in which we can calculate the entropy change is that of an isothermal process. For an isothermal process at temperature $T$, the entropy change of a system is

\[\boxed{\Delta S = \frac{Q_{\mathrm{rev}}}{T}}\]

In this expression, $Q_{\mathrm{rev}}$ is the heat flow into the system in a reversible process. Even though the heat $Q_{\mathrm{rev}}$ is a path function that depends on the specific reversible path taken, the entropy change $\Delta S$ is independent of the path.

Example: Entropy change of melting ice

A $350\ \mathrm{g}$ sample of ice at $0^\circ\mathrm{C}$ is heated until all of the ice has melted. The latent heat of fusion of ice is $334\ \mathrm{J/g}$.

  1. Calculate the entropy change of the ice in the melting process.
  2. Suppose the heat that melts the ice comes from a thermal reservoir at $25^\circ\mathrm{C}$. Assuming the reservoir is large enough that its temperature does not change, calculate the entropy change of the reservoir.
Solution

1. The givens are $m = 350\ \mathrm{g}$, $L_f = 334\ \mathrm{J/g}$, and $T_{\mathrm{ice}} = 0^\circ\mathrm{C} = 273\ \mathrm{K}$. The heat that melts the ice is

\[Q_{\mathrm{ice}} = mL_f = (350\ \mathrm{g})(334\ \mathrm{J/g}) = 1.169\times 10^{5}\ \mathrm{J}.\]

The ice melts at a constant temperature, so its entropy change is the heat it absorbs divided by that temperature:

\[\Delta S_{\mathrm{ice}} = \frac{Q_{\mathrm{ice}}}{T_{\mathrm{ice}}} = \frac{1.169\times 10^{5}\ \mathrm{J}}{273\ \mathrm{K}} = +428\ \mathrm{J/K}.\]

2. The reservoir stays at $T_{\mathrm{res}} = 25^\circ\mathrm{C} = 298\ \mathrm{K}$. All of the heat the ice absorbs comes from the reservoir, so

\[Q_{\mathrm{ice}} + Q_{\mathrm{res}} = 0 \quad\Longrightarrow\quad Q_{\mathrm{res}} = -Q_{\mathrm{ice}} = -1.169\times 10^{5}\ \mathrm{J}.\]

The reservoir’s temperature is constant too, so

\[\Delta S_{\mathrm{res}} = \frac{Q_{\mathrm{res}}}{T_{\mathrm{res}}} = \frac{-1.169\times 10^{5}\ \mathrm{J}}{298\ \mathrm{K}} = -392\ \mathrm{J/K}.\]

The reservoir loses less entropy than the ice gains, because it gives up the same heat at a higher temperature. The total entropy of the ice and the reservoir increases by about $36\ \mathrm{J/K}$.

Entropy change in heating

To calculate the entropy change in a process where the temperature of the system changes, we can divide the process into infinitesimal isothermal steps. For each infinitesimal step, the entropy change is

\[dS = \frac{q_{\mathrm{rev}}}{T},\]

where $q$ denotes an infinitesimal quantity of heat. We get the total entropy change by integrating over all the infinitesimal steps:

\[\Delta S = \int \frac{q_{\mathrm{rev}}}{T}.\]

For example, consider heating or cooling a substance with constant specific heat $c$. For a finite temperature change, the heat added or removed is

\[Q = mc\Delta T.\]

For an infinitesimal temperature change $dT$, we instead have

\[q = mc \, dT,\]

so the entropy change from an initial temperature $T_{\mathrm{i}}$ to a final temperature $T_{\mathrm{f}}$ is

\[\Delta S = \int_{T_{\mathrm{i}}}^{T_{\mathrm{f}}} \frac{q}{T} = \int_{T_{\mathrm{i}}}^{T_{\mathrm{f}}} \frac{mc \, dT}{T}.\]

Integrating this gives a natural logarithm, so we end up with

\[\boxed{\Delta S = mc \ln\left( \frac{T_{\mathrm{f}}}{T_{\mathrm{i}}} \right)}\]

Example: Entropy change of cooling coffee

A $250\ \mathrm{g}$ cup of coffee at $80^\circ\mathrm{C}$ is left on a desk and cools to room temperature, $20^\circ\mathrm{C}$. Treat the coffee as water ($c = 4186\ \mathrm{J/(kg\cdot K)}$) and the room as a thermal reservoir at $20^\circ\mathrm{C}$.

  1. Calculate the entropy change of the coffee.
  2. Calculate the entropy change of the room and the total entropy change.
Solution

1. Converting the givens to SI units, with temperatures in kelvin,

\[m = 0.250\ \mathrm{kg}, \qquad c = 4186\ \mathrm{J/(kg\cdot K)}, \qquad T_i = 353\ \mathrm{K}, \qquad T_f = 293\ \mathrm{K}.\]

The coffee’s temperature changes as it cools, so we use the entropy change for heating or cooling a substance with constant specific heat:

\[\Delta S_{\mathrm{coffee}} = mc\ln\left(\frac{T_f}{T_i}\right) = (0.250\ \mathrm{kg})\left(4186\ \mathrm{J/(kg\cdot K)}\right)\ln\left(\frac{293\ \mathrm{K}}{353\ \mathrm{K}}\right) = -195.0\ \mathrm{J/K}.\]

The entropy change is negative because the coffee cools. It loses heat, so $T_f < T_i$ and the logarithm is negative.

2. The room is a reservoir, so it stays at $T_{\mathrm{room}} = 293\ \mathrm{K}$. The heat the coffee loses goes into the room:

\[Q_{\mathrm{room}} = -Q_{\mathrm{coffee}} = -mc\left(T_f - T_i\right) = -(0.250\ \mathrm{kg})\left(4186\ \mathrm{J/(kg\cdot K)}\right)(293\ \mathrm{K} - 353\ \mathrm{K}) = +6.28\times 10^{4}\ \mathrm{J}.\]

The room’s temperature is constant, so

\[\Delta S_{\mathrm{room}} = \frac{Q_{\mathrm{room}}}{T_{\mathrm{room}}} = \frac{6.28\times 10^{4}\ \mathrm{J}}{293\ \mathrm{K}} = +214.3\ \mathrm{J/K}.\]

The total entropy change is the sum of the two:

\[\Delta S_{\mathrm{tot}} = \Delta S_{\mathrm{coffee}} + \Delta S_{\mathrm{room}} = -195.0\ \mathrm{J/K} + 214.3\ \mathrm{J/K} = +19.3\ \mathrm{J/K}.\]

The coffee’s entropy decreases, but the room’s increases by more, so the total entropy increases, as the second law requires for an irreversible process.

Entropy change in free expansion

Free expansion of a gas

Let’s consider the entropy change in a process that is clearly irreversible, namely the free expansion of a gas into a vacuum. Consider a sealed, insulated container with volume $V$ divided into two halves by a partition, and suppose we fill one half of the container with a gas while the other half contains a vacuum.

A schematic of a rigid rectangular container divided into two equal halves by a partition down the middle. The container is drawn with heavy black walls. The left half is a light cyan field scattered with blue dots for the gas molecules, labeled gas, volume V over 2. The right half is empty white space with no molecules in it, labeled vacuum, volume V over 2. Between them stands the partition, a grey vertical slab, which holds the gas in the left half. Together the two halves make up the container's total volume V.

If we remove the partition, the gas will rapidly expand to fill the entire container. It should be clear that this expansion is irreversible, because the entire mass of gas will never spontaneously return to the left half of the container.

The same rigid rectangular container after the partition has been removed. The gas, drawn as blue dots on a light cyan field, now fills the entire container instead of just the left half, and the same molecules are spread over twice as much space. A dashed vertical line down the middle marks where the partition used to be, and there is no longer a vacuum on the right. A double-headed dimension arrow beneath the container spans its full width, labeled gas now fills volume V. The gas has expanded from V over 2 to V without pushing on anything.

A reversible path between the same states

Because entropy is a state function, the entropy change $\Delta S$ only depends on the initial and final states, not the specific process connecting them. To calculate the entropy change in this process, we can consider a reversible process connecting the same initial and final states.

Specifically, consider a slow, isothermal expansion of a gas in a container from volume $V/2$ to volume $V$. We keep the container in contact with a thermal reservoir at constant temperature $T$, and a movable piston allows the gas to expand.

A schematic of the reversible path between the same two states: a slow isothermal expansion. The gas, blue dots on a light cyan field, fills a horizontal cylinder closed at the left by heavy black walls and at the right by a grey movable piston with a rod. A dashed vertical line down the middle marks where the piston started, when the gas filled only half of its final volume. A purple arrow labeled W points right, beyond the end of the piston rod: the gas pushes the piston out and does work as it expands. Beneath the cylinder is a light orange band labeled thermal reservoir at temperature T, with three orange arrows pointing up out of it into the gas, one of them labeled Q. Because the reservoir holds the temperature fixed, the internal energy does not change and the heat drawn in equals the work done by the gas. The initial and final states are the same as in the free expansion, but this path is slow and reversible.

Since this is an isothermal process, the entropy change is $\Delta S = Q/T$. Since $\Delta E_{\mathrm{int}} = 0$ for an isothermal process, the first law tells us that $Q = - W$. Using the formula for the work done on an ideal gas in an isothermal process, we have

\[\Delta S = \frac{-W}{T} = \frac{nRT \ln(V_f/V_i)}{T} = nR \ln\left(\frac{V_f}{V_i}\right).\]

Plugging in the initial volume $V_i = V/2$ and the final volume $V_f = V$, we get

\[\Delta S = nR \ln\left(\frac{V}{V/2}\right) = nR \ln 2.\]

Entropy increases in irreversible processes

Notice that in this free expansion process, the container is completely isolated from the environment, so there is no heat exchanged, no work done, and no change in the internal energy of the gas. Nevertheless, the entropy of the gas increases by $nR \ln 2$. This specific example illustrates an important general feature of irreversible processes. In an irreversible process, entropy is generated even in a completely isolated system.

This is an essential distinction between entropy and energy. Energy cannot be created or destroyed, but new entropy can be generated in a system. But we cannot go in the other direction! Once entropy has been created, it cannot be destroyed.

The second law of thermodynamics

The second law of thermodynamics

This last observation, that we can create new entropy but not get rid of it, is the essence of the second law of thermodynamics. The second law says that

\[\boxed{\text{the total entropy of an isolated system cannot decrease,}}\]

or as an equation,

\[\boxed{\Delta S_\mathrm{tot} \ge 0.}\]

In the case of a non-isolated system, we can still apply the second law by considering the total entropy change of the system plus its environment. The total entropy change is

\[\Delta S_\mathrm{tot} = \Delta S_\mathrm{sys} + \Delta S_\mathrm{env},\]

so the second law tells us that

\[\boxed{\Delta S_\mathrm{sys} + \Delta S_\mathrm{env} \ge 0.}\]

A system that can exchange energy with its environment can go down in entropy, as long as the entropy of the environment increases by at least as much.

Entropy and life

Living things carry out irreversible processes all the time, like breaking down food, contracting muscles, and building new molecules. These processes generate entropy inside the organism. Where does the new entropy go?

An organism is not an isolated system. It takes in energy in a low-entropy form (food, or sunlight for a plant) and releases heat and waste products to its environment, which carry entropy out of the organism. The second law limits the total entropy of the organism plus its environment.

Living organisms keep their own entropy from building up by continually exporting entropy to their environment. This takes a steady supply of usable energy, from food or from the body’s stored fuel, and living things obey the second law throughout.

Irreversibility and the second law

Irreversibility is a direct consequence of the second law. If the total entropy increases in a process, then the reverse of that process would decrease the total entropy, which is forbidden by the second law. We can conclude that a process is reversible if the total entropy change is zero,

\[\boxed{\Delta S_{\mathrm{rev}} = 0,}\]

and a process is irreversible if the total entropy increases:

\[\boxed{\Delta S_{\mathrm{irrev}} > 0.}\]

Irreversibility of heat flow

We can now answer the question we started with: why does heat flow spontaneously from hot to cold, but never from cold to hot?

Consider two thermal reservoirs, a hot one at temperature $T_{\mathrm{H}}$ and a cold one at a lower temperature $T_{\mathrm{C}}$. We put them in thermal contact, so heat $Q$ flows from the hot reservoir to the cold one, and we insulate the pair from its surroundings. The reservoirs are large enough that their temperatures do not change as the heat flows.

A schematic of two thermal reservoirs exchanging heat. On the left is a light red block labeled hot reservoir, at temperature T sub H. On the right is a light blue block labeled cold reservoir, at temperature T sub C. The two blocks sit side by side, touching along a shared wall. An orange arrow labeled Q crosses that wall from the hot reservoir into the cold one, showing heat flowing from hot to cold. A dashed outline surrounds both reservoirs and is labeled isolated system: no energy enters or leaves the arrangement as a whole.

Each reservoir stays at a fixed temperature, so we can use $\Delta S = Q/T$ for each one, as we did for the reservoir in the ice-melting example. The hot reservoir loses heat $Q$ at temperature $T_{\mathrm{H}}$, so its entropy decreases. The cold reservoir gains the same heat at temperature $T_{\mathrm{C}}$, so its entropy increases:

\[\Delta S_{\mathrm{H}} = -\frac{Q}{T_{\mathrm{H}}}, \qquad \Delta S_{\mathrm{C}} = +\frac{Q}{T_{\mathrm{C}}}.\]

The same two reservoirs inside a dashed outline labeled isolated system, now labeled with their entropy changes. Heat Q, drawn as an orange arrow across their shared wall, flows from the hot reservoir on the left to the cold reservoir on the right. The hot reservoir, at temperature T sub H, is labeled delta S sub H equals minus Q over T sub H: it loses entropy. The cold reservoir, at temperature T sub C, is labeled delta S sub C equals plus Q over T sub C: it gains entropy.

The total entropy change of the combined system is

\[\Delta S_{\mathrm{tot}} = \Delta S_{\mathrm{H}} + \Delta S_{\mathrm{C}} = -\frac{Q}{T_{\mathrm{H}}} + \frac{Q}{T_{\mathrm{C}}},\]

which we can write as

\[\Delta S_{\mathrm{tot}} = Q\left(\frac{1}{T_{\mathrm{C}}} - \frac{1}{T_{\mathrm{H}}}\right).\]

Since $T_{\mathrm{C}} < T_{\mathrm{H}}$, $\Delta S_{\mathrm{tot}}$ is positive, and the total entropy increases. The same heat carries more entropy into the cold reservoir than it takes out of the hot one, so heat flow from hot to cold generates entropy. For example, if $Q = 1200\ \mathrm{J}$ flows from a reservoir at $400\ \mathrm{K}$ to one at $300\ \mathrm{K}$, the hot reservoir loses $3.0\ \mathrm{J/K}$ of entropy and the cold reservoir gains $4.0\ \mathrm{J/K}$, so $\Delta S_{\mathrm{tot}} = +1.0\ \mathrm{J/K}$.

Now suppose the same heat $Q$ flowed the other way, from the cold reservoir to the hot one. In this case,

\[\Delta S_{\mathrm{tot}} = Q\left(\frac{1}{T_{\mathrm{H}}} - \frac{1}{T_{\mathrm{C}}}\right) < 0.\]

This would decrease the total entropy of an isolated system, which the second law forbids. Heat flows spontaneously only from hot to cold, and the flow is irreversible.

The same two reservoirs inside a dashed outline labeled isolated system, now with the heat arrow reversed. The orange arrow labeled Q crosses the shared wall from the cold reservoir on the right into the hot reservoir on the left, and a red X is drawn across it. The hot reservoir, at temperature T sub H, is labeled delta S sub H equals plus Q over T sub H, and the cold reservoir, at temperature T sub C, is labeled delta S sub C equals minus Q over T sub C. The cold reservoir would lose more entropy than the hot reservoir gains, so the total entropy change would be less than zero, which is forbidden: heat never flows from cold to hot on its own.

The big picture

  • Energy is conserved. The first law, $\Delta E_{\mathrm{int}} = Q + W$, does not require processes to run in a particular direction as long as the total energy doesn’t change.
  • Entropy is not conserved. Irreversible processes create new entropy, and once created it can never be destroyed. The second law, $\Delta S_\mathrm{tot} \ge 0$, determines the direction of macroscopic processes.