THERMODYNAMICS • SECOND LAW AND ENTROPY

Entropy Balance: Closed Systems — Apply entropy balance for closed systems

Master the entropy balance equation to quantify irreversibilities and predict the direction of real thermodynamic processes.

Historical Context & Motivation

The concept of entropy arose from the practical question of why heat engines could never convert all absorbed heat into useful work. Early nineteenth-century engineers like Sadi Carnot recognized that some energy was always "lost" to irreversibility, but lacked the mathematical language to describe this loss. The development of entropy as a state property, and subsequently the entropy balance as an accounting tool, gave engineers and scientists a rigorous framework for quantifying irreversibilities in any thermodynamic process. The entropy balance for a closed system — one in which mass does not cross the system boundary — is especially important because it applies to a vast array of practical devices such as pistons, sealed tanks, and rigid vessels.

1824
Carnot's Theorem
Sadi Carnot publishes Réflexions sur la puissance motrice du feu, establishing that no engine operating between two reservoirs can be more efficient than a reversible one — hinting at a fundamental directionality in heat transfer.
1850–1854
Clausius Formalizes the Second Law
Rudolf Clausius introduces the concept that heat cannot spontaneously flow from a cold body to a hot body, and derives the inequality ∮ δQ/T ≤ 0, laying the groundwork for the entropy concept.
1865
Entropy Named
Clausius coins the term entropy (from the Greek τροπή, meaning transformation) and defines it as a state property via dS = δQrev / T.
1870s–1900s
Statistical Interpretation
Ludwig Boltzmann provides the microscopic interpretation S = kB ln Ω, connecting entropy to the number of accessible microstates and cementing its role as a fundamental property of matter.
20th Century
Modern Entropy Balance
The entropy balance equation is formalized as a general accounting principle — mirroring mass and energy balances — enabling systematic analysis of irreversibilities in closed and open systems alike.

With the first law (energy balance) alone, one cannot determine whether a proposed process is physically possible — energy conservation places no restriction on the direction of spontaneous change. The entropy balance fills this gap: it tells us not only how much irreversibility a process generates but also whether the process can occur at all. The central question this lesson addresses is: How do we systematically apply the entropy balance to closed systems to quantify entropy transfer, entropy generation, and changes in system entropy?

Core Principles & Definitions

Before applying the entropy balance, it is essential to understand several foundational ideas that underpin the equation. Entropy is an extensive state property, meaning its value depends on the mass of the system and is completely determined by the system's thermodynamic state — not by the path taken to reach that state. The entropy balance is essentially a bookkeeping equation: it tracks how entropy enters or leaves a closed system via heat transfer, how much entropy is generated internally by irreversibilities, and the resulting change in the system's total entropy. Unlike energy, entropy is not conserved; it can be produced but never destroyed, which is the essence of the Second Law.

1

Closed System

A system whose boundary is impermeable to mass. Energy may cross the boundary as heat (Q) or work (W), but no mass enters or exits. Examples include gas in a piston-cylinder and fluid in a sealed rigid tank.
2

Entropy Transfer via Heat

Entropy crosses a closed-system boundary only through heat transfer. The entropy transfer associated with heat Q at a boundary temperature Tb is Q/Tb. Work interactions carry no entropy.
3

Entropy Generation (S_gen)

Irreversibilities within the system — friction, unresisted expansion, mixing, heat transfer across a finite ΔT — produce entropy. Sgen ≥ 0 always; it equals zero only for an internally reversible process.
4

The Second Law Inequality

The Second Law requires Sgen ≥ 0. A negative computed Sgen indicates that the proposed process is impossible. This is the powerful predictive aspect of the entropy balance.
KEY TAKEAWAY
Think of entropy like a bank account that tracks "disorder credits." Heat transfers are like deposits and withdrawals (entropy in or out), but every irreversibility inside the system is like an unavoidable service fee — it always adds to the account balance, never subtracts. The entropy balance is your bank statement: Change in balance = Net deposits − Net withdrawals + Fees. If the math predicts negative fees (Sgen < 0), the transaction is fraudulent — the process cannot physically occur.

Visual Explanation — The Entropy Balance Diagram

The diagram shows a closed system (dashed boundary) with entropy entering via heat transfer Q1/Tb,1 (pink arrow) and leaving via Q2/Tb,2 (cyan arrow). Internal irreversibilities generate entropy Sgen ≥ 0 (green box). Work interactions cross the boundary but carry no entropy. The entropy balance equation at the bottom ties these contributions together.

