# Work done by free expansion of gas and the energy of the piston

So this has been bothering me for a while. I know that for a free expansion of a gas, work done by it is zero. However, I have a doubt regarding the kinetic energy gained by a piston during this free expansion of a gas.

So, let there be a cylindrical container of infinite length. In the above picture, we can see that there is a fixed piston and a gas with pressure 'P', volume 'V' and temperature 'T'. The remaining volume of the cylinder is vacuum.

Now, the piston is released. As a result, free expansion of gas occurs and the piston moves towards the right. Now, if the piston is massless, I can understand that no work is done by the gas as the kinetic energy of the piston is zero, due to mass being zero.

However, if the piston has a mass 'M', it will have a kinetic energy. However, if we again assume that work done by the gas is again zero, then where is the piston's kinetic energy coming from?

Also, in both cases, we are assuming that there is no gravity and that the movement of the piston in the cylinder is frictionless.

• You show the case with the cylinder is open ended and infinitely long. How would your understanding change if a cylinder was a finite length and closed at the end? Mar 10 at 18:34
• @ChetMiller If the cylinder was finite, the expansion of the gas ends once the piston touches the end of the closed cylinder. At that point, the kinetic energies of the piston in both the cases will be zero. Also, after the expansion ends, the values of pressure, volume and temperature of the gas will change. Mar 11 at 7:56
• @ChetMiller Also, this process is irreversible. So, if it was an isothermal irreversible process, temperature of the gas remains the same, with new values of pressure and volume being $P_1$ and $V_1$. So, work done by the gas is: $W=P_1(V_1-V)$. And, if it was an adiabatic irreversible process, the new values of pressure, volume and temperature are $P_2$, $V_2$ and $T_2$. Work done by gas: $W= -n*C_v(T_2-T)$. And, by using: $n*C_v(T_2-T) = -P_2(V_2-V)$. Therefore, work done by gas: $W= P_2(V_2-V)$ Mar 11 at 7:57
• In the open cylinder case, the kinetic energy of the piston is not zero, and the piston keeps moving forever, and the gas keeps expanding forever. In the case of the closed cylinder, in the final state, the piston will not be moving, and the combination of piston and gas will have done no work. So $Q-W=\Delta U=0$ and $T_2=T_1$. Also, no work will have been done by the gas on the piston. Mar 11 at 11:34
• @ChetMiller I’m confused. I understand that no work is done if the gas never stops expanding. But, why is no work done by the gas in the case of a closed finite cylinder, once the piston reaches the end? If we assume that the process was adiabatic, where no heat was given to the gas $(Q=0)$, the temperature of the gas after expansion should have decreased. As a result, there should be a decrease in the internal energy of the gas ($ΔU<0$), which means that the gas has done work. Therefore, work done by gas should be: $W = - ΔU$. Mar 11 at 14:43

Force balance on piston: $$F_g(t)=m\frac{dv}{dt}$$where $$F_g(t)$$ is the force in the positive direction exerted by the gas on the inside face of the piston, and v is the piston velocity. Multiplying this equation by the piston velocity and integrating with respect to time gives:$$W_g(t)=\int_0^t{F_g(t)\frac{dx}{dt}dt}=m\frac{v^2(t)}{2}$$Since viscous damping forces from the gas cause the piston to eventually come to rest at the closed end of the cylinder (even with elastic collisions of the piston against the rigid closed end of the cylinder), the work done by the gas on the inside face of the piston is eventually equal to zero.