Consider an adiabatic box with an adiabatic board in the middle, which separates the box into two parts. There is a small hole in the board next to a coil, and the hole has a door which opens when the current in the coil reaches a certain value.
Now, if I put some gas in the right half of the box, where each molecule has a magnetic dipole moment, only fast molecules will produce enough current in the coil by induction to open the door.
After some time, the faster molecules will come to the left side and the slower molecules will be left on the right side, so the entropy in this isolated system decreases spontaneously. Does this violate the second law of thermodynamics? What's the problem with this setup?
