Diesel engines or compression ignition engines as they are called are generally classified as two stroke engine and four stroke engines. In diesel engine, air admitted into the cylinder is compressed, the compression ratio being 12 to 20. At the end of compression stroke, fuel is injected. It burns and the burning gases expand and do work on the position. The engine is directly coupled to the generator. The gases are then exhausted from the cylinder to atmosphere.