An IBM 7094 beam, quadrupole aberration program

An IBM 7094 beam, quadrupole aberration program

NUCLEAR INSTRUMENTS AND METHODS 40(1966) 166-168; 0 NORTH-HOLLAND PUBLISHING co. AN IBM 7094 BEAM, QUADRUPOLE ABERRATION PROGRAM P. F. MEADS,...

345KB Sizes 2 Downloads 26 Views

NUCLEAR

INSTRUMENTS

AND

METHODS

40(1966)

166-168; 0

NORTH-HOLLAND

PUBLISHING

co.

AN IBM 7094 BEAM, QUADRUPOLE ABERRATION PROGRAM P. F. MEADS, Jr. William M. Brobeck and Associates, Berkeley, Califbrrtia

Received 19 December 1965 A very genera1 computing program has been written to study the linear properties of a general beam system and to calculate the third-order aberration properties of systems consisting of quadrupole and octopole magnets. The distinctive properties of this IBM 7094 code include a comprehensive method of parameter

adjustment, using the linear programming algorithm, to meet up to 12 linear beam conditions and minimize aberrations. Easily

1.Introduction

parameters, of a beam system consisting of quadrupole and octopole magnets and drift spaces. The tolerance requirements on placement and construction of all constituent quadrupole magnets are also calculated. A flexible complement of cathode-ray-tube plots provides a clear demonstration of the optical effects of the aberrations. The program is equipped to execute very general variations of all designated parameters of the beam system in order to obtain, as closely as possible, desired first-order optical properties while restricting each varied parameter to previously determined bounds. Up to twelve conditions can be specified with up to twentyfour independent parameters being adjusted. The code will also minimize objectionable aberrations, keeping the first-order properties unchanged. In order for the code to meet all of the specified conditions, it is not only necessary that the solution exists, but that the initial guess be close to the correct values of the beam parameters. The code will locate the lowest point of a “valley” (least error) in the multidimensional parameter space but will not cross a “ridge” to locate a possibly better solution in an adjacent “valley”. Good initial guesses may be available, particularly for simple beam systems. Frequently, however, the user is not able to prescribe an approximate value to one or more parameters. The code is equipped to “survey” the parameter space for these parameters and to “try” in turn, a large number of guessed systems, starting with the most favorable and continuing with less desirable systems. The code may be directed to conduct an arbitrary sequence of additional calculations upon each beam system generated in the course of a “survey”. Control of the flow through the program is specified by a sequence of “call cards” that are put in a mnemonic format similar to mnemonic computer instructions. There are seventy-six different mnemonic instructions. Input and output options are mainly controlled through a series of internal switches that are set by a single card

This paper describes a digital computer program that evaluates the aberrations and functions of the aberrations of general orthogonal beam systems (those that consist of quadrupole and octopole magnets). The code also calculates and adjusts the linear properties, including dispersion, of a completely general beam system. Particular attention has been given to the development of convenient and easily used output with heavy reliance on cathode-ray-tube plots to guide the interpretation of the printed output. The code, called 4P, is written for the IBM 7094 computer; a somewhat restricted version exists for the basic IBM 7090 computer. FORTRAN coding and FAP coding are used to an equal extent; the code runs under the FORTRAN-II monitor system. 2. Program scope The program treats beam systems consisting of no more than ninety of the following types of beam elements : 1. drift space; 2. quadrupole magnet ; 3. octopole magnet; 4. bending magnets with bends in either plane, with arbitrary angles of entry and exit and with arbitrary field exponent ; 5. pseudo-element, that provides a drift space in one plane but not the other, providing a handy device for specifying properties that occur at different locations in the two orthogonal planes intersecting along the optic axis; 6. solenoid magnet; 7. general strong-focusing bending magnet; 8. any other type of element whose optical properties are described solely by fixed 3 x 3 transfer matrices in each plane. In addition, the program calculates all the aberrations, through third-order in the appropriate small

used output is provided, including a wide complement cathode-ray-tube plots.

166

of

AN

IBM

7094

BEAM,

QUADRUPOLE

ABERRATION

PROGRAM

167

and that may be independently changed at any time. The flow through the program may be altered at any point, depending upon the outcome of a number of user-specified tests. Many other features of the code allow the widest latitude in its application while retaining relative simplicity in its use.

1. list of the parameters that may be varied including designation of parameters to be varied together; 2. minimum and maximum constraints upon each parameter to be varied; 3. list of conditions to be satisfied, the desired beam properties.

3. Basic computer required The present version of the program is designed to operate under the FORTRAN-II monitor on an IBM 7094 or 7090 computer equipped with seven index registers, a cathode-ray-tube (CRT), an internal clock and three data channels. Modified versions exist that operate on a basic 7090 computer at a small loss in speed and flexibility. Provisions exist for executing the CRT plots on a second computer, using data stored on magnetic tape.

