16
PRAMANA c Indian Academy of Sciences Vol. 69, No. 4 journal of October 2007 physics pp. 551–566 Development of 2D particle-in-cell code to simulate high current, low energy beam in a beam transport system S C L SRIVASTAVA, S V L S RAO and P SINGH Nuclear Physics Division, Bhabha Atomic Research Centre, Mumbai 400 085, India E-mail: shashi [email protected] MS received 12 March 2007; revised 16 May 2007; accepted 5 July 2007 Abstract. A code for 2D space-charge dominated beam dynamics study in beam trans- port lines is developed. The code is used for particle-in-cell (PIC) simulation of z-uniform beam in a channel containing solenoids and drift space. It can also simulate a transport line where quadrupoles are used for focusing the beam. Numerical techniques as well as the results of beam dynamics studies are presented in the paper. Keywords. Space-charge; particle-in-cell; beam dynamics; Poisson’s equation; solenoids; quadrupole magnets. PACS Nos 29.27.Bd; 52.65.Rr; 41.20.cv 1. Introduction Newly proposed accelerators with applications to nuclear waste transmutation and spallation neutron sources require high intensity Linacs. To develop the technology of high intensity Linacs for our ADS programme, a 20 MeV, 30 mA CW proton accelerator is being built at the Bhabha Atomic Research Centre, Mumbai. It con- sists of 50 keV ECR ion-source, low energy beam transport line (LEBT), 3 MeV radio frequency quadrupole (RFQ), medium energy beam transport line (MEBT) and 20 MeV drift tube Linac (DTL) [1]. In the low energy section of such acceler- ators, beams are strongly subjected to the Coulomb repulsion and understanding the behaviour of such space-charge dominated beams is a challenging task. This re- quires a careful control of particle dynamics by suitably incorporating space-charge forces in the beam. Several codes (TRACE2D [2], TRANSPORT [3] etc.) are avail- able to study the beam dynamics and to match the beam parameters between two structures (for example, ion-source and RFQ). As these codes are formulated by linearizing the space-charge forces and equations of motion, they are expected to be accurate in the linear regime. These codes cannot therefore simulate the non- linear space-charge effects in beam dynamics. There are numerous particle-in-cell (PIC) codes (PARMILA [4], PARMTEQ [5], WARP3D [6], BEAMPATH [7] etc.) 551

Development of 2D particle-in-cell code to simulate high

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Development of 2D particle-in-cell code to simulate high

PRAMANA c© Indian Academy of Sciences Vol. 69, No. 4— journal of October 2007

physics pp. 551–566

Development of 2D particle-in-cell code to simulatehigh current, low energy beam in a beamtransport system

S C L SRIVASTAVA, S V L S RAO and P SINGHNuclear Physics Division, Bhabha Atomic Research Centre, Mumbai 400 085, IndiaE-mail: shashi [email protected]

MS received 12 March 2007; revised 16 May 2007; accepted 5 July 2007

Abstract. A code for 2D space-charge dominated beam dynamics study in beam trans-port lines is developed. The code is used for particle-in-cell (PIC) simulation of z-uniformbeam in a channel containing solenoids and drift space. It can also simulate a transportline where quadrupoles are used for focusing the beam. Numerical techniques as well asthe results of beam dynamics studies are presented in the paper.

Keywords. Space-charge; particle-in-cell; beam dynamics; Poisson’s equation; solenoids;quadrupole magnets.

PACS Nos 29.27.Bd; 52.65.Rr; 41.20.cv

1. Introduction

