The area of a loop
A four-stroke engine repeats the same dance every two turns of the crank: intake, compression, power, exhaust. Plot cylinder pressure against volume and the dance becomes a closed loop, and the area inside it is the work handed from the piston to the crank in that cycle. engine-sim simulates each cylinder’s gas in real time to produce this loop, and in the end, the sound.
Ideal efficiency depends only on compression ratio: η = 1 − r1−γ. Raising the ratio from 8 to 12 lifts efficiency from about 56 to 63 percent. It is not free: temperature and pressure at the end of compression rise too, and past a point the mixture ignites on its own before the spark. That is knock, and much of engine design is living just below that line.
Firing order
A single cylinder pushes once every two turns; the flywheel carries the rest. Adding cylinders spreads the pushes around. Four cylinders fire every 180 degrees, six every 120, eight every 90. But it is not only how often; which cylinder fires when matters too, because it sets both the vibration and the rhythm you hear in the exhaust.
With four cylinders the total torque dips nearly to zero; in the straight six and the V12 the pulses overlap and the curve flattens. The two V8s have the same number of cylinders but sound different: with a cross-plane crank each bank fires at uneven intervals, with a flat-plane crank the two banks simply alternate.
The voice
Exhaust sound is largely the rhythm of these pulses. Every firing sends a pressure wave down the pipe; the pipe and muffler boost some frequencies and choke others. The synthesiser below does exactly that: it fires pulses at the chosen engine’s firing angles and runs each bank through its own resonant filter. engine-sim does far more, deriving it from the gas dynamics.
The familiar burble of a cross-plane V8 comes from each bank firing at uneven intervals; the flat-plane V8 shrieks higher and smoother. The four buzzes at high revs, the single is heard as separate thumps at low revs. This little model is not a real engine, but it is enough to hear with your own ears how much the rhythm decides the sound.
- p–v
- The area of the pressure–volume loop is work per cycle; efficiency grows with compression ratio.
- firing
- Cylinder count and crank layout set torque ripple and rhythm.
- metal
- redline renders engine-sim natively with Metal on Apple Silicon and swaps engines live.
- in the code
- github.com/cleoanka/redline