TRACE 3-D is an interactive
code that calculates and displays the envelopes of a bunched beam
through a user-defined transport system. Accelerating elements
and linear space-charge forces are included. The beam is described
by a 6-D sigma matrix of second moments. We have extended the
capabilities of this code to include effects, such as wakefields,
related to the variation of the beam bunch in the longitudinal
direction. This nonlinear capability was implemented by adding
centroid tracking and describing the beam by a collection of slices,
each described by a 6-D centroid and sigma matrix. External forces,
space-charge forces, and wakefields act on the collection of beam
slices. Results are presented in terms of an overall sigma matrix,
computed by combining the slice distributions. The new TRACE
3-D has been integrated with an improved graphic user interface
(GUI) based on the Shell for Particle Accelerator Related Codes.
This new approach to modeling wakefields demonstrates the flexibility
of extending the capabilities of moment codes to handle important
physical effects, and the rapid incorporation of the new capabilities
into the graphic interface illustrates the ease of customizing
the new GUI. The wakefield model and features of the new interface
are presented.
The TRACE 3-D program [1] is one of the standard codes used in the design of linear accelerators and transport lines. A new version of TRACE 3-D has been developed that computes the short-time (single bunch) wakefield effects that can alter the bunch distribution. In order to model the effects of wakefields, we imagine the beam bunch to be divided into a number of slices longitudinally. Each slice of the bunch is then described by its own 6-D centroid and 6¥6 sigma matrix. The effects of wakefields are modeled using a multipole expansion of the forces which act on the beam as a function of the longitudinal position within the bunch. Monopole, dipole and quadrupole terms (wake functions) are included. These terms can be expressed as transfer (R) matrices which act on the centroids and sigma matrices of each slice. The approach has been outlined by Chan [2], and follows the development of Chao and Cooper [3] for the code LTRACK, but we do not assume that the beam is traveling at the speed of light.
To implement this model in TRACE 3-D, new wakefield "optical" elements have been developed that are used to describe the monopole, dipole and quadrupole wakefield functions [2]. These are currently modeled as a second-degree polynomial in the longitudinal position, although other parameterizations could be readily implemented. One of the new wakefield elements is then placed in the beamline after each physical element (e.g. misalignment or RF gap) that is responsible for a wakefield.
The wakefield version of
TRACE 3-D has been integrated with a GUI designed specifically
to support particle beam simulation and analysis programs. Known
as the Shell for Particle Accelerator Related Codes (S.P.A.R.C.),
this GUI provides a unique software environment customized to
the needs of the accelerator community [4]. Earlier versions
of TRACE 3-D have been integrated with the S.P.A.R.C. GUI for
several years [5]. New capabilities have been added to S.P.A.R.C.
that are aimed at improving the customization of the GUI to meet
the differing needs of users. These new features were utilized
to create a prototype GUI for use with the new TRACE 3-D.
The initial beam bunch is
assumed to be a uniformly filled, upright ellipsoid in (x,y,z)
with
- zmax
² z ² zmax . (1)
The bunch is divided into
2N+1 equal-length slices, labeled from -N (head)
to +N (tail). Slice number 0 is centered at z=0.
Let zi
be the z value at the upstream face of slice i and
define zN+1
to be -zmax.
Since the number of particles, dn, in a slice of length
dz is proportional to the square of the distance from the
bunch center. Introducing the variable
z=(z
/
zmax)
one has
dn ~ [1 - (z)2]
dz . (2)
With this distribution, the
z-centroid of slice i is given by
<z>i=[6zi2-3zi4-6zi+12+3zi+14]/[12zi2-4zi4-12zi+12+4zi+14]zmax.
(3)
The fraction of particles
in slice i is given by
ni
= [3zi
- zi3
- 3zi+1
+ zi+13]
/ 4 . (4)
To estimate the z'-centroid
of each slice, it is assumed that the ratio of the centroid values
<z'>i
/<z>i
is the same as z'e/zm,
where zm,
is the maximum value of z for the z-z' ellipse
and z'e
is the value of z' at z = zm.
From the definition of the Twiss (Courant-Snyder) parameters
for the z-z' ellipse, then
<z'>i
= - [az
/ bz]
<z>i
.
(5)
The transverse emittances,
ex
and ey,
are adjusted at each slice according to
ex,y,i
= [1 - (<z>i /zmax)2]
(ex,y
/f )
,
(6)
where the factor f
is the ratio of the average to maximum emittance value
f
= Si
[1 - (<z>i /zmax)2]
ni
.
(7)
The values of s55
and s66
for the i-th slice are estimated from
s55i = (Dz / 2)2 , (8)
s66i
= [(ez
/ bz)
- (<z>i /bz)2]/e
, (9)
where Dz
= 2zmax
/(2N+1),
and e is ratio of the average to maximum s66
value
e
= (bz
/ ez)
Si
[(ez
/ bz)
- (<z>i
/bz)2]
. (10)
The centroids and sigma matrices
for each slice are transformed through the beamline using the
usual transfer matrix formalism. Each TRACE 3-D optical element
[1] is described by a 6¥6
R-matrix, R(Ds),
that transforms the beam over a distance Ds
in the element
according to
<X (s+Ds)>i = R(Ds) <X (s)>i , (11)
s
(s+Ds)i
= R(Ds)
s
(s)i
R(Ds)T
, (12)
where <X (s)>i and s (s)i are the 6-D centroid and 6¥6 sigma matrix for the beam slice at position s. Existing TRACE 3-D subroutines are used to compute the R-matrix elements for the standard optical elements, but new subroutines have been written to carry out the transformations described by (11) and (12). As described in the next section, new subroutines for modeling the wakefield optics have also been written.
The longitudinal slices for
the beam bunch are recombined to compute effective bunch centroids
and sigma matrix elements. The overall bunch centroid is given
by
<X
> = Si
ni <X>i
. (13)
The individual elements of
the overall bunch sigma matrix are given by
sij
= Sknk[sijk+5<ui>k<uj>k]
- 5[Sknk<ui>k][Sknk<uj>k]
, (14)
where ui
represents (x,x',y,y',z,z'
) for i=1,6
and
sijk
/ 5 =<ui uj>k
- <ui>k <uj>k
, (15)
is the sigma matrix for the k-th slice. The individual slice centroids and overall sigma matrix are used to compute space charge effects with a modified space charge model that takes into account the effective force on each slice centroid. The overall bunch centroids and overall sigma matrix are utilized for generating graphic output displays of the beam envelopes and centroid locations.
Three new "optical elements"
have been added to TRACE 3-D to model the monopole, dipole and
quadrupole wakefield functions. These elements are inserted into
a beamline model immediately after each element that is responsible
for generating a wakefield. The monopole wakefield changes the
energies of the bunch slices, the dipole wakefield causes deflections
of the transverse centroids of the slices, while the quadrupole
wakefield effects the sigma matrices of the bunch slices in addition
to the energy and transverse centroids. The three wakefield multipoles
are expressed in terms of wake function strengths per unit length,
W0(s),
W1(s),
and W2(s).
Each wakefield acts on a bunch over the length, L, of
the element responsible for generating the wakefield. The product
of this length and the multipole strengths are used for computing
the wakefield effects [6] and are modeled as second degree polynomials:
LW0(s) = p0(1) + p0(2)s + p0(3)s 2 , (16)
LW1(s) = p1(1) + p1(2)s + p1(3)s 2 , (17)
LW2(s)
= p2(1) + p2(2)s +
p2(3)s 2 . (18)
The three coefficients for a given multipole, pm(1), pm(2) and pm(3), are user inputs for the corresponding wakefield optical element.
The effects on the energy
and centroid of the k-th slice are given by [6]:
DEk = -Si<k ni LW0(<z>i- <z>k) , (19)
with an expression similar
to (20) for D<y'>k.
The sigma matrix for the k-th slice is transformed with
a R-matrix, with elements that differ from the identity
matrix given by [2]:
R21 = - R43 = q1 , (21)
R23 = R41 = q2 , (22)
with
q1 = Ck Si<k ni LW2(<z>i- <z>k)[s11i-s33i+<x 2>i-<y 2>i] , (23)
q2
= Ck Si<k
ni LW2(<z>i-
<z>k)[2s13i+2<x
>i <y >i]
. (24)
The q1
and q2
terms correspond to normal and skew quadrupole moments, respectively.
The coefficient Ck
appearing in (20), (23) and (24) is a function of the relativistic
energy factor of the k-th slice, gk,
and is given by
Ck
= re (me/M )/ gk
, (25)
where re is the classical radius of the electron, me is the electron mass and M is the particle mass.
User defined optics elements,
such as the wakefield elements described above, may be easily
integrated into the S.P.A.R.C. GUI for TRACE 3-D using a new TableBuilder
application. The TableBuilder is used to create customized data
input windows called Piece Windows [5]. Custom Piece Windows
for user defined elements provide the same functionally as other
Piece Windows, including options for the choices of parameter
units, including several "smart units" options, and
lower and upper user guidance limits. The guidance limits are
soft, that is, any parameter value may always be entered. The
limits are utilized to provide the user with a visual alert when
his or her input value may have impractical consequences.
Once a custom Piece Window such as that shown in Figure 1 has been generated, the graphic construction of beamlines that include the user defined elements is the same as for beamlines with any other optical elements [4,5]. The setting up of arrays and other input for TRACE 3-D is accomplished by the GUI and is transparent to the user.
Several other improvements
to the GUI have also been implemented and a few more are under
development in order to fully support the new TRACE 3-D capabilities.
Several additional smart units options have been added to the
Global Parameters [5]. For example the Beam Energy may be input
in terms of the relativistic velocity (b),
relativistic energy (g),
or particle momentum (in GeV/c), in addition to eV, keV, MeV or
GeV. The radiofrequency may be entered as either a frequency
or a wavelength, with several options for each. The S.P.A.R.C.
expert rule system [4,5] provides all conversions and gives users
feedback in any of the available units options for his input.
A few other optical elements
have been added to TRACE 3-D as part of this work, and some additional
parameters have been added to existing elements to support misalignment
modeling. In particular, the rotate element has been modified
so that it can model either rotations (yaw and pitch, as well
as roll) or displacements of the beam axis. Roll and displacement
parameters, including an option to generate random values, have
been added to the quadrupole. An electrostatic quadrupole has
been added to the program. We also note that together with a
suite of other electrostatic elements (prisms, einzel lenses and
accelerator tubes) developed as part of other work, versions of
TRACE 3-D are available for studying a broad spectrum of bunched
and continuous beam accelerator systems.
A new version of the TRACE
3-D code has been developed for modeling wakefield effects and
similar phenomena related to variations of a beam bunch in the
longitudinal direction. A number of new optical elements have
been added to support the modeling of wakefields and misalignments.
The new version of TRACE 3-D has been integrated with an enhanced
version the S.P.A.R.C. GUI that allows users to customize the
integrated TRACE 3-D / GUI program to meet individual needs.
The authors are indebted
to Chris Babcock for assistance in incorporating changes to the
GUI Global Parameter Pane and for modifications to existing Piece
Windows. Portions of this work have been completed as part of
Cooperative Research and Development Agreement (CRADA) number
LA95C10203 between the Los Alamos National Laboratory and G. H.
Gillespie Associates, Inc.
[1] K. Crandall and D. Rusthoi, "TRACE 3-D Documentation," Los Alamos National Laboratory Report LA-UR-90-4146, 92 pages (1990).
[2] K. C. D. Chan, "Computer Codes for Wakefield Analysis in RF-Based Free-Electron Laser," Proceedings of the Beijing FEL Seminar, World Scientific Publishing Co. Pte, Ltd. (Singapore), 172-192 (1988).
[3] A. W. Chao and R. K. Cooper, "Transverse Quadrupole Wake Field Effects in High Intensity Linacs," Particle Accelerators 13, 1-12 (1983).
[4] G. H. Gillespie, "The Shell for Particle Accelerated Related Codes (SPARC) - A Unique Graphical User Interface," AIP Conference Proceedings 297, 576-583 (1993).
[5] G. H. Gillespie and B. W. Hill, "A Graphical User Interface for TRACE 3-D Incorporating Some Expert System Type Features," 1992 Linear Accelerator Conference Proceedings (Ottawa), AECL-10728, 787-789 (1992).
[6] K. C. D. Chan and
R. C. Cooper, "LTRACK Beam Transport Calculation Including
Wakefield Effects," AIP Conference Proceedings 177,
37-44 (1993).