# Work done in thermodynamic process

1. Jul 9, 2013

### CAF123

1. The problem statement, all variables and given/known data
An ideal gas undergoes the following reversible cycle: (a) an isobaric expansion from (P1, V1) to (P1, V2), (b) an isochoric reduction from (P1, V2) to (P2, V2) (c) an isobaric reduction from (P2, V2) tp (P2, V1) (d) an isochoric expansion from (P2,V1) to (P1, V1). What work is done in this cycle? How much work is done by the gas in traversing the cycle 100 times?

2. Relevant equations

Work done by gas/surroundings: $$W = - \int_{V_1}^{V_2} P\,dV$$

3. The attempt at a solution
No work done in cases (b), (d). In case (a), assuming the gas is expanding against the surroundings, W = -P1(V2-V1) (My book uses convention that negative work for system doing work on surroundings)
In case (c), surroundings do work on gas, acting to compress, so W = -P2(V1-V2).

Work done in cycle presumably refers to net work in cycle? In which case net work, $W_N = -P_1(V_2 - V_1) - P_2(V_1 - V_2).$ Is this correct? My book has the work done by gas = (P1 - P2)(V2 - V1). How can this be correct? The only work done by the gas is in step (a) of the cycle?

Many thanks

2. Jul 9, 2013

### szynkasz

You get $W_N=(P_2-P_1)(V_2-V_1)$ so this is the answer with opposite sign.

3. Jul 9, 2013

### CAF123

Yes, I am aware of that, the problem is i don't see why it should be. The work done by the gas against the surroundings is -P1(V2-V1) [Process (a)]. The work done by the surroundings against the gas is -P2(V1-V2) [Process (c)]. I have followed the conventions in my book regarding the sign convention (I am aware there are dis similarities across different branches of science), but I am still out by a minus.

Also, the second part asks about the work done solely by the gas. How can it be the answer given? As showed above, only in process (a) does the gas do work. In the other process, the surroundings do work. (this is assuming, of course, when the gas expands it is the gas losing internal energy to the surroundings rather than some external driving force causing the gas to expand).

4. Jul 9, 2013

### barryj

In process a, the gas does the work on the surroundings. In process c the surroundings does work on the gas. The relationship " WN=(P2−P1)(V2−V1) " is the net work done by the gas. This looks like a simple heat engine where heat is added to the gas during process a and removed in process c.

5. Jul 9, 2013

### CAF123

I have two expressions, one for the work of the gas on the surroundings and the other the work of surroundings on the gas. Then I add these two expressions together to get the net work done in a single cycle: W = (P2-P1)(V2-V1). There are two things I don't understand here:
1) this is incorrect by a factor of -1
2) how can W above be the work done by the gas. The work done by the gas on surroundings is -P1(V2-V1) and -P2(V1-V2) is work done by the surroundings.. So why do these combine to give the net work done by the gas?

6. Jul 9, 2013

### barryj

It is a bit confusing. Consider a cylinder with a piston connected to a block on a surface. In process a, when you add heat to the gas, it will expand forcing the piston to do work on the block. This is the case where the gas does work on the surroundings. This is why you get the term P1(V2-V1) when the piston retracts, due to cooling or loss of heat, work is done on the gas resulting in -P2(V2-V1). The confusing part is understanding whether work is done ON the gas or BY the gas.

7. Jul 9, 2013

### TSny

Maybe the confusion is due to how you wrote this equation. You should actually have different equations for the work done by the gas and the work done by the surroundings. Consider the two different equations

$$W = - \int_{V_1}^{V_2} P\,dV$$ and $$W = + \int_{V_1}^{V_2} P\,dV$$

Can you see which of these gives the work done by the gas and which gives the work done by the surroundings? (Edit: assuming $\small V_1$ is the initial volume and $\small V_2$ is the final volume.)

Last edited: Jul 9, 2013
8. Jul 9, 2013

### Andrew Mason

This is not correct if you mean the work done BY the gas on the surroundings. In an expansion (V2>V1) the work done BY the gas is positive.

What you have written is the expression for work done ON the gas.

AM

9. Jul 10, 2013

### CAF123

