The Carnot cycle is a theoretical ideal thermodynamic cycle proposed by French physicist Sadi Carnot in 1824 and expanded upon by others in the 1830s and 1840s. It provides an upper limit on the efficiency that any classical thermodynamic engine can achieve during the conversion of heat into work, or conversely, the efficiency of a refrigeration system in creating a temperature difference by the application of work to the system. It is not an actual thermodynamic cycle but is a theoretical construct.
Every single thermodynamic system exists in a particular state. When a system is taken through a series of different states and finally returned to its initial state, a thermodynamic cycle is said to have occurred. In the process of going through this cycle, the system may perform work on its surroundings, for example by moving a piston, thereby acting as a heat engine. A system undergoing a Carnot cycle is called a Carnot heat engine, although such a "perfect" engine is only a theoretical construct and cannot be built in practice.^{[1]} However, a microscopic Carnot heat engine has been designed and run.^{[2]}
Essentially, there are two "heat reservoirs" forming part of the heat engine at temperatures T_{h} and T_{c} (hot and cold respectively). They have such large thermal capacity that their temperatures are practically unaffected by a single cycle. Since the cycle is theoretically reversible, there is no generation of entropy during the cycle; entropy is conserved. During the cycle, an arbitrary amount of entropy ΔS is extracted from the hot reservoir, and deposited in the cold reservoir.^{[]} Since there is no volume change in either reservoir, they do no work, and during the cycle, an amount of energy T_{h}ΔS is extracted from the hot reservoir and a smaller amount of energy T_{c}ΔS is deposited in the cold reservoir. The difference in the two energies (T_{h}T_{c})ΔS is equal to the work done by the engine.
The Carnot cycle when acting as a heat engine consists of the following steps:
Isothermal Expansion. Heat is transferred reversibly from high temperature reservoir at constant temperature T_{H} (isothermal heat addition or absorption). During this step (1 to 2 on Figure 1, A to B in Figure 2) the gas is allowed to expand, doing work on the surroundings by pushing up the piston (stage 1 figure, right). Although the pressure drops from points 1 to 2 (figure 1) the temperature of the gas does not change during the process because it is in thermal contact with the hot reservoir at T_{h}, and thus the expansion is isothermal. Heat energy Q_{1} is absorbed from the high temperature reservoir resulting in an increase in the entropy of the gas by the amount .
Isentropic (reversible adiabatic) expansion of the gas (isentropic work output). For this step (2 to 3 on Figure 1, B to C in Figure 2) the gas in the engine is thermally insulated from both the hot and cold reservoirs. Thus they neither gain nor lose heat, an 'adiabatic' process. The gas continues to expand by reduction of pressure, doing work on the surroundings (raising the piston; stage 2 figure, right), and losing an amount of internal energy equal to the work done. The gas expansion without heat input causes it to cool to the "cold" temperature, T_{c}. The entropy remains unchanged.
Isothermal Compression. Heat transferred reversibly to low temperature reservoir at constant temperature T_{C}. (isothermal heat rejection) (3 to 4 on Figure 1, C to D on Figure 2) Now the gas in the engine is in thermal contact with the cold reservoir at temperature T_{c}. The surroundings do work on the gas, pushing the piston down (stage 3 figure, right), causing an amount of heat energy Q_{2} to leave the system to the low temperature reservoir and the entropy of the system to decrease by the amount . (This is the same amount of entropy absorbed in step 1, as can be seen from the Clausius inequality.)
Adiabatic reversible compression. (4 to 1 on Figure 1, D to A on Figure 2) Once again the gas in the engine is thermally insulated from the hot and cold reservoirs, and the engine is assumed to be frictionless, hence reversible. During this step, the surroundings do work on the gas, pushing the piston down further (stage 4 figure, right), increasing its internal energy, compressing it, and causing its temperature to rise back to T_{h} due solely to the work added to the system, but the entropy remains unchanged. At this point the gas is in the same state as at the start of step 1.
In this case,
or,
This is true as and are both lower and in fact are in the same ratio as .
When the Carnot cycle is plotted on a pressurevolume diagram (Figure 1), the isothermal stages follow the isotherm lines for the working fluid, the adiabatic stages move between isotherms, and the area bounded by the complete cycle path represents the total work that can be done during one cycle. From point 1 to 2 and point 3 to 4 the temperature is constant. Heat transfer from point 4 to 1 and point 2 to 3 are equal to zero.
The behaviour of a Carnot engine or refrigerator is best understood by using a temperatureentropy diagram (TS diagram), in which the thermodynamic state is specified by a point on a graph with entropy (S) as the horizontal axis and temperature (T) as the vertical axis (Figure 2). For a simple closed system (control mass analysis), any point on the graph will represent a particular state of the system. A thermodynamic process will consist of a curve connecting an initial state (A) and a final state (B). The area under the curve will be:

