The 1 4 th Sy mposium on Accelerator Science and Technology , Tsukuba, Japan, Nov ember 2 0 0 3

BEAM TRACKING IN THE 3D DISTRIBUTED MAGNETIC FIELDS
M. J. Shirakata, H. Fujimori and Y. Irie, KEK, Tsukuba, Japan
Abstract
In case that large bore magnets were placed within ashort distance, the fringe fields interfere with each otherand it is difficult to predict the exact beam behavour because of a non-linear effect. We developed the particle
tracking code which can take into account a 3D distributed
magnetic field. The 3D distributed magnetic field can beobtained from the commercial application program such as
TOSCA which is used for the magnet design. The beam
tracking results of the J-PARC RCS injection with a realistic fringe field are presented not only for the injected proton
beam but also for the stripped electrons.

EXPANSION OF THE PARTICLE
TRACKER TRACY-II
The particle tracker code ’TRACY-II’ was developed
originally for the simulation of the KEK-PS slow extraction process and it has been applied to the JHF project1 .
The code is written in C which is more extendable andwhich has more platform portability than Fortran. In orderto take into account the realistic firinge field from the large
bore magnets, more general particle tracking code ’GenericSolver’ which can trace the particle motion in the 3D distributed magnetic field was developed as an additional feature of the TRACY-II. The 3D magnetic field is defined as
the 3D vectors on the 3D lattice structure. The particle only
sees the 8 vectors on the 8 lattice points around oneself.
The field at the particle position is interporated by using
the extended Lagrange formula. The interpolation method
is updated to more accurate way than the nearest neighbour
method [1] though the extended Lagrange formula is alsoa linear interporation method. Particle trajectory is calculated by solving the Lorentz equation with the 4th order
Runge Kutta method2.

four bump magnets and they are called as SB1, SB2, SB3,
SB4 for the shift bump and PB1, PB2, PB3, PB4 for thepaint bump, respectively. There is a carbon stripping foil
between SB2 and SB3. Here is the injection point.

Field Interference
As seen in Fig. 1, the bending fields to form a bump orbit interfere with the neighbouring magnet because the shift
bump magnets are lined closely with respect to their apertures. Moreover the shift bump system is located between
two quadrupole magnets QFL and QDL. Because the SB1
is closely aligned to the QFL, the fringe field interference
also occur in this area. The situation is the same for theSB4 and QDL. The magnetic field calculation of the shift
bump area is carried out applying the whole magnet system
including QFL and QDL in order to represent the realistic
fringe field interference. Generally the magnet is divided tothe mesh elements during the field calculation on the computer. The dividing point must be chosen carefully when
the different types of magnets are treated at one time because the pole shapes are quite different for dipoles andquadrupoles. Though it is not so difficult to fit the magnet
shape when the mesh size is small, the number of mesh elements which can be treated is limited by the magnet design
program in many cases. This is the main difficulty on themagnetic field calculation. In order to reduce the numberof mesh elements required in the calculation, the step size
along the z (or s) axis is set larger than those of the x and ydirection because a simple shape is assumed in z direction.
The field was checked with two step sizes of ∆z = 100 and25 mm. It was found that there is no obvious difference
on the ∆z. It was found that the step size of 100 mm isenough 4 in z direction.
2x = 0 mm
x = 100 mm

MAGNETIC FIELDS OF THE 3GEV RCS
By [kG]The beam injection line in the 3 GeV RCS3 is shownin Fig. 1. There are two bump systems. One is the shift
bump and the other is the paint bump. The shift bump system will be fully excited during the whole injection period.
On the other hand, the paint bump has a time dependency
in order to paint up the RCS beam aperture of 216 π mm
mrad with the LINAC beam of 6 π mm mrad. The injection
process continues about 320 turns. Each bump system has

10−1−276788082s [m]8486882 The numerical integration module will be replaced by the simplectic

Figure 2: By distribution in the shift bump area at x = 0and +100 mm and y = 0.

integrator. The simplectic integrator insures the simplecticity and has anadvantage in the calculation time.
3 It is still under minor updating.

4 If the Rogowski cut was introduced, the step size of z direction also
should be small.

1 J-PARC project in the present day.

The 1 4 th Sy mposium on Accelerator Science and Technology , Tsukuba, Japan, Nov ember 2 0 0 3

3GeV Injection Bump (ver. RCS_2.323) rev.2003.5.12
3000
417

700

766

5189
700

417

800

900

589

5169

800

830

800

470 470

800

830

800

3000
569

900

500

800

700

700

800

M.W.P.M.
11300

M.W.P.M.
1M.W.P.M.
2M.W.P.M.
4M.W.P.M.
3M.W.P.M.
8

M.W.P.M.
6

M.W.P.M.
50S.T.

B.P.M.+S.T.

M.W.P.M.
9M.W.P.M.
12ST71000

QDX71674

B.P.M.

S.T.

PB172834

PB274300

SEPT275400

SEPT173400

QFL
78174

SB179613

0.697182T/m

0.05516rad

SB281243

Foil
82113

SB382983

SB484613

QDL
86032

SEPT3
88100
0.14486rad
0.7685T

M.W.P.M.
10

PB389250

0.705795T/m

SB & PB Gap height = 290 mm
QFL, QDL Bore = φ 410 mm

PB490250QFM
93892

SEPT490100
0.36512rad
1.1622T

Figure 1: Layout of the beam injection line of the 3GeV RCS.
10080

Table 1: Bl values of shift bump magnets. Design value =0.175587 Tm

No correction
Normalized

x [mm]