The diagram above captures the complete entropy accounting for a closed system. Every term in the entropy balance has a clear physical origin: the left-hand side represents the change in stored entropy of the system between two equilibrium states; the summation on the right accounts for entropy transport across the boundary by heat (with each heat interaction divided by the boundary temperature at which it occurs); and Sgen represents the entropy produced internally due to irreversibilities such as friction, mixing, or heat conduction across a finite temperature difference. Notice critically that work — whether boundary work, shaft work, or electrical work — appears nowhere in the entropy balance because work is an organized energy transfer that carries zero entropy.

Mathematical Framework

The entropy balance for a closed system can be expressed in both differential (rate) and integrated (process) forms. The integrated form is most commonly used in engineering problem solving, but the rate form provides insight into instantaneous entropy production and is essential for transient analyses.

ENTROPY BALANCE — INTEGRATED FORM
S₂ − S₁ = Σₖ (Qₖ / T_b,k) + S_gen
S2 − S1 = change in system entropy (kJ/K). Qk = heat transfer at the k-th boundary location (kJ); positive into the system, negative out. Tb,k = absolute temperature of the boundary at location k (K). Sgen = entropy generated within the system (kJ/K), always ≥ 0.
ENTROPY BALANCE — RATE FORM
dS/dt = Σₖ (Q̇ₖ / T_b,k) + Ṡ_gen
dS/dt = time rate of change of system entropy (kW/K). Q̇k = rate of heat transfer at boundary k (kW). Ṡgen = rate of entropy generation (kW/K), always ≥ 0.
SPECIAL CASE — ADIABATIC PROCESS
S₂ − S₁ = S_gen ≥ 0
When Q = 0 (adiabatic), the entropy of a closed system can only increase or remain constant. An isentropic process (S₂ = S₁) requires both adiabatic conditions and internal reversibility.
ENTROPY CHANGE — PURE SUBSTANCE
ΔS = m × (s₂ − s₁)
For a pure substance of mass m, the entropy change is computed from specific entropy values s1 and s2 obtained from thermodynamic property tables or equations of state. For an ideal gas: Δs = cv ln(T₂/T₁) + R ln(v₂/v₁), or equivalently Δs = cp ln(T₂/T₁) − R ln(P₂/P₁).
⚠️ Sign Convention Matters
When applying the entropy balance, the sign of Q must be consistent: Q > 0 means heat into the system, which contributes positive entropy transfer (Q/Tb > 0). Q < 0 means heat out of the system, contributing negative entropy transfer. Always use the boundary temperature Tb in absolute units (Kelvin or Rankine) — never Celsius or Fahrenheit.

Sources of Irreversibility in Closed Systems

Understanding the sources of entropy generation is crucial for applying the entropy balance effectively. In a closed system, irreversibilities can be broadly categorized into several types. Each source contributes a positive amount to Sgen, and the total entropy generated is the sum of all contributions. Identifying these sources also provides insight into how a process might be improved — by reducing or eliminating irreversibilities, one moves the process closer to the ideal (reversible) limit.