5. Output produced by the program Field data: When the beam system parameters are derived from a gradient function, either given or calculated by the code, the code plots graphs showing the gradient along the optic axis and the locations and properties of equivalent magnets having infinitely sharp fringing-fields. Linear properties: The primary output of the linear properties consists of a full description of each element in the beam system and the 3 x 3 transfer matrices in each plane (equivalent to priting magnifications, locations of focal points and principal planes and dispersive properties). If desired, transfer matrices to intermediate points may be provided. Calculations of the CourantSnyder phase-amplitude functions may be specified’). Beam widths may be calculated and listed as well as the location and size of the virtual waists seen by each element in the system. In addition, the code may be directed to plot the beam profile in each plane for the entire system and also to plot the phase ellipses, in the two planes, between each constituent element. A small compiler has been built into the code to enable the user to specify up to seven arbitrary functions which can be evaluated at any point in the beam system. These. functions are constructed by up to twenty-four elementary arithmetical operations upon the calculated parameters available to the code at the time they are evaluated. Any eight quantities calculated by the code may be tabulated in sequence for a very large number of beam systems. The table so generated may be used to quickly compare the functional interdependence of this group of parameters. Each of these parameters may be plotted against any other with the code selecting the appropriate scales and executing all labeling automatically. Optimization of linear properties: When asked to adjust certain parameters to achieve specified first-order properties, the code provides the usual data yielded by the linear programming techniques utilized. These data include initial and final errors in meeting the specified properties, the variations made in the parameters, the dependence of the error upon the constraints imposed, the identification of the limiting constraints and the errors in meeting the constraints.

4. Required input data The input data needed to calculate the first-order optical properties of a beam system consist of the appropriate parameters of length and field for each constituent beam element : length, gradient for quadrupoles; length, field, field exponent, orientation angles for bending magnets; length, field for solenoid magnets; length, field profile, curvature for general strong focusing magnets. Elements described solely by their transfer matrices require the input of those matrices. A beam system consisting solely of quadrupole magnets and drift spaces may be completely specified by giving the magnetic-field-gradient as a function of distance along the optic axis. Given these data and a minimum of information about magnet locations, the code will calculate effective magnet and drift space for the lengths, effective magnetic-field-gradients magnets, and the shape coefficients (which describe the detailed fringing-field shape) required for the calculation of the aberrations. An additional feature provides for the construction of the magnetic-field-gradient function, given the location and length of each quadrupole magnet and the “half-width” characteristic of the fringing-field of each magnet. A subsidiary feature of the code provides for direct integration of the differential equations for several trajectories through the region described by the magnetic-field-gradient function. If it is desired to alter the parameters to effect a desired optimization, then the following additional data are required :

168

P. F. MEADS,

Aberrations: Additional data needed to calculate the aberrations of a system including only quadrupole and octopole magnets and drift-spaces consist of the fieldshape coefficients for the quadrupole magnets and the radial-third-derivative of the magnetic field for magnets having octopole field components. The primary output for the aberration calculations consists of a list of the coefficients describing the tolerances of each magnet with respect to displacements, rotations, and undesired harmonics of the magnetic field, followed by a list of the coefficients in the powerseries expansions of x,y,x’,y’ (displacements and slopes orthogonal to the optic axis at the point of observation) in terms of xO,yO,x&y~ (corresponding displacements and slopes at the start of the beam system) and Ap/p, grouped by type of aberration. These data are followed by the normalized aberration coefficients appropriate to the given bounds on the initial parameters. The maximum displacements in x and y due to the aberrations, assuming a rectangular initial distribution, are calculated as are the root-meansquare displacements which assume the initial displacements and slopes to be uniformly distributed in a fourdimensional hyperellipsoid. If desired, the code will plot the aberration figure; this is the distorted image of a point source on the axis. Either rectangular or ellipsoidal apertures may be used. A five-dimensional raster of coordinates (xO,y,,,x&y& and Ap/p) may be specified by giving the upper and lower bounds and increments in each parameter. The code will then calculate the linear and aberration terms in x,y,x’ and y’ for each trajectory whose initial coordinates coincide with one of the points in the fivedimensional raster. Data may be plotted in addition to being listed. If they are plotted, one may specify any or all of the three projections of the trajectories upon the coordinate planes. Scaling is accomplished automatically with provisions being available to retain the same scale for a series of comparative plots. Using these plots, the locations and sizes of the “images of least confusion” may be quickly determined. The plots also show whether a small or large proportion of the trajectories is adversely affected by the system’s aberrations.

JR.

Frequently the virtual sources are distinctively shown upon the plots. As all of these data are highly dependent upon the initial conditions of the beam, provisions have been included for changing the initial conditions and observing the effects of this change. All of these data are calculated very rapidly. The code initiates a beam system, adjusts it to provide the specified first-order properties, and then calculates all the first-order properties and the aberration properties in a few seconds (four seconds for a double-focusing quadrupole triplet). The numbers generated by the program have been verified for accuracy through the imposition of twentyeight relationships that must hold in order that the equations of motion be derivable from a Hamiltonian’). These relate aberration coefficients to the linear properties of the beam; the relations usually are satisfied to five or six significant figures. Further description of the code and the theory behind it is contained in a doctoral thesis’). The program described in this paper was first written at the Lawrence Radiation Laboratory, Berkeley, California and subsequently revised during a stay at the Midwestern Universities Research Association Laboratory, Stoughton, Wisconsin. Later development continued at William M. Brobeck and Associates, through a contract with Argonne National Laboratory, Lemont, Illinois. The author is indebted to the guidance of Dr. D. L. Judd in developing the theory behind this program as well as to Dr. A. A. Garren and Dr. J. D. Young for their guidance in applying the methods of linear programming to the optimization of beam properties. Mr. J. Eseubio and Dr. T. R. Sherwood have been most helpful in the painful process of debugging the code. References 1)E. D. Courant and H. S. Snyder, Ann. Phys. 3 (1958) 1. 2) P. F. Meads, Jr., I. The theory of aberrations of quadrupole focusing arrays. (Ph. D. Thesis-University of California, unpublished), available as Lawrence Radiation Laboratory Report UCRL-10807 (1963).