I was thinking about a completely unrelated problem (Quantum Field Theory Peskin & Schroeder kind of unrelated!) when the diagram below sprang into my mind for no apparent reason. After some thinking, I can't figure out why it wouldn't work, other than the theoretical reason that it systematically decreases entropy in a closed system:
We have a thick, insulating barrier between two "ventricles" of a closed-off system. The only opening in this barrier is made by a solid shaft snugly (without permitting the transfer of heat between the two compartments) but frictionlessly. On the left ventricle we have a paddle attached, and on the right we have a coiled wire, as illustrated in the diagram. There are fixed magnets surrounding the coil of wire, providing a constant magnetic field through it.
Let's say the whole contraption is so small that a single air molecule hitting the paddle will contribute a small but not immaterial amount of angular momentum to the shaft (again, I never said this machine was practical!). Therefore, random chance will make air molecules hit the paddle so that it will start turning in Brownian-motion style. This rotation is damped by the energy dissipated when the coil turns the current induced by the magnets moving relative to the turning reference frame of the coil into heat through a resistor in the coil. Thus, the air molecules contribute a small portion of their kinetic energy to the paddle, which is then expended as heat on the other side of the border, making the air molecules on the left colder, while air molecules on the right heat up.
Doesn't this mean a decrease in entropy? (To see that it can't be an increase in entropy, take away the barrier, and note that the molecules go back to thermal equilibrium naturally, meaning that entropy increases naturally when undoing our actions).
To further show this mythical contraption to be an impossibility, we could create a barrier with two pieces of equipment forming a passage between the two ventricles. One port-hole of energy would be the paddle already envisioned, the other would be a Carnot engine taking energy from the hot right to the cold left. The paddle would take energy from the left to the right effortlessly for a period of time, and then the Carnot engine would move the heat back the other way, gaining energy that came from nowhere in the process!!
Where has my logic gone wrong? Clearly entropy must not decrease, and energy cannot be created by the fundamental axioms of physics. Why does this paddle fail to transfer energy from one ventricle to the other? An explanation of what has gone wrong with my reasoning would be greatly appreciated!