# Are you supposed to use the internal or external pressure for the $pV$ work integral?

To introduce the $$pV$$ work integral, my physics textbook gives me the classic setup of a vertical piston (which has face area $$A$$) with a gas of pressure $$p$$ and initial volume $$V_i$$ (please see the image for the exact setup). On the piston is lead shot which exerts a downward force. The force exerted by the gas is given by $$F=PA$$. Therefore, the work done by the gas is given by the integral from the initial to final volume of $$Fdx=pAdx=pdV$$ (please see the image for the full derivation; only the full paragraph is relevant).

This derivation makes sense. However, I have seen formulations of the integral in terms of external pressure rather than internal pressure. Namely, I have seen the differential work written as $$dW=-p_{ext}\cdot dV$$. I understand that the negative sign comes from the chemistry sign convention, but am confused whether to use the internal or external pressure.

In two different cases, these two integrals seem to produce different results.

Case 1 - Adiabatic Expansion: My book suggests that an adiabatic expansion can be achieved by the following setup: a completely thermally insulated gas piston with lead shot (see image).

As one shot is removed at a time from the piston, the gas expands adiabatically. In this case, the external pressure is constant and the internal pressure varies with volume. I would expect the two integrals (d$$W=p\cdot dV$$ and $$dW=p_{ext}\cdot dV$$) to be different, but am not completely sure if this is true.

Case 2 - Free Expansion: In the free-expansion setup, a gas is allowed to expand into a vacuum chamber (see image).

The gas has pressure p, but the external pressure p_ext is zero. Therefore, the first integral, which uses $$dW=pdV$$ has a non-zero value while the second integral $$dW=p_{ext}\cdot dV$$ is equal to zero. The second integral produces the correct result while the first does not.

Again, which pressure is correct to use for these integrals.

This is my first post so I apologize for any formatting errors that occurred.

Thank you so much!

Please note that throughout this question, I have used $$p$$ to refer to internal pressure of the gas and $$p_{ext}$$ to refer to external pressure.

• Hello, and welcome to Physics SE. Please refrain from posting screenshots of textbooks or references, but rather paraphrase your source in your post. – Yejus Aug 3 '20 at 4:58

For your case 1:

I think your book refers to Quasistatic process.

It is a form of idealized process which is "infinitely slow" so the system is always in thermodynamic equilibrium with the surroundings.

What this means in this context is that $$p_{ext} =p$$.

So it really does not matter which one you use magnitude wise.

The correct formula for work done by the gas is $$W=\int_{V_{initial}}^{V_{final}}p_{ext}\cdot dV$$

Regarding:

In this case, the external pressure is constant and the internal pressure varies with volume.

Note both internal and external(due to change in weight) pressures are changing extremely slowly and continuously. So you have the integrate over whole process.

For case 2:

Work done by gas in free expansion is indeed $$0$$ as $$p_{ext}=0$$. So there is no external force acting on the gas , hence no work is done on the gas. Also there is nothing the gas can exert force on so work done by the gas is also $$0$$.

Also note that this process is "non-reversible" or "non Quasistatic" so it makes no sense to use the formula derived using the assumption of "reversible" process. Even though it gives the correct answer.

• Thank you so much! Does the integral formula that you gave work for non-quazistatic processes. If not, is there a general formula for work done by and work done on the gas? – Neel Aug 3 '20 at 11:52
• @Neel Take a look at Chet Miller's answer – Hrishabh Nayal Aug 3 '20 at 12:35
• Is it valid do use W=∫p_ext⋅dV for a free expansion? Also in the case where the piston is pushed down by a constant external pressure (it is compressed until the internal and external pressure are the same) which formula is correct to use, W=∫p_ext⋅dV or ∫p⋅dV? Thank you for all of your help! – Neel Aug 3 '20 at 13:21
• You can also use first law of thermodynamics as a better option for some cases. – Hrishabh Nayal Aug 3 '20 at 13:58
• Which part of the derivation breaks down for the p*dV integral (the derivation that I initially referred to in my original question) breaks down once the process is not quasi static. – Neel Aug 3 '20 at 20:37

The ideal gas law describes the relationship between pressure, volume, and temperature of an ideal gas at thermodynamic equilibrium. It also describes the PVT relationship for a gas experiencing a very slow deformation process (quasi-static, reversible), since a reversible process is just a continuous sequence of closely neighboring thermodynamic equilibrium states. But for a rapid deformation of a gas, the ideal gas law no longer allows you to calculate the gas pressure correctly (especially at the moving boundary where the gas is doing work), because it applies only at thermodynamic equilibrium, and a rapid irreversible process passes through a sequence of non-equilibrium states. We know from fluid dynamics that, what is happening in an irreversible rapid-deformation process is that "viscous stresses" contribute to the pressure at the moving boundary. So the pressure must differ from the ideal gas law.

Now for $$P_{ext}$$ vs P: $$P_{ext}$$ is supposed to represent the pressure of the surroundings at the moving boundary where work is being done, and P is supposed to represent the pressure of the gas at this interface. Whether a process is reversible or irreversible, by Newton's law of action-reaction, we must always have that $$P=P_{ext}$$. And, for thermodynamic equilibrium or for a reversible process, P can be determined from the ideal gas law (or other real-gas equation of state). But, for an irreversible process, we can't use the ideal gas law, so we are more limited. To calculate the work done at the moving boundary, we must impose the external pressure manually or by an automatic control system to dictate the pressure for calculating the work done by the gas on its surroundings.

So, in summary, for all processes, both reversible or irreversible, the work done on the surroundings is $$W=\int{P_{ext}dV}=\int{PdV}$$However, for an irreversible process, we can not calculate P from the ideal gas law, so we are stuck using $$P_{ext}$$, which must be specified by other means.

• If we always have P=P_ext, shouldn't the gas always remain in static equilibrium? I may be completely wrong but isn't the reactionary force of the force exerted by the gas on the piston the force exerted by the piston on the gas? – Neel Aug 3 '20 at 13:14
• If you're doing a force balance on two bodies A or B that are in contact, for body A, you only include the contact force that body B exerts on A, and not the contact force that A exerts on B. So, no, you would not have static equilibrium. Your understanding of the action reaction pair here is correct, however. – Chet Miller Aug 3 '20 at 13:46
• I believe while $W=\int{P_{ext}dV}$ is true $P_{ext} =P$ is not true for non- Quasistatic process. Example consider putting sudden weight on piston in above adiabatic case, here the internal pressure increases to become equal to external. Note that gas and surroundings are not in contact but gas is in contact with piston and both forces due to internal and external pressure act on piston(not gas). – Hrishabh Nayal Aug 3 '20 at 13:52
• @HrishabhNayal This is not correct. I am defining $P_{ext}$ as the force per unit area exerted by the surroundings on the system. So, unless you are considering the piston as part of your internal system, $P_{ext}=P$. Otherwise, if you are considering only the gas as the system, the piston is part of the surroundings, and $P_{ext}$ is the pressure exerted by the inside face of the piston on the gas. There are only two entities under consideration, system and surroundings, not system, piston, and surroundings. – Chet Miller Aug 3 '20 at 14:25
• @ChetMiller Ah I see, I got all confused in the terminology you used. In that case you are correct. – Hrishabh Nayal Aug 3 '20 at 14:36