CHE-220 · Lesson 7 of 12 · 24 min

The second law and entropy

The first law says energy is conserved, but it does not say which processes can actually happen. Heat flows from hot to cold on its own, never the reverse. A turbine cannot turn all the heat from a boiler into electricity. A refrigerator needs work to pump heat from the cold fermenter coolant to the warm outdoors. These one-way facts are the content of the second law of thermodynamics, and its central property, entropy, is what lets engineers calculate the best a process could ever do. For Kingfisher, the second law answers practical questions: how much electricity the proposed steam turbine could produce at most, how little power the ammonia refrigeration plant could need, and how much the plant loses by heating streams with steam much hotter than necessary.

Statements of the second law

The second law has several equivalent statements. The Kelvin-Planck statement says that no device operating in a cycle can take heat from a single reservoir and convert it entirely to work. Some heat must always be rejected to a colder reservoir. The Clausius statement says that no device operating in a cycle can transfer heat from a colder body to a hotter one with no other effect. A refrigerator does move heat uphill, but only because work is supplied. Each statement implies the other: a device that violated one could be combined with an ordinary engine or refrigerator to violate the other.

Both statements describe cyclic devices, which return to their initial state after each cycle so that their internal energy does not change. A steam power plant is one, with water circulating through boiler, turbine, condenser and pump. So is a refrigeration plant, with ammonia circulating through evaporator, compressor, condenser and expansion valve.

Heat engines, refrigerators and the Carnot limit

A heat engine takes heat \(|Q_H|\) from a hot reservoir at \(T_H\), delivers work \(|W|\) and rejects heat \(|Q_C|\) to a cold reservoir at \(T_C\). Its thermal efficiency is the work out divided by the heat in. A refrigerator runs the other way: it takes heat \(|Q_C|\) from the cold reservoir, receives work \(|W|\) and rejects heat \(|Q_H|\) to the hot reservoir. Its coefficient of performance (COP) is the heat removed divided by the work needed. A heat pump is the same machine valued for the heat it delivers to the hot side.

Two schematics side by side. On the left, a heat engine: a circle between a hot reservoir box at the top labeled T H and a cold reservoir box at the bottom labeled T C. An arrow labeled Q H flows down from the hot reservoir into the circle, an arrow labeled Q C flows down from the circle to the cold reservoir, and an arrow labeled W leaves the circle to the right. On the right, a refrigerator: the arrows are reversed, with Q C flowing up from the cold reservoir into the circle, W entering from the right and Q H flowing up into the hot reservoir.
A heat engine converts part of the heat from a hot reservoir into work and rejects the rest; a refrigerator uses work to move heat from a cold reservoir to a hot one.

Carnot showed in 1824 that no engine operating between two reservoirs can be more efficient than a reversible engine operating between the same reservoirs, and that all reversible engines between the same two temperatures have the same efficiency. That efficiency depends only on the two temperatures. It defines the thermodynamic temperature scale, which turns out to be identical to the ideal gas temperature scale, so the temperatures must be absolute.

\[\eta = \frac{|W|}{|Q_H|} \le \eta_{Carnot} = 1 - \frac{T_C}{T_H} \qquad COP_{ref} = \frac{|Q_C|}{|W|} \le \frac{T_C}{T_H - T_C}\]

Worked problem

Upper limits for the steam turbine and the refrigeration plant

Kingfisher's boilers could raise steam at 400 °C (752 °F), and cooling water is available at about 30 °C (86 °F). The refrigeration plant must remove heat at −10 °C (14 °F, the evaporator) and reject it at 35 °C (95 °F, the condenser). Find the Carnot efficiency of an engine between 400 °C and 30 °C and the Carnot COP of a refrigerator between −10 °C and 35 °C.

Show solution
  1. Engine: \(\eta_{Carnot} = 1 - 303.15/673.15 = 0.550\).
  2. Refrigerator: \(COP_{Carnot} = 263.15/(308.15 - 263.15) = 5.85\).

Answer: No real steam cycle between those temperatures can exceed 55 percent efficiency, and real ones reach roughly 30 to 40 percent, because the steam does not receive all its heat at 400 °C and the turbine and pumps are irreversible (Lesson 11). Likewise, the refrigeration plant needs at least 1 kW of compressor power for every 5.85 kW of cooling; real ammonia plants achieve COPs of about 3 to 4.5 at these temperatures (Lesson 12).

