Second law of thermodynamics

The second law of thermodynamics, as formulated in the middle of the 19th century by William Thomson, 1st Baron Kelvin and Rudolf Clausius, states that it is impossible to gain mechanical energy (work) from heat flowing from a cold to a hot body. Clausius postulated that the opposite is the case: it requires input of mechanical (or electric) energy   to transport heat from a low- to a high-temperature object. A heat pump, air conditioner, and refrigerator are devices that move heat from a cold to a warm place and, according to Clausius, they need mechanical or electric energy (work) to do it.

Thomson formulated the second law in a slightly different, but equivalent way. He used the concept of a Carnot engine, which is a virtual heat engine that converts part of the heat that it receives from a heat reservoir into work. The engine goes through thermodynamic cycles and after a full cycle it is by definition back in its initial state, i.e., its internal energy has not changed. Thomson postulated that it is impossible for such a cyclic heat engine to do net work while in contact with a single heat reservoir, even when the work delivered by the engine would be converted back into heat and re-funneled into the reservoir (in which case the internal energy of the heat reservoir would be the same at the beginning and the end of the cycle). A heat source cannot play the same role as a bank that lends money to an entrepreneur who makes enough money with his loan to repay the bank and still have a net gain of money. It is not possible for a heat engine to get a "loan" of heat from a single heat source, get work out of it, and bring back  the borrowed heat to the same source. In short, Thomson stated that it is impossible to perform work by cooling down a single heat source.

Discussion of the second law
If the second law did not prevail, there would be no fear of energy shortage. For example, it would be possible—as already pointed out by Lord Kelvin—to propel ships by energy extracted from sea water. After all, the oceans contain immense amounts of internal energy. When one could extract just a small portion of it—whereby a slight cooling of the sea water would occur—and use this to propel a ship (a form of work), then ships could move without any net consumption of energy. It would not violate the first law of thermodynamics, because the rotation of the ship's propellers would again heat the water and in total the energy of the supersystem "ship-plus-ocean" would be conserved, in agreement with the first law. Unfortunately, it is not possible, no work can be extracted from the  water because it would be  a single source of heat. Clausius would explain the violation of the law by observing that ships are warmer than sea water (or at least they are not colder) and hence it needs work to transport heat from the sea to the ship.

Without the second law, one could conceive a similar setup on land where energy, extracted from the earth, would charge batteries, and heat, dissipated by electric currents generated by the batteries, would be given back to the earth. Such a device is also out of the question because the second law forbids it.

The second law is summarized in Figure 1. Two heat reservoirs are shown, one of absolute temperature Th (the hot reservoir) and the other of temperature Tc (the cold reservoir), Th >Tc. The reservoirs are coupled by a heat engine (green circle), a construct that converts heat Qh into work W. The remaining heat Qc is delivered to the cold reservoir. This idealized representation of power-generating machines was invented by Sadi Carnot who used it for the study of  steam engines. But this schematic representation also applies to many other machines, for instance also to an automobile, a vehicle with an internal combustion engine. The high-temperature heat bath is formed by the cylinders which are hot because of the combustion of gasoline. The cold heat bath is formed by the environment of the car—part of the heat is converted to work and the remaining heat is delivered to the surroundings through the car's radiator. The cyclically moving pistons, that perform the actual work, form the heat engine.

An essential feature of the process depicted in Figure 1 is that it is reversible: all arrows may be reverted, in which case  Figure 1 would depict heat flowing from cold to hot and, according to Clausius, work would have to be done by the surroundings on the system (represented by an ingoing arrow for W).

When the heat flow is from hot to cold, work W  is performed by the engine on the surroundings (outgoing W in Figure 1). The Kelvin principle states that Qc &ne; 0, because otherwise there would be a single heat source delivering the work. Hence, the second law states that only part of the heat Qh obtained from the hot reservoir, can be converted into work, the remaining part  of   Qh, the amount Qc,   is given off to the low temperature reservoir. [In the case of a car it means that only part of the combustion energy is converted into work and that the other part of the combustion energy heats up the air surrounding the car.]

It can be shown that the efficiency &eta; &equiv; W / Qh is bounded:

