THERMODYNAMICS • FIRST LAW OF THERMODYNAMICS

First Law: Closed Systems — Apply the first law to closed systems

Understanding how energy is conserved, transferred, and transformed within systems that exchange no mass with their surroundings.

Historical Context & Motivation

The idea that energy can be neither created nor destroyed — only converted from one form to another — is one of the most powerful unifying principles in all of physics and engineering. Before the nineteenth century, however, heat and mechanical work were considered fundamentally different phenomena; the former was often attributed to an invisible fluid called caloric, while the latter was understood through Newtonian mechanics. It took decades of careful experimentation, heated debate, and brilliant theoretical synthesis to establish the first law of thermodynamics as a universal conservation law that unifies heat, work, and internal energy within a single quantitative framework.

The study of closed systems — thermodynamic systems that exchange energy but not mass with their surroundings — provided the conceptual proving ground for these ideas. Steam engines, piston–cylinder assemblies, and bomb calorimeters are all examples of devices that can be modeled as closed systems, and their analysis drove the formalization of the first law. Understanding this history illuminates why the first law takes the mathematical form it does and why closed-system analysis remains a cornerstone of modern thermodynamics.

1798
Rumford's Cannon-Boring Experiment
Count Rumford observed that boring cannon barrels produced seemingly inexhaustible heat, challenging the caloric theory and suggesting that heat was a form of motion rather than a conserved fluid.
1843
Joule's Paddle-Wheel Experiments
James Prescott Joule demonstrated a precise quantitative equivalence between mechanical work and heat, establishing the mechanical equivalent of heat (approximately 4.186 J per calorie).
1847
Helmholtz Formalizes Energy Conservation
Hermann von Helmholtz published Über die Erhaltung der Kraft, providing a mathematical framework for the conservation of energy across mechanical, thermal, electrical, and chemical domains.
1850
Clausius States the First Law
Rudolf Clausius rigorously formulated the first law of thermodynamics, distinguishing between internal energy, heat, and work and establishing the modern sign conventions used in engineering thermodynamics.
1854–1865
Refinement and the Second Law
Clausius and Lord Kelvin refined the first law while simultaneously developing the second law, revealing that energy conservation alone does not determine the direction of spontaneous processes.

The question these pioneers grappled with was deceptively simple: if heat is not a substance, how do we systematically account for energy entering or leaving a system that has fixed boundaries and no mass transfer? The answer — the first law applied to closed systems — provides a bookkeeping equation so robust that it underpins everything from the design of internal combustion engines to the analysis of phase transitions in materials science.

Core Principles & Definitions

Before applying the first law to closed systems, it is essential to establish precise definitions for the quantities involved. Thermodynamics is a field in which ambiguity in language can lead to sign errors and conceptual confusion, so clarity at the outset pays dividends throughout every subsequent analysis. The four foundational ideas presented below form the vocabulary and logical scaffold upon which the entire first-law framework is built.

1

System & Surroundings

A system is the region of space or quantity of matter under analysis. Everything outside the system boundary is the surroundings. A closed system (also called a control mass) permits energy transfer across its boundary but prohibits mass transfer.
2

Internal Energy (U)

Internal energy encompasses all microscopic forms of energy within a system — molecular translational, rotational, and vibrational kinetic energies, as well as intermolecular potential energies. It is a state function, meaning its value depends only on the current thermodynamic state, not the path by which that state was reached.
3

Heat (Q)

Heat is energy transferred across a system boundary due to a temperature difference. It is a path function — its magnitude depends on the process. In the engineering sign convention, Q > 0 when heat is added to the system (heat in).
4

Work (W)

Work is energy transferred across a system boundary by any mechanism other than a temperature difference — for example, boundary (PdV) work, shaft work, or electrical work. Like heat, it is a path function. In the engineering convention, W > 0 when work is done by the system on its surroundings.
⚠️ Sign Convention Warning
Two common sign conventions exist. The engineering (IUPAC) convention writes ΔU = Q − W (work done by the system is positive). The physics convention writes ΔU = Q + W (work done on the system is positive). This lesson uses the engineering convention throughout. Always verify which convention your textbook uses before solving problems.
KEY TAKEAWAY
Think of a closed system as a bank account that never accepts or dispenses physical currency (no mass transfer). The balance (internal energy) can only change through two channels: deposits and withdrawals of energy as heat or work. The first law is the accounting identity that ensures every joule entering or leaving the account is tracked. Just as your bank statement does not care how you earned the money (path function), your final balance (state function) depends only on the net deposits minus net withdrawals.

