# Entropy production rate due to heat transfer

I don't understand how you can derive a formula for the rate of entropy generation due to heat transfer between two sources with temperatures $$T_2$$ and $$T_1$$ without varying the temperature themselves. My understanding is that if we consider a such system the total entropy will be $$S=S_1+S_2$$ and due to the fact that $$E=E_1+E_2$$ when we make a variation we obtain $$\delta S= \frac{\delta E_1}{T_1}+\frac{\delta E_2}{T_2}=(\frac{1}{T_1}-\frac{1}{T_2})\delta E_1$$ Then, considering the rate of entropy production I think I should consider also that $$T_1$$ and $$T_2$$ are functions of time, but the answer I was able to find is $$\frac{\delta S}{\delta t}=(\frac{1}{T_1}-\frac{1}{T_2})\frac{\delta E_1}{\delta t}$$ Why is that? Also if you have any notes or books suggestions on this subject please leave them below.

The problem here is that, if we are dealing with two ideal constant temperature reservoirs, there is a temperature discontinuity at the interface between the two reservoirs, with temperature $$T_1$$ on one side of the interface and temperature $$T_2$$ on the other side of the interface. In the real world, no such temperature discontinuity will exist. Instead, adjacent to the interface in each reservoir, there will be a thin thermal boundary layer in which the temperature varies rapidly with distance from the interface, from the bulk temperature in the reservoir at the outside edge of the boundary layer to the interface temperature $$T_I$$ at the interface. It is within these thin thermal boundary layers that all the entropy gets generated.
To get a feel for how this all plays out, we can simulate the effect within the boundary layers by placing a thin thermally conductive solid layer between our two ideal reservoirs. This layer can have thermal conductivity k and (small) thickness $$\delta$$ (with negligible heat capacity and mass), such that the rate of heat conduction through the layer from the hot reservoir to the cold reservoir is given by $$\dot{Q}=-kA\frac{(T_2-T_1)}{\delta}$$ If Q is the total amount of heat transferred from the hot reservoir to the cold reservoir during the process, then the entropy change of each of the reservoirs is $$\Delta S_1=\frac{Q}{T_1}$$and$$\Delta S_2=-\frac{Q}{T_2}$$In addition, the entropy change in the massless solid layer during the process is $$\Delta S_{layer}=\frac{Q}{T_2}-\frac{Q}{T_1}+\sigma=0$$where $$Q/T_2$$ is the entropy transferred from the hot reservoir to the layer and $$Q/T_1$$ is the entropy transferred from the layer to the cold reservoir, and $$\sigma$$ is the amount of entropy generated within the solid layer during the process. From this last equation, if follows that the entropy generated is given by: $$\sigma=\frac{Q}{T_1}-\frac{Q}{T_2}$$In addition, if we add the three equations together, we obtain the total entropy change: $$\Delta S_{total}=\Delta S_1+\Delta S_2+\Delta S_{layer}=\sigma$$Thus, the total entropy change is equal to the entropy generated within the thin solid conductive layer (which simulates the thermal boundary layers in the real-world system).