# Comparing work in thermodynamics with work done in mechanics

Let us the consider a gas as our system enclosed in a cylinder with piston.

1st case(Expansion of gas):

Here force on the piston is exerted by the gas in upward direction and during expansion piston moves up. So, the work done here is positive(force and displacement in same direction). Also the relation W=PΔV (with their usual meanings) also satisfies the "positive" sense of work, since the volume increases during expansion.

2nd case(Compression of gas):

Here, the surrounding exerts the force on the piston and compresses the gas. Since, the direction of force by surrounding on the system and displacement of piston(both downwards) are in same direction, should not the work done by the surrounding on the system should be positive? But, W=PΔV gives -ve work, since volume decreases during compression. Why does the mechanical concept of work and W=PΔV does not give same result?

(In Physics)We are usually told that work done by the system is positive and work done by the surrounding on the system is negative. But 2nd picture shows exactly what I am confused with. During compression, it is the gas that does negative work not the surrounding does the work in the gas?

1st picture is screenshot of book University Physics. 2nd picture is from here.

## 2 Answers

Normally both results are the same for work but it is defined in another way as you wrote: $dw = -pdV$ so the work you can get by integration.

In mechanics as well as in thermodynamics, the work done by the system on the surroundings is equal to the force vector the system exerts on the surroundings dotted with the displacement vector. If the force vector exerted by the system on its surroundings is in the same direction as the displacement (as, for example, when the mechanical system is decelerating), the work done by the system on its surroundings has a positive sign (and the work done by the surroundings on the system has a negative sign). If the force vector exerted by the system on its surroundings is in the opposite direction of the displacement (as, for example, when the mechanical system is accelerating), the work done by the system on its surroundings has a negative sign (and the work done by the surroundings on the system has a positive sign).

• "the work done by the surroundings on the system has a positive sign" your last line.I got the same conclusion. But for physics.bu.edu/~duffy/py105/Firstlaw.html states that "W is positive if work is done by the system, and negative if work is done on the system." – Digraj Khan Apr 21 '18 at 22:04
• This is a very poor choice of wording, and, at face value, is incorrect. It should say that if dW is taken to represent the work done by the system on the surroundings, then dW=+PdV, and, if dW is taken to represent the work done by the surroundings on the system, then dW=-PdV. This is what they actually meant to say. – Chet Miller Apr 22 '18 at 2:27