Computational Study of the Effects of Cathode Placement, Electron Energy, and Magnetic Field Strength on the Confinement of Electrons