Heat pump and refrigeration cycle
The classical Carnot heat engine
Thermodynamic heat pump cycles or refrigeration cycles are the conceptual and mathematical models for heat pumps and refrigerators. A heat pump is a machine or device that moves heat from one location (the 'source') at a lower temperature to another location (the 'sink' or 'heat sink') at a higher temperature using mechanical work or a high-temperature heat source. Thus a heat pump may be thought of as a "heater" if the objective is to warm the heat sink (as when warming the inside of a home on a cold day), or a "refrigerator" if the objective is to cool the heat source (as in the normal operation of a freezer). In either case, the operating principles are identical. Heat is moved from a cold place to a warm place.
According to the second law of thermodynamics heat cannot spontaneously flow from a colder location to a hotter area; work is required to achieve this. An air conditioner requires work to cool a living space, moving heat from the cooler interior (the heat source) to the warmer outdoors (the heat sink). Similarly, a refrigerator moves heat from inside the cold icebox (the heat source) to the warmer room-temperature air of the kitchen (the heat sink). The operating principle of the refrigeration cycle was described mathematically by Sadi Carnot in 1824 as a heat engine. A heat pump can be thought of as heat engine which is operating in reverse.
Heat pump and refrigeration cycles can be classified as vapor compression, vapor absorption, gas cycle, or Stirling cycle types.
The vapor-compression cycle is used in most household refrigerators as well as in many large commercial and industrial refrigeration systems. Figure 1 provides a schematic diagram of the components of a typical vapor-compression refrigeration system.
The thermodynamics of the cycle can be analysed on a diagram as shown in Figure 2. In this cycle, a circulating refrigerant such as Freon enters the compressor as a vapor. The vapor is compressed at constant entropy and exits the compressor superheated. The superheated vapor travels through the condenser which first cools and removes the superheat and then condenses the vapor into a liquid by removing additional heat at constant pressure and temperature. The liquid refrigerant goes through the expansion valve (also called a throttle valve) where its pressure abruptly decreases, causing flash evaporation and auto-refrigeration of, typically, less than half of the liquid.
That results in a mixture of liquid and vapor at a lower temperature and pressure. The cold liquid-vapor mixture then travels through the evaporator coil or tubes and is completely vaporized by cooling the warm air (from the space being refrigerated) being blown by a fan across the evaporator coil or tubes. The resulting refrigerant vapor returns to the compressor inlet to complete the thermodynamic cycle.
The above discussion is based on the ideal vapor-compression refrigeration cycle, and does not take into account real-world effects like frictional pressure drop in the system, slight thermodynamic irreversibility during the compression of the refrigerant vapor, or non-ideal gas behavior (if any).
Vapor absorption cycle
In the early years of the twentieth century, the vapor absorption cycle using water-ammonia systems was popular and widely used but, after the development of the vapor compression cycle, it lost much of its importance because of its low coefficient of performance (about one fifth of that of the vapor compression cycle). Nowadays, the vapor absorption cycle is used only where heat is more readily available than electricity, such as waste heat provided by solar collectors, or off-the-grid refrigeration in recreational vehicles.
The absorption cycle is similar to the compression cycle, except for the method of raising the pressure of the refrigerant vapor. In the absorption system, the compressor is replaced by an absorber which dissolves the refrigerant in a suitable liquid, a liquid pump which raises the pressure and a generator which, on heat addition, drives off the refrigerant vapor from the high-pressure liquid. Some work is required by the liquid pump but, for a given quantity of refrigerant, it is much smaller than needed by the compressor in the vapor compression cycle. In an absorption refrigerator, a suitable combination of refrigerant and absorbent is used. The most common combinations are ammonia (refrigerant) and water (absorbent), and water (refrigerant) and lithium bromide (absorbent).
When the working fluid is a gas that is compressed and expanded but does not change phase, the refrigeration cycle is called a gas cycle. Air is most often this working fluid. As there is no condensation and evaporation intended in a gas cycle, components corresponding to the condenser and evaporator in a vapor compression cycle are the hot and cold gas-to-gas heat exchangers in gas cycles.
The gas cycle is less efficient than the vapor compression cycle because the gas cycle works on the reverse Brayton cycle instead of the reverse Rankine cycle. As such the working fluid does not receive and reject heat at constant temperature. In the gas cycle, the refrigeration effect is equal to the product of the specific heat of the gas and the rise in temperature of the gas in the low temperature side. Therefore, for the same cooling load, a gas refrigeration cycle will require a large mass flow rate and would be bulky.
Because of their lower efficiency and larger bulk, air cycle coolers are not often applied in terrestrial refrigeration. The air cycle machine is very common, however, on gas turbine-powered jet airliners since compressed air is readily available from the engines' compressor sections. These jet aircraft's cooling and ventilation units also serve the purpose of pressurizing the aircraft cabin.
The Stirling cycle heat engine can be driven in reverse, using a mechanical energy input to drive heat transfer in a reversed direction (i.e. a heat pump, or refrigerator). There are several design configurations for such devices that can be built. Several such setups require rotary or sliding seals, which can introduce difficult tradeoffs between frictional losses and refrigerant leakage.
Comparison with Combined Heat and Power (CHP)
A heat pump may be compared with a CHP unit, in that for a condensing steam plant, as it switches to produced heat, then electrical power is lost or becomes unavailable, just as the power used in a heat pump becomes unavailable. Typically for every unit of power lost, then about 6 units of heat are made available at about 90oC. Thus CHP has an effective COP compared to a heat pump of 6. It is noteworthy that the unit for the CHP is lost at the high voltage network and therefore incurs no losses, whereas the heat pump unit is lost at the low voltage part of the network and incurs on average a 6% loss. Because the losses are proportional to the square of the current, during peak periods losses are much higher than this and it is likely that widespread ie city wide application of heat pumps would cause overloading of the distribution and transmission grids unless they are substantially reinforced.
The Reversed Carnot Cycle
Since the Carnot cycle is a reversible cycle, the four processes that comprise it, two isothermal and two isentropic process, can all be reversed as well. When this happens, it is called a reversed Carnot cycle. A refrigerator or heat pump that acts on the reversed Carnot cycle is called a Carnot refrigerator and Carnot heat pump respectively. In the first stage of this cycle (process 1-2), the refrigerant absorbs heat isothermally from a low-temperature source, TL, in the amount QL. Next, the refrigerant is isentropically compressed (process 2-3) and the temperature rises to the high-temperature source, TH. Then at this high temperature, the refrigerant rejects heat isothermally in the amount QH (process 3-4). Also during this stage, the refrigerant changes from a saturated vapor to a saturated liquid in the condenser. Lastly, the refrigerant expands isentropically where the temperature drops back to the low-temperature source, TL (process 4-1). 
Coefficient of Performance
The efficiency of a refrigerator or heat pump is given by a parameter called the coefficient of performance (COP).
The COP of a refrigerator is given by the following equation:
- COP = Desired Output/Required Input = Cooling Effect/Work Input = QL/Wnet,in
The COP of a heat pump is given by the following equation:
- COP = Desired Output/Required Input = Heating Effect/Work Input = QH/Wnet,in
Both the COP of a refrigerator and a heat pump can be >1. When combining these two equations you will see that:
- COPHP = COPR + 1 for fixed values of QH and QL
This implies that COPHP will be >1 because COPR will be a positive quantity. In a worse case scenario, the heat pump will supply as much energy as it consumes, making it act as a resistance heater. However, in reality, as in heating your house, some of QH is lost to the outside air through piping, insulation, etc., thus making the COPHP drop below unity when the outside air temperature is too low. Therefore, the system we use to heat our houses uses fuel. 
For an ideal refrigeration cycle:
- COP = TL/(TH-TL)
For an ideal heat pump cycle:
- COP = TH/(TL-TH)
For Carnot refrigerators and heat pumps, COP is expressed in terms of temperatures :
- COPR,Carnot = 1/((TH/(TL) - 1)
- COPHP,Carnot = 1/(1 - (TL/TH))
- The Systems and Equipment volume of the ASHRAE Handbook, ASHRAE, Inc., Atlanta, GA, 2004
- Cengel, Yunus A. and Michael A. Boles (2008). Thermodynamics: An Engineering Approach (6th ed.). McGraw-Hill. ISBN 0-07-330537-5.
- Fundamentals of Engineering Thermodynamics, by Howell and Buckius, McGraw-Hill, New York.
- The Ideal Vapor-Compression Cycle
- Scroll down to "The Basic Vapor Compression Cycle and Components"
- Lowe, Robert E. (2011), "Combined heat and power considered as a virtual steam cycle heat pump", Energy Policy 39: 5528–5534
- Thermodynamics: An Engineering Approach by Yunus A. Cengal and Michael A. Boles
- Thermodynamics: An Engineering Approach by Yunus A. Cengal and Michael A. Boles
- Turns, Stephen (2006). Thermodynamics: Concepts and Applications. Cambridge University Press. p. 756. ISBN 0-521-85042-8.
- Dincer, Ibrahim (2003). Refrigeration Systems and Applications. John Wiley and Sons. p. 598. ISBN 0-471-62351-2.
- Whitman, Bill (2008). Refrigeration and Air conditioning Technology. Delmar.