Compression
Flame front
Piston / rod / crank
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.
A spark-ignition engine never fires the plug when the piston is at top dead centre. Because combustion is a flame front that takes tens of crank degrees to spread through the cylinder, the spark has to be advanced so that peak cylinder pressure lands a little after TDC, where the piston still has good leverage on the crankshaft. This simulator drives a real slider-crank mechanism and a first-law-of-thermodynamics pressure model with a Wiebe combustion function, so moving the spark-advance, combustion-duration and compression-ratio sliders visibly reshapes the pressure-vs-crank-angle curve, shifts the peak-pressure location, and flags when the timing has drifted into knock-risk or torque-losing territory.