Entropy

Clausius found that for any reversible cycle, the sum of each bit of heat transferred divided by the absolute temperature at which it is transferred is zero. A quantity whose integral around every cycle is zero is a state function. He called it entropy. Its change between two states is the integral of reversibly transferred heat divided by temperature, along any reversible path joining them. For any real, irreversible path, the integral of heat over temperature is smaller than the entropy change, and the difference is entropy generated by the irreversibility.

\[dS = \frac{dQ_{rev}}{T} \qquad \Delta S \ge \int\frac{dQ}{T} \qquad \Delta S_{total} = \Delta S_{system} + \Delta S_{surroundings} \ge 0\]

The last inequality is the most compact statement of the second law: the total entropy of a system and its surroundings never decreases. It stays constant only for reversible processes, which are ideal limits. Every real process generates entropy, through friction, heat transfer across finite temperature differences, mixing, unrestrained expansion and chemical reaction away from equilibrium.

Entropy changes for ideal gases, liquids and phase changes

Because entropy is a state function, its change is computed along any convenient reversible path. For an ideal gas, combine the first law for a reversible process with the ideal gas law. The result has a temperature term from the heat capacity and a pressure term. For liquids and solids, the pressure term is negligible and only the temperature term remains. For a phase change at constant temperature and pressure, the heat is the latent heat, so the entropy change is the latent heat divided by the absolute temperature.

\[\Delta S^{ig} = \int_{T_1}^{T_2}C_P^{ig}\frac{dT}{T} - R\ln\frac{P_2}{P_1} \qquad \Delta S^{liquid} \approx C_P\ln\frac{T_2}{T_1} \qquad \Delta S^{lv} = \frac{\Delta H^{lv}}{T}\]

The ideal gas formula gives a useful check on Lesson 3. For the reversible adiabatic compression of carbon dioxide from 1.05 bar and 30 °C to 4 bar, the outlet temperature of 126.2 °C should make \(\Delta S = 0\), and the program in this lesson confirms it does. A real compressor delivering gas at, say, 150 °C between the same pressures has a positive entropy change, a direct measure of its irreversibility.

Entropy balances for open systems

For a control volume, entropy enters and leaves with the streams, enters or leaves with heat transfer at the boundary temperature, and is generated inside by irreversibilities. At steady state, the entropy balance says that what leaves minus what enters, including heat terms, equals the rate of entropy generation, which can never be negative.

\[\sum_{out}\dot{m}S - \sum_{in}\dot{m}S - \sum_j\frac{\dot{Q}_j}{T_{\sigma,j}} = \dot{S}_G \ge 0\]

Here \(T_{\sigma,j}\) is the temperature of the surface through which heat \(\dot{Q}_j\) passes. The entropy balance is the tool for finding the best possible performance of any steady-flow device: set \(\dot{S}_G = 0\) and solve. It also measures how far a real device falls short.

Lost work

Entropy generation has a direct economic meaning. The lost work, the work that could have been produced (or need not have been consumed) if the process had been reversible, equals the surroundings temperature times the entropy generated. This result, known as the Gouy-Stodola theorem, turns abstract entropy numbers into kilowatts. Process designers use it to rank the irreversibilities in a plant and decide which are worth fixing.

\[\dot{W}_{lost} = T_0\,\dot{S}_G \qquad T_0 \approx 298\ \text{K (surroundings)}\]

Worked problem

Entropy generation in the beer preheater

The beer preheater transfers 10.4 MW (35.5 MMBtu/h) to beer heated from 32 °C to 88 °C (90 to 190 °F), with constant heat capacity. Saturated steam at 400 kPa (58 psia) condenses at 143.6 °C (290 °F) on the other side. Find the rate of entropy generation and the lost work with \(T_0 = 298.15\ \text{K}\). Repeat for steam at 200 kPa (29 psia), condensing at 120.2 °C (248 °F).

