CHE-220 · Lesson 1 of 12 · 28 min

Thermodynamics in chemical engineering and the first law

In CHE-200 you balanced mass and energy around the Kingfisher Bioenergy dry-grind ethanol plant in Sarnia. You used heat capacities, latent heats, steam tables and the ideal gas law as tools, without asking much about where those numbers come from or what limits them. This course asks those questions. Thermodynamics tells a chemical engineer how much energy a process needs, whether a proposed process can work at all, how far a reaction or separation can go, and how to find property values for real fluids at real conditions, including high pressures where the ideal gas law fails.

Three projects at the plant run through the course. A gas company, Lakeshore Gas, is building a carbon dioxide liquefaction unit beside the fermenters, so it needs reliable properties for carbon dioxide from atmospheric pressure up to about 70 bar, close to the critical point where simple methods break down. The plant itself is studying a back-pressure steam turbine that would generate electricity from the high-pressure steam it already raises and pass the exhaust steam on to the distillation reboilers, a form of combined heat and power. And the fermenters need a larger ammonia refrigeration plant, because summer cooling water is too warm to hold the fermentation at 32 °C. Process engineer Ingrid Solheim leads the plant's side of all three studies, with co-op student Theo Laurent doing many of the calculations.

What thermodynamics can and cannot tell you

Classical thermodynamics deals with systems at equilibrium and with changes between equilibrium states. It tells you the minimum work needed to compress carbon dioxide, the maximum work a turbine could deliver from a given steam supply, the vapour pressure of ethanol at any temperature, and the equilibrium conversion of a reaction. It does not tell you how fast anything happens: how long the compressor takes to reach steady speed, how quickly a reaction approaches equilibrium, or how big a heat exchanger must be. Those questions belong to kinetics and to the transport courses. Thermodynamics sets the limits; rate processes determine how close real equipment gets to them.

Thermodynamics also does not care about the molecular mechanism. The same equations apply to steam in a boiler and to a refrigerant in a heat pump. That generality is its power, but it means you must supply property data for each substance, either from measurements, from correlations, or from an equation of state. Much of this course is about getting those properties right.

Systems, surroundings and states

Every thermodynamic analysis starts by defining the system, the part of the universe you choose to study, separated from the surroundings by a boundary. A closed system exchanges energy but not mass with its surroundings: a sealed tank of nitrogen, or the gas trapped in a cylinder behind a piston. An open system, or control volume, has mass crossing its boundary: a compressor, a heat exchanger, a whole distillation column. An isolated system exchanges neither mass nor energy, which makes it a useful idea for the second law in Lesson 7.

The state of a system is fixed by its properties. Intensive properties such as temperature, pressure, density and specific enthalpy do not depend on the amount of material; extensive properties such as total volume, mass and total enthalpy do. For a pure substance in a single phase, the phase rule from CHE-200 says that two intensive properties fix the state, so knowing temperature and pressure fixes every other intensive property. In two-phase regions, temperature and pressure are linked, and you need one more property, such as the vapour fraction.

A state function, or property, depends only on the state, not on how the system got there. Internal energy \(U\), enthalpy \(H\), entropy \(S\), volume and temperature are state functions, so their changes depend only on the end states. Heat \(Q\) and work \(W\) are not properties: they are energy in transit across a boundary, and their values depend on the path. This distinction is the key to almost every calculation in the course, because it lets you replace a real, messy path by any convenient path between the same end states when you calculate a change in a property.

Two system diagrams side by side. On the left, a closed system: a rigid tank drawn as a rectangle with a dashed boundary, heat Q crossing the boundary inward, and no mass flows. On the right, an open system: a compressor drawn as a trapezoid inside a dashed control volume, with an inlet stream on the left, an outlet stream on the right, shaft work Ws entering from above and heat Q leaving from below.
A closed system exchanges heat and work but not mass; an open system, or control volume, also has streams crossing its boundary.

