Skip to Main Content
Summary form only given. This paper presents a flexible algorithm for the general calculation of expansion solutions to Laplace's equation. The limiting factor in application of the technique is shown to be series truncation error and not errors in calculating numerical derivatives as previously assumed. Application of the algorithm to the accurate computation of arbitrary magnetic fields in cylindrical geometry from on-axis or coil data are presented. For an ideal current loop, magnetic field accuracies of better than 0.01% of the exact elliptic integral solution can be obtained out to approximately 70-80% of the loop radius. Accuracy improves dramatically (usually by many orders of magnitude) for radii closer to the axis. Results are also shown for thin current disks, thin solenoids and thick coils. Other aspects of the technique are illustrated by application to the design of a coil system for a hollow beam electron gun. With some reasonable assumptions about the overlay of the electron trajectories and the magnetic flux contours, it is possible to generate an estimate for the on-axis profile of the gun magnetic field (or an off-axis line of constant flux). The expansion technique can then be applied to calculate the off-axis field and its impact on the trajectories without assuming any particular coil system. The initial estimate can then be refined and re tested. Finally, an optimization technique is used to develop a coil system which closely reproduces the refined field. The results of carrying out this set of calculations on a 150 kV, 20 A hollow electron gun design for an FEL experiment are reported.