TITLE: Clausius Inequality with three reservoirs
QUESTION [3 upvotes]: Deriving Clausius inequality in the case of two reservoirs is quite simple. We assume that there is a thermal machine operating between two reservoirs, the first at temperature $T_1$ and the second at temperature $T_2$ with $T_2 < T_1$.
The whole idea is that we can write the efficiency
$$\eta= 1-\dfrac{Q_2}{Q_1},$$
for that machine and compare with the effiency of a reversible machine operating between the reservoirs:
$$\eta_r = 1 - \dfrac{T_2}{T_1}.$$
By Kelvin's statement of the second law we have $\eta \leq \eta_r$. This implies directly that
$$\dfrac{Q_2}{Q_1}\geq\dfrac{T_2}{T_1}\Longrightarrow \dfrac{Q_1}{T_1}-\dfrac{Q_2}{T_2}\leq 0.$$
But we already know that $Q_2 < 0$ because $Q_2$ is the rejected heat, so that $-Q_2 = |Q_2|$, while $Q_1 = |Q_1|$ because $Q_1 > 0$. This gives Clausius inequality
$$\dfrac{|Q_1|}{T_1}+\dfrac{|Q_2|}{T_2}\leq 0.$$
Now, suppose we want to do it with three reservoirs. That is, we know that a heat $Q_3> 0$ is extracted from a reservoir at $T_3$, heat $Q_2>0$ is extracted from a reservoir at $T_2$ and heat $Q_1 > 0$ is rejected to a reservoir at temperature $T_1$. 
I want to derive Clausius inequality, but I don't know how to do, because we have three reservoirs, instead of two. In that case we cannot use the efficiencies directly it seems.
How do we derive this result here?

REPLY [0 votes]: $$\eta=1-\frac{Q_1}{Q_2+Q_3}$$ $$\eta_{rev}=\frac{W_{rev}}{Q_2+Q_3}$$ $$W_{rev}=\left(1-\frac{T_1}{T_2}\right)Q_2+\left(1-\frac{T_1}{T_3}\right)Q_3$$ $$\eta_{rev}=1-\frac{\frac{T_1}{T_2}Q_2+\frac{T_1}{T_3}Q_3}{Q_2+Q_3}$$
$$\eta\le\eta_{rev}$$ $$\frac{\frac{T_1}{T_2}Q_2+\frac{T_1}{T_3}Q_3}{Q_2+Q_3}\le\frac{Q_1}{Q_2+Q_3}$$ $$\frac{Q_2}{T_2}+\frac{Q_3}{T_3}-\frac{Q_1}{T_1}\le0$$
{"set_name": "stack_exchange", "score": 3, "question_id": 254456}