Conversion of thermal power into mechanical power