That is a great question. The first answer, you won't like it very much: by default. In steam table problems of these type, you only have constant-pressure or constant-volume processes. That's it. Other type of processes are really difficult to model using steam, because steam is really difficult to model, that is why we use tables!!! Another answer would be that, when calculating W=-int(PdV) P is really the external pressure, not the internal one, against which the piston is struggling to move. So, if it moves, it moves against a pressure located outside the piston (but in fact is the same pressure inside the piston!). Anyhow, it is a little difficult to understand what is really going on. It takes a lot of reading.
how do you know its constant pressure ?
That is a great question. The first answer, you won't like it very much: by default. In steam table problems of these type, you only have constant-pressure or constant-volume processes. That's it.
Other type of processes are really difficult to model using steam, because steam is really difficult to model, that is why we use tables!!!
Another answer would be that, when calculating W=-int(PdV) P is really the external pressure, not the internal one, against which the piston is struggling to move. So, if it moves, it moves against a pressure located outside the piston (but in fact is the same pressure inside the piston!).
Anyhow, it is a little difficult to understand what is really going on. It takes a lot of reading.
'Promosm' 🤗