Show solution
  1. Beer: \(\dot{m}C_P = 10.4\times10^6/56 = 185.7\ \text{kW/K}\); \(\Delta\dot{S}_{beer} = 185.7 \times \ln(361.15/305.15) = 31.29\ \text{kW/K}\).
  2. Steam at 400 kPa: \(\Delta\dot{S}_{steam} = -10\,400/416.75 = -24.96\ \text{kW/K}\).
  3. Taking the whole exchanger as the system, with no heat loss to the outside: \(\dot{S}_G = 31.29 - 24.96 = 6.34\ \text{kW/K}\); \(\dot{W}_{lost} = 298.15 \times 6.34 = 1.89\ \text{MW}\).
  4. Steam at 200 kPa: \(\Delta\dot{S}_{steam} = -10\,400/393.35 = -26.44\ \text{kW/K}\); \(\dot{S}_G = 4.85\ \text{kW/K}\); \(\dot{W}_{lost} = 1.45\ \text{MW}\).

Answer: Heating beer with 143.6 °C steam destroys about 1.9 MW of work potential, because heat falls across an average temperature difference of more than 80 K. Using 120 °C steam cuts the loss to about 1.45 MW, but needs a larger exchanger because the temperature difference is smaller. This trade-off, between capital cost and lost work, is at the heart of heat integration, and it is exactly why the plant's combined heat and power study (Lesson 11) makes sense: a back-pressure turbine can extract work from high-pressure steam before it is used for heating at lower pressure.

Carnot limits for the steam cycle and the refrigeration plant, entropy generation and lost work in the beer preheater, and ideal gas entropy changes for carbon dioxide compression.
# Second-law limits and entropy generation at Kingfisher Bioenergy
import math
R = 8.314
T0 = 298.15                                   # surroundings (dead state) temperature, K

# 1. Carnot limits
TH, TC = 400 + 273.15, 30 + 273.15            # steam turbine inlet and cooling water, K
print(f"Carnot engine efficiency, 400 C source and 30 C sink: {1 - TC / TH:.3f}")
Tevap, Tcond = -10 + 273.15, 35 + 273.15      # ammonia refrigeration plant
print(f"Carnot refrigerator COP, -10 C to 35 C: {Tevap / (Tcond - Tevap):.2f}")

# 2. Entropy generation in the beer preheater with two choices of heating steam
Q = 10.4e6                                    # W
Tin, Tout = 32 + 273.15, 88 + 273.15          # beer temperatures, K
mcp = Q / (Tout - Tin)                        # W/K, constant heat capacity
dS_beer = mcp * math.log(Tout / Tin)
for label, Tsteam in (("400 kPa steam, 143.6 C", 143.6 + 273.15), ("200 kPa steam, 120.2 C", 120.2 + 273.15)):
    dS_steam = -Q / Tsteam                    # condensing at constant temperature
    S_gen = dS_beer + dS_steam
    print(f"{label}: beer +{dS_beer/1000:.2f} kW/K, steam {dS_steam/1000:.2f} kW/K, "
          f"S_gen = {S_gen/1000:.2f} kW/K, lost work = {T0 * S_gen/1e6:.2f} MW")

# 3. Ideal gas entropy change with Cp(T): check the reversible adiabatic compression from Lesson 3
A, B, D = 5.457, 1.045e-3, -1.157e5          # CO2, Cp/R = A + B T + D/T^2
def dS_ig(T1, P1, T2, P2):
    integral = A * math.log(T2 / T1) + B * (T2 - T1) - D / 2 * (1 / T2 ** 2 - 1 / T1 ** 2)
    return R * (integral - math.log(P2 / P1))
print(f"CO2 1.05 bar, 30 C to 4 bar, 126.2 C: dS = {dS_ig(303.15, 1.05, 399.35, 4.0):+.3f} J/(mol K) (reversible adiabatic, so about zero)")
print(f"CO2 1.05 bar, 30 C to 4 bar, 150.0 C: dS = {dS_ig(303.15, 1.05, 423.15, 4.0):+.3f} J/(mol K) (an irreversible adiabatic compressor)")
Output
Carnot engine efficiency, 400 C source and 30 C sink: 0.550
Carnot refrigerator COP, -10 C to 35 C: 5.85
400 kPa steam, 143.6 C: beer +31.29 kW/K, steam -24.96 kW/K, S_gen = 6.34 kW/K, lost work = 1.89 MW
200 kPa steam, 120.2 C: beer +31.29 kW/K, steam -26.44 kW/K, S_gen = 4.85 kW/K, lost work = 1.45 MW
CO2 1.05 bar, 30 C to 4 bar, 126.2 C: dS = +0.002 J/(mol K) (reversible adiabatic, so about zero)
CO2 1.05 bar, 30 C to 4 bar, 150.0 C: dS = +2.506 J/(mol K) (an irreversible adiabatic compressor)

