Consider an adiabatic container containing atoms of some kind as shown in the picture. The container has a piston of molecular dimension(Perhaps a complex molecule). Initially the piston is pushed in and luckily it hit an atom and some work is turned into internal energy of the system. After a short time an atom of momentum greater than the new average of the atoms hit the piston and thus the system did a work on the external environment. So in the aftermath we got more work from the system than we initially put in. Also some heat is totally converted into work. Isn't this a violation to the second law of thermodynamics (even though at great luck)?
-
1$\begingroup$ This is essentially a variant of Feynman' ratchet, and does not work for the same reason. Essentially the problem is you are not considering the statistical behavior of the environment, or how that might impact the system $\endgroup$– By SymmetryCommented Jul 12, 2019 at 16:19
-
$\begingroup$ @BySymmetry I'm not trying to propose a perpetual motion machine, but a short and momentary violation of 2nd law. I just want to know if there is explanation for these impulse like violations. $\endgroup$– Vibin Ram NarayanCommented Jul 12, 2019 at 16:29
-
$\begingroup$ Take careful note that expressed in terms of engines the second law constrains the behavior of machines "working in a cycle". You have not closed the cycle and have not analyzed the bevahior of a full system capable of creating a cycle so you are in no position to assert violations of the second law in its historical forms. Pointedly a compressed gas allowed to drive a piston and then vented is not a violation for this same reason. $\endgroup$– dmckee --- ex-moderator kittenCommented Jul 12, 2019 at 20:37
1 Answer
There are several approaches to this kind of question.
For the diagram you show, with only a few molecules with known positions and velocities, you’re working in the realm of Newtonian mechanics, not statistical mechanics or thermodynamics. In that realm, everything is determined and known, entropy is therefore always zero, and it’s not meaningful to talk about the 2nd law of thermodynamics: it’s true by definition.
With a slightly more disordered/complex system, you enter statistical mechanics. Here, you talk about probabilities of things happening, including the probability of changes in entropy. In that limit entropy can go down, it’s just unlikely. As the system gets bigger, it gets more unlikely.
As you eventually get to the large system limit, the probability of deviations is effectively zero, and the laws of thermodynamics are rigidly applicable.
But there’s a more basic point to make: Expansion of a piston turns heat into work, and there’s no violation of the 2nd law in that case. That’s just a standard expansion process.