A steam engine is a heat engine that performs mechanical work using steam as its working fluid. Steam engines have a long history, going back almost two thousand years. Early devices were not practical power producers, but more advanced designs became a major source of mechanical power during the industrial revolution. Modern steam turbines generate about half of the electric power in the world.
Many steam engines are external combustion engines, although other sources of heat such as solar power, nuclear power, or geothermal energy are often used. The heat cycle is known as the Rankine cycle.
In general usage, the term "steam engine" can refer to integrated steam plants such as railway steam locomotives and portable engines, or may refer to the motor unit alone, as in the beam engine and stationary steam engine. Specialized devices such as steam hammers and steam pile drivers are dependent on steam supplied from a separate, often remotely located boiler.