\eta \le \frac{T_\mathrm{h}-T_\mathrm{c}}{T_\mathrm{h}} $$ Thus, when car cylinders operate at, say, 427 °C = 700 K and the surroundings are  27 °C = 300 K, then &eta; &le; 400/700 = 57%. This percentage is used for driving the car, the other 43% is lost to the surroundings. It is important to note that the efficiency is limited by the second law of thermodynamics; the limiting &eta; can only be raised by higher Th, not by better streamlining of the car or other design improvements.

Mathematical expression of the second law
In the article entropy it is proved from the Clausius/Kelvin principle that a thermodynamic system is characterized, not only by its usual parameters volume, pressure, etc., but also by the state variable S, the entropy of the system. In order to introduce S, a small amount of heat is written as DQ. Consider a single thermodynamic system of absolute temperature T. The differential dS is defined  by

dS \;\stackrel{\mathrm{def}}{=}\; \frac{DQ}{T} > 0. $$ when heat enters the system. When heat exits the system, the definition of dS is,

dS \;\stackrel{\mathrm{def}}{=}\; - \frac{DQ}{T} < 0, $$ In both definitions the amount DQ is positive. Notice that S is a function with a well-defined differential dS that is proportional to the small quantity DQ. This is completely analogous to the internal energy U that has a differential given by the difference of two small quantities dU=DQ&minus;DW—whereas U is a state function, Q and W are not.

Reversible processes
The fact that entropy S is a state function implies that the following holds for a reversible cyclic   process,

\oint \frac{DQ}{T} \equiv {\int\limits_1\limits^2}_{{\!\!}^{(I)}}\frac{DQ}{T} + {\int\limits_2\limits^1}_{{\!\!}^{(II)}} \frac{DQ}{T} = \oint dS = 0. $$ This equation is the mathematical expression of the second law of thermodynamics for the special case of reversible processes. The cycle consists of two different paths in state space, denoted by I and II. The path integrals start and end at common points in state space, indicated by 1 and 2.

In order to show conversely that this equation yields the Clausius principle, we consider the heat engine (green circle) in Figure 1 as our system and assume that both heat baths are so large (or the engine so small) that one full cycle of the engine does not change the temperatures of the baths. Then for one cycle of the engine one can write,

\oint dS = \oint \frac{DQ_\mathrm{h}}{T_\mathrm{h}} - \oint \frac{DQ_\mathrm{c}}{T_\mathrm{c}} = \frac{Q_\mathrm{h}}{T_\mathrm{h}} - \frac{Q_\mathrm{c}}{T_\mathrm{c}} = 0 \quad\qquad\qquad (1) $$ where we defined

\frac{Q_\mathrm{h}}{T_\mathrm{h}} \equiv \oint \frac{DQ_\mathrm{h}}{T_\mathrm{h}} = \frac{1}{T_\mathrm{h}} \oint DQ_\mathrm{h}, $$ and the analogous definition holds for Qc. Note that from the reverse process (heat flowing from cold to hot) one obtains the same result.

By definition Qh and Qc  are positive  amounts of heat. With regard to the work W, one must carefully distinguish whether work is  performed by (Wby) or on (Won) the system. Clearly Wby = &minus;Won. Observe further that from equation (1) it follows that

\frac{Q_\mathrm{h}}{Q_\mathrm{c}} = \frac{T_\mathrm{h}}{T_\mathrm{c}} > 1, \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad(2) $$ i.e., Qh > Qc irrespective of the direction of the heat flow.

When the heat flow is from hot to cold (arrows are as shown in Figure 1), the first law states that work by the system (outward arrow) obeys the equation

W_\mathrm{by}= Q_\mathrm{h} -Q_\mathrm{c} > 0, \, \quad\qquad\qquad\qquad\qquad\qquad\qquad\qquad(3) $$ that is, the heat engine performs work on its surroundings.

When the heat flow is from cold to hot (all arrows are reverted in Figure 1), the first law of thermodynamics states that work on the system (inward arrow) is

W_\mathrm{on}= Q_\mathrm{h} -Q_\mathrm{c} > 0, \, $$ meaning that the surroundings perform work on the heat engine. Hence, from the mathematical formulation of the second law follows, in correspondence with the Clausius principle, that work on the system is needed to transport heat from the cold to the hot reservoir.

