A heat engine takes in heat from a high temperature source, converts some of it to work, and expels the rest to a low temperature sink. It works by carrying a working substance through a cyclic process. The work done by the engine equals the net heat absorbed and is represented by the area enclosed in the PV diagram. The thermal efficiency of a heat engine is the ratio of work output to heat input from the high temperature source. The Carnot cycle between two temperature reservoirs represents the most efficient heat engine possible.