Newly proposed accelerators with applications to nuclear waste transmutation andspallation neutron sources require high intensity Linacs. To develop the technologyof high intensity Linacs for our ADS programme, a 20 MeV, 30 mA CW protonaccelerator is being built at the Bhabha Atomic Research Centre, Mumbai. It con-sists of 50 keV ECR ion-source, low energy beam transport line (LEBT), 3 MeVradio frequency quadrupole (RFQ), medium energy beam transport line (MEBT)and 20 MeV drift tube Linac (DTL) [1]. In the low energy section of such acceler-ators, beams are strongly subjected to the Coulomb repulsion and understandingthe behaviour of such space-charge dominated beams is a challenging task. This re-quires a careful control of particle dynamics by suitably incorporating space-chargeforces in the beam. Several codes (TRACE2D [2], TRANSPORT [3] etc.) are avail-able to study the beam dynamics and to match the beam parameters between twostructures (for example, ion-source and RFQ). As these codes are formulated bylinearizing the space-charge forces and equations of motion, they are expected tobe accurate in the linear regime. These codes cannot therefore simulate the non-linear space-charge effects in beam dynamics. There are numerous particle-in-cell(PIC) codes (PARMILA [4], PARMTEQ [5], WARP3D [6], BEAMPATH [7] etc.)

551

Page 2: Development of 2D particle-in-cell code to simulate high

S C L Srivastava, S V L S Rao and P Singh

developed in the field of accelerator physics to study dynamics of space-charge dom-inated beams. To our knowledge, only BEAMPATH [7] simulates the continuousbeam in transport lines using PIC method.

In this paper, we present an algorithm that forms the basis of the code, whichhas been developed to study various aspects of space-charge dominated continuousbeam in a LEBT. In addition to tracking the particles, generation of differentkinds of beam distributions is an integral part of this code. In future, we plan toincorporate, in order to study space-charge compensation, collisions of protons withneutral gas atoms and molecules using Monte Carlo technique in the code.

2. Transport of space-charge dominated beam

Consider the propagation of an intense charged particle beam through a beamtransport system consisting of different focusing elements. For the beam dynamicsstudy, the PIC method [8] is used. The beam is represented as a combination of alarge number of macroparticles with the same charge-to-mass ratio as that of thereal beam. The simulation is performed in 4D phase space of particle transversepositions x, y and transverse velocities vx, vy. The macroparticles following certainkind of distribution will be tracked in the presence of external field and the fieldexerted by the beam. To calculate field exerted by the beam (self-field), we needto solve the Poisson equation and from that electric fields are calculated. Sincemotion of particles is influenced by the self-fields which depend on their spatialdistribution inside the beam, we need to solve the Poisson equation at each andevery step and this problem has to be solved self-consistently. During simulationsthe macroparticle is lost if it touches the boundaries.

From the single particle Hamiltonian, equations of motion can be derived and ingeneral they can be written as follows:

dx

dt= vx,

dy

dt= vy,

dvx

dt=

q

m(E + v ×B)x,

dvy

dt=

q

m(E + v ×B)y. (1)

Integration is performed with fixed time step δt. In (1), the electric field is acombination of external and space-charge fields, while magnetic field is externalonly (at low energy, self-magnetic field is very small as compared to electric field).In the following sections, the numerical algorithms of the code and results arediscussed.

3. Beam distribution generator

Initially, the particles will be distributed in the 4D transverse phase space accordingto a distribution function. For the generation of particle distribution in transverse

552 Pramana – J. Phys., Vol. 69, No. 4, October 2007

Page 3: Development of 2D particle-in-cell code to simulate high

Development of 2D PIC code

4D phase space x, x′, y, y′, consider a class of distributions with elliptical symmetry.The distribution function n(x, x′, y, y′) depends on total emittance ε which has ameaning of radius-vector in 4D phase space:

n(x, x′, y, y′) =dN

dxdx′dydy′= n(ε), (2)

ε = A2x + cA2

y, (3)

where c is the ratio of beam emittances [9]. For any value of c except 1 the areaof the 2D projection (ellipse) of (3) will be unequal. Parameters Ax, Ay describe afamily of ellipses.

A2x =

(√βxx′ +

αxx√βx

)2

+(

x√βx

)2

, (4)

A2y =

(√

βyy′ +αyy√

βy

)2

+

(y√βy

)2

, (5)