60Name
SB1
SB2
SB3
SB4
Bl [Tm] 0.1737257 0.1754762 0.1755115 0.1736490

40200−2076

78

8082s [m]

848688Figure 3: Central orbit trajectory in the shift bump area
which started from x = y = 0. The black line show theCOD, the red line is after the Bl correction and the greendashed line indicates the stripping foil position.
Fig. 2 shows the By field in the shift bump area. Theblack line of x = y = 0 mm shows only the shift bump field
because there is no quadrupole field with this condition.
The field interference between shift bump magnets can beseen here. The magnetic field between SB2 and SB3 does
not descend to zero because there are two fringe fields overlapping on the same direction.

Bump Magnet
Four dipole magnets are connected in series in order toform a shift bump orbit. The Bl values obtained from the3D magnetic field data are listed in Table 1. The field edge
is defined as the zero cross point between SB1 and SB2,
SB3 and SB4, and the local minimum point between SB2
and SB3. In order to distinguish the dipole field of SB1
and SB4 from the quadrupole field, the field tail faced tothe quadrupole magnet is cut off. The effect from this cutoff is less than 0.1 mm on the bump orbit.
Due to the fringe interference, the balance in the fourbump magnets is broken and it causes the closed orbit distortion as shown in Fig. 3. The effective Bl of SB1 andSB4 are about 1% smaller because the field tail becomesshort due to the quadrupole magnet core. The Bl correction is required in order to cancel the Bl unbalance. The

red line in Fig. 3 shows the bump orbit after the Bl normalization. The residual COD can be suppressed less than
1 mm. In actual, some shim pieces will be required on themagnet for the real Bl correction.

Quadrupole Magnet
In similar way of the dipole fields, quadrupole fields
also have an error due to the field interference. In case ofquadrupole fileds, the field error becomes a gradient error
Gl. The focusing gradient error mainly causes the horizontal tune shift and the defocusing gradient error mainly
causes the vertical tune shift. The gradient error is sometimes more harmful than the dipole one. The gradient error
can be corrected in the same way as the bump magnets.
Fig. 4 shows the betatron tune deviation in vertical phasespace comparing to the design matrix after the gradient error normalization.
Though there is no tune difference on the step size along
the z-axis, about 1% gradient error still remains between
the design matrix and the distributed fields. It might bethought that the origin of this deviation comes from thevery long fringe length.

TRACKING RESULTS
Injected Proton Beam
The injection parameters are as follows:• 400 MeV proton ∆p/p = ±0.3%• x = y = 6 or 30 [π mm mrad]• (x, x , y, y  ) = (131, -5.5, 0, -3.7) [mm, mrad] on foil
• painting area is 216 π mm mrad

The 1 4 th Sy mposium on Accelerator Science and Technology , Tsukuba, Japan, Nov ember 2 0 0 3Vertical

40015EH = EV = 30 [pi mm mrad]
EH = EV = 30 [pi mm mrad]
EH = EV = 6 [pi mm mrad]
EH = EV = 6 [pi mm mrad]

350Matrix
rev1
rev2

10300
250x, y [mm]y’ [mrad]

50200
150
1005050−5010−100
15050

100150200

250

s [mm]
80

400y [mm]4080

Figure 4: Vertical tune deviation in phase space. rev1 corresponds to ∆z = 100 mm mesh and rev2 corresponds to∆z = 25 mm mesh.

Figure 6: Stripped electron trajectory. The stripping foil isput at s = 0. Horizontal: black and red, Vertical: green andblue.
x = +285 mm
40EH = EV = 30 [pi mm mrad]
EH = EV = 6302010y [mm]For the first step, the 300 turn simulation result is shownin Fig. 5 without paint bump. The particles were put on
three emittance ellipses of 216, 162 and 108 π mm mrad.
It was found that there is no critical effect from the fringe
fields though a small diffusion can be seen in phase space.

0−10−20

10−30

Horizontal
Vertical−40
226x’, y’ [mrad]

5228

229230231s [mm]Figure 7: Stripped electron distribution in y-s plane at x =+285 mm.

0The amplitude of Bx and Bz is not changed in the range ofx = 0 ∼ 131 mm. Around the neighbouring of the carbon
stripping foil, Bx is almost zero. The Bz is dominant forthe diffuse on the vertical direction.

−5−10−80

227−60−40−20020x, y [mm]406080
inj_bump_6p_v302_cd_rev2M.dat
100Figure 5: The poincaré map at the center of PB1 during
300 turns without paint bump.
Bx, By, Bz [G]Stripped Electron

500Bx
By
Bz−50

The stripped electron from the injection beam brings
about the 145W thermal damage. The electron catcher
plays a very important roll for the H− injection. In order todesign the electron catcher, the trajectories of stripped electrons are investigated. When the stripped electron has thesame speed as the injected proton, the corresponding electron momentum becomes 518.147 ∼ 521.266 keV/c. Fig. 6
shows the electron track after the stripping foil. There is afocus point at x = +285 mm in the horizontal motion andthe trajectory diffuses in vertical. It indicates that the electron catcher should be placed at x = +285 mm with 80 mm
height parallel to the s direction. The cross section view atx = +285 mm is shown in Fig. 7.
Fig. 8 shows the Bx , By , Bz at (x, y) = (131, 10) [mm].

−100777879808182s [m]8384

858687

Figure 8: Bx , By , Bz distribution in the shift bump areaat (x, y) = (131, 10) [mm]. The stripping foil is put at s =82.113 m

REFERENCES[1] M. Shirakata et al., Proceedings of EPAC2002, June,2002(1670-1672)