A diesel generator is the combination of a diesel engine with an electric generator to generate electrical energy. This is a specific case of engine-generator. A diesel compression-ignition engine often is designed to run on fuel oil, but some types are adapted for other liquid fuels or natural gas.