For better or worse, my engineering thermodynamics text is wedded to the
du = dq - dw
approach to the first law. Here, dq is the energy transferred to the system due to a demperature difference and dw is energy transferred out of the system by all other means - both are inexact differentials.
Also, it takes the traditional approach of relating ds and dq in any process (reversible or irreversible) as
T ds >= dq
The Gibbs relation amongst the state variables is (P is pressure and dv is change in specific volume)
T ds = du + P dv
one can put this together algebraically to obtain the following
P dv = T ds - du > dq - du = dw
Therefore
dw <= P dv
I am puzzled by this because I can think of a system where dv = 0 yet the system sends energy out to its environment by a battery inside the system attached by wires to a resistor outside in the environment. The energy, dw, transferred out is definitely > 0.
As I stated in the beginning , disavowing du = dq - dw is not going to help me here.