Hi TSny,
Perhaps I should write out how my book uses the sign convention:
'When the surroundings do work on the system, that work is positive; conversely when the system does work on the surroundings, that work is negative. If the gas expands against the surroundings, the infinitesimal work done is $dW = PdV$. As it stands, this is positive for an expansion (dV > 0) To make dW negative (as per the sign convention). we insert a negative to obtain dW = - PdV. On the other hand, if the surroundings compress the gas dV is then negative and dW positive as required.'

So from this, my understanding is that the single equation $W = -\int_{V_i}^{V_f} P dV$ encapsulates both work done by gas/by surroundings.

10. Jul 10, 2013

### CAF123

Hi AM,
See the above for my book's sign convention. My book also makes the point that engineers define positive work as that done by the system on the surroundings. (opposite to the books standard convention).

I am wondering also, if the gas does -xJ of work on the surroundings, then is it correct to say that the surroundings does +xJ of work on the gas?

The question wording 'work done in cycle' is confusing since it does not refer to either the net work done by the gas or the surroundings

Last edited: Jul 10, 2013
11. Jul 10, 2013

### barryj

Think about this problem in a practical sense. This problem is about an engine, sort of like the gas engine on a car. The engine goes through this same cycle over and over as the engine rotates. So you can think of the net work done in the cycle is the work done as the process goes from a to b to c to d and then back to a again over and over. You might look up the carnot cycle in your physics book to get some better understanding.

12. Jul 10, 2013

### TSny

I think the wording of your book is confusing.

Consider the case of a gas in a cylinder with a piston. The force which the gas pressure exerts on the piston is in a direction to try and increase the volume of the gas. This is true whether the volume is increasing or decreasing. If the volume is increasing, then the force due to the gas pressure is in the same direction as the movement of the piston, so the gas does positive work. If the volume is decreasing, then the force due to the gas pressure is in the opposite direction to the movement of the piston, so the gas does negative work. In general, you can write the work done by the gas on the surroundings as

$$W_{by\; gas\;on\;sur} = + \int_{V_i}^{V_f}P_{gas}dV$$

This formula will work for both increasing and decreasing volumes. If the volume increases, then the formula will give a positive work done by the gas. If the volume decreases, then the formula will give a negative work done by the gas (because dV is negative for this case).

You can use similar arguments to show that the work done by the surroundings on the gas is

$$W_{by\; sur\;on\;gas} = - \int_{V_i}^{V_f}P_{sur}dV$$

where the volumes here still refer to the volume of the gas.

The negative sign is due to the fact that the force of the surroundings on the piston has the opposite direction of the force of the gas on the piston.

For a reversible process, you have $P_{gas} = P_{sur}$ and you generally just write $P$ for both the pressure of the gas and the pressure of the surroundings.

Last edited: Jul 10, 2013
13. Jul 10, 2013

### CAF123

Thanks TSny, your way of putting it makes a lot more sense - is this the standard sign convention in physics?

When the question says 'work done in the cycle', does it mean the net work done by the gas or the net work done by the surroundings? In the former case, using your last post, I get $$W_{gas\, on\, surr} = (P_1 - P_2)(V_2 - V_1)$$ and so does this mean the work done by the surroundings is simply the negative of this, i.e $$W_{surr\, on\, gas} = (P_2 - P_1)(V_2 - V_1)$$ Is either answer acceptable to 'work done in cycle'?

In one cycle WD by gas is $(P_1 - P_2)(V_2 - V_1)$. So in 100 cycles, WD by gas $W_{gas\, on\, surr} = 100(P_1 - P_2)(V_2 - V_1)$

@barryj - thanks, I am getting onto Carnot engines soon

14. Jul 10, 2013

### TSny

It could mean either one. So, you would hope that whoever is asking the question makes it clear which work is intended. Some texts emphasize the work done on the system (gas) so that they can write the first law as ΔU = Q + W. Other texts emphasize the work done by the system so that ΔU = Q - W. When dealing with cycles (especially in the context of engines) I think that it's the work done by the gas that is usually of interest since the whole purpose of the engine is to do work on the environment.

Yes.

I would say so (as long as you specify clearly which one you are calculating).

Yes

15. Jun 4, 2016

### conscience

Hello TSny ,

This makes sense . But if the process is irreversible , non quasi-static , how do we determine the work done by the gas ?

