You are on page 1of 3

Nuclear Instruments and Methods in Physics Research A 393 (1997) 277-279

NUCLEAR
INSTRUMENTS
& METHODS
IN PHYSICS
RESEARCM
SectIonA
ELS!&ER

TDA3D: Updates and improvements


to the widely used three-dimensional free electron laser simulation
B. Faatz”, W. Fawleyb, P. Pierini’, S. Reiched,‘, G. Travishdl*, D. Whittum”, J. Wurteleb
“DESY, 22607 Hamburg, Germary
bLawrence Berkeley National Laboratory. Unirersity of Califbmia. Berkeley. CA 94720. USA
‘Istituto Nazionale di Fisica Nucleare. Sezione di Milano. Via Celoria 16, 20133 Milano, ItaLl
‘UCLA Department of Physics, Los .4ngeles. C.4 90095, USA
‘Stanford Linear Accelerator Center, Stanford CA, 94025. USA

Abstract
TDA3D is a widely distributed and often used Free Electron Laser (FEL) simuIation code. While a number of versions
of TDA exist, this paper describes the official version which is well tested and supported.
We describe the capabilities of the code emphasizing recent improvements and revisions. TDA3D is a steady-state
(time-independent) amplifier code. The code self-consistently solves, after averaging over a wiggler period, the paraxial
wave equation for the radiation field and the Lorentz equations of motion for the electrons. The paraxial wave equation
includes diffraction and optical guiding. The calculation of the electron beam motion takes into account longitudinal
bunching and transverse betatron oscillations, so that emittance, energy spread, and external focusing can be properly
modeled. Recent additions to the simulation include the ability to model natural wiggler focusing in one or both planes,
alternating gradient quadrupoles or sextupoles, and ion channels. The initial loading of the electron distribution can be
controlled to allow for matching into focusing channels, improved quiet starts (non-correlated phase-space distributions),
and arbitrary energy spread.

1. Introduction and history LLNL FRED [3] and LANL FELIX codes, both of
which were limited in distribution due to US classifica-
Computer modeling of the FEL interaction has been tion restrictions. The development of these codes (and
an important part of both theoretical and experimental other codes [4]) involved many man-years of effort. For
programs since the development of the wiggler-period some smaller groups such developmet from scratch
averaged FEL equations [1,2]. The one-dimensional, would require a major effort. We, therefore, believed that
time-independent equations themselves are not complic- a widely distributed FEL simulation with such capabili-
ated and numerous authors have written codes to solve ties would, to a certain extent, democratize FEL research.
them. A smaller number of these simulations have grown i.e., allow diverse groups to purpose experiments and
into well tested, thorough codes. By the mid 198Os, it was benchmark theoretical calculations using models that
clear, however, that the extension of FEL amplifiers to were state-of-the art. This was the motivation behind the
optical wavelengths would likely involve diffractive and original TDA code. Over the years the code has been
refractive effects, and beam quality (e.g. emittance) could modified. expanded and tested by many investigators,
significantly limit performance in many cases. Thus, FEL but the source has always remained publicly available.
modeling in the optical regime would require the ability So, while its physics model is similar to that found in
to solve the paraxial eikonal field equations and to input a number of codes, TDA’s impact on the FEL commun-
realistic beam distributions. At that time, the most de- ity has been profound.
veloped simulations with such capabilities were the The original TDA [5,6] used axisymmetric modes, but
was subsequently modified to include any number of
azimuthal modes [7]. Improved coding and beam load-
*Corresponding author. Tel: + 1 310 206 5584; fax: + 1 310 ing was incorporated into TDA3D version of 0.3 [S]. In
206 1091; e-mail: travish@physics.ucla.edu. the meantime, many workers adapted the code for a var-
‘Permanent address: DESY, 22607 Hamburg, Germany iety of studies. A number of versions of TDA have been

