The Carnot Cycle is an important concept in physics. No heat engine is 100 percent efficient. The amount of work you get out of a heat engine is always less than the heat that goes into the engine. The second law of thermodynamics says that the most efficient possible heat engine can’t convert all the input heat into work. Real heat engines always have some losses due to friction or interaction with their environment.
A theoretical heat engine that has no such losses is known as a Carnot engine — and even a perfect Carnot engine can’t convert all the input heat into work. A Carnot engine consists of a gas, a hot reservoir, and a cold reservoir. The gas repeatedly heats and cools and expands and contracts in a cycle known as the Carnot cycle.
The Carnot cycle has four steps:
The gas expands isothermally (at constant temperature).
The gas absorbs heat from the hot reservoir. As the gas expands, it does work on its surroundings equal to the heat it absorbs. The temperature of the gas is equal to the temperature of the hot reservoir in this stage.
The gas cools adiabatically (with no heat flow).
The gas continues to expand, doing work on its surroundings, cooling as it transfers internal energy to those surroundings. Adiabatic cooling and heating can be very nearly achieved if the walls of the container holding the gas are well insulated.
Once it reaches the temperature of the cold reservoir, the gas begins to expand isothermally.
The surroundings do work on the gas, and heat is transferred into the gas.
The gas compresses and warms up adiabatically.
The surroundings continue to do work on the gas, but no heat is transferred into the gas during this stage. The stage ends when the temperature of the gas reaches the temperature of the hot reservoir again.
You can see how the pressure and volume change during the Carnot cycle. The work done in one cycle is the shaded area of the graph.
The gas is back at the temperature, pressure, and volume it started at, ready for the cycle to start all over again. If you want a heat pump rather than a heat engine, no problem — the ideal Carnot cycle is completely reversible, so you just need to run your heat engine in reverse.