# Clausius Inequality with three reservoirs

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?

You can basically follow the same construction used to obtain the Clausius inequality $\oint \frac{dQ}{T}\leq 0$ for an arbitrary cycle. See for instance Fermi's book.
The first step is to decompose your cycle in infinitely many (infinitesimal) isothermals and adiabatics. Since you have only three reservoirs, your decomposed cycle will be in fact just a finite isothermal $T_3$, then a finite adiabatic, then the finite isothermal $T_2$, a finite adiabatic, a finite isothermal $T_1$ and finally a finite adiabatic. Let us call the system following this cycle by $S$. The next step is to introduce three Carnot auxiliary systems all of them running between a reservoir with temperature $T_0$ and the reservoirs $T_1$, $T_2$ and $T_3$. We conveniently choose $T_0$ to be the highest temperature among them. Let us call this set of auxiliary system by $S'$. The Carnot engines satisfy $$\frac{Q_i'}{T_0}=\frac{Q_i}{T_1},\quad i=1,2,3.$$ In my notation the $Q_i$ are always positive. The total heat exchanged by the complete system $S+S'$ is $$Q'=T_0\left(-\frac{Q_1}{T_1}+\frac{Q_2}{T_2}+\frac{Q_3}{T_3}\right).$$ There are work done, corresponding to the are inside the cycle. No other effect. Finally, Kelvin statement of the second Law says it is not possible extract heat from a source and deliver work with no other effect. Hence $Q'\leq 0$ which results in the Clausius inequality: $$-\frac{Q_1}{T_1}+\frac{Q_2}{T_2}+\frac{Q_3}{T_3}\leq 0.$$
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$.
For this case, the correct form of the Clausius inequality is $$-\frac{Q_1}{T_1}+\frac{Q_2}{T_2}+\frac{Q_3}{T_3}\leq 0$$with all the Q's taken to be positive (exactly as you have specified in the quote). Note the minus sign in front of the $Q_1$ since this corresponds to heat leaving the system at the interface temperature (with the reservoir) $T_1$. Each of the T's is the temperature at the interface with the surroundings where the corresponding heat transfer is taking place. The entropy change for the cycle is, of course, zero.
$$\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$$