THERMODYNAMICS • FIRST LAW OF THERMODYNAMICS

Energy Balance: Closed Systems — Apply energy balance to closed-system processes

Master the bookkeeping of energy as heat and work transform the state of a fixed-mass system.

Historical Context & Motivation

The idea that energy can be neither created nor destroyed—only converted from one form to another—took more than a century to crystallize. Before the first law of thermodynamics was formalized, engineers relied on empirical rules of thumb to design steam engines, and natural philosophers debated whether heat was a material substance called caloric or a manifestation of microscopic motion. The resolution of this debate laid the groundwork for every modern energy balance, from power-plant design to biological metabolism. Understanding how these ideas developed illuminates why the closed-system energy balance takes the particular mathematical form it does today.

1798
Rumford's Cannon-Boring Experiment
Count Rumford observed that the heat generated during cannon boring was inexhaustible, challenging the caloric theory and suggesting that heat is a form of mechanical energy.
1843
Joule's Paddle-Wheel Experiment
James Prescott Joule quantified the mechanical equivalent of heat by measuring the temperature rise of water stirred by falling weights, establishing a precise numerical link between work and heat.
1850
Clausius Formalizes the First Law
Rudolf Clausius stated that the internal energy of a system changes by the difference of heat added and work done by the system, giving the first law its modern mathematical structure.
1854
Kelvin's Absolute Temperature Scale
Lord Kelvin introduced the thermodynamic temperature scale, enabling consistent measurement of energy transfer and anchoring energy balance calculations to an absolute reference.

The central question these pioneers answered is deceptively simple: when a fixed quantity of matter exchanges energy with its surroundings through heat and work, how do we systematically account for where the energy goes? The closed-system energy balance is the answer—a single equation that, when mastered, unlocks the analysis of pistons, bombs, tanks, rigid vessels, and countless other engineering devices in which mass does not cross the system boundary.

Core Principles & Definitions

Before writing an energy balance, several foundational definitions must be precise. A closed system (also called a control mass) is a region of space whose boundary permits energy transfer—via heat and work—but prohibits mass transfer. The system boundary separates the system from its surroundings, and together they constitute the universe in a thermodynamic sense. Clear identification of these elements is the very first step in any energy-balance problem.

1

Internal Energy (U)

The sum of all microscopic kinetic and potential energies of the molecules within the system. It is a state property—its change depends only on the initial and final states, not on the path taken.
2

Heat (Q)

Energy transfer driven by a temperature difference between the system and its surroundings. Heat is a path function—its value depends on how the process is carried out, not just on end states.
3

Work (W)

Energy transfer that is not caused by a temperature difference. Examples include boundary (PdV) work, shaft work, and electrical work. Work is also a path function.
4

Sign Convention

In the standard convention used here, Q > 0 means heat added to the system and W > 0 means work done by the system. Some textbooks reverse the work sign; always verify which convention is in use.
5

State vs. Path Functions

State functions like U, T, and P depend only on the current equilibrium state. Path functions like Q and W depend on the process path. Differentials of state functions are exact (dU), while those of path functions are inexact (δQ, δW).
KEY TAKEAWAY
Think of a closed system as a bank account with a fixed owner (mass never leaves). The account balance is internal energy. Deposits are heat in and withdrawals are work out. No matter how many transactions occur, the change in your balance equals total deposits minus total withdrawals: ΔU = Q − W.

Visual Explanation — The Closed-System Energy Balance

The dashed boundary encloses the closed system, which stores energy as internal energy (U), kinetic energy (KE), and potential energy (PE). Energy enters as heat Q (green arrow, positive into system) and leaves as work W (pink arrow, positive out of system). No mass crosses the boundary.

The diagram above captures the essence of the first law for a closed system. The dashed boundary is permeable to energy but impermeable to mass—no matter enters or leaves. The total energy stored in the system, E = U + KE + PE, can change only by net heat transfer into the system or net work transfer out of the system. In many engineering applications involving stationary devices such as rigid tanks or piston–cylinder assemblies, macroscopic kinetic and potential energy changes are negligible, and the energy balance simplifies to ΔU = Q − W. Recognizing when this simplification is valid is a critical skill in applying the first law correctly.