Equilibrium and reversible processes

A system is at equilibrium when nothing changes with time and there are no unbalanced driving forces inside it: no temperature differences to drive heat flow, no pressure differences to drive motion, and no chemical potential differences to drive mass transfer or reaction. Thermodynamic property relations apply to equilibrium states. Real processes pass through non-equilibrium states, but you can still calculate changes in properties between equilibrium end states.

A reversible process is an idealized one that moves through a continuous series of equilibrium states, driven by infinitesimal differences, so that it could be reversed by an infinitesimal change in conditions with no net effect on the surroundings. No real process is reversible: friction, mixing, heat transfer across finite temperature differences and unrestrained expansion all make processes irreversible. Reversible processes matter because they give the limits. A reversible compression needs the least work, a reversible expansion delivers the most work, and the ratio of real to reversible performance is the efficiency that equipment vendors quote.

Energy, heat and work

The first law of thermodynamics says that energy is conserved. A system stores energy as internal energy \(U\), associated with molecular motion and interactions, as kinetic energy of bulk motion and as potential energy in a gravity field. Energy crosses the boundary of a closed system only as heat, driven by a temperature difference, or as work, any other energy transfer, such as a moving piston, a rotating shaft or an electric current.

Sign conventions differ between textbooks. This course follows the convention common in chemical engineering: heat added to the system is positive, and work done on the system is positive. With that convention, the first law for a closed system is written with both terms added. Many mechanical engineering texts, including MEC-230, take work done by the system as positive and write \(Q - W\) instead. Both are correct if used consistently, so always check which convention a source uses before taking a number from it.

\[\Delta U + \Delta E_K + \Delta E_P = Q + W \qquad \text{(closed system)}\]

For a stationary closed system, the kinetic and potential energy terms vanish and the first law becomes \(\Delta U = Q + W\). The most common form of work in a closed system is expansion or compression work against a moving boundary. For a reversible process, where the external pressure equals the system pressure at every step, that work is the integral of pressure over the volume change, with a minus sign so that compression, where volume falls, is positive work done on the gas.

\[W = -\int_{V_1}^{V_2} P\,dV \qquad \text{(reversible boundary work)}\]

Constant-volume and constant-pressure processes

Two special cases explain why both internal energy and enthalpy are defined. In a rigid closed vessel, no boundary work is possible, so the heat added equals the change in internal energy. At constant pressure, the boundary work is \(-P\Delta V\), and the heat added equals the change in \(U + PV\). That combination appears so often that it gets its own name, enthalpy, \(H = U + PV\). Enthalpy is a state function because \(U\), \(P\) and \(V\) are.

\[Q = \Delta U \ \text{(constant } V\text{)} \qquad Q = \Delta H \ \text{(constant } P\text{)} \qquad H \equiv U + PV\]

The heat capacities follow from the same two cases. The constant-volume heat capacity \(C_V\) is the rate of change of internal energy with temperature at constant volume, and the constant-pressure heat capacity \(C_P\) is the rate of change of enthalpy with temperature at constant pressure. For an ideal gas, internal energy and enthalpy depend only on temperature, and the two heat capacities differ by exactly \(R\) on a molar basis. For liquids and solids, \(C_P\) and \(C_V\) are nearly equal because their volumes change so little.

\[C_V = \Big(\frac{\partial U}{\partial T}\Big)_V \qquad C_P = \Big(\frac{\partial H}{\partial T}\Big)_P \qquad C_P - C_V = R \ \text{(ideal gas)}\]

Worked problem

Warming a nitrogen purge receiver

A 20 m³ rigid receiver holds nitrogen at 8.0 bar absolute and 10 °C for purging fermenters before maintenance. On a summer afternoon the gas warms to 40 °C. Treating nitrogen as an ideal gas with \(C_V = \tfrac{5}{2}R\), find the heat absorbed and the final pressure.

