|Robert Stirling thermodynamics|
With a heat source on one end and a heat sink on the other, gas in chambers, and two pistons can move a wheel. With a wheel mechanically powered, two pistons can compress and expand a gas to move heat from one end to another.
Heat engine, heat pump
Mechanical energy from waste heat. Heat pump for heating or cooling.
In the real world
An ideal Stirling engine cannot be built. Gases transfer heat too slowly and losses occur. * Imperfect instruments require compromises. It takes a while to figure things out.