Skip to content
Tutorials Center
My learning

Topics

Lesson 9 of 49 · Gases and Thermodynamics Review

Heat, work and the first law

Learn the first law dU = q + w, sign conventions, expansion work, reversible and irreversible paths, enthalpy and the heat capacities Cv and Cp, with worked examples.

Energy cannot be created or destroyed, only moved around. The first law of thermodynamics turns that principle into bookkeeping. Whatever happens to a chemical system, whether a gas expands, a fuel burns or a battery discharges, the change in the energy of the system must equal the energy that crossed its boundary as heat or work.

This lesson sets out the vocabulary, the sign convention (which differs in some textbooks, so we state it carefully), and the central calculations of expansion work and enthalpy.

A piston-cylinder with heat entering and work leaving, beside a sign-convention card
We count energy from the system's point of view: anything that flows in is positive.

What you will learn

  • The meaning of system, surroundings, state function and path function.
  • The first law, ΔU = q + w, and the IUPAC sign convention.
  • How to calculate expansion work for reversible and irreversible processes.
  • Why enthalpy exists and how Cp and Cv relate.

Key terms

Internal energy (U): the total kinetic and potential energy of the molecules in the system.

Heat (q): energy transferred because of a temperature difference.

Work (w): energy transferred by a force acting through a distance (for gases, -P dV).

Enthalpy (H): H = U + PV.

Heat capacity: C = q/ΔT; at constant volume C_V = (∂U/∂T)_V, at constant pressure C_P = (∂H/∂T)_P.

Systems, surroundings and sign conventions

An open system exchanges matter and energy with its surroundings, a closed system exchanges only energy, and an isolated system exchanges neither. A coffee in a flask is nearly isolated, an open mug is open.

The first law for a closed system:

Text
ΔU = q + w

In the IUPAC convention used in this course, q and w are positive when they increase the energy of the system. Heat flowing into the system is q > 0; work done on the system (compression) is w > 0; work done by the system (expansion) is w < 0. Some older books write ΔU = q - w with w the work done by the system, so always check the convention.

U is a state function: its change depends only on initial and final states. q and w are path functions. An important consequence: for a complete cycle ΔU = 0, so q = -w. A heat engine converts heat into work by a cycle.

Expansion work

When a gas expands against an external pressure P_ext through a small volume change dV:

Text
dw = -P_ext dV

The sign: for expansion dV > 0, so w < 0, the gas loses energy. The total work is the area under the P_ext against V curve.

Constant external pressure. w = -P_ext ΔV.

Free expansion into a vacuum (P_ext = 0): w = 0.

Reversible expansion. If the external pressure is only infinitesimally smaller than the gas pressure at every step, the process is reversible: it can be reversed by an infinitesimal change in conditions. For an ideal gas at constant temperature,

Text
w_rev = -nRT ln(V2/V1)

The reversible path produces the maximum work that can be extracted from an expansion. This is a key idea: the area under the curve depends on the path.

Worked example

One mole of ideal gas at 300 K expands from 10.0 L to 20.0 L.

(a) Reversibly: w = -(1)(8.3145)(300) ln 2 = -1729 J.

(b) Against a constant external pressure equal to the final pressure. Final pressure P_2 = nRT/V_2 = 8.3145 x 300 / 0.0200 = 124.7 kPa. Then w = -P_2 ΔV = -124.7e3 x 0.0100 = -1247 J.

For an isothermal ideal gas ΔU = 0, so q = -w: the gas absorbs 1729 J of heat in (a) and 1247 J in (b). Same start and end, different heat and work, same ΔU. The reversible path extracts more work.

Heat at constant volume and constant pressure

At constant volume no expansion work occurs, so ΔU = q_V. A bomb calorimeter measures ΔU this way.

Most chemistry happens at constant pressure (open to the atmosphere). There ΔU = q_P - P ΔV, so the heat absorbed is

Text
q_P = ΔU + P ΔV = Δ(U + PV) = ΔH

This is the reason for defining enthalpy H = U + PV: its change equals the heat absorbed at constant pressure (when only expansion work is possible). H, like U, is a state function.

For reactions involving gases, ΔH = ΔU + Δn_gas RT (ideal gases, constant T). For N₂ + 3H₂ → 2NH₃, Δn_gas = -2, so at 298 K ΔH is more negative than ΔU by 2 x 8.3145 x 298 = 4.96 kJ.

Heat capacities

C_V = (∂U/∂T)_V and C_P = (∂H/∂T)_P. For an ideal gas, H = U + nRT, so

Text
C_P - C_V = nR      (molar: C_P,m - C_V,m = R)

The molecular picture gives values: a monatomic gas has only translation, U_m = (3/2)RT, so C_V,m = 3/2 R = 12.47 J mol⁻¹ K⁻¹ and C_P,m = 5/2 R = 20.79. Linear diatomics at room temperature add two rotations: C_V,m = 5/2 R. Vibrations join at higher temperature.

The ratio γ = C_P/C_V is 5/3 for monatomic, 7/5 for diatomic (room temperature) gases.

Adiabatic expansion

When no heat enters (q = 0), ΔU = w, so the gas cools as it expands. For a reversible adiabatic process on an ideal gas: T V^(γ-1) = constant and P V^γ = constant. This explains why a gas leaving a spray can feels cold.

Common misconceptions

"Heat is stored in a body." Heat is energy in transit; a body stores internal energy.

"Work is always done by the gas." The sign depends on direction: compression does work on the gas.

"An isothermal process means no heat flow." For an isothermal ideal-gas expansion, all the work done comes from heat absorbed.

"ΔH is the heat of any process." Only at constant pressure with no non-expansion work.

Try it

Compute the work and heat for different paths between the same two states. Notice that ΔU is zero but q and w change with path.

Python Work depends on the path

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Now visualize the work as an area on a P-V diagram. The reversible curve encloses more area than the one-step path.

Python Areas under the P-V curve

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 5 questions

of 5 answered You scored / 5 · perfect!

  1. 1. A gas absorbs 500 J of heat and does 200 J of work on the surroundings. What is ΔU?

    q = +500 J, w = -200 J, so ΔU = q + w = +300 J.
  2. 2. For the isothermal reversible expansion of 1 mol ideal gas at 300 K from 10 L to 20 L, w is

    w = -nRT ln(V2/V1) = -8.3145 x 300 x 0.693 = -1729 J.
  3. 3. Enthalpy change equals the heat absorbed when

    At constant pressure q_P = ΔU + PΔV = ΔH.
  4. 4. For an ideal monatomic gas, Cp,m is

    C_V,m = 3/2 R and C_P,m = C_V,m + R = 5/2 R.
  5. 5. Which of these is a state function?

    H, like U, depends only on the state. q and w depend on the path.

Summary

  • First law: ΔU = q + w with IUPAC signs (energy in is positive).
  • Expansion work dw = -P_ext dV; isothermal reversible ideal-gas work is -nRT ln(V2/V1), the maximum possible.
  • q_V = ΔU; q_P = ΔH where H = U + PV.
  • C_P - C_V = nR for an ideal gas; γ = 5/3 for monatomic gases.
  • Adiabatic expansion cools a gas because ΔU = w.

Next: Thermochemistry and Hess's law