The first law says energy is conserved. For a closed system, a fixed mass with no flow across its boundary, the net heat added minus the net work done by the system equals the change in its stored energy: Q − W = ΔU + ΔKE + ΔPE.
Last updated
Closed systems and sign conventions
A closed system (a control mass) can exchange heat and work with its surroundings, but no mass crosses its boundary. A sealed tank, the gas behind a piston and a block being heated are all closed systems.
This page uses the most common engineering convention: heat into the system is positive, and work done by the system is positive. Some textbooks count work done on the system as positive and write ΔU = Q + W. Either works if you use it consistently.
Forms of work
Boundary work is done when the boundary moves, as when a gas pushes a piston: W_b = ∫P dV. At constant pressure it is P(V₂ − V₁). In a rigid container the volume cannot change, so boundary work is zero.
Other work crosses the boundary without moving it: an electric heater, a paddle wheel or a rotating shaft. Electrical and shaft work done on the system enter the balance as negative W under the convention above.
For an ideal gas, internal energy depends only on temperature. With constant specific heats, ΔU = m·c_v·(T₂ − T₁). For a constant-pressure process the heat added equals the enthalpy change, Q = m·c_p·(T₂ − T₁).
Specific heats change with temperature. Room-temperature values are fine for moderate temperature changes; for large ones, use an average value or property tables. Kinetic and potential energy changes are usually negligible for stationary systems and are dropped.
Key formulas
Formulas used on this page, with the textbook each is cited from
Formula
Expression
Where
Cited from
Closed-system energy balance
Q − W = ΔU + ΔKE + ΔPE
Q into the system and W by the system are positive
Çengel & Boles, Thermodynamics: An Engineering Approach
Boundary work
W_b = ∫ P dV
area under the process curve on a P–V diagram
Moran & Shapiro, Fundamentals of Engineering Thermodynamics
Internal energy change, ideal gas
ΔU = m·c_v·(T₂ − T₁)
constant c_v, in kJ/(kg·K)
Çengel & Boles, Thermodynamics: An Engineering Approach
Ideal-gas specific heats
c_p − c_v = R
R = specific gas constant
Moran & Shapiro, Fundamentals of Engineering Thermodynamics
Worked examples
Example: Heating air in a rigid tank with heat loss
Given
A rigid 0.5 m³ tank holds air at 100 kPa and 27 °C (take T₁ = 300 K).
A 100 W electric heater inside the tank runs for 8 minutes.
Over the same time, the tank loses 12 kJ of heat to the room.
Treat air as an ideal gas with R = 0.287 kJ/(kg·K) and c_v = 0.718 kJ/(kg·K), the room-temperature value from ideal-gas specific-heat tables.
Find
The final temperature and pressure of the air.
Solution
System: the air in the tank. Rigid, so W_b = 0. No motion, so ΔKE = ΔPE = 0.
Mass of air from the ideal gas law:m = P₁V / (R·T₁) = (100 kPa × 0.5 m³) / (0.287 kJ/(kg·K) × 300 K) = 0.5807 kg
Electrical work is done on the system, so it is negative:W = −(100 W × 480 s) = −48 000 J = −48 kJ
Heat leaves the system, so it is negative:Q = −12 kJ
Energy balance:ΔU = Q − W = −12 kJ − (−48 kJ) = 36 kJ
Temperature change:T₂ − T₁ = ΔU / (m·c_v) = 36 kJ / (0.5807 kg × 0.718 kJ/(kg·K)) = 86.3 K → T₂ = 386.3 K (113.2 °C)
Constant volume and mass, so pressure scales with absolute temperature:P₂ = P₁·(T₂ / T₁) = 100 kPa × (386.3 / 300) = 128.8 kPa
Answer: T₂ ≈ 386 K (113 °C) and P₂ ≈ 129 kPa. Using an average c_v over 300–386 K would change T₂ by well under 1 K.
Example: Constant-pressure heating in a piston–cylinder
Given
0.2 kg of air in a piston–cylinder is at 150 kPa and 20 °C (293 K).
It is heated at constant pressure to 120 °C (393 K).
Use R = 0.287, c_v = 0.718 and c_p = 1.005 kJ/(kg·K).
Find
The boundary work, the change in internal energy, and the heat added.
Solution
Initial and final volumes from the ideal gas law:V₁ = m·R·T₁ / P = (0.2 × 0.287 × 293) / 150 = 0.1121 m³; V₂ = (0.2 × 0.287 × 393) / 150 = 0.1504 m³
Boundary work at constant pressure:W_b = P(V₂ − V₁) = 150 kPa × (0.1504 − 0.1121) m³ = 5.74 kJ
Same result from m·R·ΔT, a useful check:W_b = 0.2 × 0.287 × 100 = 5.74 kJ ✓
Change in internal energy:ΔU = m·c_v·ΔT = 0.2 kg × 0.718 kJ/(kg·K) × 100 K = 14.36 kJ
Heat from the energy balance:Q = ΔU + W_b = 14.36 + 5.74 = 20.10 kJ
Check with enthalpy, since the pressure is constant:Q = m·c_p·ΔT = 0.2 × 1.005 × 100 = 20.10 kJ ✓
Answer: W_b = 5.74 kJ (done by the air), ΔU = 14.36 kJ and Q = 20.10 kJ added. About 29% of the heat leaves again as work on the piston.
Common mistakes
Mixing sign conventions. Write the convention at the top of the solution. Under Q − W = ΔU, electrical or shaft work done on the system is negative.
Using °C in ΔU but not in the ideal gas law. A temperature difference is the same in K and °C, but PV = mRT needs absolute temperature in kelvin.
Adding boundary work to a rigid tank. No volume change means W_b = 0. Work can still enter through a heater, paddle wheel or shaft.
Using c_p for a constant-volume process. ΔU always uses c_v for an ideal gas. c_p appears for the enthalpy, which equals Q only at constant pressure.
Forgetting to convert watts and minutes to kJ. 1 W = 1 J/s. Multiply by seconds and divide by 1000 to get kJ before you add it to Q.
In industry
Frequently asked questions
What is the difference between a closed and an open system?
A closed system has a fixed mass; only energy crosses its boundary. An open system, or control volume, has mass flowing in or out, as in a pump, nozzle or turbine, and its energy balance includes the enthalpy carried by the flow.
Is heat the same as temperature?
No. Temperature is a property of the system. Heat is energy in transit across the boundary because of a temperature difference. A system does not contain heat; it contains internal energy.
Why does a rigid tank still have work?
It has no boundary work, because the volume cannot change. Other kinds of work, such as a heater’s electrical work or a stirrer’s shaft work, still cross the boundary.
When can I ignore kinetic and potential energy?
When the system is stationary or its velocity and height barely change. For a tank on the floor or a piston in a cylinder, both terms are negligible next to ΔU.