The program confirms each example. The last two lines show the ideal gas entropy change for carbon dioxide compressed from 1.05 bar and 30 °C to 4 bar: essentially zero at the reversible outlet temperature of 126.2 °C, and about +2.5 J/(mol·K) for an irreversible compressor delivering gas at 150 °C. Lesson 10 turns that difference into an isentropic efficiency.

The third law and absolute entropies

The second law defines only entropy changes. The third law supplies a reference: the entropy of a perfect crystal at absolute zero is zero. That lets chemists tabulate absolute entropies, which are needed for Gibbs energies of reaction and chemical equilibrium in Thermodynamics II. For most process calculations in this course, any convenient reference state works, because only changes matter. Steam tables, for example, set the entropy and internal energy of saturated liquid water at the triple point to zero.

Common mistakes

  • MistakeUsing Celsius temperatures in Carnot formulas or ΔS = Q/T.

    InsteadAlways use absolute temperature in second-law formulas.

  • MistakeThinking entropy can never decrease anywhere.

    InsteadA system's entropy can fall if its surroundings gain at least as much; only the total cannot decrease.

  • MistakeComputing ΔS along the actual irreversible path with dQ/T.

    InsteadUse any reversible path between the same states; ΔS is a state function.

  • MistakeTreating Carnot efficiency as achievable.

    InsteadIt is an upper bound; real cycles reach a fraction of it.

  • MistakeIgnoring the pressure term in ideal gas entropy changes.

    InsteadΔS^ig includes −R ln(P2/P1); it dominates in isothermal compression.

Summary and key terms

  • Kelvin-Planck: no cycle converts heat from one reservoir entirely to work; Clausius: heat does not flow uphill without work.
  • Carnot limits: η = 1 − TC/TH for engines; COP = TC/(TH − TC) for refrigerators.
  • dS = dQrev/T; total entropy of system plus surroundings never decreases.
  • Ideal gas: ΔS = ∫Cp dT/T − R ln(P2/P1); phase change: ΔS = ΔH/T.
  • Open systems: outflow minus inflow minus Q/Tσ equals entropy generation, which is never negative.
  • Lost work = T0 × entropy generated; it ranks irreversibilities in kilowatts.
Second law
The law that total entropy never decreases, equivalently that heat cannot be fully converted to work in a cycle.
Heat engine
A cyclic device that converts part of the heat from a hot reservoir into work.
Coefficient of performance
For a refrigerator, heat removed from the cold space per unit of work supplied.
Carnot efficiency
The maximum efficiency of any engine operating between two reservoir temperatures.
Entropy
A state function defined by dS = dQrev/T, measuring the irreversibility of processes.
Entropy generation
Entropy produced inside a system by irreversibilities; zero only for reversible processes.
Lost work
Work potential destroyed by irreversibility, equal to T0 times the entropy generated.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. An engine receives 100 kW at 500 K and rejects heat at 300 K. What is the maximum power it can produce?

    Show answer

    100 × (1 − 300/500) = 40 kW.

  2. Find the Carnot COP of a freezer at −25 °C rejecting heat at 30 °C.

    Show answer

    248.15/55 = 4.51.

  3. One kilogram of water vaporizes at 100 °C with ΔH = 2257 kJ/kg. Find ΔS.

    Show answer

    2257/373.15 = 6.05 kJ/(kg·K).

  4. An ideal gas is compressed isothermally from 1 to 10 bar. Find ΔS per mole.

    Show answer

    −R ln 10 = −19.1 J/(mol·K); the surroundings gain at least that much.

  5. Using the program, what is the lost work in the beer preheater with 200 kPa steam?

    Show answer

    About 1.45 MW.

  6. Why does a smaller temperature difference in a heat exchanger reduce lost work but raise cost?

    Show answer

    Less entropy is generated, but the exchanger needs more area for the same duty.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz