**Answering your questions**

(1) As long as the irreversibility arises solely as a consequence of the fact that the system and the environment are at different temperatures, the methods outlined below work. You can calculate $\Delta S_{\textrm{sys}}$ as normal, and calculating $\Delta S_{\textrm{env}}$ is also straight-forward if we treat its temperature as constant. There is no such thing as $\delta Q^{\textrm{rev}}$ and $\delta Q^{\textrm{irr}}$. The *difference* between the reversible and irreversible cases is the path that the environment takes through state space.

(2) This depends on what $\delta Q$ and what $T$ you're talking about. If $Q$ is the heat flow into the system, and $T$ is the temperature of the system, then this is $\mathrm dS_{\textrm{sys}}=\delta Q_{\textrm{sys}}/T_{\textrm{sys}}$. If these are the heat flow into the environment and the temperature of the reservoir, then this is $\mathrm dS_{\textrm{env}}=\delta Q_{\textrm{env}}/T_{\textrm{env}}$. If $Q$ is the heat flow into the system and $T$ is the temperature of the environment, then $\delta Q_{\textrm{sys}}/T_{\textrm{env}}$ is just $-\mathrm dS_{\textrm{env}}$, and we can interpret the quantity $\mathrm d\sigma = \mathrm dS_{\textrm{sys}} - \delta Q_{\textrm{sys}}/T_{\textrm{env}}$ as the *entropy production* of this part of the process. In the case where the irreversibility arises solely as a consequence of heat flow between system and environment when they have different temperatures, and if the system operates on a quasi-static cycle, then the net entropy production $\sigma = \oint\mathrm d\sigma$ goes into the environment.

(3) Let's write the Clausius' inequality carefully as
$$
\frac{\delta Q_{\textrm{sys}}}{T_{\textrm{env}}} < \mathrm dS_{\textrm{sys}}.
$$
Using the answer to part (2) and this form of the inequality, I think that dissolves question (3), but I'm not sure.

Now, I think it's worth expanding on these comments:

**Preliminaries**

(A) If we are talking about the system following the cycle shown above, there is no such thing as $\delta Q^{\textrm{rev}}$ vs $\delta Q^{\textrm{irr}}$. The reason is that in order to even draw that diagram to begin with, we are assuming that the system is undergoing quasi-static processes. The irreversibility is *solely* a product of the energy exchange with the environment. In particular, it is due to heat flow between the system and its environment when the there is a finite temperature difference between them.

(B) The Clausius' inequality is subtle. The temperature that shows up in $\delta Q/T$ is the temperature of the *boundary* of the system, *not the system itself*! In other words, $T$ appearing in the Clausius' inequality is actually the temperature of the environment. This is why during an irreversible process, the entropy change of the system, defined by $\oint \delta Q_{\textrm{sys}}/T_\textrm{sys}$, can be zero, while $\oint \delta Q_{\textrm{sys}}/T_\textrm{res}<0$.

In any case, it is useful to do some calculations explicitly. Let's concentrate on the isochoric process $1\to2$ for the purposes of illustration.

**Heuristics**

Below, we carefully compute the entropy changes for both system and environment, but for now, let's give a quick heuristic explanation of what's going on.

If---as illustrated in the figures above---the system undergoes a quasi-static process (meaning that the system moves through a sequence of equilibrium states and so always has a well-defined set of thermodynamic variables), then the entropy change of the system is given by integrating $\delta Q_{\textrm{sys}}/T_\textrm{sys}$ from point 1 to 2 along a reversible path, regardless of whether the actual process is reversible or not. If the process is *not* quasi-static for the system, it is possible that the system can be broken up into subsystems that *do* undergo quasi-static processes.

In general, one can calculate the entropy change during an irreversible process between two equilibrium states by imagining a quasi-static process between them and calculating $\Delta S$ for that process. If the process is quasi-static, we can use $dS = \delta Q/T$. If not, we can use the thermodynamic relation

