The first law of thermodynamics is the law of conservation of energy applied to heat and work. Energy can cross the boundary of a system only as heat or as work, and whatever goes in and doesn’t come out is stored in the system. Every engine, compressor, boiler and refrigerator is analysed by starting here.
The concept
Draw a boundary around the thing you want to study: the system. Everything outside is the surroundings. Energy crosses the boundary in two ways:
- Heat (Q) flows because of a temperature difference, for example from a flame into a cylinder.
- Work (W) is energy transferred by a force moving through a distance, for example gas pushing a piston or a shaft turning.
Energy stored inside the system is its internal energy (U): the kinetic and potential energy of its molecules, which shows up mostly as temperature. The first law simply balances the books.
Closed systems
A closed system has a fixed mass: nothing flows in or out, as with gas trapped in a cylinder.
Open systems (steady flow)
An open system, or control volume, has mass flowing through it: a turbine, pump, compressor, nozzle or heat exchanger. Each kilogram of fluid carries its own energy in, and pushing it in and out takes work too. Combining the internal energy with that flow work gives enthalpy, . For steady flow:
For an ideal gas, .
Sign convention
This guide uses the 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 . Both are correct as long as you stay consistent.
Assumptions
- The system boundary is clearly defined, and only heat and work cross it (closed system), or the flow is steady with one inlet and one outlet (open system).
- Kinetic and potential energy changes are ignored unless velocities or heights change a lot.
- Air behaves as an ideal gas with constant specific heats: R = 287 J/kg·K, c_v = 718 J/kg·K, c_p = 1005 J/kg·K.
- Processes are slow enough that pressure is uniform in the gas (quasi-static), so .
Solved problem 1: heating gas in a cylinder
A piston-cylinder holds 0.5 kg of air at 200 kPa and 300 K. It is heated at constant pressure until it reaches 500 K. Find the work done, the change in internal energy and the heat supplied.
Step 1: volumes from the ideal gas law.
Step 2: boundary work at constant pressure.
Step 3: change in internal energy.
Step 4: heat from the first law.
Check: at constant pressure J. ✓
Notice that most of the heat (about 71 %) stays in the gas as internal energy; only about 29 % comes out as work. That is why heating a gas at constant pressure is a poor way to make work, and why engines use cycles that compress the gas first.
Solved problem 2: an air compressor (steady flow)
A compressor takes in 0.5 kg/s of air at 300 K and delivers it at 450 K. It loses 5 kW of heat to its surroundings. Inlet and outlet velocities and heights are about equal. Find the power needed to drive it.
Step 1: write the steady flow energy equation, dropping the kinetic and potential energy terms.
Step 2: put in the numbers. Heat leaves, so kW.
Step 3: solve.
The negative sign means work is done on the air, not by it.
Where the first law is used
- Engines: the heat released by burning fuel equals the work output plus the heat lost in the exhaust and coolant. See Otto and Diesel cycles.
- Heat exchangers: the heat lost by the hot fluid equals the heat gained by the cold one.
- Cooling of electronics and machines: the power dissipated must leave as heat, which sets the size of the fan or heat sink. See heat transfer fundamentals.
- Pumps, fans and turbines: the shaft power equals the change in the fluid’s energy plus losses.
What the first law doesn’t tell you
The first law says energy is conserved, but not which way it flows or how much of the heat can become work. A cup of coffee never gets hotter by drawing heat from a cold room, even though that wouldn’t break the first law. The second law sets those limits, and gives the Carnot efficiency as the ceiling for any engine.
Key points
- Energy crosses a system boundary only as heat or work; the rest is stored as internal energy.
- Closed system: Q − W = ΔU. Steady flow: Q̇ − Ẇ = ṁ(Δh + ΔV²/2 + gΔz).
- Choose a sign convention, write it down and keep it.
- The first law balances energy; the second law decides how much heat can become work.