Show solution
  1. Moles: \(n = PV/(RT) = 8.0\times10^5 \times 20/(8.314 \times 283.15) = 6800\ \text{mol} = 6.8\ \text{kmol}\).
  2. Rigid tank, so \(W = 0\) and \(Q = \Delta U = nC_V\Delta T = 6800 \times 2.5 \times 8.314 \times 30 = 4.24\ \text{MJ}\).
  3. Pressure at constant volume: \(P_2 = P_1T_2/T_1 = 8.0 \times 313.15/283.15 = 8.85\ \text{bar}\).

Answer: The receiver absorbs 4.24 MJ, and the pressure rises by about 10 percent. That rise is why receivers have relief valves set above the highest pressure that sun and fire could produce, and why the design pressure, not the normal operating pressure, sets the wall thickness.

The first law for open systems

Most chemical process equipment is open. Mass entering a control volume carries its internal, kinetic and potential energy with it, and the surroundings must also push it in: each kilogram entering at pressure \(P\) and specific volume \(V\) brings flow work \(PV\). Adding flow work to internal energy gives enthalpy again, which is why enthalpy, not internal energy, appears in open-system balances. The remaining work is shaft work \(W_s\), delivered through a rotating shaft or an electrical connection.

\[\frac{d(mU)_{cv}}{dt} = \sum_{in} \dot{m}\Big(H + \frac{u^2}{2} + gz\Big) - \sum_{out} \dot{m}\Big(H + \frac{u^2}{2} + gz\Big) + \dot{Q} + \dot{W}_s\]

At steady state the accumulation term is zero. For a single stream in and out, dividing by the mass flow gives the steady-flow energy equation used for pumps, compressors, turbines, heat exchangers, valves and nozzles. In process equipment the kinetic and potential energy terms are usually tiny compared with enthalpy changes: a stream moving at 20 m/s carries 0.2 kJ/kg of kinetic energy, while warming water by a single degree takes 4.2 kJ/kg. The main exceptions are nozzles and turbine blades, where velocities reach hundreds of metres per second, and tall columns of liquid pumped to great heights.

\[\Delta H + \frac{\Delta u^2}{2} + g\Delta z = Q + W_s \qquad \text{(steady flow, per unit mass)}\]

Worked problem

Steam for the beer preheater

In CHE-200 the beer preheater needed 10.4 MW to heat beer on its way to the beer column. Saturated steam at 400 kPa absolute enters the shell side and leaves as saturated liquid. The latent heat of steam at 400 kPa is about 2133.8 kJ/kg (approximate steam-table value). Find the steam flow.

Show solution
  1. Take the steam side as the control volume. It is steady, has no shaft work, and kinetic and potential energy changes are negligible, so \(\dot{Q} = \dot{m}(H_{out} - H_{in}) = -\dot{m}\,\Delta H_{vap}\).
  2. The steam gives up 10.4 MW: \(\dot{m} = 10.4 \times 10^3/2133.8 = 4.87\ \text{kg/s}\).
  3. \(4.87\ \text{kg/s} \times 3.6 = 17.5\ \text{t/h}\).

Answer: The steam flow follows directly from an enthalpy balance on one side of the exchanger. The beer side gives the same duty from its own balance, which is how plant engineers check flow meters: the two sides of every exchanger must agree.

Unsteady flow: filling a vessel

Unsteady open systems appear whenever vessels fill, empty or start up. A classic case is filling an evacuated, insulated cylinder from a supply line at constant conditions. The cylinder has no outflow, no shaft work and no heat transfer, and kinetic energy is negligible, so the unsteady balance reduces to a surprising result: the final internal energy of the gas in the cylinder equals the enthalpy of the line gas. Because enthalpy exceeds internal energy by \(PV\), the gas in the cylinder ends up hotter than the line gas. The flow work done by the line gas pushing in becomes internal energy of the cylinder contents.

\[U_{final} = H_{line} \qquad T_{final} = \gamma\,T_{line} \ \ \text{(ideal gas, constant heat capacities, }\gamma = C_P/C_V\text{)}\]

