# Convention of Work in Thermodynamics

1. Sep 28, 2013

### Lapetude

1. The problem statement, all variables and given/known data

I am wondering about the following conventions:

The work done by the gas is positive if the gas expands,
and negative if it is compressed.
Conversely, the work done on the gas by external force
(e.g., a moving piston) is positive for compression, and negative when the gas expands.

Why is $$W_{A,B}=-\int_{A}^{B}PdV$$
Specifically the signs are driving me nuts in working out the total work done on the gas in the Carnot cycle.

2. Relevant equations

So if a piston is compressing the work done on the gas is by convention positive. But $$dV$$ is negative. So is the negative sign in $$W_{A,B}=-\int_{A}^{B}PdV$$
a result of trying to make sure the work done is positive in compression?.

3. The attempt at a solution

Consider the Carnot cycle 1st stage of :
isothermal expansion from volume $$V_{1}$$ to volume $$V_{2}$$ at constant temperature $$T_{1}$$. If I use the above definition I get:
$$W=-\int_{V_{1}}^{V{2}}PdV=nRT_{1}Log\left(\frac{V_{1}}{V_{2}}\right)$$
However in this case $$dV$$ is positive so do I just drop the minus from the integral? And hence is the true answer:
$$W=\int_{V_{1}}^{V{2}}PdV=nRT_{1}Log\left(\frac{V_{2}}{V_{1}}\right)$$
which makes no sense if we define the work on a gas as it expands as negative. ie, the above Log will always be positive. If my first answer is correct this would imply that the total work on the gas in the Carnot cycle is negative, while the work done by the gas is positive. Surely this makes sense as we are converting heat into the external work? Thanks in advance.

2. Sep 28, 2013

### Lapetude

Sorry I just found
which is what I'm after.
"mpkannan makes it clear- you must look at everything in context before deciding the signs on everything. A question like "what is the sign on work" is too vague.

Two statements of the First Law of Thermo seen in textbooks:

dU = Q + W and dU = Q - W

W in the first statement is "work on the gas"
W in the second statement is "work by the gas"

And so, for example, when a gas expands W would be negative in the first statement (work done on the gas is negative since positive work is being done on the surroundings).
BUT
when a gas expands W would be positive in the second statement (work done by the gas is positive since work is being done on the surroundings).

The fact that work is negative in one case but positive in the other (both for the same scenario) is not a contradiction, since in one case we're talking about work ON and in the other we're talking about work BY. Textbooks should present BOTH statements of this first law, CLEARLY defining that the first statement is work ON and the second is work BY, in my opinion."

3. Sep 28, 2013

### Staff: Mentor

I think everyone feels pretty much the same way.