# Why doesnt this violate 2nd law of thermodynamics?

Consider an ideal gas in a cylindrical container in a gravitational field, with a piston on top pushing down by gravity. The piston has some locking mechanism that locks it in place if it is displaced upwards enough that the temperature of the gas is some $1>>\epsilon>0$. If we wait long enough, enough particles will line up due to their random motion and push the piston upwards. We can make the piston arbitrarily thin and arbitrarily heavy. Eventually it will lock in some final top position and some arbitrarily small portion of kinetic energy is left in the gas. Since we can make the volume change arbitrarily small, while momentum phase space goes to zero, the entropy must have decreased in this process, but that cant happen, so what is wrong with this reasoning?

-

The system you design is not closed and cannot be closed to the volume your are postulating.

Entropy increases or stays constant is a statement involving the whole package, pistons containers and all. Entropy is lost through black body radiation, which cannot be isolated but has to be counted, and the thermal properties of the container and piston.

You are describing how pistons may fail over time by relaxation, but no problem with entropy and the second law.

-
Your answer is completely irrelevant, in classical thermodynamics you can have perfectly isolated systems, you can also have ideal gases, point particles and locks that dont deterioate. Your answer is analogous to saying that energy isnt conserved in newtonian mechanics because the universe is expanding. –  Allah Abdulala Gustavo ElFakir Nov 6 '13 at 17:26
Well, you are wrong in my opinion. Classical thermodynamics is a mathematical model for physical systems, physics, not mathematics and video game suppositions. The second law needs closed systems , period, otherwise entropy can decrease as in crystalization if the liquid is not taken into account, and all living things, if their total environment is not taken into account. –  anna v Nov 6 '13 at 18:39
I am not wrong. I am asking a question in the context of classical thermodynamics. But I have found the answer. Why dont you go to all the questions on Newtonian mechanics, SR, and QM and tell them how wrong they are? –  Allah Abdulala Gustavo ElFakir Nov 7 '13 at 15:55
My answer is within the classical thermodynamic framework. The entropy statement ( entropy stays constant or increases) holds only for closed systems in classical thermodynamics of course. –  anna v Nov 7 '13 at 16:13