An ideal gas is enclosed in a cylinder with a tight-shutting piston, which moves without friction. There is a bowl with fine grained sand on top of the piston. The cylinder is placed in a headed bath which keeps the gas a constant temperature, see attached file. One sand grain is then removed. The piston moves an infinitesimal step out, and the pressure in the cylinder drops infinitesimally. If we place another sand grain in the bowl, the pressure rises by an infinitesimal step and work is converted to heat. For an expansion of an ideal gas at constant temperature is [tex] \Delta U = 0 [/tex] which yields [tex] Q= -W[/tex] So if we remove a sand grain from the piston, we are actually converting heat (from the heated bath) to work (lifting the piston) which is a violation to the 2nd law of thermodynamics. Why is this possible? Is it because it's a reversible process? What if we remove all of the sand grains one by one, would the work then become non-infinitesimal?