# Can't understand energy conservation in simple thermodynamics example

SITUATION

Consider a very big cylinder with a mobile piston in the middle separating two sections (A and B) filled with gas. Both the cylinder walls and the piston are adiabatic, so there is no exchange of heat with the exterior or between sections. The pressure of the gas in A is much higher than the pressure of the gas in B (think 10 bar against 1 bar). The piston is originally being hold by one stick and there is another one not to far from it. We unlock the first and the system evolves until it hits the second one (we assume the change in volume was small enough so as to not produce any significant change of pressures: think 1 mL in total volumes of 1 L each section).

ANALYSIS

I first consider the change in energy of the total system in terms of the change of energy in the subsystems A and B. For the gas of section A, I could claim it only changed its $$U$$ by giving $$p_B \Delta V$$ of work to its environment (in this case, gas in section B). If I then consider the gas in section B, I can claim it received $$p_A \Delta V$$ of work from its environment (gas in section A). This $$\Delta V$$ is the same in magnitude for both cases but of opposite sign, so if I consider that the change in internal energy of the whole system must be the sum of these two, then I get:

$$\Delta U_{tot} = \Delta U_{A} + \Delta U_{B}$$

$$\Delta U_{tot} = -p_B \Delta V - p_A ( -\Delta V ) = ( p_A - p_B )\Delta V > 0$$

However, if I then analyze what should happen to the whole system, it has not received any heat (adiabatic walls) nor any pressure work from the external environment (the external walls are fixed, the piston is an internal wall of the system). Since there is no other source of work being done to/by the system that I can identify, its $$\Delta U_{tot}$$ should be $$0$$.

What am I thinking wrong? Which step of the previous analysis is faulty? My intuition tells me that there is some "thermodynamically invisible" potential energy stored in the pressure difference between sections that is converted into "thermodynamically visible" energy by letting go of what is holding the piston, but (as my terminology indicates) I don't know how to consider this in thermodynamical terms.

Note 1: this question is similar to mine. But its author set the situation so that the change is infinitesimal in order to exchange the external pressure for the internal one in the work formula (as I understand it, $$-p_{ext} \Delta V$$ is valid for any process that is a constant external pressure). So as far as I can tell, the answer there heavily relies on this cuasi-static condition and doesn't really apply to this situation (or at least I don't understand how to adapt it). It is also mixing more "mechanical considerations" in ways I've never seen when dealing with a thermodynamic problem (like including the energy of the piston).

Note 2: I have previously stated this problem in another question. However, I did it in the context of a more general theoretical doubt and I think things got mixed up, so I ended up not quite satisfied with any response. I would like to avoid that here and just focus on understanding this problem, but just wanted to mention this to explain why I don't consider this to be a "double posting".

• Are you assuming that the piston is massless, or that it has mass? – Chet Miller Oct 8 '18 at 20:09

Firstly, you cannot assume that pressure doesn't change; that will lead you to incorrect answers here.

But that's actually not the main problem. The main problem is that you're ignoring the kinetic energy of the gas and piston as it expands.

Take the extreme case where you just have gas on side A, and side B is a vacuum. Now you don't even need to assume the system is closed - it can be open to outer space on the vacuum side and the physics of the problem stay the same.

If you release the piston, it will accelerate outward, and to stop it it needs to give up some energy to the environment. For example, you can imagine trying to stop it with a brake; the brake has to heat up. Even if the piston is infinitesimally light, the gas itself has kinetic energy.

Going back to your example, the only way for the piston to not do work on the environment is for you to wait until it equilibrates. The piston will keep moving until the pressure on both sides is equal. However if the process is allowed to continue until that happens, then obviously you can't apply $$dU = pdV$$ to analyze it. Instead you need to integrate this over the whole trajectory. The result of this will be that the internal energy doesn't change.

So to summarize: the 'missing energy' here is the kinetic energy.

Your second analysis is correct. The internal energy of the combined system does not change.

With regard to the first analysis, consider the following. In a rapid irreversible deformation like this, the overall compressive stress on each side of the piston is not determined solely by the ideal gas law (except just prior to the initial release, and after equilibrium is reached). During the irreversible process itself, viscous stresses are contributing to the overall compressive stress on each side of the piston. If the piston were massless, for example, the compressive stress on the piston face situated on the initially high pressure side will be less than the original pressure on the high pressure side, but higher than the original pressure on the initially low pressure side. And, the compressive stress on the piston face situated on the initially low pressure side will be higher than the original pressure on the low pressure side, but lower than the original pressure on the initially high pressure side. These effects are the results of viscous stresses, and how they work. At the very faces of the piston, on either side, the difference in overall compressive stress between the two faces will be infinitesimal throughout the entire process, such that the work done by the gas on the high pressure side will be equal in magnitude and opposite in sign to the work done by the gas on the low pressure side. The net result will be that the total amount of work will be zero.

Unfortunately, for the case of an adiabatic piston, the solution to this problem as posed cannot be obtained solely using thermodynamics. It can, however, be solved using gas dynamics, involving the Navier Stokes equations in conjunction with the transient differential energy balance equation.