$$\mathrm dU = T\,\mathrm dS-p\, \mathrm dV+\mu\, \mathrm d N$$

by solving for $\mathrm \,dS$ and integrating along the reversible path.

Here, we assume that the irreversibility arises solely as a consequence of heat exchange between the system and its environment while they are different temperatures, which means that the system and environment each undergo separate quasi-static processes, but we can think of them as two subsystems comprising a closed system that does *not* undergo a quasi-static process.

We do a sample calculation carefully below, but note that $T_\textrm{sys}$ is changing throughout the process. On the other hand, the entropy change of the environment is given by integrating $\delta Q_{\textrm{env}}/T_\textrm{env}$ along a reversible path, where these are now quantities associated with the *environment*.

Now, consider the case where the system is in contact with a single reservoir of temperature $T_2$ throughout this process, which means that at all times, $T_\textrm{env} > T_\textrm{sys}$. In any small part of the process, the heat flow out of the reservoir is equal to the heat flow into the system, and so the entropy gain of the system is necessarily larger than the entropy loss of the reservoir:
$$
\mathrm dS_{\textrm{sys}} = \frac{\delta Q_{\textrm{sys}}}{T_{\textrm{sys}}} > \frac{\delta Q_{\textrm{sys}}}{T_{\textrm{res}}} = -\frac{\delta Q_{\textrm{res}}}{T_{\textrm{res}}} = -\mathrm dS_{\textrm{res}}
$$

Finally, if we were to calculate part of the Clausius' inequality integral, it would be exactly
$$
\frac{\delta Q_{\textrm{sys}}}{T_{\textrm{res}}} = -\mathrm dS_{\textrm{res}} < \mathrm dS_{\textrm{sys}}
$$
as it's supposed to.

**Careful calculation**

The entropy change of the system is given by
$$
\Delta S_{\textrm{sys},1\to2} = \int_{1}^{2}\frac{\delta Q_{\textrm{sys}}}{T}
= \int_{T_1}^{T_2}\frac{nC_V\,\mathrm dT}{T},
$$
where $C_V$ is the molar specific heat of the gas at constant volume. This evaluates to
$$
\Delta S_{\textrm{sys},1\to2} = nC_V\ln\left(\frac{T_2}{T_1}\right),
$$
which can be written as
$$
\Delta S_{\textrm{sys},1\to2} = Q_{1\to2}\frac{\ln\left({T_2}/{T_1}\right)}{T_2-T_1},
$$
where $Q_{1\to2}$ is the heat flow into the system during this process; this quantity is positive since $T_2 > T_1$.

Now, suppose that this process comes about due to the system being in contact with a thermal reservoir of constant temperature $T_2$. Then, the change in entropy of the *reservoir* is given by
$$
\Delta S_{\textrm{res},1\to2} = \int_{1}^{2}\frac{\delta Q_{\textrm{res}}}{T_{\textrm{res}}}
= \int_{1}^{2}\frac{-\delta Q_{\textrm{sys}}}{T_2},
$$
assuming that the system and reservoir are otherwise isolated from the rest of the universe so that $\delta Q_{\textrm{res}} = -\delta Q_{\textrm{sys}}$. This last term evaluates to
$$
\Delta S_{\textrm{res},1\to2} = -\frac{Q_{1\to2}}{T_2},
$$
and so the total entropy change of the universe is
$$
dS = \Delta S_{\textrm{sys},1\to2} + \Delta S_{\textrm{res},1\to2}
=Q_{1\to2}\left(\frac{\ln\left({T_2}/{T_1}\right)}{T_2-T_1}-\frac{1}{T_2}\right).
$$
It is relatively straight-forward to show that this quantity is positive for $T_2>T_1$ (our assumption).