The efficiency &eta; follows from equations (2) and (3)

\eta \equiv \frac{W_\mathrm{by}}{Q_\mathrm{h}} = \frac{Q_\mathrm{h} -Q_\mathrm{c}}{Q_\mathrm{h}}= 1 - \frac{Q_\mathrm{c}}{Q_\mathrm{h}} = 1 - \frac{T_\mathrm{c}}{T_\mathrm{h}} = \frac{T_\mathrm{h}-T_\mathrm{c}}{T_\mathrm{h}}, $$ and since Th > Tc > 0, it follows that &eta; < 1.

It is good to stress that the inequality &eta; < 1 holds for reversible processes in which there are no entropy losses. Often the fact that &eta; is less than unity is given in the very same discussion as in which it is pointed out that entropy strives toward a maximum. It is then easy to draw the incorrect conclusion that &eta; being less than one is solely due to entropy losses. It is true, however, that in spontaneous (irreversible) processes the entropy does increase with the consequence that the efficiency &eta; is  further reduced; the equation for &eta; becomes an upper bound. That is, for irreversible processes the equality that is valid for reversible processes, becomes an inequality,

\eta < \frac{T_\mathrm{h}-T_\mathrm{c}}{T_\mathrm{h}}. $$

Spontaneous, irreversible, processes
Many, in fact most, thermodynamic processes are spontaneous and irreversible. A well-known spontaneous process is the flow of heat from a vessel containing hot fluid to one containing cold fluid, see Figure 2. The opposite process, the transport of heat from a cold to a hot vessel, needs work by the Clausius principle and is accordingly not spontaneous. The spontaneous flow of heat from hot to cold is irreversible; the terms "spontaneous" and "irreversible" will be used interchangeably in what follows.

Another example of an irreversible process is Count Rumford's seminal cannon boring experiment in which work by a drill is converted into frictional heat. This process cannot be reverted because of the Kelvin principle. It is impossible to obtain work from the frictional heat  without another, colder, reservoir present. The cannon-plus-drill forms a single source of heat.

The Joule-Thomson effect shows yet another example of an irreversible process.

In Figure 2 it is shown that during a certain short time span a small amount of heat DQ flows from the upper to the lower vessel, Th > Tc. For the loss and gain of an infinitesimal amount of heat we may use the equations for the change in entropy given in the previous section. That is, the upper (hot) container loses entropy, while the lower (cold) gains entropy. For the total isolated system it holds that

dS = -\frac{DQ}{T_\mathrm{h}} + \frac{DQ}{T_\mathrm{c}} = DQ\left( \frac{1}{T_\mathrm{c}} - \frac{1}{T_\mathrm{h}}\right) > 0. $$ Clearly, heat will keep on flowing until the temperature of both vessels has become equal and the entropy of the isolated system has increased and finally S2 &minus; S1 > 0. If the same amount of heat had been transferred from the hot to the cold reservoir, but reversibly through a heat engine, as in Figure 1, work would have been delivered by the heat flow, while the spontaneous process of Figure 2 does not perform any work. This already shows that a spontaneous process yields less work than the corresponding reversible process. And, in turn, it means that the efficiency &eta; of a spontaneous process is smaller than the efficiency of the corresponding reversible process, a result that was preluded above.

In Figure 2 an irreversible process is shown in which the entropy increases while zero heat is added to the system. This is an extreme case; in arbitrary irreversible processes the entropy increases more  than the non-zero amount of heat (divided by temperature) that is added to the system. This inequality is the content of the second law for irreversible processes. In order to give the formulation of the second law of thermodynamics for irreversible processes of arbitrary systems, we consider Figure 3. A system consisting of an arbitrary closed system C (only heat goes in and out) and a reversible heat engine E is coupled to a large heat reservoir R of constant temperature T0. The system C undergoes a cyclic state change, where from 1 to 2 the change is irreversible (dashed line) and from 2 to 1 it is reversible (full line). Since the change 1–2–1 is a cycle and no work is performed on or by C, it follows that

