The efficiency \(\eta\) for a Carnot cycle heat engine is:
$$
\eta = \frac{|W|}{Q_H} = \frac{Q_H+Q_C}{Q_H} = 1 + \frac{Q_C}{Q_H},
$$
where \(W\) is the work per mol, which is negative for a heat engine, \(Q_H\) is the heat added
per mol to the
cycle (positive), \(Q_C\) is the heat removed per mol from the cycle (negative), \(T_C\) is the
temperature (K) of the cold reservoir and \(T_H\) is the temperature (K) of the hot reservoir.
The entropy change for the cycle is zero
$$
\Delta S = \frac{Q_H}{T_H} + \frac{Q_C}{T_C},
$$
so the efficiency can also be written as
$$
\eta = 1 - \frac{T_C}{T_H}.
$$
The area enclosed by curves on either the P-V or T-S diagram equals the negative of the work per
cycle.
For a heat pump, the coefficient of performance is
$$
COP = \frac{Q_C}{W},
$$
where \(W\) is positive because work is added to the cycle for a heat pump, \(Q_H\) is negative
because heat is removed from the cycle, and \(Q_C\) is positive because heat is added to the
cycle.