Skip to content
cfd-lab:~/en/posts/2026-06-25-otto-diesel-a…● online

Translated from the author's Korean original. Read the original (한국어)

NOTE #083DAY THU 유체역학DATE 2026.06.25UPDATED 2026.10.19READ 7 min read#Otto-Cycle#Diesel-Cycle#Thermodynamics#Flow-Phenomena#Compression-Ratio

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

Doubling alpha from 3 to 6 leaves the r=9 efficiency stuck at 0.5848. The knob that moves it is r.

In 1919 Thomas Midgley, at a refinery, was chasing a metallic ping in car engines. Raise the compression ratio and the power goes up. Cross a line and the fuel detonates before the spark plug fires. That ping is knock. Fold the reciprocating engine into four thermodynamic processes and the efficiency formula is what's left. Python at the end scores Otto against Diesel at the same ratio.

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

The compression ratio (cylinder volume at its largest over its smallest) is the efficiency knob. Squeeze the air harder and the same fuel returns more work.

Temperature hits first. Adiabatic compression shrinks the volume and heats the gas together. Past the fuel's autoignition temperature, the mixture explodes before the flame arrives. That is knock. Pistons and bearings go first.

The compression-ratio slider stretches the P–V loop sideways. The heat slider only shoves that same loop upward.

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

The shaded area is the net work of one cycle. The efficiency readout barely moves when the heat goes up. Knock cares about the left end of the loop, the temperature after compression.

In 1921 Midgley added tetraethyl lead to delay ignition. The octane rating (an antiknock index) came out of that. Additives run out of room too. Gasoline engines usually sit between 9 and 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=r k−1\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). A larger compression ratio drives T2T_2 up more steeply. The seed of knock sits in that relation. The sideways stretch of the loop, back at the slider, is this same rise. A nozzle that buys speed by expanding is a different machine: the duct has to widen past the throat. In the engine, that expansion pushes a piston.

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

η=1−QoutQin=1−T4−T1T3−T2\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=rk−1T_2/T_1 = T_3/T_4 = r^{k-1}, and all the temperatures cancel, leaving a strikingly simple result:

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

Efficiency keeps only the compression ratio rr and the specific heat ratio kk. How much fuel burned (QinQ_{in}) dropped out of the formula. That is why the heat slider could not move the readout.

The printed 56.5% is 1−8−0.41-8^{-0.4} at r=8r=8. The 63.0% is r=12r=12. With k=1.4k=1.4 the loss term is r−0.4r^{-0.4}. Flip it and the temperature ratio is T2/T1=1/(1−η)T_2/T_1 = 1/(1-\eta): about 2.30 at r=8r=8 and about 2.70 at r=12r=12. The listing takes intake air at 300 K, so the end of compression lands near 690 K and 810 K. Four notches, from 8 to 12, buy 6.5 points of efficiency and about 120 K. The efficiency slope flattens. The temperature slope does not. Knock lights up before the efficiency does.

The closed form at r=9r=9 is 0.5848. The loss 1−0.5848=0.41521-0.5848=0.4152 means T2/T1T_2/T_1 is about 2.41 and T2T_2 is about 722 K. The heat knob alpha sets T3=T2αT_3 = T_2 \alpha, so alpha 3 puts T3T_3 near 2170 K and alpha 6 near 4330 K. T4=T1αT_4 = T_1 \alpha, so the rejected heat scales by the same factor. Alpha cancels in qout/qin=T1/T2q_{out}/q_{in} = T_1/T_2. Doubling the heat leaves 0.5848 nailed in place.

A ratio of 8 is about 56%, and 12 is about 63%. The bare numbers want another notch. 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=1−1r k−1 rc k−1k (rc−1)\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#

Lay both cycles on the compression-ratio axis and the ranking shows up before the plot does. The curves lie flatter toward the right. One extra unit of ratio buys less efficiency. At the same rr, cyan (Otto) sits above amber (Diesel). The red band is gasoline's practical wall. Otto stops in front of it. Diesel walks through and runs further right.

Drop the cut-off toward 1.2 and constant-pressure heating starts to look like constant-volume heating. As rc→1r_c \to 1 the two formulas meet. That scale is how far Diesel has wandered from Otto. The table prints the gap first.

Python — Measuring Both Cycles Directly#

The closed form has to come out of the state temperatures. The listing checks that.

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%

The cut-off slider moves only the amber curve, and the horizontal axis is the rr column in the table.

At the default rc=2r_c=2 the gap is 7.5 points at r=8r=8 (56.5 versus 49.0), 6.3 points at r=12r=12 (63.0 versus 56.7), and still 5.0 points at r=22r=22 (71.0 versus 66.0). The gap shrinks. The sign does not flip. Pull the slider to 1.2 and the curves sit on each other. With rc=2r_c=2 and k=1.4k=1.4 the Diesel fraction is (21.4−1)/1.4(2^{1.4}-1)/1.4. Since 21.42^{1.4} is about 2.639, the fraction is about 1.171. Otto's loss at r=12r=12 is 37.0%. Times 1.171 that is 43.3%, and the efficiency is 56.7%, the same line as the table.

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.

Stop at 12, or cut the cut-off ratio#

At r=12r=12 Otto is 63.0% and Diesel at a cut-off of 2 is 56.7%. On a fixed ratio, Otto is the pick. Gasoline cannot keep that condition. The premixed charge hits knock and 12 is the end of the road. The formula η=1−r−(k−1)\eta = 1 - r^{-(k-1)} keeps only the ratio and the specific-heat ratio. How much fuel burns sets the size of the output, not the efficiency.

Diesel compresses air alone, takes the ceiling off, and runs at 15–22. Diesel at r=18r=18 is 63.2%, level with Otto at 12. At r=22r=22 it leads at 66.0%. The loss at equal ratio is the cut-off fraction. The decision that overturns it is allowing a higher ratio. A different wall, where the liquid boils because the pressure fell first, is vapor pressure ahead of temperature.

Share if you found it helpful.