Q_\mathrm{rev} =Q_\mathrm{irr} \quad\hbox{with}\quad Q_\mathrm{rev} \equiv \int_1^2 DQ_\mathrm{rev},\quad Q_\mathrm{irr} \equiv \int_1^2 DQ_\mathrm{irr}. $$ For the heat engine E it holds that

\frac{DQ_\mathrm{rev}}{DQ_\mathrm{II}} = \frac{T_\mathrm{rev}}{T_0}\quad\hbox{and}\quad \frac{DQ_\mathrm{irr}}{DQ_\mathrm{I}} = \frac{T_\mathrm{irr}}{T_0}. $$ Hence

\frac{Q_\mathrm{II}}{T_0} \equiv \frac{1}{T_0} \int_1^2 DQ_\mathrm{II} = \int_1^2 \frac{DQ_\mathrm{rev}}{T_\mathrm{rev}}\quad\hbox{and}\quad \frac{Q_\mathrm{I}}{T_0} \equiv \frac{1}{T_0} \int_1^2 DQ_\mathrm{I} = \int_1^2 \frac{DQ_\mathrm{irr}}{T_\mathrm{irr}}. $$ From Kelvin's principle it follows that W &le; 0, because there is only the single heat source R. The case W = 0 refers to both paths being reversible, we now consider W < 0. Invoking the first law of thermodynamics we get,

W = Q_\mathrm{I} - Q_\mathrm{II} < 0\; \Longrightarrow\; \frac{Q_\mathrm{II}}{T_0} > \frac{Q_\mathrm{I}}{T_0}, $$ so that

\int_1^2 \frac{DQ_\mathrm{rev}}{T_\mathrm{rev}} > \int_1^2 \frac{DQ_\mathrm{irr}}{T_\mathrm{irr}} $$ Since the path indicated by the full line is reversible, the left-hand side of this inequality is equal S2&minus;S1 and the final result becomes

S_2 -S_1 > \int_1^2 \frac{DQ_\mathrm{irr}}{T_\mathrm{irr}} \Longleftrightarrow dS > \frac{DQ_\mathrm{irr}}{T_\mathrm{irr}}, $$ which proves the second law of thermodynamics for irreversible processes from the Kelvin principle.

Equilibrium in an isolated system
Consider Figure 2 again, it depicts an isolated system, surrounded by adiabatic (black) walls with two partitions separated by a diathermic wall. It will not be assumed now that the temperature of the upper partition is higher than of the lower partition, hence we refer to the temperature and entropy of the upper partition as T1 and S1. The lower partition has the variables T2 and S2. The second law of thermodynamics states that by a spontaneous process the entropy of the isolated system increases. This statement is now turned around: when S can be increased by a spontaneous process, such process will occur. In other words, the second law states that the entropy of an isolated system strives towards a maximum.

At the maximum a small change in S will be zero,

dS = 0.\, $$ This is a necessary condition for the system to be in an equilibrium state. It is not sufficient for the entropy to be maximum,  because the equilibrium could be a state of minimum entropy, or it could be a metastable equilibrium. In the system of Figure 2:

dS = dS_1 + dS_2 = 0.\, $$ This condition is written here for a partitioning of an isolated system into two parts; it is clear that it can be extended to as many subsystems as one wants.

In order to see what this condition can predict, the system of Figure 2 is assumed to be in an equilibrium state of maximum entropy. Transfer of an infinitesimal amount of heat DQ from 2 to 1 does not change the total entropy,

dS = \frac{DQ}{T_1} - \frac{DQ}{T_2} = 0. $$ so that, since DQ &ne; 0,

DQ\left( \frac{1}{T_1} - \frac{1}{T_2}\right) = 0 \Longrightarrow T_1 = T_2. $$ and the (expected) result is found that at equilibrium the temperatures of the two subsystems of the isolated system are equal.

It was observed by Clausius in 1865 that the world may be seen as an isolated system which is not in thermodynamic equilibrium. He wrote: die Entropy der Welt strebt einem Maximum zu [the entropy of the world  strives towards a maximum]. When this maximum is reached the temperature will be equal everywhere (probably close to 0 K). This state is known as the entropy death of the universe.