Skip to content
cfd-lab:~/en/posts/2026-06-25-otto-diesel-a…online
NOTE #085DAY THU 유체역학DATE 2026.06.25READ 6 min readWORDS 1,049#Otto-Cycle#Diesel-Cycle#Thermodynamics#유동현상#Compression-Ratio

Why Gasoline Engines Stop at a Compression Ratio of 12 — Otto vs Diesel

Air-standard cycles on compression ratio, engine efficiency, and the knock wall

In 1919, a refinery researcher named Thomas Midgley was chasing the source of a metallic "ping" coming from car engines. The higher he pushed the compression ratio, the more power he got — but past a certain point, the fuel detonated on its own, before the spark plug ever fired. That metallic knock is what we still call engine knock. This post simplifies the messy reciprocating engine into four thermodynamic processes — the air-standard cycle — to trace how compression ratio sets efficiency, and why a gasoline engine can't just keep raising it. At the end we measure, in Python, which wins at the same compression ratio: Otto or Diesel.

Push the Compression Ratio Up, and Where Does It Stop?#

The compression ratio (the ratio of cylinder volume at its largest to its smallest) is the knob for engine efficiency. Squeeze the air harder, and you extract more work from the same fuel.

The catch is temperature. Adiabatic compression shrinks the volume and raises the temperature at the same time. Once the end-of-compression temperature climbs past the fuel's autoignition point, the whole mixture explodes before the flame reaches it. That is knock, and it wrecks pistons and bearings.

In 1921 Midgley added tetraethyl lead to delay ignition. The idea of an octane rating (an antiknock index) came out of this. But additives have limits too. Gasoline engines usually sit at a compression ratio of 9 to 12.

Four Processes for an Engine — the Air-Standard Otto Cycle#

A real engine tangles intake, combustion, and exhaust together. To make it tractable, we fix the working fluid as a set amount of ideal gas (air) and replace combustion with "heat coming in from outside." That simplification is the Otto cycle.

It closes in four processes.

  • 1→2: adiabatic compression (the piston squeezes the air)
  • 2→3: constant-volume heat addition (volume fixed, instant combustion)
  • 3→4: adiabatic expansion (air pushes the piston — the power stroke)
  • 4→1: constant-volume heat rejection (heat dumped through the exhaust)

In an adiabatic process, the compression ratio r=V1/V2r=V_1/V_2 and temperature are tied together:

T2T1=rk1\frac{T_2}{T_1} = r^{\,k-1}

Here TT is temperature and kk is the specific heat ratio (cp/cvc_p/c_v, about 1.4 for air). The larger the compression ratio, the more steeply the end-of-compression temperature T2T_2 rises. The seed of knock lives in this equation.

Try the simulation below. Change the compression ratio and the heat input, and watch how the closed loop in the P–V plane reshapes.

Thermal efficiency η = 58.5% (k = 1.4, shaded area = net work)

Raise the compression ratio and the loop stretches sideways, growing the shaded area (the net work of one cycle). Raise the heat input and the loop climbs upward — yet the efficiency number barely moves. The next section explains why.

Efficiency Is Set by the Compression Ratio Alone#

Thermal efficiency is work done over heat received. In constant-volume heating and rejection, heat is proportional to a temperature difference, so

η=1QoutQin=1T4T1T3T2\eta = 1 - \frac{Q_{out}}{Q_{in}} = 1 - \frac{T_4 - T_1}{T_3 - T_2}

where QinQ_{in} is the heat received and QoutQ_{out} the heat dumped. Substitute the adiabatic relations T2/T1=T3/T4=rk1T_2/T_1 = T_3/T_4 = r^{k-1}, and all the temperatures cancel, leaving a strikingly simple result:

ηOtto=11rk1\eta_{\text{Otto}} = 1 - \frac{1}{r^{\,k-1}}

Efficiency depends only on the compression ratio rr and the specific heat ratio kk. How much fuel you burned (QinQ_{in}) has vanished. That is why moving the heat slider barely changed the efficiency number.

A compression ratio of 8 gives about 56%, and 12 gives about 63%. Just looking at the numbers, you want to keep raising it. But knock blocks the road near 12.

Diesel Clears the Wall with Constant-Pressure Heating#

Rudolf Diesel took another route. He does not premix the fuel. He compresses only air. After raising the end-of-compression temperature above the autoignition point, he injects fuel that burns the instant it lands. No spark plug. With no premixed charge to knock, the compression ratio can climb to 15–22.

