Skip to content
Tutorials Center
My learning

Topics

Lesson 12 of 48 Β· The First Law

Heat and Work

Learn what heat and work are, the sign convention, how to compute boundary work as the area under a P-V path for isobaric, isothermal and polytropic processes, and other forms of work.

Heat and work are the two ways energy crosses the boundary of a closed system, and students often confuse them. The key idea is that neither is stored: a gas does not "contain" heat or work, it contains energy. Heat and work describe how that energy gets in or out during a process. This lesson defines both, fixes the sign convention for good, and teaches the most common calculation: the work done when a gas expands or is compressed.

A P-V diagram with the area under the path shaded and a card listing the sign convention for heat and work
Boundary work is the area under the P-V path; heat in and work out are positive.

What you will learn

  • The definition of heat and work and why both depend on the path.
  • The sign convention: Q in positive, W out positive.
  • How to compute boundary work for isobaric, isothermal and polytropic processes.
  • Other forms of work: shaft, electrical, spring.

Key terms

Heat transfer: energy moving across a boundary because of a temperature difference (conduction, convection or radiation).

Adiabatic: a process with no heat transfer (Q = 0).

Boundary work: work done by or on a fluid as the boundary moves, W_b = ∫ P dV.

Power: rate of energy transfer, αΊ† = W/Ξ”t, in watts.

Heat

Heat is energy that moves because of a temperature difference. It travels by conduction (through solids and still fluids, Fourier's law: QΜ‡ = βˆ’k A dT/dx), convection (carried by moving fluid, QΜ‡ = h A (T_s βˆ’ T_f)) and radiation (electromagnetic waves, QΜ‡ = Ξ΅ Οƒ A T⁴ for a surface, Οƒ = 5.67 Γ— 10⁻⁸ W/(mΒ²Β·K⁴)). In this course we usually treat Q as given or as the unknown in a balance, rather than computing it from the transfer mechanism; that is the subject of a heat transfer course.

A process with no heat transfer is adiabatic: perfect insulation, or simply so fast that no heat has time to flow (a bicycle pump heats up on compression almost adiabatically). Adiabatic does not mean constant temperature.

Work

Mechanical work is a force acting through a distance, W = ∫ F dx. In thermodynamics we define work generally: energy transferred that is not heat. Examples: a piston pushed by gas, a rotating shaft, a battery pushing current through a motor, a stretched spring.

Boundary work

For a gas in a piston-cylinder, the force on the piston is P A and the displacement is dx, so Ξ΄W = P A dx = P dV. Integrating over a quasi-equilibrium path:

W_b = βˆ«β‚Β² P dV

This is the area under the process curve on a P-V diagram. Expansion (dV > 0) gives positive work; compression gives negative work. Because the area depends on the path, the same two end states can have different work.

Isobaric (constant P): W = P (Vβ‚‚ βˆ’ V₁). A gas at 200 kPa expanding from 0.1 to 0.3 mΒ³ does 200 Γ— 0.2 = 40 kJ.

Isothermal ideal gas (P V = m R T = constant): W = P₁V₁ ln(Vβ‚‚/V₁). From P₁ = 500 kPa, V₁ = 0.2 mΒ³ to Vβ‚‚ = 0.6 mΒ³: W = 100 Γ— ln 3 = 109.9 kJ.

Polytropic (P V^n = constant, n β‰  1): W = (Pβ‚‚Vβ‚‚ βˆ’ P₁V₁)/(1 βˆ’ n). With n = 1.3 and the same end volumes, Pβ‚‚ = 500 Γ— (1/3)^1.3 = 119.9 kPa and W = (119.9 Γ— 0.6 βˆ’ 100)/(1 βˆ’ 1.3) = 93.6 kJ.

Notice the three paths between the same volumes give 109.9, 93.6 and (isobaric at 500 kPa) 200 kJ. Heat and work are path functions.

Other forms of work

  • Shaft work: αΊ† = 2Ο€ n T with torque T (NΒ·m) and rotational speed n (rev/s); it drives compressors and is produced by turbines.
  • Electrical work: αΊ† = V I (volts times amperes).
  • Spring work: W = Β½ k (xβ‚‚Β² βˆ’ x₁²).

Sign convention in practice

Situation Q W
Heat added to gas +
Heat removed βˆ’
Gas expands against piston +
Piston compresses gas βˆ’
Electric heater inside a closed insulated tank βˆ’ (work done on system)

The last row is a classic: an electric resistor in an insulated tank adds energy to the gas as work on the system, so W is negative.

Common misconceptions

"Heat is stored in a hot object." Objects store internal energy; heat is the transfer process.

"Adiabatic means isothermal." An adiabatic compression heats the gas; a constant-temperature expansion requires heat input.

"Boundary work formula applies to any process." ∫ P dV assumes quasi-equilibrium; a free (unresisted) expansion into vacuum does no work even though V increases.

Try it

The first plot compares the three expansion paths between the same two volumes. The second calculator computes boundary work for any polytropic exponent.

Python Three paths, three works

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.

Python Polytropic work calculator

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 at a constant 300 kPa expands from 0.1 to 0.4 m3. The boundary work is

    W = P (V2 - V1) = 300 x 0.3 = 90 kJ, positive for expansion.
  2. 2. An electric heater runs inside a rigid insulated tank of gas. For the gas as the system, the heater is

    Electrical energy crossing the boundary is work, and it enters the system, so W is negative.
  3. 3. Which statement about heat and work is true?

    Both are path functions, unlike properties.
  4. 4. Compressing a gas quickly in a well-insulated pump will

    With Q = 0, the work done on the gas raises its internal energy and temperature.
  5. 5. What does the area under a P-V curve represent?

    W = integral of P dV.

Summary

  • Heat is energy transfer driven by temperature difference; work is any other energy transfer; both are path functions.
  • Sign convention: Q in positive, W by the system positive.
  • Boundary work is the area under the P-V path: P Ξ”V for isobaric, P₁V₁ ln(Vβ‚‚/V₁) isothermal, (Pβ‚‚Vβ‚‚ βˆ’ P₁V₁)/(1 βˆ’ n) polytropic.
  • Shaft, electrical and spring work follow the same bookkeeping.

Next: Energy Balance for Closed Systems