016%9002/97/$17.00 Copyright (:I 1997 Elsevier Science B.V. All rights reserved
PII SOl68-9002(97)00492-O IV. LONG-WAVELENGTH FELs
278 B. Faatz et al. / Nucl. Instr. and Meth. in Phys. Rex A 393 (1997) 277-279

written. Versions have been created to handle oscillators, where E, is the space charge term, which is calculated
waveguides, no wiggler-period averaging, etc. It is fair to from the particle distribution and the appropriate wave
say that most of the modifications have not been equation. The remainder of the notation is given in Ref.
documented or provided to the community at large. [7]. The external focusing term can be selected from
Nevertheless, over the last few years a core group of quadrupole, sextupole or ion channel.
users, including one of the originai authors, has improved
and changed the code to the point that a new release,
along with this brief paper, is desirable.
3. The numerics of TDA3D

A radial mesh is used for the radiation fields, with


2. The physics of TDA3D asymmetries accommodated for by a modal decomposi-
tion. The equations are integrated in z using the Runge-
TDA3D is a steady-state (i.e., time-independent or Kutta method. The present version of the code incorpor-
single-frequency) amplifier code which begins with a ates improvements to the particle loading. Improvements
nonzero, completely temporally coherent input elec- in the undulator error modeling, which includes traject-
tromagnetic field. The time independence indicates that ory offsets and corrections, have also been implemented
the code does not account for multi-frequency phe- in an, as yet, unrelased version. Further details of the
nomena such as sideband growth or bunch-length effects TDA3D numerics have been covered in other publica-
such as slippage. Being an amplifier code, it only ac- tions [S-7].
counts for a single pass of the electron/radiation interac- Various numerical diagnostics are available both
tion; howeever,the electron beam data can be stored and during the propagation through the undulator and at
fed back into another undulator section, as in an optical the end of the run. Different beam parameters can
klystron configuration. The code follows the electron be monitored (e.g. bunching, optical mode size, elec-
beam and optical field evolution through a user specified tron-beam energy distribution, phase-space distribu-
length of undulator. A paraxial wave equation is used to tions) and plotted as functions of beam radius and
compute the radiation (optical) field in a self-consistent position along the undulator. Diagnostics that are diffi-
manner (refer to Eqs. (1HS). The electron beam motion cult to access experimentally are easily available in the
takes into account longitudinal (phase) bunching and code.
transverse betatron motion. The program accounts TDA3D has a simple input and output structure (see
for optical diffraction, multiple azimuthal modes, elec- Fig. 1). An input file in “namelist” format is used to pass
tron beam emittance, energy spread and other three- values to the code. The code then generates a text output
dimensional effects. It is capable of modeling various file and/or a graphics metafile.
focusing channels, including discrete quadrupoles [7]. Recently, effort has been made to make TDA3D avail-
The code can also calculate the bunching of the able for a variety of platforms and graphic libraries.
beam at arbitrarily harmonics. Space charge can also The main code handles the pre-processing, numerics
be included at the user’s discretion [9]. However, the and post-processing, while using an external routine to
equations of motion are averaged over an undulator handle the differences in computing environments.
period, so the high- frequency wiggle motion is not Nevertheless, the code is still not fully modular. It is
simulated. also still not possible to post-process output data after
TDA3D solves the following equations:

dyn
-= -O’a,a,sin@“+EZ,
dz 2c Yn

d0, 2rr 1 + pL + a,’ + 2a,a,cos&


---z--q
dz i., 2CY.2

dp, =
-
1 aa,”
- - - + Focusing,
dz Y. ar,

drl
_= -- Pi
dz Y” ’
Fig. 1. The input/output structure of TDA3D. The external
routine tdaplot_xxxx is chosen for a particular graphics library
and computer platform.
B. Faatz et al. I Nucl. Instr. and Meth. in Ph_vs.Res. A 393 (1997) 277-279 279

the original run. Hence, if a user wishes to generate References


new types of plots or diagnostics from old data, it must
be done manually. On the other hand, the code is Cl1 N.M. Kroll, P.L. Morton, M.N. Rosenbluth. IEEE J. Quan-
very simple, conforms to FORTRAN77, and requires tum Electron. 17(8) (1981) 1436.
only a few support files (the common blocks, graphics PI W.B. Colson, Phys. Lett. A 64(2) (1977) 190.
routines). c31 E.T. Scharlemann, W.M. Fawley, Proc. SPIE 642 (1986) 2.
M There were other FEL simulations that used a variety of
approximations to the field equations (rather than directly
solving the eikonal equations). However, they were not
4. Distribution of the code made widely available, nor were they developed with the
same level of effort as FRED and FELIX.
TDA3D is presently being distributed, as version 1.0, c51 M. Tran, J.S. Wurtele, Comput. Phys. Commun. 54 (1989)
through ftp and www sites. Support for the code is being 263.
provided by the authors of this paper on a volunteer C61T.M. Tran, J.S. Wurtele, Phys. Rep. 195 (1990) 1.
basis. Generally, errors in the physical model or numer- c71 P. Jha, J.S. Wurtele, Nucl. Instr. and Meth. A 331 (1993)
477.
ical errors are corrected when reported. Extensions to
I231TDA3D 0.3 benefited additionally from the efforts of M.
the code’s capabilities are provided on an irregular Ben-Ari and S. Ishii.
basis. Users are encouraged to modify the code, but
c91 TDA3D uses a space charge calculation scheme similar to
not distribute modified versions. Finally, a repository of that found in FRED, which is described in E.T. Schar-
input files is being created to serve as an example for lemann et al.. Proc. 7th Int. Conf. 1985. Tahoe City, CA.
users. USA.

IV. LONG-WAVELENGTH FELs

You might also like