# Carnot engine

A Carnot engine (car-NO) is an idealized hypothetical heat engine (like a steam engine, for example) that is used to demonstrate an important truth about all heat engines. It is fictional, that is, it is a "thought experiment" or gedanken experiment. The Carnot engine was devised by French engineer/scientist Nicolas Léonard Sadi Carnot (1887-1934).
All discussion of heat engines, and of thermodynamics, proceed from a fundamental truth, that heat always flows from a warmer body to a colder one, never the other way. Heat never spontaneously flows "uphill" from a colder body to a warmer one. This principle is generally known as the second law of thermodynamics. (The first law is that heat is energy, and the law of conservation of energy applies to all forms of energy, including heat.) A Carnot engine does not prove the second law—a proof requires statistical mechanics—but simply uses the second law to deduce an upper limit on the efficiency of any heat engine.

## Reversibility

When one is not dealing with thermodynamics or statistical mechanics, the laws of physics are reversible. They will still be true if time goes backwards. Planets can orbit the Sun in the opposite directions, and charged particles can go backward through an electric field, retracing their paths in reverse. This is not true if heat flows spontaneously from a warmer body to a colder one, since it could never flow the other way. Just about any device that involves heat is irreversible.
The crucial aspect of a Carnot engine is that it has been carefully designed to be reversible. Heat flows into it at a high temperature (the "source") and flows out at a lower temperature (the "sink".) Some of the heat energy flowing in, instead of flowing out at the sink, is turned into mechanical (or electrical) energy. Since it is reversible, it can also drive heat from the low temperature to the high temperature, with extra mechanical or electrical energy pumped in. There is nothing wrong with this; it is how refrigerators work. The second law of thermodynamics doesn't prevent heat from being forced uphill. It just prevents heat from flowing uphill by itself. If one puts in mechanical energy, one can pump heat uphill. A Carnot engine shows how much external energy must be put in to force heat uphill, and how much external energy can come out when heat flows downhill.

## The Carnot cycle

The Carnot engine makes use of the Ideal gas law. Gases in the real world do not obey this law perfectly, but they come close enough to make Carnot's construction believable.
A Carnot engine consists of a cylinder of gas with a piston (or other equivalent arrangement) in which the piston is manipulated and heat is allowed to flow in or out. The action takes place in four phases, each of which is reversible:
* "Adiabatic compression". The gas is compressed until its temperature rises to the hotter temperature, called T$_{HOT}$.
* "Isothermal expansion". Heat flows in at T$_{HOT}$, making the gas expand.
* "Adiabatic expansion". The gas is allowed to expand until its temperature drops to the colder temperature, called T$_{COLD}$.
* "Isothermal compression". Heat flows out at T$_{COLD}$ while the gas contracts.
The cycle repeats, going through the same states of pressure, volume, and temperature.

## Adiabatic compression

If we compress a volume of gas (put it in a cylinder and push the piston inward) with the gas completely isolated, that is called adiabatic compression. This refers to the isolation, so that no heat can flow in or out. Since we are doing work on the gas, and no energy can escape, the temperature rises. One could imagine achieving this by insulating the cylinder from any outside contact, or by doing the compression instantaneously, so that there is no time for heat to enter or leave—it doesn't matter, since a Carnot engine is fictional.
Adiabatic compression will be the first phase in the four phases of our Carnot engine. During the third phase, adiabatic expansion, the temperature will go down.

### An experiment

Take a rubber band in your hands and suddenly (adiabatically!) stretch it, and then immediately touch it to your upper lip. (The upper lip is quite sensitive to temperature, especially if your hands are busy holding the rubber band.) It should feel warm. Now hold the rubber band in its stretched state for 30 seconds or so, until in comes into thermal equilibrium with the air. Suddenly release it and press it to your lip. It should feel cold. Stretching and releasing the rubber band is equivalent to compressing and releasing a container of gas.
This phenomenon is also the reason why a bicycle tire is hot just after being pumped up.

