# Issue with the work of a reversible process

You consider a cylinder with a piston inside which can move without friction, and with diathermic walls. The piston divides the cylinder into two rooms: A-B, filled with two ideal gases. There is also a valve that connects B and the outside. Let's consider just the room A as our thermodynimic system.

In the figure above are drawn two consecutive equilibria states of a generic reversible process, each described with a vector of thermodynamics variables. We assume that during the disequilibrium state, the piston moves of $dx$. You can observe that the only way to make the piston move is to use the valve; if the valve stays closed you can only have an isochoric process.
However, now we are intrested in calculating the work that our system (room A) has exchanged during the transition 1->2. In the equilibria states the net force acting on the piston is $0N$ because the pressure in the two rooms is the same, so the piston is firm. Using the kinetic energy theorem between the two equilibra states you obtain: $$dk=dW=0$$ While I now that the right expression should be: $$dW=p dv$$ But I don't understand where it comes from, since it is in contrast with my treatment. And also, which pressure should I consider in this formula? Someone could show me exactly which point of my treatment is wrong?

• while I do not quite understand what you wrote but it seems to me that you have deduced that in mechanical equilibrium $p_0=p_1$, which is correct. – hyportnex Feb 12 '18 at 14:00
• What exactly do $L$ and $k$ mean here? – By Symmetry Feb 12 '18 at 14:30
• The result $dP=0$ is in contrast with my hypothesis. In this case, the pressure doesn't increase during the process, and so you haven't a compression/expansion of the gas: the system doesn't evolve in time. @hyportnex – Landau Feb 12 '18 at 15:19
• It is not "in contrast"; given the situation you defined by the constraint $dL_1 +dL_2=0$ you derived that the only virtual displacement compatible with your constraint and equilibrium is $dp=0$ (see d'Alembert principle). – hyportnex Feb 12 '18 at 16:50
• In general the 1st law would say $dU=\delta Q +\delta L$ but you have postulated a purely mechanical energy exchange, that is one with $dU=\delta L$. This is called an adiabatic process. If you further assume that the gas is internally frictionless then the partition will oscillate back and forth just as an ideal spring would do. If the gas has internal friction then the oscillation of the partition will be dissipated and the partition will stop at a point where the pressures will be equal, i.e, $\delta p = 0$. Read the subject called "the adiabatic piston". – hyportnex Feb 13 '18 at 19:46

Here's a mechanical example. Suppose you lift up a weight using a massless string, by a distance $L$. During this process, the tension in the string is $F$. Since the tension inside the string is uniform, the work done on any piece of the string is zero. But this does not imply that you did zero work.

Specifically, you did work $+FL$ on the string, and the weight did an equal and opposite amount of work $-FL$ on the string. The net work done on the string is zero, while the work done by you, and the weight, are both individually nonzero.

In the thermodynamic case, $dW$ refers to the work done by room $A$, not the net work done on the piston. (For the math, just replace $F$ with $p$ and $L$ with $dV$.) In the ideal, quasistatic case, the work done on the piston is always zero, as you showed, so this is not a very interesting quantity.

Here's a bit more information on the quasistatic vs. non-quasistatic case. In the quasistatic case, the gases in chambers $A$ and $B$ have well-defined pressures $p_A$ and $p_B$ throughout, where $p_A$ and $p_B$ satisfy the equation of state. By the work-kinetic energy theorem, we have $$dW_A = p_A dV_A, \quad dW_B = p_B dV_B.$$ If we further assume that the piston moves slowly and on frictionless rails, then $p_A = p_B$, and the net work done on the piston is zero.

Now consider the general non-quasistatic case. During this process, the gas in chamber $A$ does not have a well-defined pressure throughout. However, there is a well-defined local pressure $p_A^\text{p}$ right at the piston, and $$dW_A = p_A^\text{p} dV_A, \quad dW_B = p_B^{\text{p}} dV_B.$$ For example, if I pull the piston quickly to the right, before the gas in chamber $A$ can react, then $p_A^{\text{p}} \approx 0$. I also form a shock wave of gas in chamber $B$ ahead of the piston, so that $p_B^{\text{p}}$ is very large. The resulting energy balance equation is $$\int p_A^\text{p} dV_A + p_B^{\text{p}} dV_B + dW_{\text{me}} = 0$$ where the final term is the work I did. In principle, this tells you something about $p_A^\text{p}$ and $p_B^\text{p}$, but calculating them is a total nightmare.

• Ok, but there is a problem: during the disequilibrium the tdm variables (and also pressure) are not defined. We know that $dW_{tot}=0$, you assume also that during the disequilibrium there are two forces acting on the piston, the first due to pressure in A and the second due to pressure in B. You have: $dW_{1}+dW_{2}=0$. How you say, let's consider only $dW_{1}$; however you can't write $dW=pdv$ because pressure is not defined. @knzhou – Landau Feb 20 '18 at 14:14
• @Landau I edited with more details about the non-quasistatic case. Note that $dW = F dx$ is always true, since it's a mathematical identity. Similarly, $dW = p dV$ is always true, provided that $p$ is the local pressure at the piston. In the quasistatic case, the entire gas has a well-defined pressure, which is equal to this local pressure. In the non-quasistatic case, this isn't true. – knzhou Feb 20 '18 at 15:29
• With local pressure do you refer to the average of the values of pressure on the surface of the piston? Sorry, but I have still some doubts. Consider only the reversible procces. During the transition 1->2 from the two equilibria states there is a disequilibrium state. How you say, it is defined a local pressure on the surface of the piston, so the force on the A side is $F=p_{av-A}S$ and also $F=p_{av-A}dv-p_{av-B}dv=0 \rightarrow p_{av-A}=p_{av-B}$ and so $dW=p_{av-A}dv=p_{av-B}dv\neq p_{0}dv$ This one should be the right expression. – Landau Feb 20 '18 at 18:31
• What do you think about that? @knzhou – Landau Feb 21 '18 at 21:52
• @Landau First: yes, I mean an average local pressure. Second: a reversible process must be quasistatic, which means that both sides are effectively at equilibrium the whole time, so there is no issue! Does that answer your question? – knzhou Feb 21 '18 at 21:56

In general, the 1st law would say that $dU=\delta Q +\delta L$ but you have postulated a purely mechanical energy exchange, that is one with $dU=\delta L$. This is called an adiabatic process.

If you further assume that the gas is internally frictionless, then the partition will oscillate back and forth just as an ideal spring would do.

If the gas has internal friction, then the oscillation of the partition will be dissipated and the partition will stop at a point where the pressures will be equal, i.e, $\delta p = 0$. Read the subject called "the adiabatic piston".

• I've edited my question, hope that now it's more clear. However I'm not considering necessary an adiabatic process. Thanks for your help. – Landau Feb 14 '18 at 9:32