Skip to content
ScienceQuest

Heat Engine and Carnot Cycle Simulator

SimulatorUndergraduate Updated

Support ScienceQuest on Buy Me a Coffee (opens in a new tab)

Run an ideal gas round a Carnot, Otto or Stirling heat engine cycle on a PV diagram, with the net work, heat flows and efficiency against the Carnot limit.

Simulator

Efficiency
Net work out divided by heat in.
50 %
Carnot limit
1 - Tc/Th. No cycle between these two temperatures can beat it.
50 %
Fraction of the limit
How close this cycle gets to the ceiling the second law sets.
100 %
Net work per cycle
The area enclosed by the loop, which is why the shading is the answer.
2740 J
Heat in
5481 J
Heat rejected
Never zero. Dumping heat to the cold side is what makes the cycle repeatable.
2740 J
Parameters
K

For Otto this is the peak after combustion, not a reservoir.

K

For Carnot this is the isothermal expansion; the adiabats add to it on their own.

mol

Scales every energy in proportion and changes no efficiency at all.

  • This cycle
  • Carnot limit
Efficiency against hot side temperature, with the Carnot ceiling for comparison. An Otto cycle is flat here once the hot side is above the temperature compression alone reaches, because its efficiency depends on compression ratio and not on temperature. Below that no fuel burns and it does no work.
Cite this tool

Citing this tool

Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.

On the syllabus: AP Physics 2, Unit 9: Thermodynamics; MCAT, 5E: Principles of chemical thermodynamics and kinetics.

Teaching with this? You can put it on a class page or LMS for free, with no ads inside the frame. Get the embed code.

The equation

ηCarnot=1−TCTH\eta_{\text{Carnot}} = 1 - \frac{T_C}{T_H}

Carnot, Réflexions sur la puissance motrice du feu (1824)

What is the Carnot heat engine efficiency formula?

The Carnot efficiency formula, ηCarnot = 1 − (TC / TH), gives the highest efficiency any heat engine can reach between two thermal reservoirs. TC is the cold reservoir temperature and TH the hot one, both in kelvins (K). At the simulator’s default 600 K and 300 K, the limit is 50%.

The enclosed area is the net work

Work done by an expanding gas is ∫P dV, the sum of P times each small change in volume, so along any leg of the cycle it is the area under that leg. Travelling to the right, the gas expands and does positive work. Coming back to the left, it is compressed and the work is negative. Subtracting one from the other leaves the area between the outward and return paths, which is the area enclosed by the loop.

The shaded region is the net work per cycle, and the direction of travel decides what the device does. Traversed clockwise, the loop produces net work and the device is an engine. Anticlockwise, it consumes work to move heat from cold to hot, and the same diagram describes a refrigerator. No single state variable tells you which you are looking at.

Why there is a ceiling at all

Nothing in η = 1 - Tc/Th refers to the gas or the machine, only to the two temperatures. If some engine beat it, its work output could drive a reversed Carnot cycle, and the pair would move heat from cold to hot with no net work put in, which the second law forbids.

To raise the limit you have to lower the ratio Tc/Th. The cold side is usually the surroundings, so in practice you raise the hot side as far as the materials allow, which is why power stations run their steam as hot as their boilers and turbines can survive.

Why every cycle rejects heat

The ledger beside the diagram splits the heat taken in into the part that became work and the part that was dumped. The dumped part shrinks as the cycle gets more efficient, but no arrangement of the cycle removes it.

A cycle has to return to its starting state to run again. Getting the pressure back down without undoing the work the expansion delivered means removing energy, and the cold side is the only place to put it.

Three cycles, and what each one is limited by

Carnot is two isotherms joined by two adiabats, and it sits exactly on the limit. Its drawback is practical: both adiabatic legs span the same temperature range, so both change the volume by the same factor, (Th/Tc)^(1/(γ-1)). At 800 K against 300 K with a diatomic gas that factor is already 11.6 before the isothermal legs are added, and an enormous swept volume for a modest output is a large part of why nobody builds one.

Otto is the gasoline engine: two adiabats joined by two constant-volume legs, with combustion supplying the heat at the top of the compression stroke. Its efficiency is 1 - r^(1-γ), which contains no temperature. Set the cycle to Otto and look at the efficiency plot: once the hot side is above the temperature compression alone reaches, the efficiency line is flat while the Carnot ceiling above it rises. A hotter peak gains no efficiency; a higher compression ratio does, until knock sets the limit. Mazda says its SKYACTIV-G, announced in 2010, was the first gasoline engine for mass-production cars to reach 14.0:1 without knocking.