where αx,y, βx,y and γx,y are Courant–Snyder parameters in the x and y planes.The equation ε = constant describes a hyperellipsoid surface in the phase spacex, x′, y, y′. As the distribution function depends on ε, the phase space density, n,will be constant on one hyperellipsoid surface while it will vary from one surface toanother. The distribution function is normalized under the following condition:

∫ ∞

−∞

∫ ∞

−∞

∫ ∞

−∞

∫ ∞

−∞n(x, x′, y, y′)dxdx′dydy′ = 1. (6)

For generating the phase space distributions, we have to generate the 4N valuesof x, x′, y, y′ which correspond to a given distribution function n(ε). To generatevarious distributions, we need to know the distribution of ε,

g(ε) =dN(ε)

dε. (7)

Let us transform x, x′, y, y′ to new coordinates r, θ, φ, ψ (0 ≤ θ ≤ π, 0 ≤ φ ≤ 2π, 0 ≤ψ ≤ π):

√βxx′ +

αxx√βx

= r sin θ cos φ sin ψ, (8)

x√βx

= r sin θ sin φ sin ψ, (9)

√c

(√

βyy′ +αyy√

βy

)= r cos θ sin ψ, (10)

√c

(y√βy

)= r cosψ, r =

√ε. (11)

Pramana – J. Phys., Vol. 69, No. 4, October 2007 553

Page 4: Development of 2D particle-in-cell code to simulate high

S C L Srivastava, S V L S Rao and P Singh

The phase space element transforms as

dxdx′dydy′ =r3

csin2 ψ sin θdrdθdφdψ. (12)

Then the number of particles in the phase space element is

dN(r, θ, φ, ψ) = n(r)r3

csin2 ψ sin θdrdθdφdψ. (13)

Integration of (13) over angle variables gives the number of particles dN as a func-tion of r,

g(r) =dN(r)

dr= 2π2 r3

cn(r). (14)

The algorithm for generation of different distributions is based on the above equa-tions and it is given below:

1. To simulate the distribution g(r) we will use the inverse transform methodin which we take the integral distribution defined by (15) to find r = r(G)under the assumption that the values of G are uniformly distributed in theinterval [0,1]:

G(r) =∫ r

0

g(r′)dr′. (15)

2. For each value of r, two random numbers Ax and Ay are chosen such thatthey satisfy (3) and then the 4 points x, x′, y, y′ are calculated by the followingequations:

x = Ax

√βx cos p, (16)

x′ = Ax

(−αx cos p√

βx

+sin p√

βx

), (17)

y = Ay

√βy cos q, (18)

y′ = Ay

(−αy cos q√

βy

+sin q√

βy

), (19)

where p and q are two random numbers which are uniformly distributed in[0, 2π]. The steps 1 and 2 will be repeated N times for generating N particles.The generated particles will follow the distribution n(ε).

The above method is implemented in the program, which presently generates 4DKapchinskij–Vladimirskij (KV), waterbag and parabolic distributions. This needsemittance, and Courant–Snyder parameters of the beam to generate the specifieddistributions. The definition of different distributions is given in table 1. The (x, x′)projections of all the three distributions are shown in figure 1. The representationof the emittance was found to be better than 1% in all the cases for 1000 and moreparticles.

554 Pramana – J. Phys., Vol. 69, No. 4, October 2007

Page 5: Development of 2D particle-in-cell code to simulate high

Development of 2D PIC code

Table 1. Definition of different phase space distributions.

Distributions Definition

KV 2cπ2r4

0rδ(r2 − r2

0)

Waterbag 2cπ2r4

0

Parabolic 6cπ2r4

0(1− r2

r20)

−6 −4 −2 0 2 4 6−50

−40

−30

−20

−10

0

10

20

30

40

50

x (mm)

x’ (

mra

d)

KVDistribution

−6 −4 −2 0 2 4 6−50

−40

−30

−20

−10

0

10

20

30

40

50

x (mm)

x’ (

mra

d)

WaterbagDistribution

(a) (b)

−6 −4 −2 0 2 4 6−50

−40

−30

−20

−10

0

10

20

30

40

50

x (mm)

x’ (

mra

d)

ParabolicDistribution