which is the amount of thermal energy transferred in the process. If the process moves to greater entropy, the area under the curve will be the amount of heat absorbed by the system in that process. If the process moves towards lesser entropy, it will be the amount of heat removed. For any cyclic process, there will be an upper portion of the cycle and a lower portion. For a clockwise cycle, the area under the upper portion will be the thermal energy absorbed during the cycle, while the area under the lower portion will be the thermal energy removed during the cycle. The area inside the cycle will then be the difference between the two, but since the internal energy of the system must have returned to its initial value, this difference must be the amount of work done by the system over the cycle. Referring to Figure 1, mathematically, for a reversible process we may write the amount of work done over a cyclic process as:

Since dU is an exact differential, its integral over any closed loop is zero and it follows that the area inside the loop on a TS diagram is equal to the total work performed if the loop is traversed in a clockwise direction, and is equal to the total work done on the system as the loop is traversed in a counterclockwise direction.
Evaluation of the above integral is particularly simple for the Carnot cycle. The amount of energy transferred as work is
The total amount of thermal energy transferred from the hot reservoir to the system will be
and the total amount of thermal energy transferred from the system to the cold reservoir will be
The efficiency is defined to be:

where
This definition of efficiency makes sense for a heat engine, since it is the fraction of the heat energy extracted from the hot reservoir and converted to mechanical work. A Rankine cycle is usually the practical approximation.
The Carnot heatengine cycle described is a totally reversible cycle. That is all the processes that compose it can be reversed, in which case it becomes the Carnot refrigeration cycle. This time, the cycle remains exactly the same except that the directions of any heat and work interactions are reversed. Heat is absorbed from the lowtemperature reservoir, heat is rejected to a hightemperature reservoir, and a work input is required to accomplish all this. The PV diagram of the reversed Carnot cycle is the same as for the Carnot cycle except that the directions of the processes are reversed.^{[3]}
It can be seen from the above diagram, that for any cycle operating between temperatures and , none can exceed the efficiency of a Carnot cycle.
Carnot's theorem is a formal statement of this fact: No engine operating between two heat reservoirs can be more efficient than a Carnot engine operating between those same reservoirs. Thus, Equation 3 gives the maximum efficiency possible for any engine using the corresponding temperatures. A corollary to Carnot's theorem states that: All reversible engines operating between the same heat reservoirs are equally efficient. Rearranging the right side of the equation gives what may be a more easily understood form of the equation, namely that the theoretical maximum efficiency of a heat engine equals the difference in temperature between the hot and cold reservoir divided by the absolute temperature of the hot reservoir. Looking at this formula an interesting fact becomes apparent: Lowering the temperature of the cold reservoir will have more effect on the ceiling efficiency of a heat engine than raising the temperature of the hot reservoir by the same amount. In the real world, this may be difficult to achieve since the cold reservoir is often an existing ambient temperature.
In other words, maximum efficiency is achieved if and only if no new entropy is created in the cycle, which would be the case if e.g. friction leads to dissipation of work into heat. In that case, the cycle is not reversible and the Clausius theorem becomes an inequality rather than an equality. Otherwise, since entropy is a state function, the required dumping of heat into the environment to dispose of excess entropy leads to a (minimal) reduction in efficiency. So Equation 3 gives the efficiency of any reversible heat engine.
In mesoscopic heat engines, work per cycle of operation in general fluctuates due to thermal noise. If the cycle is performed quasistatically, the fluctuations vanish even on the mesoscale.^{[4]} However, if the cycle is performed faster than the relaxation time of the working medium, the fluctuations of work are inevitable. Nevertheless, when work and heat fluctuations are counted, there is exact equality that relates the exponential average of work performed by any heat engine and the heat transfer from the hotter heat bath.^{[5]}
Carnot realized that in reality it is not possible to build a thermodynamically reversible engine, so real heat engines are even less efficient than indicated by Equation 3. In addition, real engines that operate along this cycle are rare. Nevertheless, Equation 3 is extremely useful for determining the maximum efficiency that could ever be expected for a given set of thermal reservoirs.
Although Carnot's cycle is an idealisation, the expression of Carnot efficiency is still useful. Consider the average temperatures,
at which heat is input and output, respectively. Replace T_{H} and T_{C} in Equation (3) by ⟨T_{H}⟩ and ⟨T_{C}⟩ respectively.
For the Carnot cycle, or its equivalent, the average value ⟨T_{H}⟩ will equal the highest temperature available, namely T_{H}, and ⟨T_{C}⟩ the lowest, namely T_{C}. For other less efficient cycles, ⟨T_{H}⟩ will be lower than T_{H}, and ⟨T_{C}⟩ will be higher than T_{C}. This can help illustrate, for example, why a reheater or a regenerator can improve the thermal efficiency of steam power plantsand why the thermal efficiency of combinedcycle power plants (which incorporate gas turbines operating at even higher temperatures) exceeds that of conventional steam plants. The first prototype of the diesel engine was based on the Carnot cycle.