# Why entropy change of reservoir is reversible?

When two reserviors exchange heat, it is considered as reversible heat transfer and entropy is calculated. But when the process is reversible change in entropy of universe must be zero. But why positive value is coming??

Great conceptual question. That process is most definitely irreversible. But when we calculate the entropy change for each reservoir separately, we use a cool trick: for the purposes of calculating the entropy change we can replace an irreversible process with a reversible process having the same initial and final states.

Why does the trick work? Because entropy is a state function, so its change only depends on the initial and final states.

So how does this work, for example, for the colder reservoir? We just replace the actual process of heat absorption with a very slow, gradual, addition of heat, making sure the reservoir always stays in thermal equilibrium. That new process is reversible (we can always very slow, gradually, take the heat out), and so we can calculate the entropy change for that reservoir by integrating $$\frac{dQ}{T}$$.

When two reserviors exchange heat, it is considered as reversible heat transfer

Only when the two reservoirs are at the same temperature (single-phase heating in this case is an idealized phenomenon that cannot exist in the real world but is useful for thought experiments and can be approached arbitrarily closely).

Otherwise, energy flows down a temperature gradient, which generates entropy and is irreversible.

entropy is calculated. But when the process is reversible change in entropy of universe must be zero.

Under the constraint of equal temperatures, the total change in entropy is zero. The reservoir being heated gains entropy, and the reservoir doing the heating loses an equal amount of entropy.

The exchange of heat between two ideal reservoirs at different temperatures is definitely an irreversible process. The interface between the two reservoirs cannot be at both temperatures at the same time, and the temperature at the interface cannot be discontinuous spatially.

To analyze what is going on here, we can visualize the interface between the reservoirs as a very thin slab of conductive material (of negligible mass and heat capacity) sandwiched between the two reservoirs. At one surface of the slab we have the hot reservoir temperature and at the other surface we have the cold reservoir temperature, with the temperature varying linearly across the slab. Heat is conducted through the slab from the hot reservoir to the cold reservoir as a result of the temperature difference across the slab according to the heat conduction equation: $$\dot{Q}=kA\frac{\Delta T}{\delta}$$where $$\delta$$ is the thickness of the slab. This conduction of heat across the interface slab (with a finite temperature gradient) is responsible for all the entropy generated in the process. None of the entropy generation occurs within the ideal reservoirs themselves. The entropy change of the hot reservoir is brought about by transfer of heat Q to the slab, and the change is $$\Delta S_H=-\frac{Q}{T_H}$$. Similarly for the cold reservoir, the entropy change is brought about by an transfer of heat S from the slab, and the change is $$\Delta S_C=+\frac{Q}{T_C}$$. The entropy generated within the interface slab in this process is just the entropy change of the combination: $$\sigma=\frac{Q}{T_C}-\frac{Q}{T_H}$$Since the slab has negligible mass and heat capacity, its entropy change is zero. The real interface is just the limit of our slab interface as the interface thickness approaches zero.