For nitrogen with \(\gamma = 1.4\) and line gas at 20 °C, the ideal estimate is about 137 °C. Real cylinders end up cooler because the steel walls absorb heat and the filling takes time, but the effect is real: gas cylinders and storage bottles become noticeably warm while filling, which is why fast-fill stations for compressed gases limit fill rates or precool the gas.

First-law balances for a rigid nitrogen receiver, the steam side of the beer preheater, filling an evacuated cylinder, and a comparison of kinetic energy with enthalpy changes.
# First-law balances for three Kingfisher Bioenergy situations
R = 8.314                                   # J/(mol K)

# 1. Closed rigid tank: a nitrogen purge receiver warms in the sun (constant volume, Q = dU)
V, P1, T1, T2 = 20.0, 8.0e5, 283.15, 313.15   # m3, Pa, K, K
n = P1 * V / (R * T1)                        # mol, ideal gas
Cv = 2.5 * R                                 # diatomic gas near room temperature
Q = n * Cv * (T2 - T1)
P2 = P1 * T2 / T1
print(f"Purge receiver: n = {n/1000:.1f} kmol, Q = {Q/1e6:.2f} MJ, pressure rises to {P2/1e5:.2f} bar")

# 2. Open steady-flow device: condensing steam heats the beer stream (Q = m dh)
Q_beer = 10.4e6                              # W, beer preheater duty from CHE-200 Lesson 11
hfg_400kPa = 2133.8e3                        # J/kg, latent heat of steam at 400 kPa (approximate table value)
m_steam = Q_beer / hfg_400kPa
print(f"Beer heater: steam {m_steam:.2f} kg/s = {m_steam*3.6:.1f} t/h of 400 kPa steam")

# 3. Unsteady open system: filling an evacuated cylinder from a supply line (u_final = h_line)
for gas, cp_R in (("nitrogen", 3.5), ("carbon dioxide", 4.47)):
    gamma = cp_R / (cp_R - 1)
    T_line = 293.15
    T_final = gamma * T_line                 # adiabatic filling, ideal gas, constant heat capacities
    print(f"Filling an empty cylinder with {gas}: gamma = {gamma:.3f}, final T = {T_final-273.15:.0f} C")

# 4. Kinetic energy is usually small: compare it with an enthalpy change of 1 K
for u in (2.0, 20.0, 200.0):                 # m/s
    print(f"velocity {u:5.0f} m/s: kinetic energy {u**2/2/1000:7.3f} kJ/kg (water, 1 K of heating = 4.18 kJ/kg)")
Output
Purge receiver: n = 6.8 kmol, Q = 4.24 MJ, pressure rises to 8.85 bar
Beer heater: steam 4.87 kg/s = 17.5 t/h of 400 kPa steam
Filling an empty cylinder with nitrogen: gamma = 1.400, final T = 137 C
Filling an empty cylinder with carbon dioxide: gamma = 1.288, final T = 104 C
velocity     2 m/s: kinetic energy   0.002 kJ/kg (water, 1 K of heating = 4.18 kJ/kg)
velocity    20 m/s: kinetic energy   0.200 kJ/kg (water, 1 K of heating = 4.18 kJ/kg)
velocity   200 m/s: kinetic energy  20.000 kJ/kg (water, 1 K of heating = 4.18 kJ/kg)

The program confirms the two worked examples and adds the filling calculation for nitrogen and carbon dioxide. Carbon dioxide heats less on filling because its heat capacity ratio is lower. The last lines show how small kinetic energy terms usually are: even at 20 m/s the kinetic energy is less than a twentieth of the enthalpy change for one degree of heating of water, so dropping kinetic energy from a heat exchanger balance costs nothing in accuracy.

How this course builds on these ideas

