Efficiency
\(\eta = \frac{\text{output}}{\text{input}}\).
So for an engine, \(\eta=\frac{\text{Work}}{\text{Heat In}}\). We can think of the engine receiving heat from a hot source and expelling to a low temperature source and doing work. Carnot efficiency: \(\eta_c = \frac{W}{Q_H} = \frac{Q_H-Q_C}{Q_H} = 1-\frac{Q_C}{Q_H} = 1-\frac{T_C}{T_H}\). For a cycle, \(\Delta S_H=\Delta S_C\) and \(\Delta S=\int dQ/T\) and so \(\Delta S_{H,C}=\frac{Q_{H,C}}{T_{H,C}}\) (negative for cold term).
For a Fridge, the heat comes in from the cold reservoir, we do work on it, and it expells heat to the hot temperature source. Output: \(Q_C\). Input: \(W\).
For a heat pump, it is very similar, Output: \(Q_H\). Input: \(W\).