Five primary sources of entropy generation in closed systems are shown radiating toward the central Sgen node. Internal heat transfer across finite temperature differences (pink), mechanical friction and viscous dissipation (amber), unresisted expansion such as free expansion (cyan), mixing and chemical reactions (green), and inelastic deformation (orange) each contribute independently to the total irreversibility.
Common sources of irreversibility and their physical origins
SourcePhysical MechanismExample in Practice
Heat transfer across ΔTEnergy flows spontaneously from hot to cold regions within the system. The greater the temperature difference, the larger the entropy produced.Hot coffee in an insulated but internally non-uniform container; heat redistribution within a piston-cylinder with temperature gradients.
FrictionMechanical friction or viscous shear converts ordered kinetic energy into disordered internal energy (heat), which cannot be fully recovered.Piston rings sliding against cylinder walls; stirring of a viscous fluid in a sealed vessel.
Unresisted expansionGas expands into a vacuum (free expansion) or against a pressure significantly lower than the gas pressure, producing no useful work while increasing entropy.Punctured membrane separating gas from vacuum in a rigid tank (classic Joule expansion).
MixingSpontaneous mixing of different substances or phases increases the number of accessible microstates, producing entropy even without net heat or work.Two gases separated by a partition in a rigid, insulated container; partition is removed and gases mix.
Inelastic deformationPermanent deformation of solid components within the system converts mechanical work into internal energy irreversibly.A paddle wheel churning a liquid in a rigid, insulated container (Joule's paddle-wheel experiment).

Worked Example — Entropy Balance for a Piston-Cylinder

A rigid-walled piston-cylinder device contains 2 kg of water initially at 200 °C and 400 kPa. The water is cooled at constant pressure by transferring heat to a surrounding reservoir at Tres = 25 °C (298.15 K) until the water reaches 100 °C. Determine (a) the heat transferred, (b) the entropy change of the water, and (c) the entropy generated during the process. Assume the boundary temperature equals the reservoir temperature.

Cooling Water at Constant Pressure
1
Step 1 — Identify the System and ProcessThe system is the 2 kg of water inside the piston-cylinder. This is a closed system (no mass crosses the boundary). The process occurs at constant pressure (P = 400 kPa). Heat is transferred out of the system to the reservoir, so Q will be negative. There is a single boundary heat interaction at Tb = 298.15 K.
2
Step 2 — Look Up State PropertiesFrom superheated steam tables at P = 400 kPa: State 1 (200 °C): h1 = 2860.5 kJ/kg, s1 = 7.1714 kJ/(kg·K). State 2 (100 °C, 400 kPa → compressed liquid, approximately saturated liquid at 100 °C): h2 ≈ 419.0 kJ/kg, s2 ≈ 1.3069 kJ/(kg·K).
h₁ = 2860.5, s₁ = 7.1714; h₂ ≈ 419.0, s₂ ≈ 1.3069 (kJ/kg and kJ/(kg·K))
3
Step 3 — Apply the First Law to Find QFor a closed system at constant pressure with no kinetic or potential energy changes, the energy balance reduces to Q = m × (h2 − h1). Q = 2 × (419.0 − 2860.5) = 2 × (−2441.5) = −4883.0 kJ. The negative sign confirms heat leaves the system.
Q = −4883.0 kJ
4
Step 4 — Compute the Entropy Change of the SystemΔSsys = m × (s₂ − s₁) = 2 × (1.3069 − 7.1714) = 2 × (−5.8645) = −11.729 kJ/K. The system entropy decreases because the water is cooling and condensing — going from a disordered vapor state to a more ordered liquid state.
ΔS_sys = −11.729 kJ/K
5
Step 5 — Apply the Entropy Balance to Find S_genThe entropy balance for this closed system is: S₂ − S₁ = Q/Tb + Sgen. Solving for Sgen: Sgen = (S₂ − S₁) − Q/Tb = −11.729 − (−4883.0/298.15) = −11.729 − (−16.378) = −11.729 + 16.378 = 4.649 kJ/K.
S_gen = 4.649 kJ/K > 0 ✓ — The process is irreversible (as expected, since heat flows across a large temperature difference between the system and the 25 °C reservoir).
Verification Check
Always verify that Sgen ≥ 0. If you compute a negative value, either an arithmetic error has occurred, a property was looked up incorrectly, or the boundary temperature was not used consistently. A large positive Sgen indicates significant irreversibility, often due to heat transfer across a large temperature difference — exactly the situation here (steam at ~200 °C exchanging heat with a 25 °C reservoir).

Reversible vs. Irreversible Processes — A Comparison

A central application of the entropy balance is distinguishing between reversible and irreversible processes. The entropy generation term Sgen serves as the quantitative indicator: it is zero for reversible processes and positive for irreversible ones. Understanding the practical differences between these idealized and real-world processes is essential for thermodynamic design and analysis.

Comparison of reversible and irreversible processes in the context of entropy balance
FeatureReversible ProcessIrreversible Process
S_genExactly zero. The process can be reversed with no net change in the system or surroundings.Strictly positive. The process leaves a permanent mark on the universe — entropy has been created.
Entropy balanceΔS = Σ Q/T_b (entropy change equals entropy transfer only)ΔS = Σ Q/T_b + S_gen (entropy change exceeds entropy transfer)
Adiabatic caseIsentropic: S₂ = S₁. Entropy is constant.S₂ > S₁. Entropy increases even without heat transfer.
Driving forcesInfinitesimal differences in temperature, pressure, or chemical potential at the boundary.Finite differences — the larger the driving force, the greater the irreversibility.
Physical realityA theoretical idealization. No real process is perfectly reversible; it would require infinite time.All real processes. Friction, rapid compression/expansion, and finite-ΔT heat transfer are unavoidable.
Use in engineeringSets the performance benchmark (upper bound on efficiency, lower bound on work input).Represents actual performance. S_gen quantifies the gap between real and ideal.
KEY TAKEAWAY
Sgen is the thermodynamic equivalent of a quality audit for a manufacturing process. A perfect factory (reversible process) produces zero defective units (Sgen = 0); a real factory always produces some defects (Sgen > 0). The goal of engineering design is to minimize defects — to bring Sgen as close to zero as economically feasible, thereby maximizing useful work output or minimizing required work input.

Connection to Open Systems & Exergy Analysis

The entropy balance for a closed system is the foundation upon which the more general open-system entropy balance is built. When mass crosses the system boundary, additional entropy transport terms (ṁ × s at each inlet and exit) must be included. Furthermore, the entropy balance forms the basis for exergy analysis (also called availability analysis), which combines the first and second laws to quantify the maximum useful work obtainable from a system relative to its environment. In exergy analysis, every unit of entropy generated corresponds to a quantifiable amount of exergy destruction given by Xdestroyed = T₀ × Sgen, where T₀ is the environment (dead-state) temperature.

Entropy balance: closed system vs. open system
AspectClosed SystemOpen System (Control Volume)
Entropy balanceS₂ − S₁ = Σ Qₖ/T_{b,k} + S_gendS_cv/dt = Σ Qₖ/T_{b,k} + Σ ṁᵢsᵢ − Σ ṁₑsₑ + Ṡ_gen
Mass flow termsNone — mass is fixed within the boundary.Entropy transported by mass at inlets (ṁᵢsᵢ) and exits (ṁₑsₑ) must be included.
Typical devicesPistons, sealed tanks, bombs, calorimetersTurbines, compressors, heat exchangers, nozzles
Steady-state simplificationNot applicable — closed systems inherently undergo finite changes between two states.dS_cv/dt = 0, simplifying the balance to a purely algebraic equation.

Looking forward, the relationship Xdestroyed = T₀ × Sgen (known as the Gouy–Stodola theorem) provides a monetary-equivalent lens for irreversibility: it converts abstract entropy generation into a concrete amount of lost work potential measured in kJ. This makes the entropy balance not just an academic exercise but a practical tool for engineers optimizing power plants, refrigeration cycles, and chemical processes. Mastery of the closed-system entropy balance is therefore the essential stepping stone toward these more advanced applications.

Practice Problems

PROBLEM 1CONCEPTUAL
A closed, perfectly insulated rigid tank undergoes a process in which a paddle wheel stirs the gas inside. Does the entropy of the gas increase, decrease, or remain constant? Explain using the entropy balance, and state whether Sgen is zero, positive, or negative.
PROBLEM 2BASIC CALCULATION
A closed system contains 3 kg of an ideal gas (cv = 0.718 kJ/(kg·K), R = 0.287 kJ/(kg·K)) in a rigid tank. The gas is heated from 300 K to 500 K by a reservoir at 600 K. Determine the entropy generated during the process.
PROBLEM 3INTERMEDIATE
A piston-cylinder device contains 0.5 kg of refrigerant R-134a at 800 kPa and 60 °C. It is cooled at constant pressure until it exists as a saturated liquid at 800 kPa. The boundary temperature equals the saturation temperature at 800 kPa (Tsat = 31.31 °C = 304.46 K). Determine Q, ΔSsys, and Sgen. Use h₁ = 296.8 kJ/kg, s₁ = 1.0181 kJ/(kg·K), h₂ = h_f = 93.42 kJ/kg, s₂ = s_f = 0.3459 kJ/(kg·K).
PROBLEM 4APPLIED
An insulated piston-cylinder contains 1 kg of air (ideal gas, cp = 1.005 kJ/(kg·K), cv = 0.718 kJ/(kg·K), R = 0.287 kJ/(kg·K)) initially at 100 kPa, 300 K. The air is compressed to 800 kPa. If the process were isentropic, the final temperature would be 543.4 K. However, due to friction, the actual final temperature is 580 K. Determine the entropy generated due to the irreversibility of the actual compression.
PROBLEM 5CRITICAL THINKING
A student proposes a process in which 2 kg of water in a closed rigid tank changes from saturated liquid at 150 °C (s = 1.8418 kJ/(kg·K)) to compressed liquid at 50 °C (s ≈ 0.7038 kJ/(kg·K)), while rejecting 800 kJ of heat to a reservoir at 20 °C (293.15 K). Is this process thermodynamically possible? Use the entropy balance to justify your answer, and discuss what the result implies.

Lesson Summary

The entropy balance for a closed system is given by S₂ − S₁ = Σ(Qk/Tb,k) + Sgen. The left side is the change in system entropy, determined solely from the initial and final equilibrium states using property tables or ideal-gas relations. The summation term accounts for entropy transfer via heat at each boundary location, where each Q is divided by the corresponding absolute boundary temperature. Work interactions do not appear because work carries no entropy. The entropy generation term S_gen captures all internal irreversibilities — friction, unresisted expansion, mixing, internal heat transfer across finite ΔT — and must always be ≥ 0 by the Second Law of Thermodynamics.

An isentropic process requires both adiabatic conditions (Q = 0) and internal reversibility (Sgen = 0), serving as the ideal benchmark. A computed Sgen < 0 signals an impossible process, making the entropy balance a powerful feasibility check. This closed-system framework extends naturally to open systems (by adding mass-flow entropy terms) and to exergy analysis (where Xdestroyed = T₀ × Sgen converts entropy generation into lost work potential), making it an indispensable tool across all of engineering thermodynamics.

Varsity Tutors • Thermodynamics • Entropy Balance: Closed Systems