### Crunching the adiabatic equation

We have to figure out what the temperature rise is for a given amount of compression. This is tricky, since the pressure, volume, and temperature are not all under our control, being related by PV=NRT.
To get around this problem, imagine that we assert control over the volume and pressure, pumping heat in or out as needed to make the temperature do whatever it has to do. When we are done, we will set the heat flow to zero and see what happened.
We are going to move an infinitesimal amount from (V, P) to (V+dV, P+dP). This will be in two steps: from (V, P) to (V, P+dP) and then from (V, P+dP) to (V+dV, P+dP). That is, we will change only P at first, and then only V. Since we know the heat capacities at constant volume (C$_v$) and at constant pressure (C$_p$), we can do this.
For the first step, the volume is constant, and the pressure rises by dP. The temperature must rise by dT$_1$. We have:
       $PV=NRT\qquad \mathrm {and} \qquad (P+dP)V=NR(T+dT_{1})$
so
       $dT_{1}={\frac {V}{NR}}\ dP$
The heat energy that we must have put in is NC$_v$ dT$_1$, or
       $dQ_{1}={\frac {VC_{v}}{R}}\ dP$
For the second step, we hold the pressure constant, and push on the piston. The volume goes down, so dV is negative. We do −P dV of mechanical work. The temperature must rise by dT$_2$. We have:
       $PV=NRT\qquad \mathrm {and} \qquadP(V+dV)=NR(T+dT_{2})$
so
       $dT_{2}={\frac {P}{NR}}\ dV$
The heat energy that we must have put in is NC$_p$ dT$_2$, or
       $dQ_{2}={\frac {PC_{p}}{R}}\ dV$
The heat we put in in both steps is
       $dQ_{1}+dQ_{2}=V{\frac {C_{v}}{R}}\ dP+P{\frac {C_{p}}{R}}\ dV$
This must be zero, so
       $dP=-\ {\frac {P\ C_{p}}{V\ C_{v}}}\ dV$
This tells us the actual slope that the PV curve must have followed.
We can solve this integral:
       ${\frac {dP}{P}}=-\ {\frac {C_{p}}{C_{v}}}\ {\frac {dV}{V}}$
       $\log P=-{\frac {C_{p}}{C_{v}}}\ \log V+\alpha$
where α is a constant of integration.
       $P={\frac {\beta }{V^{C_{p}/C_{v}}}}$
where β is another constant. This gives the relationship between P and V along the adiabatic compression curve.
If the starting temperature T$_{COLD}$ and volume V$_{COLD}$ have been specified, we have:
       ${\frac {\beta }{V_{COLD}^{C_{p}/C_{v}}}}=P_{COLD}=NR{\frac {T_{COLD}}{V_{COLD}}}$
from which we get:
       $\beta =NR\ T_{COLD}\ V_{COLD}^{(C_{p}-C_{v})/C_{v}}$
But, from the behavior of an ideal gas, we have
       $C_{p}-C_{v}=R$
so
       $\beta =N\ R\ T_{COLD}\ V_{COLD}^{R/C_{v}}$
so, for all P, V along the compression curve:
       $P=N\ R\ T_{COLD}{\frac {V_{COLD}^{R/C_{v}}}{V^{C_{p}/C_{v}}}}=N\ R\ T_{COLD}{\frac {V_{COLD}^{R/C_{v}}}{V^{1+R/C_{v}}}}$ (equation 1)
This is shown as the red line in the graph on the right.
So at the end of the compression, we have:
       $P_{HOT}=N\ R\ T_{COLD}{\frac {V_{COLD}^{R/C_{v}}}{V_{HOT}^{1+R/C_{v}}}}$
but
       $P_{HOT}\ V_{HOT}=NR\ T_{HOT}\,$
so
       ${\frac {T_{HOT}}{T_{COLD}}}=\left({\frac {V_{COLD}}{V_{HOT}}}\right)^{R/C_{v}}$
