A Stirling engine is a closed-cycle heat engine that operates by cyclic compression and expansion of air or other gas by a temperature difference across the engine. A Stirling engine is able to convert thermal energy into mechanical work.
You can buy an awesome toy Stirling engine from Amazon (perhaps next Christmas's gift for some inquisitive minds). If you put it on top of a cup of hot water, this amazing machine will just run until the hot water cools down to the room temperature.
How about comparing the Stirling engine with heat transfer? I found a metal box that has approximately the same size and same thickness with our Stirling engine. I refilled the hot water to the two mugs and covered one with the metal box and the other with the Stirling engine. Then I started the engine and tracked their temperatures through the IR camera. It turned out that the rates of heat loss from the two mugs were about the same in about 30 minutes of observation. What this really means is that the energy that drove the engine was actually very small compared with the thermal energy that is lost to the environment through heat transfer (Figure 2).
This is understandable because the speed of the flying wheel is only a small fraction of the average speed of molecules (which is about the speed of sound or higher). This investigation also suggests that the Stirling engine is very efficient. Had we insulated the mug, it would have run for hours.