The Carnot cycle consists of two isothermal processes and two adiabatic processes. The second law of thermodynamics states that not all supplied heat in a heat engine can be used to do work. In other words, you cannot turn 1 kJ of heat into 1 kJ of electricity. The Carnot efficiency limits the fraction of heat that can be used.
The Carnot efficiency can be expressed as:
μC = (Ti - To) / Ti
Where μC is the efficiency of the Carnot cycle, Ti is the temperature at the engine inlet in Kelvin, To is the temperature at the engine outlet/exhaust in Kelvin
The Carnot efficiency gives the maximum useful energy that can be obtained from steam engines, internal combustion engines and refrigeration. The less friction heat given off the closer a machine can get to the Carnot efficiency.
Notice that the efficiency of a machine is influenced by To, the temperature of the thermal fluid as it exits the engine. The colder this is, the greater the engine efficiency. This is why better efficiencies can be achieved if river water or underground water is used as a coolant instead of air. Where outside air is used as a coolant it is important that it is as cool as possible. If any of the exhaust air is recirculated back to the cooling air inlet (short circuiting) then this will reduce the engine efficiency.