Mathematical Framework

The first law of thermodynamics for a closed system can be expressed in both differential and integrated forms. The differential form governs infinitesimal changes between closely spaced equilibrium states, while the integrated form relates two distinct equilibrium states separated by a finite process. Both forms are essential for problem solving: the differential form underpins derivations and is required when properties vary continuously along the process path, while the integrated form is the workhorse for most practical calculations.

FIRST LAW — DIFFERENTIAL FORM
dE = δQ − δW
where dE is the exact differential of total system energy, δQ is the inexact differential of heat (path-dependent), and δW is the inexact differential of work (path-dependent).
FIRST LAW — INTEGRATED FORM
ΔE = E₂ − E₁ = Q − W
Since E = U + KE + PE, expand to: ΔU + ΔKE + ΔPE = Q − W. For stationary systems where ΔKE = 0 and ΔPE = 0, this reduces to ΔU = Q − W.
BOUNDARY WORK — QUASI-STATIC PROCESS
W_b = ∫₁² P dV
Boundary work is the integral of pressure with respect to volume from state 1 to state 2. This integral can only be evaluated when the process path P(V) is specified. For a constant-pressure process: Wb = P(V₂ − V₁).
PER-UNIT-MASS FORM
Δu = q − w
Lowercase letters denote specific (per unit mass) quantities: u = U/m, q = Q/m, w = W/m. This form is particularly convenient when working with thermodynamic property tables that list specific internal energy values.
Sign Convention Warning
Different textbooks use different sign conventions for work. In the convention used here (Çengel & Boles, Borgnakke & Sonntag), W > 0 when the system does work on its surroundings. Some texts (e.g., Smith, Van Ness & Abbott) define W as positive when done on the system, leading to ΔU = Q + W. Always confirm the convention before substituting numbers.

Special Cases — Common Closed-System Processes

Although the energy balance ΔU = Q − W applies universally to stationary closed systems, many practical problems involve processes in which one thermodynamic property is held constant. Recognizing these special-case processes allows significant simplification of both the energy balance and the work integral. The diagram below summarizes the four most commonly encountered quasi-static processes on a pressure–volume diagram, along with their energy-balance implications.

Four common quasi-static processes plotted on a P–V diagram. The isobaric process is a horizontal line; the isochoric process is a vertical line (zero boundary work); the isothermal curve falls more gently than the steeper adiabatic curve (dashed). The area under each curve on the P–V diagram represents boundary work.
Summary of common closed-system process types with their work expressions and simplified energy balances.
ProcessConstraintWork ExpressionEnergy Balance
IsochoricV = constantWb = 0ΔU = Q
IsobaricP = constantWb = P(V₂ − V₁)ΔU = Q − P·ΔV
IsothermalT = constantWb = nRT ln(V₂/V₁) for ideal gasFor ideal gas: ΔU = 0, Q = W
AdiabaticQ = 0Depends on path (PVγ = const for ideal gas)ΔU = −W
PolytropicPVn = constWb = (P₂V₂ − P₁V₁)/(1 − n), n ≠ 1ΔU = Q − W (general)

Worked Example — Piston–Cylinder with Steam

A rigid piston–cylinder device contains 0.5 kg of water initially at 200 kPa and 150 °C (superheated steam). The steam is cooled at constant pressure until it reaches a quality of x = 0.5 (wet mixture). Determine the boundary work done and the heat transfer during this process. Assume changes in kinetic and potential energy are negligible.

