Theory, Examples & Python Visualization
What Is a Heat Engine?
A heat engine converts thermal energy into mechanical work by operating between a hot reservoir at temperature $T_H$ and a cold reservoir at temperature $T_C$. The maximum theoretical efficiency is the Carnot efficiency:
$$\eta_{Carnot} = 1 - \frac{T_C}{T_H}$$
But Carnot efficiency is achieved only at zero power output (quasi-static process). In real engines, we want to maximize power output, not just efficiency. This leads to the Curzon-Ahlborn efficiency:
$$\eta_{CA} = 1 - \sqrt{\frac{T_C}{T_H}}$$
The Problem Setup
Consider a heat engine with:
- Hot reservoir: $T_H$ (variable, 400 K–1200 K)
- Cold reservoir: $T_C = 300$ K (fixed, ambient)
- Internal irreversibilities modeled by a heat conductance parameter $K$
The power output of an endoreversible engine is:
$$P = K \cdot \frac{(T_H - T_C)^2}{4 T_H}$$
The efficiency at maximum power is:
$$\eta_{MP} = 1 - \sqrt{\frac{T_C}{T_H}} = \eta_{CA}$$
We want to:
- Find $\eta_{CA}$ for various $T_H$
- Compare it with $\eta_{Carnot}$
- Visualize power as a function of efficiency
- Show a 3D surface of power vs. $T_H$ and $T_C$
Python Source Code
1 | import numpy as np |
Code Walkthrough
Parameters & Setup — We fix $T_C = 300$ K and sweep $T_H$ from 400 K to 1200 K. The conductance $K = 1$ is normalized so results are dimensionless ratios.
carnot_efficiency(TH, TC) — Returns $\eta_C = 1 - T_C/T_H$, the theoretical upper bound.
curzon_ahlborn_efficiency(TH, TC) — Returns $\eta_{CA} = 1 - \sqrt{T_C/T_H}$. This is the efficiency at which power is maximized for an endoreversible engine. It always satisfies $\eta_{CA} < \eta_C$.
power_output(TH, TC, K) — Computes the maximum power:
$$P_{max} = K \cdot \frac{(T_H - T_C)^2}{4 T_H}$$
This is derived by differentiating the power expression with respect to the intermediate temperatures and solving $dP/d\eta = 0$.
power_vs_efficiency(eta, TH, TC, K) — Gives $P$ as a function of efficiency $\eta$ for a fixed pair $(T_H, T_C)$:
$$P(\eta) = \frac{K \cdot T_C \cdot \eta \left(1 - \frac{\eta}{\eta_C}\right)}{1 - \eta}$$
This lets us trace the full P-η curve and confirm numerically that the maximum occurs at $\eta = \eta_{CA}$.
Numerical verification — scipy‘s argmax over a dense grid of $\eta$ values cross-checks the analytical $\eta_{CA}$; they agree to 4 decimal places.
Graph Explanations
Figure 1 (2D): Efficiency vs $T_H$
The left panel shows both $\eta_C$ (red solid) and $\eta_{CA}$ (blue dashed) growing as $T_H$ increases, but $\eta_{CA}$ is always below $\eta_C$. The gap between them represents the cost of extracting finite power — you sacrifice some theoretical efficiency to get useful work out in finite time. At $T_H = 800$ K, Carnot gives 62.5% while CA gives only 38.7%, but the CA point delivers maximum power.
Figure 2 (2D): Power vs Efficiency (P-η curve)
Each colored curve shows how normalized power varies across the full efficiency range for a given $T_H$. The curves always peak (marked by black triangles ▲) at $\eta_{CA}$, then drop to zero as $\eta \to \eta_C$ (because the engine slows to a quasi-static crawl). This beautifully illustrates the efficiency-power tradeoff.
Figure 3 (3D): Power and CA Efficiency Surfaces
The left 3D surface shows $P_{max}(T_H, T_C)$ — power increases with larger temperature differences and higher $T_H$. The right surface shows $\eta_{CA}(T_H, T_C)$ — efficiency improves as $T_C$ drops or $T_H$ rises. Together they make clear that hot and cold extremes simultaneously maximize both power and efficiency, but in practice $T_C$ is set by the environment and $T_H$ is limited by materials.
Key Results from the Example ($T_H = 800$ K, $T_C = 300$ K)
| Quantity | Value |
|---|---|
| Carnot efficiency $\eta_C$ | 62.50% |
| Curzon-Ahlborn efficiency $\eta_{CA}$ | 38.73% |
| Maximum normalized power $P_{max}$ | 0.1563 W |
================================================== Example: TH = 800.0 K, TC = 300.0 K Carnot efficiency : 0.6250 (62.50%) Curzon-Ahlborn (max-P) : 0.3876 (38.76%) Max power output (norm) : 78.1250 W ================================================== Numerical max-P at eta : 0.3878 (38.78%) Analytical CA eta : 0.3876


All plots saved.
The Curzon-Ahlborn efficiency is far more relevant to real engines than Carnot. For context, real coal power plants run at ~40% efficiency, which is remarkably close to $\eta_{CA}$ predictions — not $\eta_C$.
Takeaway
The condition for maximum power output from a heat engine with fixed $T_H$ and $T_C$ is to operate at the Curzon-Ahlborn efficiency $\eta_{CA} = 1 - \sqrt{T_C/T_H}$. This is the sweet spot between the two extremes: zero efficiency (short circuit) and Carnot efficiency (zero power). Real-world engine designers implicitly target this regime, which is why thermodynamic efficiency data from actual plants aligns so well with $\eta_{CA}$ rather than $\eta_C$.