Otto Cycle Simulator Back
Heat Engine Simulator

Otto Cycle Simulator — Thermal Efficiency of a Spark-Ignition Engine

Visualize the four processes of the air-standard Otto cycle. Change the compression ratio, specific heat ratio, intake temperature and heat input to learn why a higher compression ratio raises efficiency.

Parameters
Compression ratio r
Specific heat ratio γ
Intake temperature T₁
K
Heat input Q_in
kJ/kg

Air is the working fluid with R = 0.287 kJ/(kg·K). The constant-volume specific heat c_v is computed from γ as c_v = R/(γ−1).

Results
Thermal efficiency η
End-of-compression T₂
After-combustion T₃
Net work w_net
P-V Diagram (4 Processes)

X axis = specific volume v (relative to v₁=1) / Y axis = pressure P (relative to P₁=1) / yellow shaded area = net work

Thermal Efficiency vs. Compression Ratio η(r)

X axis = compression ratio r / Y axis = thermal efficiency η (yellow dot = current r, dashed = current η)

Theory & Key Formulas

The Otto cycle is the air-standard idealization of a spark-ignition engine, made up of four processes: isentropic compression (1→2), constant-volume heat addition (2→3), isentropic expansion (3→4) and constant-volume heat rejection (4→1).

Thermal efficiency η depends only on the compression ratio r and the specific heat ratio γ:

$$\eta = 1 - \frac{1}{r^{\gamma-1}}$$

End-of-compression temperature T₂ and after-combustion temperature T₃. Here c_v is the constant-volume specific heat (c_v = R/(γ−1)):

$$T_2 = T_1\,r^{\gamma-1}, \qquad T_3 = T_2 + \frac{Q_\text{in}}{c_v}$$

End-of-expansion temperature T₄ and net work w_net:

$$T_4 = \frac{T_3}{r^{\gamma-1}}, \qquad w_\text{net} = \eta\,Q_\text{in}$$

Efficiency does not depend on the heat input Q_in and rises with the compression ratio r. Real gasoline engines are limited to roughly r = 9 to 12 by knock.

What is the Otto Cycle Simulator?

🙋
Textbooks describe a gasoline engine as four strokes — intake, compression, power, exhaust. Is that the Otto cycle?
🎓
Pretty much. The Otto cycle is the idealization of that four-stroke behavior into a closed cycle with air as the working fluid. Isentropic compression for 1→2, ignition as constant-volume heat addition for 2→3, the power stroke as isentropic expansion for 3→4, and exhaust plus intake lumped into a constant-volume rejection 4→1. On the P-V diagram above you can see the four state points and the closed loop. The shaded yellow area is the net work.
🙋
When I raise the compression ratio the efficiency goes up, but the loop also stretches into a thinner shape.
🎓
That's the heart of it. Efficiency is $\eta = 1 - 1/r^{\gamma-1}$ — it depends only on r and γ. Compress more strongly and the fluid can expand to a colder state on the power stroke, so less heat is dumped to the exhaust. Going from r = 9 to r = 12 alone takes efficiency from about 58 percent to 63 percent. Engineers have spent decades fighting to push compression ratios up.
🙋
Then why are real engines stuck at around 10? Why not infinity?
🎓
For gasoline the limit comes from knock. If you compress the mixture too hard it auto-ignites before the spark fires. The resulting explosive combustion hammers the piston and can wreck the engine. So practical limits sit at 9–10 on regular fuel and 10–12 on premium. Diesels compress only air and inject fuel later, so they do not knock and run at 14–23. That is exactly why diesels are so efficient.
🙋
Hey — when I move the heat-input slider the efficiency card does not budge. Only the work changes.
🎓
Sharp eye. In the ideal Otto cycle, efficiency depends only on r and γ — it is independent of Q_in. Raising Q_in scales the net work w_net = η × Q_in proportionally, but leaves efficiency untouched. So pressing the throttle gives you more power, but the underlying fuel economy is set by the cycle geometry. Real engines complicate this with knock limits and finite combustion speed, but starting from the ideal cycle keeps the analysis honest.

Frequently Asked Questions

