What this course is, and how to use it
This is the fifth course in University Mechanical Engineering: thermodynamics 热力学. It is about energy and entropy, and the machines that turn heat into work. You will learn to keep an energy account, to find how far a machine can go, and to spot a claim about a machine that is impossible before anyone builds it.
Scope. This is a study course, not a degree. The working fluids are water, air and R-134a. Every cycle here is checked by both laws, and every table value is taken from standard steam and refrigerant tables.
- Units 5.1–5.3 build the energy account: state, closed systems, open systems.
- Unit 5.4 sets the limits: the second law and entropy.
- Units 5.5–5.6 use those limits: power cycles and refrigeration.
The habit for the whole course: check every cycle with both laws. Look at the numbers before you believe them.
Properties and state
Why it matters. Before you can use any law, you must fix the working fluid: what its state 状态 is, and which numbers change together.
The idea, with a picture. A state is a point on a property diagram 状态图. Two independent intensive properties fix it. Under the saturation dome 饱和线 liquid and vapour exist together. There the quality 干度 $x$, the mass fraction of vapour, tells you how far across the dome you are.

The derivation (why two properties fix the rest). A simple compressible substance has an equation of state with two variables, such as $p = p(v, T)$. Every other equilibrium property is then a function of the same two. Choose any two independent properties and the rest are fixed. Inside the dome $p$ and $T$ are not independent, so choose another independent property, such as $x$ or $v$.
Worked example 1: reading a table row. Saturated water at $T = 100\,{}^\circ\mathrm{C}$: $p_{sat} = 101.35\ \mathrm{kPa}$, $v_f = 0.001044\ \mathrm{m^3/kg}$, $v_g = 1.6729\ \mathrm{m^3/kg}$, $h_f = 419.04\ \mathrm{kJ/kg}$, $h_{fg} = 2257.0\ \mathrm{kJ/kg}$.
- At $x = 0.5$: $v = v_f + x(v_g - v_f) = 0.837\ \mathrm{m^3/kg}$.
- $h = h_f + x\,h_{fg} = 1547.5\ \mathrm{kJ/kg}$.
- The same straight-line rule in $x$ works for $v$, $u$, $h$ and $s$.
Worked example 2: ideal-gas states. Air at $300\ \mathrm{K}$ and $101.325\ \mathrm{kPa}$, with $R = 0.287\ \mathrm{kJ/(kg\,K)}$: $v = RT/p = 0.8497\ \mathrm{m^3/kg}$. At twice the pressure and the same $T$, $v = 0.4248\ \mathrm{m^3/kg}$, exactly half. At constant temperature $pv$ stays the same, so the line on a p–v diagram is a hyperbola.
Common mistakes. Averaging $v$ by volume instead of by mass (quality is a mass fraction). Reading a superheated state from a saturation table. Using $pv = RT$ inside the dome: the ideal-gas law stops working where the vapour starts to condense.
Summary. Two independent properties fix the state; inside the dome one of them must be $x$; properties are linear in $x$ between $f$ and $g$; use $pv = RT$ only well outside the dome.
First law for closed systems
Why it matters. The first law is an energy account. Energy inside a system changes only by work and heat crossing its boundary. A closed system, with no mass flowing in or out, is the simplest account to keep.
The idea, with a picture. $\Delta E = Q - W$, with work done by the system counted as positive. On a p–V diagram the boundary work 边界功 $W = \int p\, dV$ is the area under the path. So the work depends on the path, not only on the end states.