Constant-Pressure Cooling of Steam in a Piston–Cylinder
1
Step 1 — Identify the System and ProcessThe system is the 0.5 kg of water enclosed in the piston–cylinder assembly. Since no mass crosses the boundary, this is a closed system. The piston moves freely under constant pressure (P = 200 kPa), so the process is isobaric. Since ΔKE = 0 and ΔPE = 0, the energy balance is ΔU = Q − Wb.
2
Step 2 — Find Initial State PropertiesAt state 1 (P₁ = 200 kPa, T₁ = 150 °C), steam tables give: specific volume v₁ = 0.9596 m³/kg, specific internal energy u₁ = 2577.1 kJ/kg. Since T₁ > Tsat at 200 kPa (120.21 °C), the steam is indeed superheated.
v₁ = 0.9596 m³/kg, u₁ = 2577.1 kJ/kg
3
Step 3 — Find Final State PropertiesAt state 2 (P₂ = 200 kPa, x₂ = 0.5), use saturation data at 200 kPa: vf = 0.001061 m³/kg, vfg = 0.8847 m³/kg, uf = 504.50 kJ/kg, ufg = 2024.6 kJ/kg. Then v₂ = vf + x₂ × vfg = 0.001061 + 0.5 × 0.8847 = 0.4434 m³/kg. Similarly, u₂ = uf + x₂ × ufg = 504.50 + 0.5 × 2024.6 = 1516.8 kJ/kg.
v₂ = 0.4434 m³/kg, u₂ = 1516.8 kJ/kg
4
Step 4 — Calculate Boundary WorkFor a constant-pressure process, Wb = P(V₂ − V₁) = mP(v₂ − v₁). Substituting: Wb = 0.5 kg × 200 kPa × (0.4434 − 0.9596) m³/kg = 0.5 × 200 × (−0.5162) = −51.62 kJ. The negative sign indicates that work is done on the system (the steam is compressed as it condenses).
W_b = −51.62 kJ
5
Step 5 — Apply the Energy Balance to Find QFrom ΔU = Q − Wb, rearrange: Q = ΔU + Wb = m(u₂ − u₁) + Wb. Compute ΔU: m(u₂ − u₁) = 0.5 × (1516.8 − 2577.1) = 0.5 × (−1060.3) = −530.15 kJ. Therefore Q = −530.15 + (−51.62) = −581.77 kJ. The negative sign confirms that heat is rejected from the system to the surroundings, consistent with the cooling process.
Q = −581.8 kJ (heat rejected)

Strengths, Limitations & Common Pitfalls

Strengths and common pitfalls when applying the closed-system energy balance.
AspectStrengthsLimitations / Pitfalls
GeneralityApplies to any substance (ideal gas, real gas, liquid, solid, two-phase mixture) without requiring a specific equation of state.Does not specify the direction of natural processes (for that, the second law is needed).
SimplicityReduces to ΔU = Q − W for stationary systems, a compact and intuitive equation.Oversimplification occurs when students drop KE or PE terms in problems where the system is moving or elevated.
Sign conventionConsistent signs allow algebraic bookkeeping—positive Q means heat in, positive W means work out.Mixing conventions from different textbooks is the single most common source of sign errors.
Boundary workThe P–V diagram provides geometric meaning—area under the curve equals work for quasi-static processes.For non-quasi-static (rapid, irreversible) processes, the integral ∫P dV gives only the boundary work and the actual work may differ.
Property dataWorks seamlessly with thermodynamic tables, equations of state, and software databases.If the wrong state is identified (e.g., reading superheated properties when the substance is in the two-phase region), all subsequent results will be incorrect.
KEY TAKEAWAY
The closed-system energy balance is analogous to a conservation law in fluid mechanics: just as the continuity equation forbids mass from appearing out of nowhere, the first law forbids energy from doing the same. Every joule must be accounted for, either as a change in stored energy or as energy crossing the boundary. The most common errors are not mathematical—they are conceptual: choosing the wrong system boundary, misidentifying the process type, or mixing sign conventions.

Connection to Open Systems & Advanced Topics

The closed-system energy balance is a stepping stone to the more general open-system (control-volume) energy balance, which accounts for mass flow across the boundary. In real-world devices such as turbines, compressors, heat exchangers, and nozzles, mass continuously enters and exits the device. The first law must then include the energy transported by the flowing mass—specifically, its enthalpy, kinetic energy, and potential energy at the inlet and outlet. Mastering the closed-system case provides the physical intuition and mathematical discipline necessary for that transition.

