The Otto cycle models the spark ignition engine as four processes, with heat supplied at constant volume while the piston is momentarily at top dead centre after compression, and heat rejected at constant volume during exhaust. The Diesel cycle differs precisely at this point, adding heat at constant pressure because fuel is injected gradually while the piston moves. Thermal efficiency of the Otto cycle rises with compression ratio and with the specific heat ratio of the gas.