I am currently confused as to how exactly a Carnot engine (ideal engine) produces work. I will explain my current understanding of how a Carnot engine works:
A piston containing gas is placed into contact with a hot reservoir. To prevent the temperature of the gas from increasing, the applied pressure on the piston is decreased and the gas is allowed to expand. (I have seen flywheel, and rocks being removed that were resting the piston as a way to explain this).
The reservoir is removed, and the pressure applied to the piston is decreased further, this causes the temperature of the gas to decrease.
The piston is brought into contact with a cold reservoir, to prevent the temperature inside the piston from decreasing, the applied pressure on the piston is increased.
The cold reservoir is removed, but the pressure applied to the piston is increased, this causes the temperature of the gas to increase.
The piston can then be brought into contact with the hot reservoir again...
My issue is that I do not see work being done by the gas on the piston, at any point in this cycle. It seems intuitive that this would take place during step 1, because the piston is in contact with a hot reservoir, but for the gas to start moving this piston the pressure and temperature would have to increase while the volume is fixed, but this isn't supposed to happen at this stage in the Carnot cycle, as this stage is completely isothermal.
I thought that the whole point of the Carnot cycle was that the pressure applied to the piston is manually controlled, specifically so that the temperature of the gas remains constant during step 1.
Please don't close this question, if there are similar questions elsewhere. I have looked and can't find one that directly answers my question.