The difference is how heat goes in. Because the fuel injects and burns gradually, the pressure stays nearly constant while the volume grows. It is constant-pressure heating, not constant-volume.

A new dimensionless number enters here: the cut-off ratio rc=V3/V2r_c = V_3/V_2, how many times the volume expanded during constant-pressure heating. Efficiency changes to:

ηDiesel=11rk1rck1k(rc1)\eta_{\text{Diesel}} = 1 - \frac{1}{r^{\,k-1}}\,\frac{r_c^{\,k}-1}{k\,(r_c-1)}

It is the Otto expression multiplied by one extra fraction. That fraction is always greater than 1 when rc>1r_c>1. So at the same compression ratio, Diesel loses to Otto. But Diesel can run a far higher compression ratio, and in a real engine it ends up more efficient.

At the Same Compression Ratio, Otto Wins#

Draw the two cycles side by side along the compression-ratio axis and the relationship becomes clear.

Three things stand out. First, the curves flatten toward the right — each extra unit of compression ratio buys less efficiency (diminishing returns). Second, at the same rr, cyan (Otto) sits above amber (Diesel). Third, the red band is gasoline's practical limit. Otto must stop before that band, while Diesel passes through it and lives further to the right.

Slide the cut-off ratio toward 1.2 and the Diesel curve hugs the Otto curve. As rc1r_c \to 1, constant-pressure heating approaches constant-volume heating, and the two formulas coincide. The cut-off ratio measures how far Diesel has wandered from Otto.

Python — Measuring Both Cycles Directly#

Let's check in code that the closed-form really comes out of the state temperatures.

import numpy as np
 
K = 1.4  # specific heat ratio of air (cp/cv)
 
def otto_efficiency(r, k=K):
    """Otto cycle: constant-volume heating, compression ratio r"""
    return 1.0 - 1.0 / r ** (k - 1)
 
def diesel_efficiency(r, cutoff, k=K):
    """Diesel cycle: constant-pressure heating, ratio r, cut-off ratio"""
    return 1.0 - (1.0 / r ** (k - 1)) * (cutoff ** k - 1) / (k * (cutoff - 1))
 
for r in [8, 12, 18, 22]:
    eo = otto_efficiency(r)
    ed = diesel_efficiency(r, cutoff=2.0)
    print(f"r={r:2d}  Otto={eo*100:5.1f}%  Diesel(rc=2)={ed*100:5.1f}%")

Output:

r= 8  Otto= 56.5%  Diesel(rc=2)= 49.0%
r=12  Otto= 63.0%  Diesel(rc=2)= 56.7%
r=18  Otto= 68.5%  Diesel(rc=2)= 63.2%
r=22  Otto= 71.0%  Diesel(rc=2)= 66.0%

Now build efficiency directly from the state temperatures and compare with the closed form.

def otto_from_states(r, alpha, k=K):
    """efficiency built from state temperatures (alpha = P3/P2, the heat knob)"""
    T1 = 300.0                 # K, intake air
    T2 = T1 * r ** (k - 1)     # 1->2 adiabatic compression
    T3 = T2 * alpha            # 2->3 constant-volume heating
    T4 = T3 / r ** (k - 1)     # 3->4 adiabatic expansion
    q_in = T3 - T2             # cv cancels
    q_out = T4 - T1
    return 1.0 - q_out / q_in
 
print(otto_from_states(9, alpha=3.0))  # 0.5848...
print(otto_from_states(9, alpha=6.0))  # 0.5848...  same even with more heat
print(otto_efficiency(9))              # 0.5848...

All three lines print the same 0.5848. Doubling the heat knob alpha from 3 to 6 leaves efficiency untouched. That confirms in code why the heat slider in the P–V simulation never moved the efficiency.

What One Notch of Compression Ratio Is Worth#

Half of this post lives inside the single Otto formula η=1r(k1)\eta = 1 - r^{-(k-1)}. Efficiency is set by the compression ratio and the specific heat ratio alone; how much you burn sets the size of the output, not the efficiency.

Gasoline, with its premixed charge, hits a ceiling called knock and stops around a compression ratio of 12. Diesel compresses only air, removes that ceiling, and — though it loses at the same compression ratio — overturns the loss by running a much higher one. The efficiency gap between the two engines is, in the end, a tug-of-war between where you add the heat (constant volume vs constant pressure) and how high you can push the compression ratio.

Share if you found it helpful.