Visual Explanation — The Closed-System Energy Balance

The diagram below illustrates the energy interactions for a generic closed system undergoing a process from state 1 to state 2. The system boundary, shown as a dashed line, is impermeable to mass but permeable to energy. Heat Q crosses the boundary due to a temperature difference between the system and its surroundings, while work W crosses the boundary through a mechanical linkage such as a piston or a rotating shaft. The internal energy U is stored within the system and changes by an amount ΔU = U₂ − U₁ as the system transitions between equilibrium states.

Energy balance for a closed system. Heat Q enters the system (positive when added), and work W leaves the system (positive when done by the system). The net effect determines the change in internal energy ΔU.

Several critical features of this diagram deserve emphasis. First, the boundary is drawn with a dashed line to convey that it is impermeable to mass but permeable to energy — a defining characteristic of the closed system. Second, the arrows for Q and W point in the positive direction according to the engineering sign convention: heat into the system and work out of the system are both positive. Third, internal energy U is shown as a property residing inside the system, underscoring its nature as a state function. The equation ΔU = Q − W at the bottom is the compact mathematical statement of the first law for a closed system.

Mathematical Framework

The first law of thermodynamics for a closed system can be stated at two levels of mathematical generality: an integral (finite-process) form suitable for analyzing processes between two equilibrium end states, and a differential (infinitesimal-process) form that serves as the starting point for deriving process-specific expressions. Both forms are presented below, along with the key equation for boundary work, which is the most common mode of work transfer in piston–cylinder problems.

FIRST LAW — FINITE PROCESS
ΔU = Q − W or equivalently U₂ − U₁ = Q − W
ΔU = change in internal energy (kJ); Q = net heat transfer to the system (kJ); W = net work done by the system (kJ). For a cycle (state 1 = state 2), ΔU = 0, so Qnet = Wnet.
FIRST LAW — DIFFERENTIAL FORM
dU = δQ − δW
Here dU is an exact differential (state function), while δQ and δW are inexact differentials (path functions). The distinction is critical: dU can be integrated independently of path, whereas δQ and δW cannot.
BOUNDARY (PdV) WORK
W_b = ∫₁² P dV
Wb = boundary work (kJ); P = system pressure (kPa); V = system volume (m³). This integral can only be evaluated if the functional relationship P(V) is known — i.e., the process path is specified. For a constant-pressure process, Wb = P(V₂ − V₁).
INTERNAL ENERGY FOR IDEAL GASES
ΔU = m c_v ΔT or ΔU = n C_v ΔT
For an ideal gas, internal energy depends only on temperature. Here m is mass (kg), cv is the specific heat at constant volume (kJ/kg·K), n is the number of moles, Cv is the molar heat capacity at constant volume (kJ/kmol·K), and ΔT = T₂ − T₁.

Two important special cases deserve emphasis. In an adiabatic process (Q = 0), the first law reduces to ΔU = −W, so work done by the system comes entirely at the expense of internal energy, causing the temperature to drop for an ideal gas. In a constant-volume (isochoric) process (Wb = 0 because dV = 0), the first law becomes ΔU = Q, meaning all heat added to the system goes directly into raising its internal energy. These reductions illustrate how specifying the process path simplifies the first-law equation and makes it solvable.

Detailed Breakdown — Common Closed-System Processes

In practice, closed-system problems almost always involve one of several idealized process types, each characterized by a constraint that holds one thermodynamic property constant during the process. The P–V diagram below shows four canonical processes for an ideal gas expanding from a common initial state. Recognizing which process is occurring is typically the first step in any closed-system analysis, because it determines how to evaluate the boundary-work integral and simplifies the first-law equation accordingly.

P–V diagram comparing four canonical processes starting from the same initial state (point 1). The isochoric process is a vertical line (no volume change, W = 0). The isobaric process is a horizontal line (W = PΔV). The isothermal curve follows PV = const for an ideal gas. The adiabatic curve (PVᵞ = const) drops more steeply because no heat enters to sustain the temperature.
Summary of common closed-system processes and their simplified first-law forms
ProcessConstraintWork W_bFirst Law Reduces To
IsochoricV = constant0ΔU = Q
IsobaricP = constantP(V₂ − V₁)ΔU = Q − P(V₂ − V₁)
IsothermalT = constantnRT ln(V₂/V₁)ΔU = 0 (ideal gas) → Q = W
AdiabaticQ = 0−ΔU = −mc_vΔTΔU = −W
PolytropicPVⁿ = C(P₂V₂ − P₁V₁)/(1 − n)ΔU = Q − (P₂V₂ − P₁V₁)/(1 − n)