In the book I have it is written " For all processes work can be calculated using $-\int P_{ext}dV$ " . I am not clear about this statement . Shouldn't that be $\int P_{gas}dV$ ?

I will consider the ususal set up of gas confined in a cylinder with massless piston of area A. Initially the piston is held by some external mechanism . The gas pressure is $P_{gas}$ . Now when the piston is allowed to move , it moves out expanding against the surrounding pressure (atmosphere in this case) $P_{atm}$ until $P_{gas} = P_{atm}$ . Consider only the gas inside the cylinder as the system.
Now if it is asked to calculate work done by gas , what is the pressure that we use while calculating work done , $P_{gas}$ or $P_{atm}$ .

I know gas pressure will not be uniform while the gas is expanding . But the force exerted by gas on the inside face of piston will be $P_{gas}A$ and not $P_{atm}A$ .

What am I missing ?

16. Jun 4, 2016

### TSny

Hi, conscience.

As I understand it, if the gas expands irreversibly, then you might not be able to calculate the work done by the gas because the gas would not necessarily have a well defined pressure during the expansion. In such cases, the work done by the gas is not well defined. However, the external pressure might still be well defined while the internal pressure is not well defined. In those cases, $-\int{P_{ext}dV}$ would represent the work done by the environment on the system.

An example would be a free expansion of a gas.
http://energyandentropy.com/Essays/page8/index.php
http://www.etomica.org/app/modules/sites/JouleThomson/Background2.html
In this example, the pressure of the gas is not well defined during the expansion. So, $\int{P_{gas}}dV$ is not well defined. But the work done by the external atmospheric pressure is well defined and $\int{P_{atm}}dV$ would equal zero, since the external pressure acts on the box which does not change volume.

I would imagine that there are cases (such as explosions) where neither $\int{P_{gas}}dV$ nor $\int{P_{ext}}dV$ are well defined.

There are other cases where both $\int{P_{gas}}dV$ and $\int{P_{ext}}dV$ are calculable but they are not equal in magnitude. For example, if you had an enclosed gas pushing a massive piston against external atmospheric pressure such that the piston gently accelerates, then $P_{gas} > P_{atm}$. The work done by the gas on the piston would be greater in magnitude than the work done by the atmosphere on the piston. The net work done on the piston by the gas and the atmosphere would equal the change in kinetic energy of the piston (assuming no friction). [EDIT: However, the work done by the gas on the piston would be the negative of the work done by the piston on the gas.]

Last edited: Jun 4, 2016
17. Jun 4, 2016

### conscience

Thinking more about this , if the piston is light ( assumed massless ) ,then pressure at both the faces should be equal which means that even though the gas pressure is non uniform , the pressure at the inside face of piston is always equal to $P_{ext}$ all the while piston is moving from initial to final position . For the purpose of calculating work done by the gas , we only need pressure at the inside face of piston . So in this case work done by the environment on the system (gas) should be equal to work done by the system on the environment .

Hence, despite gas expanding irreversibly , if the piston is massless , the work done by gas is equal to $\int{P_{ext}dV}$

Do you think the above reasoning has any merit ?

18. Jun 5, 2016

### Andrew Mason

Just to add to what has been said, suppose tbe external pressure was zero so the ideal gas undergoes a free expansion, doing no work on the surroundings. W=0, Q=0 so $\Delta u$=0

The expanding ideal gas essentially does work on itself. During the expansion it is in a dynamic state, having converted some of ifs internal energy into mechanical energy of the gas. When it finishes expanding and everything settles down it returns to equilibrim. At that point its internal energy and, therefore its temperature, will be the same as at the beginning (first law).

AM

19. Jun 5, 2016

### TSny

Yes. I do think it has merit.

But I think there could be irreversible processes where the pressure of the gas at the inner surface of the piston is not well defined and/or the external pressure of the environment on the outer surface of the piston is not well defined. The work done by the gas or the environment might not have any meaning for such processes. However, if the gas started in a state of thermal equilibrium and settles down to a final state of equilibrium after the irreversible process, then the change in any state variable (such as the change in energy) would have a well defined value. But work or heat transfer for the process might not have any meaning.

But I am certainly not knowledgeable about doing work calculations for irreversible processes.