or
       ${\frac {V_{COLD}}{V_{HOT}}}=\left({\frac {T_{HOT}}{T_{COLD}}}\right)^{C_{v}/R}$ (equation 2)
By integrating, we can determine the total mechanical work that was required to perform the compression.
       $E_{\mathrm {in} }=-\int _{V_{COLD}}^{V_{HOT}}PdV=-NR\ T_{COLD}\ V_{COLD}^{R/C_{v}}\int _{V_{COLD}}^{V_{HOT}}V^{-1-R/C_{v}}\ dV$
by equation 1.
       $\qquad \qquad =-NR\ T_{COLD}\ V_{COLD}^{R/C_{v}}\left(-C_{v}/R\right)\ V^{-R/C_{v}}\left|_{V_{COLD}}^{V_{HOT}}\right.$
       $\qquad \qquad =NC_{v}\ T_{COLD}\left(\left({\frac {V_{COLD}}{V_{HOT}}}\right)^{R/C_{v}}-1\right)$
       $\qquad \qquad =NC_{v}\ T_{COLD}\left({\frac {T_{HOT}}{T_{COLD}}}-1\right)$ by equation 2.
       $E_{\mathrm {in} }=NC_{v}\ (T_{HOT}-T_{COLD})\,$ (equation 3)
The energy expended per mole does not depend on the volumes or the pressures, only on the high and low temperatures, and the heat capacity C$_v$. This will be useful later, in the adiabatic expansion phase.

## Isothermal expansion

The next phase of the Carnot cycle is isothermal expansion. The gas cylinder, which is now at a temperature T$_{HOT}$, is placed in contact with a heat source, such as a fire or nuclear reactor, at that temperature. Heat is allowed to flow into the gas. The temperature stays the same, at T$_{HOT}$, and the gas expends, doing mechanical work.
Now we know that heat will not flow from one body to another unless there is a temperature difference. And if there is a nonzero temperature difference, the process will not be reversible. So a Carnot engine can't be realized exactly. But we can build something that comes arbitrarily close to ideal if we make the temperature difference infinitesimally small and are willing to wait arbitrarily long for the heat to flow from the source into the gas cylinder. One could think of the Carnot engine as requiring that the isothermal phases be infinitely slow and the adiabatic phases infinitely fast.
In any case, heat flows from the source into the gas cylinder at temperature T$_{HOT}$ during this phase. Since the temperature doesn't change, there is no hidden energy going into a temperature rise, so the heat capacity C$_v$ does not enter into the calculations. In fact, the calculations are relatively simple.
The complete Carnot cycle is shown at the right. The transition from W to X was analyzed previously. The mechanical energy that went in was, by equation 3:
       $E_{WX(\mathrm {in} )}=NC_{v}(T_{HOT}-T_{COLD})\,$
The transition from X to Y is isothermal expansion. We have:
       $P={\frac {NR\ T_{HOT}}{V}}$
along this path. The mechanical energy that comes out is
       $E_{XY(\mathrm {out} )}=\int _{V_{Q}}^{V_{R}}P\ dV=NR\ T_{HOT}\ \int _{V_{Q}}^{V_{R}}\ {\frac {dV}{V}}$
       $\qquad \qquad =NR\ T_{HOT}\ \left(\log V_{R}-\log V_{Q}\right)$
       $\qquad \qquad =NR\ T_{HOT}\ \log {\frac {V_{R}}{V_{Q}}}$
Since the temperature didn't change, this has to be the same as the thermal energy flowing in.
       $Q_{HOT(\mathrm {in} )}=E_{XY(\mathrm {out} )}=NR\ T_{HOT}\ \log \left({\frac {V_{R}}{V_{Q}}}\right)$ (equation 4)

## Adiabatic expansion

The transition from Y to Z is adiabatic expansion. The analysis from before works here. Taking equation 2 and re-labeling things for the first phase:
       ${\frac {V_{P}}{V_{Q}}}=\left({\frac {T_{HOT}}{T_{COLD}}}\right)^{C_{v}/R}$