The piece of the Clausius' inequality here is then just
$$
\int_1^2 \frac{\delta Q_{\textrm{sys}}}{T_{\textrm{res}}} = \frac{Q_{1\to2}}{T_2}
< Q_{1\to2}\frac{\ln\left({T_2}/{T_1}\right)}{T_2-T_1} = \Delta S_{\textrm{sys},1\to2}.
$$

Let me start by saying I agree with what both @Barbaud Julien and @Chester Miller said. So my answer is only intended to provide a different perspective.

First, it is true that the entropy is a state function of a system, and therefore the change of entropy of the system between any two given equilibrium states will be the same whether or not the process between the states is reversible. However, the change in entropy of the system plus surroundings will depend on the process. It will be zero if the process is reversible, and greater than zero if irreversible.

Consider a cycle consisting of two isothermal and two adiabatic processes. If the processes were all reversible, we would obviously have a Carnot cycle. Since your question focuses on the effect of heat transfer on entropy, let’s assume the adiabatic processes are reversible adiabatic (isentropic) and consider only the impact of the heat transfer processes being reversible or irreversible.

Let’s take the example of a heat addition expansion process of an ideal gas between two equilibrium states. Let the initial and final temperatures be equal. Consequently, from the ideal gas law, the initial and final pressure-volume products are equal. Clearly the process between the states may be a reversible isothermal process. However, it also need not be. We’ll consider both.

Let the temperature of the system be $T_{sys}$ and the temperature of the surroundings be $T_{sys}+dT$. Consider the system and surroundings as thermal reservoirs, i.e., heat transfer between them does not alter their temperatures so that the heat transfer occurs isothermally.

Let a specific quantity of heat, $Q$, transfer from the surroundings to the system. The resulting entropy changes are:

$$\Delta S_{sys}=\frac{+Q}{T_{sys}}$$

$$\Delta S_{surr}=\frac{-Q}{T_{sys}+dT}$$

The net change in entropy (system + surroundings) is thus:

$$\Delta S_{net}=\frac{+Q}{T_{sys}}+\frac{-Q}{T_{sys}+dT}$$

Now, note that if $dT\to 0$, then $\Delta S_{net}\to 0$ and the process is a reversible isothermal process.

However, for any finite temperature difference, $dT>0$, $\Delta S_{net}>0$ and the process is irreversible.

For both the reversible and irreversible processes, the change in entropy of the system is the same. However, for the irreversible process the change in entropy of the system is greater than the change in entropy of the surroundings. The excess entropy that is created in the irreversible expansion process means more heat must be rejected to the cold temperature reservoir (surroundings) during the isothermal compression in order for the cycle entropy to be zero. That results in less energy to do work in the cycle.

Although in this example the same amount of heat is transferred reversibly and irreversibly, clearly the rate of heat transfer will be greater for the irreversible than the reversible process owing to the finite temperature differential for the irreversible process. So for the amount of heat transfer to be the same, the product of the very slow heat transfer rate times the very long time for the reversible process would need to equal the product of the higher heat transfer rate times the shorter time duration for the irreversible process.

Hope this helps.

## Best Answer

Entropy is a property of the system. The change in entropy of a system as it traverses from an initial state(1) to a final state(2) is independent of the path by which the system is taken from state 1 to state 2.

The path can be a reversible one, or even irreversible,the change in entropy is always the same as long as the initial and final states are the same. However, in order to calculate the change in entropy $S_{2}-S_{1}$, one has to connect a reversible path between the two states because $\displaystyle S_{2}-S_{1}=\int_{1}^{2}\frac{dQ_{rev}}{T}$, where $dQ_{rev}$ is an infinitesimal amount of heat transferred to the system in a reversible manner at the system temperature T. NOTE: $\displaystyle\int_{1}^{2}\frac{dQ_{irrev}}{T}$ is not the correct formula for calculating the change in entropy. It is always $\displaystyle\int_{1}^{2}\frac{dQ_{rev}}{T}$ irrespective of whether the path is reversible or irreversible.