The difference is in how heat is added. The Otto cycle assumes constant-volume heat addition (combustion at a frozen piston position) and corresponds to spark-ignition engines. The Diesel cycle assumes constant-pressure heat addition (combustion while the piston expands at constant pressure) and corresponds to compression-ignition engines. At the same compression ratio the ideal Otto cycle is more efficient, but Diesel engines can run at much higher compression ratios because they do not knock, so real Diesel engines end up with higher overall efficiency.
Because heat is shared between molecular degrees of freedom — translation, rotation and vibration — in different proportions at different temperatures. Air at room temperature has γ ≈ 1.40, but at the high temperatures of post-combustion gas the vibrational modes become active, c_v rises and γ drops to about 1.30. Air-standard analyses use an average value (textbooks pick 1.4 or 1.35), and more precise fuel-air analyses model the temperature dependence. Try lowering γ in the simulator and watch efficiency drop.
The Atkinson and Miller cycles are variants in which the expansion ratio is made larger than the compression ratio, extracting more work from the heat. Late or early closure of the intake valve lowers the effective compression ratio while keeping a high mechanical expansion ratio. They are widely used in hybrid car engines: the trade-off is reduced peak power for higher efficiency. The simulator shows the standard Otto cycle (expansion ratio = compression ratio); think of Atkinson as an extension.
No — real indicator diagrams have rounded corners. Combustion is not instantaneous but spans tens of crank degrees, so spark advance, flame speed and exhaust valve timing all distort the shape. Even so, the ideal Otto cycle remains the first skeleton taught when learning engine analysis. The ratio of the measured loop area to the ideal one defines the indicated thermal efficiency of the real engine.

Real-world Applications

Automotive gasoline engines: The spark-ignition engines in essentially every passenger car are the largest application of the Otto cycle. Production compression ratios are around 9 to 13, and modern direct injection and premium fuel push that to 12 to 14. Sweeping the compression ratio in the simulator from 9 to 14 raises the ideal efficiency from 58 percent to 64 percent, but real engines lose substantial energy to friction, heat transfer, pumping losses and finite combustion speed, settling at an overall thermal efficiency of 30 to 40 percent.

Motorcycles and small utility engines: Scooters, lawn mowers, generators, chainsaws and other applications that demand light weight and low cost still rely on air-cooled single-cylinder Otto-cycle engines. The compression ratio is held low so that regular gasoline can be used. Their simple cycle geometry maps almost directly onto the idealized model in this simulator.

Atkinson-cycle hybrid engines: The Toyota Prius family and many other hybrids use Atkinson- or Miller-cycle engines that lower the effective compression ratio while keeping a high expansion ratio. This sacrifices peak power but lifts thermal efficiency above 40 percent, with electric motor assist filling in the missing acceleration. Understanding the standard Otto cycle is the prerequisite for studying these derivatives.

A starting point for engine education: Mechanical and automotive engineering courses on heat engines start from the ideal Otto cycle and then decompose the gap to real performance into combustion efficiency, mechanical efficiency, heat transfer losses and so on. Building intuition for the "compression ratio versus efficiency" and "Q_in versus work" trade-offs in the simulator transforms how one reads real engine data later on.

Common Misconceptions and Caveats

The most common misconception is that increasing the heat input increases efficiency too. The ideal Otto efficiency $\eta = 1 - 1/r^{\gamma-1}$ does not contain Q_in, so changing the heat input does not change efficiency. Try sweeping the Q_in slider in the simulator from 200 to 3000 kJ/kg and watch the efficiency card stay frozen while only the net-work card scales linearly. Raising efficiency and raising power output are two completely different operations — that distinction is the starting point of engine design.

The next pitfall is confusing the compression ratio r with the pressure ratio. The compression ratio is the volume ratio V₁/V₂, while the pressure ratio is P₂/P₁, and they are linked by P₂/P₁ = r^γ. At r = 9, the pressure ratio is already 9^1.4 ≈ 21.7. When a spec sheet quotes "10:1 compression ratio" that is the volume ratio, but the peak in-cylinder pressure (pressure ratio × intake pressure) is roughly 25 times atmospheric. Mixing the two leads to pressure estimates off by an order of magnitude.

Finally, remember that this simulator gives the upper bound of an idealized cycle; real engines fall well below it. The assumptions of an ideal gas, constant γ, instantaneous constant-volume heat addition and reversible isentropic processes never strictly hold. Indicated thermal efficiency in real engines is roughly 70 to 85 percent of the ideal value, and brake thermal efficiency after subtracting mechanical and parasitic losses is even lower — production cars typically deliver 30 to 40 percent. Treat the ideal cycle as a ceiling that real performance can approach but never reach.