The derivation (why work depends on the path). $W = \int_1^2 p\,dV$ follows the curve $p(V)$ itself. Different paths between the same two states draw different curves, so they enclose different areas. $U$, $H$ and $S$ are different: they are state functions, and their changes depend only on the end states. That is why, over a full cycle, the net work equals the net heat.
Worked example 1: two paths, one pair of states. Air goes from $(200\ \mathrm{kPa}, 0.3\ \mathrm{m^3})$ to $(200\ \mathrm{kPa}, 0.9\ \mathrm{m^3})$.
- Path A, at constant pressure: $W = p\Delta V = 200 \times 0.6 = 120\ \mathrm{kJ}$.
- Path B, first at constant temperature to $0.9\ \mathrm{m^3}$ (the pressure falls to $66.7$ kPa), then heated at constant volume back to $200$ kPa. The first leg gives $W = p_1V_1\ln(V_2/V_1) = 200 \times 0.3 \times \ln 3 = 65.9\ \mathrm{kJ}$; the second leg gives none.
- Same end states, but the work differs by $54\ \mathrm{kJ}$: the area between the two paths.
Worked example 2: an adiabatic check. From the same start the air is compressed with no heat transfer ($Q = 0$) to $0.15\ \mathrm{m^3}$.
- Reversible adiabatic: $pV^\gamma$ is constant with $\gamma = 1.4$, so $p_2 = 200 \times (0.3/0.15)^{1.4} = 527.8\ \mathrm{kPa}$.
- $W = (p_2 V_2 - p_1 V_1)/(1 - \gamma) = (79.2 - 60)/(1 - 1.4) = -48\ \mathrm{kJ}$, that is $48\ \mathrm{kJ}$ of work done on the gas.
- $\Delta U = Q - W = +48\ \mathrm{kJ}$. The account balances.
Common mistakes. Getting the sign of $W$ wrong (work by or work on). Mixing litres with kJ in $pV = mRT$. Thinking $\Delta U = m c_v \Delta T$ only holds at constant volume: for an ideal gas it holds for every process, because it is a property relation.
Summary. $\Delta U = Q - W$; boundary work is the area under the path; work and heat depend on the path, state functions do not; the ideal-gas tools are $pv = RT$, $c_v$, $c_p$ and $pV^\gamma$ for a reversible adiabatic process.
First law for open systems
Why it matters. Most real machines are flows, not closed pistons. Mass flows through a control volume 控制体积 and carries energy in and out with it. Turbines, pumps and nozzles are all studied this way, usually in steady state.
The idea, with a picture. For one inlet and one outlet, the steady-flow energy equation per kilogram is $q - w = \Delta h + \Delta ke + \Delta pe$. The work needed to push the fluid in and out, the flow work $pv$, is already inside $h = u + pv$.

The derivation (where $pv$ goes). To push 1 kg of fluid into the control volume, the fluid behind it must do work $pv$ on it. The same term appears again when the fluid is pushed out. Adding this flow work to the internal energy gives enthalpy. That is why open systems are worked in $h$, not $u$.
Worked example 1: a turbine stage. Steam enters at $3\ \mathrm{MPa}$, $400\,{}^\circ\mathrm{C}$ ($h_1 = 3230.9\ \mathrm{kJ/kg}$, $s_1 = 6.9212\ \mathrm{kJ/(kg\,K)}$) and expands with no heat loss to $50\ \mathrm{kPa}$.
- Ideal (isentropic 等熵) expansion, $s_2 = s_1$: $x_2 = (6.9212 - 1.0910)/6.5029 = 0.89655$.
- $h_{2s} = h_f + x\,h_{fg} = 340.49 + 0.89655 \times 2305.4 = 2407.4\ \mathrm{kJ/kg}$, so the ideal work is $w_s = h_1 - h_{2s} = 823.5\ \mathrm{kJ/kg}$.
- Real turbine, $\eta_t = 0.85$: $w = 0.85 \times 823.5 = 700.0\ \mathrm{kJ/kg}$ and $h_2 = 3230.9 - 700.0 = 2530.9\ \mathrm{kJ/kg}$.
Worked example 2: a pump and a nozzle.
- A pump lifts liquid water from $0.5$ to $3\ \mathrm{MPa}$: $w_p \approx v\,\Delta p = 0.001005 \times 2500 = 2.5\ \mathrm{kJ/kg}$.
- A nozzle speeds air up from $10$ to $300\ \mathrm{m/s}$ with no work and no heat: $\Delta h = -\Delta ke = -(300^2 - 10^2)/(2 \times 1000) = -44.95\ \mathrm{kJ/kg}$, so $h_2 = h_1 - 44.95$.
- Different devices, one equation: decide which terms matter for each.
Common mistakes. Dropping $ke$ for a nozzle (speed is what the nozzle is for) or keeping it for a pump (it is tiny there). Using $c_p \Delta T$ for an exit inside the dome. Forgetting $\dot W = \dot m\, w$ when the question asks for power.
Summary. $q - w = \Delta h + \Delta ke + \Delta pe$; enthalpy includes the flow work; $ke$ matters where speed is the product; for a turbine, find the isentropic work first, then apply the efficiency.
Second law and entropy
Why it matters. The first law only balances energy. The second law says which processes cannot happen. Entropy keeps that account, and the Carnot limit lets you reject impossible machine claims on paper.
The idea, with a picture. Entropy 熵 changes by $ds = \delta q_{rev}/T$. Entropy generation $\sigma$ is never negative: $\sigma \ge 0$ for every process, and $\sigma = 0$ only for a reversible one. On a T–s diagram T–s 图 the reversible heat is the area under the path, and the Carnot efficiency $\eta_C = 1 - T_L/T_H$ is a ratio of rectangle areas.