Every calculation in the rest of the course uses the first law in one of these forms. What changes is how you find \(\Delta H\) and \(\Delta U\). For liquids and ideal gases at modest pressure, heat capacities and latent heats are enough, as in CHE-200. For carbon dioxide at 40 bar near its critical point, or for refrigerants and steam, you need volumetric data from equations of state (Lessons 2 to 5), property relations that convert volumetric data into enthalpy and entropy (Lesson 8), and tables or diagrams (Lesson 9). The second law (Lesson 7) then tells you how much of a heat flow can become work, which sets the limits for the steam turbine (Lesson 11) and the refrigeration plant (Lesson 12).

Common mistakes

  • MistakeMixing sign conventions for work from different textbooks.

    InsteadState the convention at the start; in this course Q and W are positive when added to the system.

  • MistakeUsing internal energy in an open-system balance.

    InsteadStreams carry flow work, so use enthalpy for flowing streams.

  • MistakeTreating heat or work as a property of the system.

    InsteadHeat and work are energy in transit and depend on the path; only state functions have values at a state.

  • MistakeAssuming Q equals the enthalpy change in a rigid vessel.

    InsteadIn a rigid closed vessel Q equals the internal energy change; Q equals the enthalpy change only at constant pressure.

  • MistakeKeeping kinetic energy terms by habit in heat exchanger balances.

    InsteadCheck their size; they matter in nozzles and turbines, not in ordinary piping and exchangers.

Summary and key terms

  • Thermodynamics sets limits and supplies property values; kinetics and transport set rates and sizes.
  • Systems are closed, open or isolated; two intensive properties fix the state of a pure single-phase fluid.
  • State functions such as U, H and S depend only on the state; Q and W depend on the path.
  • Closed system: ΔU + ΔE_K + ΔE_P = Q + W, with reversible boundary work W = −∫P dV.
  • Q = ΔU at constant volume and Q = ΔH at constant pressure; C_P − C_V = R for an ideal gas.
  • Steady flow: ΔH + Δu²/2 + gΔz = Q + W_s; filling an empty vessel gives U_final = H_line.
System
The part of the universe chosen for analysis, separated from the surroundings by a boundary.
Control volume
An open system, with mass crossing its boundary.
State function
A property whose value depends only on the state of the system, not on its history.
Reversible process
An idealized process through equilibrium states that could be reversed with no net effect on the surroundings.
Enthalpy
H = U + PV, the property that combines internal energy and flow work.
Shaft work
Work transferred to or from a flowing fluid by a rotating shaft or similar device.
Flow work
The work PV done per unit mass to push fluid across a boundary.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. A gas in a closed cylinder receives 50 kJ of heat while 20 kJ of work is done on it by a piston. Find ΔU.

    Show answer

    ΔU = Q + W = 50 + 20 = 70 kJ.

  2. An ideal gas expands reversibly and isothermally from 1 m³ to 2 m³ at 300 K, with n = 400 mol. Find W.

    Show answer

    W = −nRT ln(V2/V1) = −400 × 8.314 × 300 × ln 2 = −691 kJ; the gas does 691 kJ of work.

  3. Why does enthalpy appear in open-system balances?

    Show answer

    Each unit of mass crossing the boundary carries internal energy plus the flow work PV needed to push it in or out.

  4. A pump raises 10 kg/s of water from 1 bar to 11 bar with negligible temperature change. Estimate the minimum shaft work.

    Show answer

    W_s ≈ VΔP ṁ = 0.001 × 10⁶ × 10 = 10 kW, using ΔH ≈ VΔP for an incompressible liquid.

  5. What does the program give for the final temperature when filling an empty cylinder with carbon dioxide from a 20 °C line?

    Show answer

    About 104 °C, using γ = 1.288.

  6. A steam line delivers 2 kg/s; the velocity rises from 20 to 40 m/s. Find the kinetic energy change rate.

    Show answer

    2 × (40² − 20²)/2 = 1200 W, or 1.2 kW, negligible beside megawatt heat duties.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz