In engineering and thermodynamics, a heat engine performs the conversion of heat energy to mechanical work by exploiting the temperature gradient between a hot "source" and a cold " sink ". Heat is transferred to the sink from the source, and in this process some of the heat is converted into work.