(c)

Figure 1. Projection of (a) KV, (b) waterbag and (c) parabolic distributionon x–x′ plane for Twiss parameters βx = βy = 24.768 cm/rad, γx = γy = 0.171rad/cm, αx = αy = −1.8, emittance εx = εy = 0.02π cm mrad and c = 1.

4. Poisson solver

The space-charge potential of the beam, U , for an instantaneous space-charge den-sity distribution, ρ, is calculated from the solution of Poisson’s equation

∂2U

∂x2+

∂2U

∂y2= −ρ(x, y)

ε0. (20)

For a z-uniform beam, this problem reduces to a 2D problem in x–y coordinates.First, we distribute the space-charge of macroparticles among grid nodes, then solve

Pramana – J. Phys., Vol. 69, No. 4, October 2007 555

Page 6: Development of 2D particle-in-cell code to simulate high

S C L Srivastava, S V L S Rao and P Singh

the Poisson’s equation on grid and finally after calculation of field on grid nodes,scale it at macroparticle positions.

The simulation region is divided into uniform rectangular meshes. Charge ofevery particle with coordinates (xn, yn) is distributed among the nearest four nodesutilizing area weighting method [8]. The charge density at node point, ρij , is givenby

ρij =N∑

n=1

ρxy

(1− |xn − xi|

hx

(1− |yn − yi|

hy

), (21)

where ρxy is the space-charge density of an individual particle and hx, hy are themesh sizes. ρxy is related to the beam current I and to the speed of the beam inthe z-direction

ρxy =I

vzNhxhy. (22)

The Poisson’s solver is implemented such that it can handle either Dirichlet orNeumann boundary condition in one direction and mixed boundary condition inthe other direction.

4.1 For Dirichlet and mixed boundary condition

Suppose that U(x, y) satisfies mixed boundary conditions in the x-direction, i.e.,

al U(x, y) + bl∂U(x, y)

∂x= gl(y) (23)

at x = xl and a similar equation for x = xh with new constants. Here, al, bl, etc.are known constants, whereas gl is a known function of y. Furthermore, supposethat U(x, y) satisfies the following simple Dirichlet boundary conditions in the y-direction:

U(x, 0) = U(x, L) = 0. (24)

Let us write U(x, y) as a Fourier series in the y-direction:

U(x, y) =∞∑

j=0

uj(x) sin(jπy/L). (25)

The functions sin(jπy/L) are orthogonal, and form a complete set in the intervaly ∈ [0, L]. In fact,

2L

∫ L

0

sin(jπy/L) sin(kπy/L)dy = δjk. (26)

Thus, we can write the source term as

556 Pramana – J. Phys., Vol. 69, No. 4, October 2007

Page 7: Development of 2D particle-in-cell code to simulate high

Development of 2D PIC code

ρ(x, y) =∞∑

j=0

%j(x) sin(jπy/L), (27)

where

%j(x) =2L

∫ L

0

ρ(x, y) sin(jπy/L) dy. (28)

Furthermore, the boundary conditions in the x-direction become

aluj(x) + blduj(x)

dx= Γl j (29)

at x = xl and a similar equation for x = xh with new constants, where

Γl j =2L

∫ L

0

gl(y) sin(jπy/L) dy. (30)

Using (25) and (27) in (20) and equating the coefficients of sin(jπy/L) (since thesefunctions are orthogonal), we obtain

d2uj(x)dx2

− j2π2

L2uj(x) = %j(x), (31)

for j = 0 · · ·∞. Now, we can discretize the problem in the y-direction by truncatingour Fourier expansion, i.e., by only solving the above equations for j = 0 · · · J ,rather than j = 0 · · ·∞. This is essentially equivalent to discretization in the y-direction on the equally-spaced grid-points yj = jL/J . The problem is discretizedin the x-direction by dividing the domain into equal segments. Thus, we obtain

ui−1,j − (2 + j2κ2)ui,j + ui+1,j = %i,j(hx)2, (32)

for i = 1 · · ·Nx and j = 0 · · · J . Here, ui,j ≡ uj(xi), %i,j ≡ %j(xi) and κ = πhx/L.The boundary conditions (29) discretize to give

u0,j =Γljhx − blu1,j

alhx − bl, (33)

uNx+1,j =Γhjhx + bhuNx,j

ahhx + bh, (34)

for j = 0 · · · J . Equations (32)–(34) constitute a set of uncoupled tridiagonal matrixequations (with one equation for each j value). These equations can be inverted,to give ui,j . Finally, U(xi, yj) values can be reconstructed from (25).

4.2 For Neumann and mixed boundary condition

If there is Neumann boundary condition in the y-direction as

Pramana – J. Phys., Vol. 69, No. 4, October 2007 557

Page 8: Development of 2D particle-in-cell code to simulate high

S C L Srivastava, S V L S Rao and P Singh

∂U(x, y = 0)∂y

=∂U(x, y = L)

∂y= 0, (35)

then we can express U(x, y) in the form

U(x, y) =∞∑

j=0

uj(x) cos(jπy/L) (36)

so that it automatically satisfies the boundary conditions in the y-direction. Like-wise, we can write the source term ρ(x, y) as

ρ(x, y) =∞∑

j=0

%j(x) cos(jπy/L), (37)

where

%j(x) =2L

∫ L

0

ρ(x, y) cos(jπy/L) dy, (38)

since

2L

∫ L

0

cos(jπy/L) cos(kπy/L) dy = δjk. (39)

Finally, the boundary conditions in the x-direction become

aluj(x) + blduj(x)

dx= Γl j , (40)

at x = xl and a similar equation for x = xh with new constants, where

Γl j =2L

∫ L

0

gl(y) cos(jπy/L) dy. (41)

Note, however, that the factor in front of the integrals in (38) and (41) takes thespecial value 1/L for the j = 0 harmonic.

As before, we truncate the Fourier expansion in the y-direction, and discretizein the x-direction, to obtain the set of tridiagonal matrix equations and solve asbefore. Fast Fourier transform is implemented using FFTW libraries [10].

Electric field on the grid nodes are calculated using

Ei,j = −∇Ui,j ; (42)

electric field at the particle position is calculated from field values at grid nodesusing the same area weight method (21), as for charge. Since these fields are in amoving frame of reference, the perpendicular component of the field in laboratoryframe will be modified by the relativistic factor γ. The parallel component, however,will remain unaffected. (For low energies, the correction is insignificant because γis close to unity.)

558 Pramana – J. Phys., Vol. 69, No. 4, October 2007

Page 9: Development of 2D particle-in-cell code to simulate high

Development of 2D PIC code

5. Integration of particle trajectories

The particle trajectories are integrated using leap-frog method to preserve the kine-matic time reversal symmetry in the simulation. In the most general case, integra-tion of particle trajectories in this code is carried out through the following steps:

1. The particle performs a half-step acceleration in an electric field:

~v ∗n = ~vn +qδt

2m~En. (43)

2. The particle velocity undergoes rotation in the magnetic field. This is imple-mented by employing Boris scheme [11]:

~v ′n = ~v ∗n + ~v ∗n × ~T , (44)

~T =q ~B

m

δt

2, (45)

~v ∗n+1 = ~v ∗n + ~v ′n × ~s, (46)

~s =2~T

1 + T 2. (47)

3. The particle performs again half-step acceleration in an electric field:

~vn+1 = ~v ∗n+1 +qδt

2m~En. (48)

4. Finally, particles are advanced with a velocity, ~vn+1:

~xn+3/2 = ~xn+1/2 + ~vn+1δt. (49)

In all the above equations ~v and ~x possess only x- and y-components (not z)while ~B has its usual meaning.

6. Focusing fields

In this section, we describe the implementation of two focusing devices in the code,namely, solenoids and quadrupoles.

6.1 Solenoid

In this code the hard edge model of solenoid is implemented, i.e. the effect of fringefield is considered at a point. To see the effect of fringe field on the motion ofcharged particle, we take as Gaussian surface a truncated square circular cylinderof radius R coaxial with the solenoid. One end is well inside the solenoid, where

Pramana – J. Phys., Vol. 69, No. 4, October 2007 559

Page 10: Development of 2D particle-in-cell code to simulate high

S C L Srivastava, S V L S Rao and P Singh

B

Gaussian Surface(Truncated Cylinder)

Circular Area

Cylindrical Area

Figure 2. Side view of Gaussian surface in the solenoid.

the field is B0 in the axial direction, and the other is well outside, where the fieldis zero as in figure 2.

Then over this surface,∮

~B · d~S = 0. (50)

So

πR2B0 = 2πR

∫~Brdz. (51)

Simply put, all the flux leaving the cylinder cap inside the solenoid must have comein through the sides of the cylinder. This means that there is an irreducible amountof integrated radial magnetic field through the fringe field region:

∫~Brdz = B0R/2. (52)

The effect of the fringe field on a particle of charge q traveling with axial velocitycomponent vz = dz/dt is to kick it sideways with a force

Fθ = ∓qvzBr = dpθ/dt (53)

or

dpθ = ∓qBrdz, (54)

∆pθ = q

∫Brdz = ∓qB0R/2. (55)

The negative (positive) denotes the entrance (exit) of the beam in the solenoidfield. There is no change in pr and pz. Let us transform these changes in Cartesiancoordinates. As

∆px

∆py

∆pz

=

cosφ − sin φ 0sin φ cosφ 0

0 0 1

0∆pθ

0

, (56)

560 Pramana – J. Phys., Vol. 69, No. 4, October 2007

Page 11: Development of 2D particle-in-cell code to simulate high

Development of 2D PIC code

so

∆px = ±qB0

2y, (57)

∆py = ∓qB0

2x. (58)

At the beginning and at the end of the solenoid, the transverse velocity changesaccording to (57) and (58) but there will be no change in position as we haverepresented the field as a Dirac-delta distribution. Inside the solenoid, magneticfield is constant and so the equations of motion are

dvx

dt=

q

m(Ex + vyB0), (59)

dvy

dt=

q

m(Ey − vxB0). (60)

6.2 Quadrupole

The field of quadrupoles [9] is given by the following equations:

Bx = B0y

aand By = B0

x

a, (61)

where a is the aperture of the quadrupole. The equations of motion (1) are nowaugmented with the magnetic field values given by (61).

7. Code validation and low energy beam transport simulation

To validate the code, we have chosen to study the evolution of round uniform beamfollowing KV distribution in the drift space. As the space-charge forces are linear,the envelope equation can be written as [9]

r′′m =ε2

r3m

+I

I0

2β3γ3rm

, (62)

where β and γ are relativistic parameters. This equation is numerically evaluatedfor a 50 keV, 30 mA proton beam and then evolution is compared with that obtainedby the PIC code. The difference in the two solutions (defined as difference of twoenvelope radius divided by envelope radius calculated from (62)) is less than 10−2.The two solutions are plotted in figure 3 and are found to be in good agreement.

We have used our code to simulate the LEBT for the 20 MeV, 30 mA proton ac-celerator being built in BARC [1]. A comparison between the parameters obtainedby TRACE2D and our code is presented. The LEBT is designed using TRACE2Dwith the following input Twiss parameters, ε = 0.02π cm mrad, βx = βy = 24.768

Pramana – J. Phys., Vol. 69, No. 4, October 2007 561

Page 12: Development of 2D particle-in-cell code to simulate high

S C L Srivastava, S V L S Rao and P Singh

0 0.1 0.2 0.3 0.4 0.5 0.6 0.70

0.01

0.02

0.03

0.04

0.05

0.06

z (m)

Env

elop

e R

adiu

s (m

)

PICKV Eq.

Figure 3. Envelope radius as a function of distance traveled in drift space.

cm/rad, γx = γy = 0.171 rad/cm and αx = αy = −1.8 and the output parametersare found to be ε = 0.02π cm mrad, αx = αy = 1.8, βx = βy = 6.43 cm/rad andγx = γy = 0.659 rad/cm. The lattice parameters of the LEBT is given in table2. As TRACE2D is an envelope tracking code, a constant emittance is obvious.With the same input parameters and lattice, we obtain the output parameters asεx = 0.0231π cm mrad, εy = 0.0224π cm mrad, αx = 1.834, αy = 1.90, βx = 6.61cm/rad, βy = 6.87 cm/rad and γx = 0.690 rad/cm, γy = 0.672 rad/cm. The par-ticle trajectories calculated using these parameters are shown in figure 4. As thenumerical simulations are sensitive to mesh size, we found that for this problemthere is no significant change in the output for mesh size greater than 128 × 128.All the calculations are therefore performed on a mesh size of 128× 128.

8. Effect of different distributions on the beam envelope

To bring out the capabilities of simulating the non-linear space-charge fields withthis code, we have simulated the behaviour of beam with different particle dis-tributions in the designed LEBT. Since waterbag and parabolic distributions arenon-uniform in 2D (x–y) projections, they will give rise to non-linear space-chargefield. The effect of non-linearity is clearly seen in the form of increase in the outputemittance values. They are found to be εx = 0.0231, 0.0276 and 0.0336π cm mrad,εy = 0.0224, 0.0254 and 0.0341π cm mrad for KV, waterbag and parabolic distrib-ution respectively in each plane. The phase space projection on x–x′ at the inputand output are shown in figure 5. The initial Twiss parameters and emittance val-ues are taken to be the same as mentioned in §7. Furthermore, the effect of variousdistributions is clearly visible on the maximum beam radius as shown in figure 6.

562 Pramana – J. Phys., Vol. 69, No. 4, October 2007

Page 13: Development of 2D particle-in-cell code to simulate high

Development of 2D PIC code

0 20 40 60 80 100 120 140 160 180 200−7

−6

−5

−4

−3

−2

−1

0

1

2

3

4

5

6

7

Distance (cm)

x (c

m)

Figure 4. Trajectories of particles in LEBT in x–z plane.

Table 2. LEBT (using solenoids and drift) parameters.

Element Length (cm) Strength (T)

Drift 60Solenoid 30 0.1903Drift 50Solenoid 30 0.2113Drift 15

Table 3. LEBT (using quadrupole and drift) parameters.

Element Length (cm) Strength (T/m)

Drift 60Quadrupole 5 3.205Drift 10Quadrupole 5 −3.392Drift 50Quadrupole 5 3.695Drift 10Quadrupole 5 −3.758Drift 10

For comparison, we designed a beam transport system using magnetic quadrupolelenses instead of solenoids. The input/output parameters are chosen the sameas in case of LEBT containing solenoids and the designed LEBT (beam) opticalparameters using TRACE2D are given in table 3.

On simulation with our code with these parameters for KV distribution, theoutput turns out to be: εx = 0.021π cm mrad, εy = 0.026π cm mrad, αx = 2.693,

Pramana – J. Phys., Vol. 69, No. 4, October 2007 563

Page 14: Development of 2D particle-in-cell code to simulate high

S C L Srivastava, S V L S Rao and P Singh

−6 −4 −2 0 2 4 6−150

−100

−50

0

50

100

150

x (mm)

x’ (

mra

d)

Input KV Distribution

−6 −4 −2 0 2 4 6−150

−100

−50

0

50

100

150

x (mm)

x’ (

mra

d)

Output(KV)

(a) (b)

−6 −4 −2 0 2 4 6−150

−100

−50

0

50

100

150

x (mm)

x’ (

mra

d)

Input Waterbag Distribution

−6 −4 −2 0 2 4 6−150

−100

−50

0

50

100

150

x (mm)

x’ (

mra

d)

Output(Waterbag)

(c) (d)

−6 −4 −2 0 2 4 6−150

−100

−50

0

50

100

150

x (mm)

x’ (

mra

d)

Input Parabolic Distribution

−6 −4 −2 0 2 4 6−150

−100

−50

0

50

100

150

x (mm)

x’ (

mra

d)

Output(parabolic)

(e) (f)

Figure 5. Phase space projections of different distributions: (a) KV, (c)waterbag and (e) parabolic in x–x′ plane at the input while (b), (d) and (f)are at the output of LEBT in the corresponding order.

αy = 1.061, βx = 13.907 cm/rad, βy = 3.657 cm/rad, γx = 0.593 rad/cm and γy =0.581 rad/cm. The emittances were poorer in cases of waterbag (εx = 0.0259, εy =0.0298), and parabolic (εx = 0.0324, εy = 0.0394π cm mrad) distributions. Thepoorer emittances were due to non-linearity in the space-charge field. The maximumbeam radius (10.16 cm) and beam radius at the end of the LEBT (0.32 cm) arefound to be in agreement with the values obtained by TRACE2D (10 cm, 0.43 cmrespectively). The beam radius as a function of z is shown in figure 7.

564 Pramana – J. Phys., Vol. 69, No. 4, October 2007

Page 15: Development of 2D particle-in-cell code to simulate high

Development of 2D PIC code

0 50 100 150 2000

1

2

3

4

5

6

7

z (cm)

x (c

m)

KV distribution

Waterbag distribution

Parabolic distribution

Figure 6. Effect of different distributions on maximum envelope radius.

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.60

2

4

6

8

10

12

z (m)

Bea

m r

adiu

s (c

m)

x−envelope

y−envelope

Figure 7. Variation of beam radius in the two transverse planes as a functionof longitudinal distance in the LEBT.

9. Conclusion

The 2D PIC program for studying the beam dynamics in LEBT system has beendeveloped. The results are found to be in good agreement with theoretical analysis.The algorithm implemented has good accuracy and takes a reasonable amount ofcomputer time. It is planned to incorporate collisions of protons with neutralgas atoms and molecules for charge compensation estimation using Monte Carlotechnique.

Acknowledgements

We thank Drs V C Sahni, S Kailas and R K Choudhury for their keen interestin this work. We also thank Dr Kartik Patel, Rajni Pande, Tushima Basak andShweta Roy for many useful discussions.

Pramana – J. Phys., Vol. 69, No. 4, October 2007 565

Page 16: Development of 2D particle-in-cell code to simulate high

S C L Srivastava, S V L S Rao and P Singh

References

[1] P Singh et al, Pramana – J. Phys. 68, 331 (2007)[2] K R Crandall and D R Rusthoi, Computer program TRACE2D, LANL Report, LA-

10235 (1986)[3] K L Brown and S K Howry, TRANSPORT/360, a computer program for design

charged particle beam transport system, SLAC report No. 91 (1970)[4] B Austin, T W Edwards, J E O’Meara, M L Palmer, D A Swenson and D E Young,

MURA Report No. 713 (1965)D A Swenson and J Stovall, LANL Internal Report MP-3-19 (1968)J P Boicourt and Charles R Eminhizer (eds), AIP Conference Proceedings (New York,1988) vol. 177, p. 1

[5] K R Crandall, T P Wangler and Charles R Eminhizer (eds), AIP Conference Pro-ceedings (New York, 1988) vol. 177, p. 22

[6] A Friedman, D P Grote and I Haber, Phys. Fluids B4, 2203 (1992)[7] Y K Batygin, Nucl. Instrum. Methods in Phys. Res. A539, 455 (2005)[8] C K Birdsall and A B Langdon, Plasma physics via computer simulation (IOP, Bristol

1991)[9] M Reiser, Theory and design of charged particle beams (John Wiley & Sons, New

York, 1994)[10] Matteo Frigo and Steven G Johnson, The design and implementation of FFTW3,

Proc. IEEE 93(2), 216 (2005)[11] J P Boris, Relativistic plasma simulation-optimization of a hybrid code, Proc. 4th

Conf. Num. Sim. Plasmas, Naval Res. Lab., November 1970

566 Pramana – J. Phys., Vol. 69, No. 4, October 2007