Consider the irreversible process of steady state heat conduction occurring along a rod in contact with a reservoir of temperature ##T_H## at x = 0 and a second reservoir of temperature ##T_C## at x = L. The temperature profile along the rod is linear, and given by $$T=T_H-(T_H-T_C)\frac{x}{L}$$and the heat flux q along the rod is constant, and given by: $$q=-k\frac{dT}{dx}=k\frac{(T_H-T_C)}{L}$$ where k is the thermal conductivity of the rod metal.
The temperature profile has been determined by satisfying the differential heat balance equation, given by:
$$k\frac{d^2T}{dx^2}=0$$
The differential entropy balance equation on the rod can be obtained by dividing the differential heat balance equation by the absolute temperature, to yield:
$$\frac{k}{T}\frac{d^2T}{dx^2}=\frac{d}{dx}\left(\frac{k}{T}\frac{dT}{dx}\right)+\frac{k}{T^2}\left(\frac{dT}{dx}\right)^2=0$$or, equivalently $$-\frac{d}{dx}\left(\frac{q}{T}\right)+\frac{q^2}{kT^2}=0$$The second term in this equation represents physically the local rate of entropy generation per unit volume within the rod. If we integrate this equation between x = 0 and x = L, we obtain: $$\frac{q_H}{T_H}-\frac{q_C}{T_C}+\frac{q^2}{kT_HT_C}L=0\tag{1}$$where ##q_H=q_C=q##. The first term on the LHS represents the rate of entropy entering the rod per unit area at x = 0, and the second term represents the rate of entropy exiting the rod per unit area at x = L. The coefficient of L in the third term is positive definite, and represents the average rate of entropy generation per unit volume within the rod. Since the rod is operating at steady state, we know that the entropy of the rod is not changing with time. So ##L\frac{dS}{dt}=0##, where dS/dt is the average rate of change of entropy per unit volume of the rod. So we can write:
$$0=L\frac{dS}{dt}\gt \frac{q_H}{T_H}-\frac{q_C}{T_C}=-\frac{q^2}{kT_HT_C}L\tag{2}$$Eqn. 2 is equivalent to the Clausius inequality applied to the irreversible heat conduction process in the rod.
Note that, in this very simple case, we have been able to precisely determine the rate of entropy generation within the system. Note also that, Eqn. 1 tells us that the rate of entropy exiting the rod at x = L is just equal to the rate of entropy entering the rod at x = 0, plus the total rate of entropy generation within the rod.