Download A User Manual for GINGER and its Post
Transcript
GINGER FEL Code Manual: Version 1.4f — April 2004 30 (3) a Fortran90 namelist &lattice which should contain the following variables: gammar0, wavelw, aw0 (these values should agree exactly without those input in the main GINGER namelist), nelement (the total number of discrete sections, including drifts, which describe the undulator) and the variables nquad and nsteer which define the number of individual quadrupoles and steering elements to be described. After the namelist, the sets of individual quadrupoles, steering dipoles, and wiggler elements are read (in that exact order). The individual quad format is the string “QUAD” in the first 10 characters, followed by five real numbers giving the beginning and end z-position in meters, the quad gradient in T/m, and the x- and y-offsets in meters. The steering element format is “DIPOLE” in the first 10 characters, followed by 3 real numbers giving the z-position in meters and the x- and yintegrated fields in T-m. The wiggler element format is either “WIGGLER” or “DRIFT” in the first 10 characters, followed by four real numbers. For the case of “WIGGLER”, these numbers comprise the initial z-position in meters, the nominal value of aw0 (without errors), the pure “phase error” component of aw0, and the effective “kick error” component of aw0 (which is acts as a transverse dipole magnetic field in the wiggle plane). These error values are usually specially-averaged values over multiple wiggle periods (see §3.5.9). For the “DRIFT” case”, only the first two numbers are used which give the beginning and end z positions in meters of the drift. Note that the configuration described in the lattice file, including drift space and quadrupole lattice information if present, override any values set in the main GINGER input file. Consequently, to avoid inadvertent confusion, the user is advised that when modeling wiggler errors, the lattice file should serve as the primary source of undulator description. 3.5.9 Generation of Lattice File via the XWIGERR Program A simple F90 program (xwigerr), freely available from the author, generates for a linearlypolarized, constant aw wiggler the individual undulator pole errors and quadrupole gradient and offset errors (if any), computes the appropriately-averaged (see below) errors in phase and drift, the proper transverse steering (if any) including the optional effects of beam position monitor offset errors, and then writes a properly-formatted lattice file (see §3.5.8) to be used by GINGER. xwigerr uses a simple F90 namelist &inwigerr which as much as possible uses the same input variable names as GINGER for equivalent items. However, units in xwigerr are MKS for both longitudinal and transverse variables, which leads to some inconsistency with GINGER for items such as xoff. Electron beam input parameters include gammar0 for Lorentz factor (alternatively energy in MeV may be given), xoff and yoff in meters for initial beam offset, and xprime and yprime in radians for initial beam angle. Main undulator variables are wavelw (or period) for undulator period, zmxmeter for wiggler length, rkxkw to set the amount of curved poleface focusing, and aw0 for RMS normalized vector potential. Undulator error variables include aw rms err for RMS fractional aw error, iseed aw for the optional random number