The polytropic process PVⁿ = constant is a generalization that encompasses all four special cases: n = 0 gives isobaric, n = 1 gives isothermal (ideal gas), n = γ = cp/cv gives adiabatic, and n → ∞ gives isochoric. Recognizing the polytropic exponent is a powerful technique for solving complex problems because a single work formula covers all intermediate cases.

Worked Example — Piston–Cylinder with Ideal Gas

Consider a piston–cylinder device containing 0.5 kg of air (ideal gas, cv = 0.718 kJ/kg·K, cp = 1.005 kJ/kg·K). The air is initially at 300 K and 100 kPa. It is heated at constant pressure until its temperature reaches 500 K. Determine: (a) the boundary work done by the air, (b) the change in internal energy, and (c) the heat transferred to the air.

Isobaric Heating of Air in a Piston–Cylinder
1
Step 1 — Identify Given Values and Process TypeMass m = 0.5 kg, T₁ = 300 K, T₂ = 500 K, P = 100 kPa (constant). The working fluid is air modeled as an ideal gas. Since the pressure is constant, this is an isobaric process. We also know cv = 0.718 kJ/kg·K and R = cp − cv = 0.287 kJ/kg·K.
2
Step 2 — Calculate the Change in Internal EnergyFor an ideal gas, internal energy depends only on temperature: ΔU = m × cv × (T₂ − T₁) = 0.5 × 0.718 × (500 − 300).
ΔU = 71.8 kJ
3
Step 3 — Calculate Boundary WorkFor an isobaric process, Wb = P(V₂ − V₁). Using the ideal gas law, PV = mRT, so P(V₂ − V₁) = mR(T₂ − T₁) = 0.5 × 0.287 × (500 − 300).
W_b = 28.7 kJ
4
Step 4 — Apply the First Law to Find Heat TransferFrom the first law for a closed system: Q = ΔU + W = 71.8 + 28.7. Alternatively, for an isobaric process, Q = m × cp × ΔT = 0.5 × 1.005 × 200 = 100.5 kJ. Both methods agree.
Q = 100.5 kJ
5
Step 5 — Verify and InterpretCheck: Q = ΔU + W → 100.5 = 71.8 + 28.7 = 100.5 ✓. The physical interpretation is that 100.5 kJ of heat is transferred into the air; of this, 71.8 kJ goes to raising the internal energy (temperature increases), and 28.7 kJ goes to performing boundary work (the piston is pushed outward as the gas expands). Notice that for an isobaric ideal-gas process, the fraction of heat that becomes work is exactly R/cp ≈ 28.6%.

Strengths, Limitations & Common Pitfalls

The closed-system formulation of the first law is elegant and broadly applicable, but like any model it has boundaries of validity and common misapplication traps. Understanding both its power and its limits is essential for using it effectively in engineering analysis.

Strengths and limitations of the first law applied to closed systems
StrengthsLimitations
Universal: applies to all substances (ideal gas, real gas, liquid, solid, two-phase mixtures) without modification of the fundamental equation.Says nothing about process direction or feasibility — the second law is needed to determine whether a process is spontaneous.
State-function approach: ΔU depends only on end states, so property tables or equations of state suffice even if the process is complex.Requires the process path P(V) to evaluate boundary work; for irreversible processes, this path may be unknown or undefined.
Reduces to simple algebraic expressions for standard processes (isochoric, isobaric, isothermal, adiabatic), enabling rapid hand calculations.Neglects kinetic and potential energy changes by default; these must be added explicitly for systems with significant bulk motion or elevation changes.
Extensible to cycles by summing individual process steps, enabling analysis of engines, refrigerators, and heat pumps.Not directly applicable to open systems (control volumes) — the open-system energy equation includes additional mass-flow enthalpy terms.
⚠️ Common Pitfall
A frequent mistake is using cp instead of cv (or vice versa) when calculating ΔU. For an ideal gas, ΔU = mcvΔT always, regardless of the process. The specific heat cp appears only when you compute enthalpy change ΔH = mcpΔT. Mixing these up is the single most common source of errors in closed-system problems.
KEY TAKEAWAY
The first law for closed systems is like an energy audit for a sealed warehouse: it tells you exactly how much inventory (internal energy) changed based on what came in (heat) and what went out (work). But just as an inventory audit cannot tell you whether the warehouse operations were efficient or wasteful, the first law alone cannot distinguish reversible from irreversible processes — that requires the second law and entropy analysis.

