Internal energy can be thought of as all the energy in a system that is not being transferred as heat.
This could include nuclear energy, chemical energy, elastic energy as well as heat that has not been transferred yet.
Temperature can often be thought of as a measure of internal energy.
This is any amount of energy that cannot be included as mechanical energy.
Internal energy can be transferred between systems without transferring heat.
That would mean that the temperature would not change.
So the internal energy could be transferred as mechanical energy in the form of work.
Recall that work required some displacement to exist, we also need that fluid to create a displacement.
So work can only be done when there is a change in volume.
The pressure should remain constant.
If not, then the equation above should be broken down parts of constant pressure.
W = PDV
Work On or By the System
Work can be positive or negative, depending “who” is doing the work.
The gas does work on the system when the volume is expanding.
That means that DV is positive, so work is positive.
When work is being done by the system, the volume is decreasing.
So DV should be negative, so work will be negative.