The derivation (from Kelvin–Planck to Carnot). No cycle can turn all the heat from one reservoir into work. So between two reservoirs the best engine is the one that rejects the least heat, and that is a reversible one: if a better engine existed, you could run a reversible one backwards with it and break the law. For the reversible Carnot cycle $Q_H/T_H = Q_L/T_L$, which gives $\eta_C = 1 - T_L/T_H$. Between $800\ \mathrm{K}$ and $300\ \mathrm{K}$, $\eta_C = 0.625$. An engine claimed to reach $0.70$ between them is impossible, and no prototype is needed to say so.
Worked example 1: entropy made by a throttling valve. Steam at $1000\ \mathrm{kPa}$ with $h = 3059\ \mathrm{kJ/kg}$ (about $304\,{}^\circ\mathrm{C}$, $s_1 = 7.136\ \mathrm{kJ/(kg\,K)}$) is throttled to $200\ \mathrm{kPa}$. A valve does no work and loses no heat, so $h_2 = h_1$.
- At $200\ \mathrm{kPa}$, $h = 3059\ \mathrm{kJ/kg}$ is superheated steam with $s_2 = 7.869\ \mathrm{kJ/(kg\,K)}$ (from the tables).
- $\sigma = s_2 - s_1 = 0.733\ \mathrm{kJ/(kg\,K)} > 0$: the process is irreversible, even though no heat crosses the boundary.
Worked example 2: the Carnot account. A Carnot engine takes $1000\ \mathrm{kJ}$ from $800\ \mathrm{K}$ and rejects heat at $300\ \mathrm{K}$.
- $W = 625\ \mathrm{kJ}$, $Q_L = 375\ \mathrm{kJ}$.
- $\Delta S_{hot} = -1.250$ and $\Delta S_{cold} = +1.250\ \mathrm{kJ/K}$: the total does not change, as a reversible cycle requires.
- Now let the same $1000\ \mathrm{kJ}$ first flow from a $2000\ \mathrm{K}$ flame to the $800\ \mathrm{K}$ reservoir. That transfer makes $\sigma = Q(1/800 - 1/2000) = 0.75\ \mathrm{kJ/K}$, and the work lost is $T_0 \sigma = 300 \times 0.75 = 225\ \mathrm{kJ}$, the exergy destroyed.
Common mistakes. Using $ds = \delta q/T$ for an irreversible path (it needs the reversible heat; otherwise use an entropy balance with $\sigma$). Judging an efficiency claim without knowing the reservoir temperatures. Taking $s$ as constant through a throttle: a throttle keeps $h$ constant, not $s$.
Summary. $ds = \delta q_{rev}/T$; $\sigma \ge 0$; the Carnot efficiency depends only on the reservoir temperatures; lost work is $T_0 \sigma$; area on a T–s diagram is reversible heat.
Power cycles
Why it matters. A power plant is where both laws meet real money. The Rankine cycle turns fuel into shaft work through boiling and condensing water. Its efficiency depends on the boiler pressure, the superheat and reheat.


The idea, with a picture. The basic Rankine cycle 朗肯循环 has four parts: pump, boiler, turbine and condenser. Heat goes in at high pressure in the boiler. Work comes out in the turbine's isentropic expansion. Heat leaves in the condenser. A little work goes in at the pump.