Connection to Open Systems & Advanced Theory

The closed-system first law is a stepping stone to the more general open-system (control-volume) energy equation, which accounts for mass flowing into and out of the system and introduces enthalpy h = u + Pv as the natural energy quantity for flowing fluids. Understanding the closed-system formulation first builds the intuition needed to appreciate why enthalpy (rather than internal energy alone) appears in the open-system equation: the flow work Pv that pushes mass across the boundary is automatically bundled into h.

Closed-system vs. open-system energy analysis
FeatureClosed SystemOpen System (Control Volume)
Mass transferNone — fixed massMass enters and/or exits
Key energy quantityInternal energy UEnthalpy h = u + Pv
First lawΔU = Q − WdE_cv/dt = Q̇ − Ẇ + Σṁ_in h_in − Σṁ_out h_out
Typical devicesPiston–cylinder, rigid tanks, bombsTurbines, compressors, nozzles, heat exchangers
Kinetic/potential energyUsually negligibleOften significant (nozzles, diffusers)

Beyond the first law, the closed-system framework extends naturally to the second law through the entropy balance: ΔS = ∫δQ/T + Sgen. The irreversibilities that the first law ignores are captured by the entropy generation term Sgen ≥ 0. Together, the first and second laws for a closed system provide a complete picture: the first law dictates how much energy is transferred, while the second law determines in which direction and with what quality. Students who master the closed-system first law will find the transition to exergy analysis and second-law efficiency far more intuitive.

Practice Problems

PROBLEM 1CONCEPTUAL
A rigid, sealed, and perfectly insulated container holds a gas. A paddle wheel inside the container is turned by an external motor, doing 15 kJ of work on the gas. What is the change in internal energy of the gas, and what is the heat transfer? Explain your reasoning using the first law for closed systems.
PROBLEM 2BASIC CALCULATION
A closed rigid tank contains 2 kg of nitrogen (ideal gas, cv = 0.743 kJ/kg·K) initially at 27°C. Heat is added until the temperature reaches 227°C. Determine the heat transfer Q.
PROBLEM 3INTERMEDIATE
A piston–cylinder device contains 0.1 m³ of an ideal gas at 400 kPa and 300 K. The gas expands isothermally until its volume doubles. Calculate: (a) the boundary work, (b) the change in internal energy, and (c) the heat transfer.
PROBLEM 4APPLIED
A bomb calorimeter (rigid, closed vessel) contains a fuel sample and oxygen. After combustion, the temperature of the calorimeter and its contents (total heat capacity Ccal = 10.5 kJ/K) rises from 25.00°C to 28.46°C. Determine the internal energy of combustion of the fuel sample, and explain why bomb calorimeters measure ΔU rather than ΔH.
PROBLEM 5CRITICAL THINKING
A closed system undergoes two sequential processes forming a partial cycle: Process A–B is an isochoric heating that adds 50 kJ of heat, and Process B–C is an adiabatic expansion that produces 30 kJ of work. If the system must return from state C to state A via a single process C–A to complete the cycle, determine QC–A and WC–A individually if it is known that the process C–A is isobaric. What additional information would you need, and what can you determine from the first law alone?

Lesson Summary

The first law of thermodynamics applied to a closed system states that the change in internal energy equals the net heat added minus the net work done by the system: ΔU = Q − W. Internal energy is a state function (path-independent), while heat and work are path functions that depend on the process. Recognizing the process type — isochoric, isobaric, isothermal, or adiabatic — simplifies the first law by eliminating or constraining one of the energy-transfer terms.

For ideal gases, internal energy depends solely on temperature (ΔU = mcvΔT), and boundary work is computed from the integral ∫P dV, which requires knowledge of the process path. The P–V diagram provides a powerful visual tool: the area under the process curve equals the boundary work. Mastery of closed-system analysis lays the foundation for open-system (control-volume) analysis, where enthalpy replaces internal energy as the key thermodynamic quantity, and for second-law analysis, which adds directionality and quality to the energy accounting.

Varsity Tutors • Thermodynamics • First Law: Closed Systems