I have been having this doubt for long. As by the first law dq=du+dw (neglecting KE and PE change). And we know that the work done by the system can be utilized in things (eg. boundary work, shaft work, shear work, paddle wheel work..etc). For open flow system replacing dq=tds, we get, tds=du+ dw (process should be reversible) if we replace dw= pdv+(shaft work..etc), then we get, tds=du+pdv+(shaft work..etc) Why isn't the above equation valid, instead we use tds=du+pdv. Why are we considering only boundary work not other works?