The derivation (why a higher boiler pressure helps). A higher boiler pressure raises the average temperature at which heat goes in. The second-law limit $\eta \le 1 - T_{out}/T_{in,avg}$ rises with it. The pump work grows only as $v \Delta p$, and $v$ of liquid water is tiny, so the gain is much larger than the cost, until the strength of the boiler tubes sets a limit. In the steam tables, the same cycle at $1\ \mathrm{MPa}$ and at $4\ \mathrm{MPa}$, both superheated to $480\,{}^\circ\mathrm{C}$, goes from $30.6\%$ to $36.5\%$.
Worked example 1: the ideal Rankine baseline. Boiler at $4\ \mathrm{MPa}$, saturated vapour ($h_3 = 2801.4\ \mathrm{kJ/kg}$, $s_3 = 6.0700$); condenser at $10\ \mathrm{kPa}$.
- Turbine: $s_4 = s_3$ gives $x_4 = (6.0700 - 0.6492)/7.5009 = 0.7227$ and $h_4 = 191.81 + 0.7227 \times 2392.8 = 1921.1$.
- Pump: $h_2 = h_1 + v_f(p_2 - p_1) = 191.81 + 0.001010 \times 3990 = 195.8$.
- Work out $2801.4 - 1921.1 = 880.3$; work in $4.0$; heat in $2801.4 - 195.8 = 2605.6$ (all kJ/kg).
- $\eta = 876.3/2605.6 = 33.6\%$.
Worked example 2: two upgrades. Superheat the steam to $4\ \mathrm{MPa}$, $480\,{}^\circ\mathrm{C}$ ($h_3 = 3400.1$, $s_3 = 7.0308$).
- $x_4 = 0.8508$, $h_4 = 2227.5$; turbine work $1172.6$, heat in $3204.3$, so $\eta$ rises to $36.5\%$.
- The exhaust quality rises from $0.72$ to $0.85$. That is better, but still too wet: water drops erode the last turbine blades below about $0.88$.
- Reheating from $800\ \mathrm{kPa}$ back to $480\,{}^\circ\mathrm{C}$ lifts the exhaust quality above $0.9$, so real plants use both superheat and reheat.
Common mistakes. Taking heat in from $h_1$ instead of $h_2$ (heat starts at the pump outlet). Ignoring the pump: use $h_2 = h_1 + v \Delta p$. Ignoring exhaust quality: an efficient cycle can still destroy its turbine blades.
Summary. Four parts, two crossings of the dome; isentropic turbine, liquid pump; superheat and reheat raise efficiency and dry the exhaust; a higher boiler pressure raises the average temperature of heat input.
Refrigeration and heat pumps
Why it matters. Run a cycle backwards and it moves heat from cold to hot. The same machine is a refrigerator or a heat pump, depending on which end you use.
The idea, with a picture. The vapor-compression cycle 蒸气压缩循环 has a compressor, a condenser, a throttle and an evaporator. Its performance is the coefficient of performance: $\mathrm{COP}_R = q_L/w_{in}$ for cooling and $\mathrm{COP}_{HP} = q_H/w_{in}$ for heating. The reversed Carnot 卡诺 cycle sets the limits: $\mathrm{COP}_R \le T_{cold}/(T_{hot}-T_{cold})$ and $\mathrm{COP}_{HP} \le T_{hot}/(T_{hot}-T_{cold})$, with temperatures in kelvin.

The derivation (why a throttle, not a turbine). A small turbine could recover some work from the expansion. But the flow there is a wet mixture, and a two-phase turbine costs far more than the few kJ/kg it would save. A throttle is cheap and keeps $h$ constant; the compressor simply supplies the lost work.
Worked example 1: an R-134a refrigerator. Evaporator at $-10\,{}^\circ\mathrm{C}$ ($h_1 = 392.7\ \mathrm{kJ/kg}$, $s_1 = 1.733\ \mathrm{kJ/(kg\,K)}$); isentropic compression to $800\ \mathrm{kPa}$ gives superheated vapour with $h_2 = 421.4$. (These values use the common IIR reference, $h = 200$ kJ/kg and $s = 1.000$ kJ/(kg·K) for saturated liquid at 0°C. Tables with another reference give different $h$ values but the same differences.)
- The condenser leaves saturated liquid, $h_3 = 243.6$; the throttle keeps $h_4 = 243.6$.
- $q_L = h_1 - h_4 = 149.1$, $w_{in} = h_2 - h_1 = 28.7$, so $\mathrm{COP}_R = 149.1/28.7 = 5.20$.
- Reversed-Carnot limit between $-10$ and $31.3\,{}^\circ\mathrm{C}$ (the condensing temperature): $263.2/(304.5 - 263.2) = 6.37$. The cycle's COP is below it, as it must be: the throttle is irreversible, and the vapour leaves the compressor hotter than the condensing temperature.
Worked example 2: the same machine heating. As a heat pump, $q_H = h_2 - h_3 = 421.4 - 243.6 = 177.8$ and $\mathrm{COP}_{HP} = 177.8/28.7 = 6.20 = \mathrm{COP}_R + 1$ ✓. The same numbers, read at a different end of the machine.
Common mistakes. Writing $\mathrm{COP} = w/q$ (upside down: COP is what you get over what you pay). Using temperature differences in $^\circ$C with no kelvin in the Carnot limit. Reading $h_2$ from the saturated-vapour row: the compressor exit is superheated.
Summary. Reverse the cycle and use a throttle instead of a turbine; the compressor is the only work input; COP is benefit over cost, below the reversed-Carnot limit, and $\mathrm{COP}_{HP} = \mathrm{COP}_R + 1$.