Stirling is two isotherms joined by constant-volume legs. Provided a regenerator recovers the heat moved on those legs, it reaches the Carnot efficiency by a different route, which makes it the counterexample to the belief that only a Carnot cycle can. Real regenerators are imperfect, which is one reason an actual Stirling engine falls short.

Common mistakes

  • Thinking efficiency can be improved by using more gas. Every energy scales in proportion, so the ratio stays put, as the Amount of gas slider shows.
  • Believing only a Carnot cycle can hit the limit. An idealised Stirling cycle does too.
  • Reading rejected heat as a defect. A cycle that rejected nothing could not return to its starting state.
  • Expecting a hotter gasoline engine to be more efficient. Ideal Otto efficiency, 1 - r^(1-γ), has no temperature in it.
  • Confusing the enclosed area with the area under the curve. Under one leg is that leg’s work. Enclosed by the loop is the net work of the whole cycle.
  • Assuming any closed loop is a valid cycle. A loop can close, conserve energy and obey the gas law at every point and still not be the cycle you named. Carnot in particular requires the two isothermal volume ratios to be equal.

Sources

OpenStax, University Physics Volume 2, section 4.5, for the Carnot cycle, its efficiency of 1 − Tc/Th and why no engine between the same two temperatures can beat it. Greitzer, Spakovszky and Waitz, MIT 16.Unified notes, Thermodynamics and Propulsion, section 3.5, for the ideal Otto efficiency of 1 − 1/r^(γ−1), the adiabat relation T V^(γ−1) = constant, and the compression temperature that caps r. Mazda’s SKYACTIV announcement of 20 October 2010 for the 14.0:1 gasoline engine. Martini, Stirling Engine Design Manual, second edition, NASA CR-168088 (1983), sections 5.1.1 and 5.1.2, for the ideal Stirling cycle reaching the Carnot efficiency with a perfect regenerator and losing efficiency as the regenerator’s effectiveness falls.

Model and assumptions

The method, what it assumes and how accurate it is
Method
Exact expression, no time stepping
Repeatability
Deterministic. The same link gives the same numbers on any machine.

What it assumes

  • An ideal gas taken around a closed quasi-static cycle, so every point on the path is an equilibrium state.
  • Net work per cycle is the area the loop encloses, computed from the path rather than measured from an animation.
  • No friction and no heat leakage, so the only irreversibility is the one the chosen cycle implies.

Where it stops holding. Any real engine, where finite-time processes are not quasi-static and the efficiency falls below the cycle’s ideal value.

Numerical accuracy

No method error to report: the result is a closed-form expression evaluated directly, with no time stepping to accumulate error. What remains is double-precision rounding, of order one part in 10^16 per operation.

Common questions

Why is the area inside the loop the work done?

Work is the sum of pressure times each small change in volume, the integral of P dV, so along any leg it is the area under that leg. Going right the gas expands and does positive work; coming back left it is compressed and the work is negative. Subtracting one from the other leaves exactly the area between the outward and return paths, which is the area enclosed. That is why the shading is the answer rather than an illustration of it.

Why can no engine beat the Carnot efficiency?

Because a more efficient engine could be run alongside a reversed Carnot cycle to move heat from cold to hot with no net work, which the second law forbids. The limit is 1 minus Tc over Th and it depends only on the two temperatures, not on the gas or the machine. Every cycle here is checked against it.

Why does a real engine reject so much heat?

Because it has to return to its starting state to run again, and getting the pressure back down without undoing all the work means dumping heat. The ledger beside the diagram shows this: the rejected slice gets smaller as the cycle gets more efficient, but it never reaches zero. It is the price of a repeatable cycle rather than a manufacturing defect.

Why does raising the peak temperature not help a petrol engine?

Otto cycle efficiency is 1 minus r to the power of 1 minus gamma, which contains no temperature at all. Only the compression ratio and the gas matter. Set the cycle to Otto and sweep the hot side: the efficiency line stays flat while the Carnot ceiling above it climbs. Real engines are limited by knock: Mazda says its SKYACTIV-G, announced in 2010, was the first gasoline engine for mass-production cars to reach 14.0:1 without knocking.

Can any real cycle actually reach the Carnot efficiency?

An idealised Stirling cycle does, which surprises people who assume only a Carnot cycle can. It uses two isotherms joined by constant volume legs, and provided the heat moved on those legs is recovered by a regenerator, only the isothermal heat counts. Select Stirling and compare the efficiency with the limit. A real regenerator is imperfect, which is where the gap comes from.

Why does the Carnot volume ratio get so large?

Both adiabatic legs span the same temperature range, so both change volume by the same factor, and that factor is the temperature ratio raised to 1 over gamma minus 1. At 800 K against 300 K with a diatomic gas that alone is 11.6, before the isothermal legs are added. Needing an enormous swept volume for a modest power output is a large part of why nobody builds one.