# Why do we use the external pressure to calculate the work done by gas

I read in a textbook that in the case when we have a gas in a cylinder fitted with a massless frictionless piston being held with an external pressure $$p_1$$, and when the pressure is reduced to become the value $$p_2$$, the gas pushes up against the piston and then the work done by the gas for a small change in volume is calculated by:

$$\mathrm dW=p_2\,\mathrm dV$$

Here, is what I don't conceptually understand. If the gas's molecules was under some pressure $$p_1$$ which is equal to the external pressure in the static state then after the external pressure became lower than the internal pressure, shouldn't the work done by the gas be the difference between the two pressures?

If the piston is frictonless and massless, then, if you do a force balance on the piston, you must have that the force per unit area that the gas exerts on the inside face of the piston will always be equal to the external force per unit area that one imposes on the outside face of the piston. The sudden drop in pressure on the outside face of the piston causes the gas to undergo an irreversible expansion. During an irreversible expansion, the local pressure within the cylinder becomes non-uniform, so that the average pressure of the gas differs from the force per unit area at the piston face. As a result, the ideal gas law (or other equation of state) cannot be applied globally to the gas in the cylinder. In addition, during an irreversible expansion, there are viscous stresses present in the gas that allow the force per unit area at the piston face to drop to the new lower value while requiring that force to match the external force on the outer face. So the work done by the gas on the piston is equal to the external force per unit area times the change in volume: $$W = \int{P_{ext}dV}$$ This equation is always satisfied, irrespective of whether the expansion is reversible or irreversible.

• Is perfect gas viscous? Feb 1 '20 at 18:21
• no...............
– user99515
Dec 21 '20 at 12:27
• @Anonymous There is no such thing as a perfect gas. Viscous stresses are a feature of the behavior of all real gases, which the perfect gas concept is incapable of capturing. And for irreversible expansions, it is viscous stresses that make the difference between the perfect gas equation applying within the gas, and the actual stresses present that enable the compressive stress of the gas on the massless piston to equal the external pressure. You are aware that, in an irreversible deformation, an ideal gas does not satisfy the ideal gas law, right? It applies only to equilibrium states. Dec 21 '20 at 12:38
• @ChetMiller I was answering the learner
– user99515
Dec 21 '20 at 12:52

The derivation of pressure-volume work is as follows, in reverse:

$W = P\Delta V$

$P = F/A$

$\Delta V = A\Delta d$

Subbing those last two into the first:

$W = (F/A) (A\Delta d)$

Or:

$W = F \Delta d$ which is the definition of work.

So, the work done by the gas in the cylinder is indeed independent of the outside pressure, it is a function of the force exerted by the gas and the displacement of the piston. But, the work done on the piston is different. It is the sum of the work done by the gas inside and that done by the gas outside. The gas outside is exerting a force inward while the distance moved by the piston is outward so that work is negative compared to the positive work done by the gas inside the cylinder. So the gretaer the difference between inside and outside pressure, the greater the net work done on the piston. But still, the work done by only the inside gas on the piston is a function of its pressure and the $\Delta V$.

This is even my confusion that in physics when we write the work done by gas we use its pressure and we don't calculate the work done in irreversible processes because in such processes pressure of the gas at any moment is not defined but in chemistry when there is irreversible process we actually find the the work done by the surrounding on the gas which we take as "-Pext*dV" (-sign is taken to get the right result, you can derive it taking initial volume as the origin and Final volume as end you will get the same result) and reverse its sign to find the work done by gas, as use it in FLOT, for e.g, if there is irreversible compression lets say work done by surrounding on the gas is "+W" i.e W amount of energy is transferred from the surrounding to the system so , it also means that system must also have done -W amount of work on the surrounding to receive W amount of energy from the surrounding..as there is no other thing from which energy can be exchanged. ...I don't know why we don't do this in physics like we do to find work done in irreversible processes in chemistry, but I think this is not wrong even in irreversible process you cannot calculate work done by gas directly by you can calculate how much you are supplying and it will do the same amount of work on you but of opposite sign to take it from you.