An automated, GUI-accessible optimizer has been implemented into Beam Optics Analyzer; the optimizer uses iterative methods to model electron guns and surface electric fields. Beam Optics Analyzer (BOA) is an adaptive mesh, finite element, charged particle trajectory modeling tool for designing 3D electron devices. Previous research included the optimized design of Brillouin focused electron guns for traveling wave tubes and confined flow Pierce electron guns for high power devices. This research provided the foundation for the current work.