Work is performed by a system if the energy transferred by the system to another accounts for the change in external generalized mechanical constraints on the system. Thermodynamic work is a generalized concept of mechanical work in physics. Thermodynamic work is defined to be measurable solely from knowledge of such external macroscopic constraint variables. These variables always occur in conjugate pairs, for example pressure and volume, magnetic flux density and magnetization.
In thermodynamics, the quantity of work done by a closed system on its surroundings is defined by factors confined to the interface of the surroundings with the system and to the surroundings of the system. According to the first law of thermodynamics for a closed system, any net increase in the internal energy U must be fully accounted for. This can be seen in the equation below:
dU= δQ- δW
Apply a force ---> Displace an Object ---> Do work