An external combustion engine is a heat engine where an (internal) working fluid is heated by combustion of an external source, through the engine wall or a heat exchanger. The fluid then, by expanding and acting on the mechanism of the engine produces motion and usable work. The fluid is then cooled, compressed and reused in a closed cycle. Unlike the steam engine's use of water in both its liquid and gaseous phases as the working fluid, the Stirling engine encloses a fixed quantity of permanently gaseous fluid such as air or helium. As in all heat engines, the general cycle consists of compressing cool gas, heating the gas, expanding the hot gas, and finally cooling the gas before repeating the cycle.