Comparison between closed-system and open-system energy balances.
FeatureClosed SystemOpen System (Control Volume)
Mass crossing boundaryNoYes (ṁin and ṁout)
Energy equationΔU = Q − WdEcv/dt = Q̇ − Ẇ + Σṁinhin − Σṁouthout + ...
Key energy propertyInternal energy, uEnthalpy, h = u + Pv
Typical devicesPiston–cylinder, rigid tank, bomb calorimeterTurbine, compressor, nozzle, heat exchanger
Boundary workExplicitly calculated via ∫P dVAbsorbed into the enthalpy terms (flow work, Pv)

Beyond the first law, the second law of thermodynamics introduces the concept of entropy and provides a direction for processes: while the first law tells you the quantity of energy that must be conserved, the second law tells you which processes are physically possible and how much useful work can actually be extracted. Together, the first and second laws form the analytical backbone of thermodynamic design—from Rankine-cycle power plants to refrigeration systems. The energy balance you have learned here is therefore not an isolated tool but the foundation upon which all of engineering thermodynamics is built.

Practice Problems

PROBLEM 1CONCEPTUAL
A sealed, perfectly insulated rigid container holds an ideal gas. A paddle wheel inside the container is turned by an external motor for 5 minutes and then stopped. After the gas returns to equilibrium, has the internal energy of the gas increased, decreased, or stayed the same? Explain your reasoning using the closed-system energy balance.
PROBLEM 2BASIC CALCULATION
A closed rigid tank contains 2 kg of air (ideal gas, cv = 0.718 kJ/(kg·K)). The air is heated from 25 °C to 150 °C. Determine the heat transfer to the air.
PROBLEM 3INTERMEDIATE
A piston–cylinder device initially contains 0.4 m³ of nitrogen gas at 100 kPa and 27 °C. The gas is compressed slowly in a polytropic process (PV1.3 = constant) to a final volume of 0.1 m³. Assuming nitrogen behaves as an ideal gas with cv = 0.743 kJ/(kg·K) and R = 0.2968 kJ/(kg·K), determine (a) the final temperature, (b) the boundary work, and (c) the heat transfer.
PROBLEM 4APPLIED
A bomb calorimeter (rigid, insulated outer shell) contains a small cup of combustion products and 2.5 kg of water. After a combustion reaction, the water temperature rises from 22.0 °C to 26.4 °C. The heat capacity of the bomb (metal parts) is 1.8 kJ/K and the specific heat of water is 4.186 kJ/(kg·K). Determine the internal energy change of the reactants/products mixture inside the bomb. What assumptions are critical?
PROBLEM 5CRITICAL THINKING
Consider a closed piston–cylinder device containing an ideal gas that undergoes two sequential processes: Process A is an isothermal expansion from state 1 to state 2, and Process B is an isochoric cooling from state 2 back to the original pressure P₁ (state 3). Prove that the net heat transfer for the combined process (QA + QB) equals the net work (WA + WB) only if the gas returns to its original temperature. Under what condition does state 3 have the same temperature as state 1?

Lesson Summary

The first law of thermodynamics for a closed system (no mass transfer across the boundary) is expressed as ΔE = Q − W, where E = U + KE + PE is the total system energy, Q is heat transfer (positive into the system), and W is work (positive out of the system). For stationary systems, the balance simplifies to ΔU = Q − W, placing internal energy at the center of the analysis.

Common process types simplify the balance further: isochoric (constant volume, Wb = 0), isobaric (constant pressure, Wb = PΔV), isothermal (constant temperature, ΔU = 0 for ideal gases), and adiabatic (Q = 0, ΔU = −W). Boundary work is the area under the curve on a P–V diagram for quasi-static processes. Success in applying the energy balance depends on correctly identifying the system boundary, selecting the appropriate sign convention, determining the thermodynamic state at each endpoint, and choosing the right process model.

Varsity Tutors • Thermodynamics • Energy Balance: Closed Systems