Difference between gasoline and diesel engines

The diesel engine was invented by Rudolf Diesel while attending engineering school in Germany. Rudolf was surprised how inefficient gasoline and steam engines were. The design of the diesel engine was patented in 1892.

Both diesel and gasoline engines convert chemical energy from fuel into mechanical energy through a series of explosions. The way these explosions happen is the major difference between these two engines.

In a gasoline engine, the explosion process is:

Intake stroke – fuel is mixed with air

Compression stroke – piston goes up, mixture of fuel and air is compressed