Efficiency of Stirling engine and Carnot's theorem
Revamped Answer. 2017-07-01
There is no contradiction because your analysis only includes what happens to the gaseous working substance in the Stirling engine, and it neglects a crucial component of the engine called the regenerator. If the regenerator is not included as a component of the engine when we perform the efficiency analysis, then we don't have a device that qualifies as a heat engine operating between two temperatures, and we therefore shouldn't expect it to abide by Carnot's Theorem as I stated in the original version of this answer.
However, if we properly take account of the regenerator, then we find that the efficiency of the engine is the Carnot efficiency.
Of course the whole analysis here is an idealized one in which we assume, for example, that there are no energy losses due to friction in the engine's components.
Details.
A stirling engine is more complex than the $P$-$V$ diagram drawn in the question statement seems to indicate. If we conceptually reduce the engine to its simplest form, it contains two fundamental components:
- A gaseous working substance. This is the part of the engine whose thermodynamic state travels along the curve in the $P$-$V$ diagram.
- A regenerator. This part of the engine absorbs and stores the energy given up by the gaseous working substance by heat transfer during the process $2\to 3$ and then returns that same energy to the gaseous working substance during the process $4\to 1$.
The crucial point is that when the regenerator is included, there is no net heat transfer into or out of the engine during the processes $2\to 3$ and $4\to 1$. The energy that leaves the gaseous working substance during the process $2\to 3$ by heat transfer is stored in the regenerator, and that heat is then given back up to the working substance during process $4\to 1$. No heat is transferred between the engine and its surroundings during these legs of the cycle.
It follows that the only heat transferred to the engine as a whole is transferred during $1\to 2$. This qualifies the device as a heat engine (see old answer below) and the efficiency of the engine is then computed as the ratio of the net work output divided by the heat input in process $1\to 2$. This yields the Carnot efficiency as it should.
My original answer claimed that the cycle drawn does not represent the operation of a heat engine operating between two temperatures, but I was neglecting the regenerator, and I believe this is what you implicitly did in the computation you originally performed as well, and this yielded the incorrect efficiency.
Original, incomplete answer.
There is no contradiction. The Stirling cycle you drew above is reversible but does not operate between two reservoirs at fixed temperatures $T_1$ and $T_2$. The isovolumetric parts of the cycle operate at continuously changing temperatures (think ideal gas law).
Old Addendum. Note that in thermodynamics, a heat engine is said to operate (or work) between (two reservoirs at) temperatures $T_1$ and $T_2$ provided all of the heat it absorbs or gives up is done so at one of those two temperatures.
To give credence to this definition (which is essentially implicit in most discussions of heat engines I have seen), here is a quote from Fermi's thermodynamics text:
In the preceding section we described a reversible cyclic engine, the Carnot engine, which performs an amount of work $L$ during each of its cycles by absorbing a quantity of heat $Q_2$ from a source at temperature $t_2$ and surrendering a quantity of heat $Q_1$ to a source at the lower temperature $t_1$. We shall say that such an engine works between the temperatures $t_1$ and $t_2$.
The Stirling cycle as you describe it is not reversible. The transfer of heat from thermal reservoirs along paths 4->1 and 2->3 is not a reversible process, because heat is being transferred between two objects at different temperatures. To reverse the process, you would need to spontaneously transfer heat from a colder to hotter reservoir, which violates the 2nd law of thermodynamics.
Stirling engines are often described as reversible, but this requires a special kind of process. Notice that the heat transferred into the engine along 4->1 is the same as the heat transferred out of the engine along 2->3 and that 4->1 and 2->3 operate between the same two temperatures. Therefore, a Carnot efficient Stirling engine can be constructed if heat is transferred isothermally within the engine along these paths. This is accomplished with a "regenerator," a thermal mass that stores the energy liberated in 2->3 and returns it to the gas along path 4->1. You can see that the regenerator has to vary continuously in temperature between T2 and T1 and exchange heat isothermally with the gas as it passes through.
Note that all reversible engines must operate with the same efficiency. This follows from the definitions of efficiency and entropy. A reversible engine operates with 0 entropy change. $\Delta S = -\frac{Q_h}{T_h} + \frac{Q_c}{T_c}$, so $\Delta S = 0$ implies $ \frac{Q_h}{T_h} = \frac{Q_c}{T_c}$ or efficiency = $\frac{Q_h - Q_c}{Q_h} = \frac{T_h - T_c}{T_h}$
In an ideal Stirling cycle, the isochoric steps have heat exchanged across an infinitesimal temperature difference, which is maintained by the regenerator having a continuous gradient of temperature between the hot and cold reservoirs. The gas can then cool or heat in alignment with that gradient. This is the very ideal part of the design that enables zero change in entropy during the two isochoric stages. This heat is just shuffled back and forth internally and so the only actual exchange with the outside is in via the hot reservoir and out via the cold. Hence the ideal efficiency. I'm not sure it's correct to call what happens in the regenerator stages isothermal. The temperature is changing continuously but ideally always across an infinitesimal difference. Is there a commonly used term for that? None the less, the isochoric stages are very different to the isothermal stages.
I've noticed in my searches on the internet about the topic of Stirling engines that many sources confuse these ideas. I've often seen efficiency analyses that ignore the effect of the regenerator altogether. This is possibly to do with the fact that isochoric processes are not usually associated with zero change in entropy but in the case of the Stirling engine there is a very special type of this process involved, using a regenerator.
The ideal Stirling engine has the same efficiency as the Carnot cycle, but its advantage is that it enables the building of real engines that, although they may not be able to achieve perfect isothermal and totally smooth regenerator isochoric stages, they do come close and are much more feasible than the possibility of building a practical Carnot engine.
So, in reality, real manufactured Stirling engines do not achieve the full ideal Carnot efficiency, but many do much better than other types of heat engine.
In conclusion, in consideration of the ideal Stirling engine:
(1) The ideal maximum efficiency of the Carnot engine is achieved. (2) Your calculation does not contradict this because it is wrong. You include the heat exchanged in the isochoric stages as part of the cost, whereas the only cost is the external heat input during the isothermal power stroke. (3) This cycle is reversible as there is no change in entropy during the isochoric stages. (4) The diagram on its own is not enough to show this as we need to also know that the ideal regenerator is what enables the third point. That is, if you remove the regenerator the diagram is still the same.