# How does the author identifies the irreversible process coming from the pressure difference?

In the book of Prigogine, Modern Thermodynamics, at page 113, it is given the example of an irreversible expansion of a gas.

In a reversible expansion of a gas, the pressure of the gas and that on the piston are assumed to be the same. If we consider an isothermal expansion of a gas that has a constant temperature $$T$$ by virtue of its contact with a heat reservoir, the change in entropy of the gas de $$S=\mathrm{d} Q / T,$$ in which dQ is the heat flow from the reservoir to the gas that is necessary to maintain the temperature constant. This is an ideal situation. In any real expansion of a gas that takes place in a finite time, the pressure of the gas is greater than that on the piston. If $$p_{gas }$$ is the pressure of the gas and that $$p_{piston}$$ the pressure on the piston, the difference $$(p_{gas} - p_{piston})dV$$ is the force per unit area that moves the piston. The irreversible increase in entropy in this case is given by $$\mathrm{d}_{\mathrm{i}} S=\frac{p_{\mathrm{gas}}-p_{\mathrm{piston}}}{T} \mathrm{d} V>0$$ In this case, the term ( $$p_{\text {gas }}-p_{\text {piston }}$$ ) /T corresponds to the 'thermodynamic force' and dV/dt the corresponding 'flow'. The term ( $$p_{\text {pas }}-P_{\text {piston }}$$ ) dV may be identified as the "uncompensated heat' of Clausius. since the change in the volume and $$\left(p_{\text {gas }}-p_{\text {piton }}\right)$$ have the same sign, di $$S$$ is always positive. In this case, $$\mathrm{d} S=\mathrm{d}_{\mathrm{e}} S+$$ $$\mathrm{d}_{\mathrm{i}} S=\mathrm{d} Q / T+\left(p_{\mathrm{gas}}-\mathrm{p}_{\mathrm{piston}}\right) \mathrm{d} V / T .$$ In the case of an ideal gas, since the energy is only a function of $$T,$$ the initial and final energies of the gas remain the same; the heat absorbed is equal to the work done in moving the piston $$p_{piston}dV$$.

However, the author does not give any explanation for how he figured out that the difference between $$p_{gas}$$ and $$p_{piston}$$ results in a irreversible process. In other words, I was given this question without the solution, how should I suppose to identify that there is a nonzero contribution to the entropy production coming from the work done by the pressure difference?

The reason for $$p_{gas}\ne p_{piston}$$ in equilibrium or during a quasi-static process is that you have some friction between the walls and the piston or viscous effects within the gas, both processes being dissipative are irreversible.
If, by $$p_{gas}$$, the author means the force per unit area that the gas exerts on the piston face, then this discussion is incorrect. That is because, for a massless, frictionless piston, by Newton's 2nd law, the force the gas exerts on the inner piston face must match the external force on the piston, $$p_{piston}A$$.
On the other hand, if, by $$p_{gas}$$, the author means the pressure calculated from the ideal gas law nRT/V using the volume average temperature T during the irreversible process (the temperature of the gas during an irreversible process is typically not spatially uniform), then the assessment is basically correct. In this case, $$(p_{gas}-p_{piston})$$ represents the contribution of viscous (dissipative) stresses to the force per unit area on the piston face. And the expression $$\frac{(p_{gas}-p_{piston})}{T}\frac{dV}{dt}$$ approximates (crudely) the rate of viscous entropy generation within the gas. There is a lot of hand-waving involved here, but at least it qualitatively alludes to a basic mechanism for entropy generation in an irreversible process.