In a combustion engine, the static compression ratio is calculated based on the relative volumes of the combustion chamber and the cylinder. It is a fundamental specification for combustion engines. The dynamic compression ratio is a more advanced calculation which also takes into account gasses entering and exiting the cylinder during the compression phase. In a combustion engine, the static compression ratio is calculated based on the relative volumes of the combustion chamber and the cylinder. It is a fundamental specification for combustion engines. The dynamic compression ratio is a more advanced calculation which also takes into account gasses entering and exiting the cylinder during the compression phase. Most engines used a fixed compression ratio, however a variable compression ratio engine is able to adjust the compression ratio while the engine is in operation. The first production engine with a variable compression ratio was introduced in 2019. A high compression ratio is desirable because it allows an engine to extract more mechanical energy from a given mass of air–fuel mixture due to its higher thermal efficiency. This occurs because internal combustion engines are heat engines, and higher compression ratios permit the same combustion temperature to be reached with less fuel, while giving a longer expansion cycle, creating more mechanical power output and lowering the exhaust temperature. In production gasoline (petrol) engines from the past 20 years, compression ratios are typically between 8:1 and 12:1. Several production engines have used higher compression ratios, including: When forced induction (e.g. a turbocharger or supercharger) is used, the compression ratio is often lower than naturally aspirated engines. This is due to the turbocharger/supercharger already having compressed the air before it enters the cylinders. Engines using port fuel-injection typically run lower boost pressures and/or compression ratios than direct injected engines because port fuel injection causes the air/fuel mixture to be heated together, leading to detonation. Conversely, directly injected engines can run higher boost because heated air will not detonate without a fuel being present. Higher compression ratios can make gasoline (petrol) engines subject to engine knocking (also known as 'detonation', 'pre-ignition' or 'pinging') if lower octane-rated fuel is used. This can reduce efficiency or damage the engine if knock sensors are not present to modify the ignition timing. Diesel engines use higher compression ratios than petrol engines, because the lack of a spark plug means that the compression ratio must increase the temperature of the air in the cylinder sufficiently to ignite the diesel. Compression ratios are often between 14:1 and 23:1 for direct injection diesel engines, and between 18:1 and 23:1 for indirect injection diesel engines. Since diesel engines operate on the principle of compression ignition, a fuel which resists autoignition will cause late ignition, which can lead to engine knock. Diesel engines have a higher peak combustion temperature than petrol engines, but the greater expansion means they reject less heat in their cooler exhaust. The compression ratio may be higher in engines running exclusively on LPG (Autogas) or compressed natural gas, due to the higher octane rating of these fuels.