The same analysis gives:
       ${\frac {V_{S}}{V_{R}}}=\left({\frac {T_{HOT}}{T_{COLD}}}\right)^{C_{v}/R}={\frac {V_{P}}{V_{Q}}}$ (equation 5)
The mechanical energy that comes out is the same as what went in during adiabatic compression:
       $NC_{v}(T_{HOT}-T_{COLD})\,$
So the two adiabatic phases cancel each other in terms of mechanical energy.

## Isothermal compression

This phase goes from Z to W. By analogy with the isothermal expansion phase and equation 4, the mechanical energy that is put in is:
       $NR\ T_{COLD}\ \log \left({\frac {V_{S}}{V_{P}}}\right)$
and this is the same as the heat energy coming out at T$_{COLD}$.
But, by equation 5,
       ${\frac {V_{S}}{V_{R}}}={\frac {V_{P}}{V_{Q}}}$
so
       ${\frac {V_{S}}{V_{P}}}={\frac {V_{R}}{V_{Q}}}$
so
       $Q_{COLD(\mathrm {out} )}=E_{ZW(\mathrm {in} )}=NR\ T_{COLD}\ \log \left({\frac {V_{R}}{V_{Q}}}\right)$
Putting it all together:
       $Q_{HOT(\mathrm {in} )}=\left({\frac {T_{HOT}}{T_{COLD}}}\right)Q_{COLD(\mathrm {out} )}$
and the total mechanical energy coming out is:
       $E_{\mathrm {tot} }=E_{XY(\mathrm {out} )}-E_{ZW(\mathrm {in} )}=Q_{HOT(\mathrm {in} )}-Q_{COLD(\mathrm {out} )}\,$
The total efficiency is:
       ${\frac {E_{\mathrm {tot} }}{Q_{HOT(\mathrm {in} )}}}={\frac {Q_{HOT(\mathrm {in} )}-Q_{COLD(\mathrm {out} )}}{Q_{HOT(\mathrm {in} )}}}={\frac {T_{HOT}-T_{COLD}}{T_{HOT}}}$ (equation 6)
That is the fundamental result.
A Carnot engine taking in heat at 400° K and emitting waste heat at 300° K is only 25% efficient. 3/4$^{ths}$ of the incoming thermal energy is wasted. This 25% figure is the thermodynamic efficiency or Carnot efficiency. As will be shown next, this is the theoretical maximum efficiency for any engine.

## Carnot's theorem

The reason for the interest in such a seemingly obscure construction as a Carnot engine is Carnot's theorem, which states that no heat engine can be more efficient than the efficiency given in equation 6. Here is the proof. It actually proves that all reversible heat engines have the same efficiency—that of equation 6, and no heat engine can be more efficient than any reversible heat engine.
Suppose we had a heat engine that, for example, took in 100 watts (joules per second) of heat at a source temperature of 600 K, and put out 60 watts of mechanical energy and 40 watts of heat at a sink temperature of 300 K. From the source and sink temperatures, this engine should have an efficiency of 50%, but we have postulated an efficiency of 60%. Now a reversible Carnot engine (or any reversible engine at all) can do the same thing in reverse, with the correct 50% efficiency. We can use the mechanical energy of the postulated engine to drive heat uphill. It can take 60 watts of heat at the low temperature, add 60 watts of mechanical energy that it gets from the postulated engine, and put out 120 watts of heat at the high temperature. If the two engines are combined, the net effect will be a composite device that takes in 20 watts of heat (60-40) at the low temperature and puts out 20 watts (120-100) at the high temperature. This configuration of heat engines will spontaneously take heat from a body at low temperature and move it to a body at high temperature. We know that is impossible.
Carnot's discovery of this principle made it clear that, to get the most efficiency out of a practical engine such as a steam engine, the steam must be heated to the highest possible temperature, and the exhaust steam must be at the lowest possible temperature. This is why nuclear power plants have enormous cooling towers.