24
Joanne Beebe-Wang SPACE CHARGE SIMULATION METHODS INCORPORATED IN SOME MULTI-PARTICLE TRACKING CODES AND COMPARISON OF RESULTS Joanne Beebe-Wang Brookhaven National Laboratory, Upton, NY, USA April 3, 2009 1 Friday, April 3, 2009

SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

SPACE CHARGE SIMULATION METHODS INCORPORATED IN SOME MULTI-PARTICLE TRACKING CODES

AND COMPARISON OF RESULTS

Joanne Beebe-WangBrookhaven National Laboratory, Upton, NY, USA

April 3, 2009

1Friday, April 3, 2009

Page 2: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

Outline1. Why space charge codes

2. Why compare space charge codes

3. How it is done in SIMPSONS

4. How it is done in SIMBAD and ORBIT

5. Compare SOR Method with FFT Method in emittance simulation of RCMS

6. Compare FFT method with SIMPSONS with KV, Waterbag and Gaussian distribution

7. Conclusion

8. Discussion (boundary condition)

2Friday, April 3, 2009

Page 3: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

Space Charge Force

Space charge effects is one of the major sources of emittance growth, halo/tail formation and beam loss.

Because of its nature of electromagnetic force proportional to 1/γ2, it is significant only at low energy.

Space charge force function of beam size in transverse and longitudinal directions, number of particles and the particle distribution in a bunch .

Once the beam emittance growth occurs, the beam is no longer affected by the same space charge force as the one before.

In the case of multi-turn injection, the number of particles is gradually increased as a function of turn number throughout the process.

The transverse emittance is sometimes also manipulated by the so-called phase space painting.

The peak intensity and the length of a bunch strongly depend on the RF voltage pattern applied.

3Friday, April 3, 2009

Page 4: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

Space Charge Simulation Codes

The analysis of space charge effects difficult. So, computer simulation is the only way to model the effects and analyze beam behavior in a self-consisted way.

A complete simulation code can be characterized by full 6-D phase space tracking of a beam propagating through a machine lattice, in the presence of particle-to-particle and particle-to-wall interactions.

In the last two decades, many computer codes for multi-particle multi-dimensional beam simulation have been developed with different degree of completeness. They include

ACCSIM (F. W. Jones,1998)TRACKxD (C. R. Prior, 1990)WARP3D (A. Friedman, 1998)SIMPSONS (S. Machida, 1990)IMPACT with MaryLie (R. Ryne, J. Qiang) ORBIT (J. D. Galambos, J. A. Holmes, D. K. Olsen, A. Luccio and J. Beebe-Wang,1999)SIMBAD (A.U. Luccio and N.L.D’Imperio, 2007)...

4Friday, April 3, 2009

Page 5: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

How do Space Charge Simulation Codes Work

Normally, the machine lattice is represented by matrices and higher order transformations obtained by an external optics code (such as MAD, DIMAD, SYNCH, TEAPOT and TRANSPORT).

The particle-to-particle and particle-to-wall interactions are calculated with PIC (Particle In Cell) algorithms.

The space charge forces or potential are obtained by solving Poisson equation with different strategies.

Each strategy may have its advantage and disadvantage. They may also present slightly different results.

So, simulation codes should be compared to experimental observations and available theories, as well as benchmarked against each other.

5Friday, April 3, 2009

Page 6: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

Transverse Space Charge Nodes in SIMBAD / ORBIT

Space Charge forces are calculated in the codes by solving the Poisson equation, in either differential form

, (1)

or in integral form

, (2)

where Φ the electric potential, P a field point and Q a source point. The factor , with γ the particle total energy in terms of the mass energy, represents the partial compensation of the electric repulsion between charges and the magnetic attraction between current elements, in the assumption (generally well satisfied in a synchrotron) that the beam bunch is Lz >> Lx, Ly.

The elliptic differential Equation (1) is solved by writing the Laplacian on a finite mesh extending to the walls, and solving the resulting linear system with boundary conditions by LU decomposition, SOR (Successive Over Relaxation), modes decomposition

The integral equation (2) is also solved by Brute Force or Convolution (FFT).

∇2Φ =ρ

ε0γ2

Φ(P ) =1

4πε0γ2

∫ρ(Q)

rdQ

6Friday, April 3, 2009

Page 7: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

the Poisson equation in differential form (1) is solved with a boundary condition of perfectly conducting circular pipe in cylindrical coordinates for a 3-D beam or in polar coordinate for 2-D beam:

. (3)

Once a charge distribution at grid points is obtained, it is Fourier transformed in the azimuthal direction:

, (4)

. (5)

with the inverse transform,

, (6)

. (7)

POISSON EQUATION SOLVER USED BY SIMPSONS (1)

7Friday, April 3, 2009

Page 8: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

Note that, n-m=nm*, then,

. (8)

The general solution to the equation (m≥0) is:

(9)

With the boundary condition φm=0 at r=b (b is the beam pipe radius), it becomes

, (10)

where

for m=0 (11)

for m≠0 (12)

where φ-m=φm* is used to compute φm for m<0.

POISSON EQUATION SOLVER USED BY SIMPSONS (2)

8Friday, April 3, 2009

Page 9: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

POISSON EQUATION SOLVER USED BY SIMPSONS (3)

In practice, the integral is replaced with summation at grid points. The electric field differentiations are done analytically beforehand (except with z):

(13)

(14)

(15)

The nature of Poissons equation solver in SIMPSONS makes it convenient for studies by modes.

9Friday, April 3, 2009

Page 10: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

Transverse Space Charge Nodes in SIMBAD / ORBIT

The transverse space charge nodes provide a transverse kick due to the space charge force. There is a base class called TransSC.

There are five derived kinds of transverse space charge nodes: (1) pair-wise sum, (ORBIT)(2) brute-force Particle-In-Cell (PIC), (ORBIT, SIMBAD)(3) FFT Particle-In-Cell (PIC), (ORBIT, SIMBAD)(4) LU decomposition, (SIMBAD)(5) Successive Over Relaxation (SOR) iterative, (SIMBAD)

To use any of these meaningfully it is necessary to add many of these nodes around a ring, including at least one node per scale length of the beam shape variation and > 10 per betatron oscillation.

The easiest way to add these nodes is to insert a node after each transfer matrix included in the lattice file. This requires generation of a lattice file with sufficient fineness.

10Friday, April 3, 2009

Page 11: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

Transverse Space Charge Method #1: Pair-wise sum

Simply calculates the Coulomb force on one particle by summing the force over all other particles.

A smoothing parameter (εs) is included in the calculation as an additional length used in calculating the particle separation distances. Typically one uses a length very small compared to the beam transverse size, in which case it only reduces the Coulomb force between near-neighbors. This smoothing parameter can prevent spurious kicks.

No binning is done with this scheme.

Simple, but requires ~ N^2 operations to calculate the kicks, where np is the number of macro-particles. Exceedingly slow, should only been used for checking other faster methods. Not recommended for normal simulations.

11Friday, April 3, 2009

Page 12: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

Transverse Space Charge Method #2: Brute-Force (PIC)

A straight-forward particle in cell implementation.

The macro-particles are binned on a prescribed X-Y grid, the force at each grid point is calculated using the binned particle distribution, and the force on each particle is calculated by a bi-linear interpolation from the grid.

The grid extent is determined by first calculating the macro-particle extreme locations, and by making a rectilinear grid extending a prescribed amount beyond the particle extent.

A smoothing parameter is also used in calculating the force between grid points. This smoothing parameter can be used if the bins are sparsely populated, and should have magnitude comparable to the bin spacing. However, it is recommended to use enough macro-particles to populate the bins to at least 10 particles per bin, and let the smoothing parameter → 0.

The dominant calculation time for this method is typically the force calculations on the grid, which is ~ (Nbin)^4 operations. Faster than the pair-wise sum method. Slower than FFT method.

12Friday, April 3, 2009

Page 13: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

Transverse Space Charge Method #3: FFT (PIC)

Similar to the brute-force PIC. First binning macro-particles to a grid, then calculating the force distribution on the grid, and finally by interpolating the force from the grid back to each macro-particle. The difference is that an FFT method is used to calculate the force on the grid using the binned particle distribution.

The grid is determined automatically, by first calculating the macro-particle extrema location, and by making a rectilinear grid centered at the average macro-particle (x,y) location, but extending twice as far as any particle. This buffer of empty bins is provided to prevent any false force contributions from the FFT method. The grid extent is not adjustable.

A smoothing parameter is also used in the force calculation between grid points, This smoothing parameter can be used if the bins are sparsely populated, and should be comparable to the bin spacing. However, it is recommended to use enough macro-particles to populate the bins to at least 10 particles per bin, and let the smoothing parameter → 0.

The computation requires only ~ 2 Nbin log(Nbin) operations.

The method works for an arbitrary number of bins. but the most efficient usage is to have a number of bins that is a power of 2.

13Friday, April 3, 2009

Page 14: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

Transverse Space Charge Method #4: LU decomposition

The elliptic differential Equation is solved by difference methods.

1. Write the Laplacian on a finite mesh extending to the walls: AΦ=b

2. Write matrix A into product of a lower and an upper triangular matrices:AΦ=LUΦ=b

3. First solve the equation Ly=b for y by forward substitution

4. Then solve the equation UΦ=y for Φ by backward substitution

5. The computation requires (Nbin^3) /3 + Nbin^2 operations.

14Friday, April 3, 2009

Page 15: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

Transverse Space Charge Method #5: SOR

The elliptic differential Equation is solved by difference methods.

1. Write the Laplacian on a finite mesh extending to the walls: AΦ=b

2. Write matrix A into sum of a diagonal, a strictly lower triangular and an strictly upper triangular part of A respectively: A=D+L+U

3. The successive over relaxation (SOR) iteration is defined by the recurrence relation: (D+ωL) Φ_(k+1)=[ωU+(1-ω)D]Φ_k + ωbwhere Φ_k is the kth iteration and ω is a relaxation factor (an input parameter in SIMBAD).

4. Iteration is natural, since the beam transverse charge density

15Friday, April 3, 2009

Page 16: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

SOR Method vs. FFT Method emittance from RCMS simulations

Injection kinetic energy 7 MeVMin. extraction energy 70 MeVMax. extraction energy 250 MeVrepetition rate 30 HzMin. protons per bunch 1.0 x 107

Max. protons per bunch 1.7 x 109

Circumference, C 28.6 mNumber of FODO cells 13Half-cell length 1.1Dipole magnet length 0.682 mQuadrupole magnet length 0.14 mHorizontal tune, Qx 3.093Vertical tune, Qy 3.102Max. horizontal beta-x 3.64 mMax. vertical beta-y 3.64 mMax. dispersion 2.17 mHorizontal chromaticity -2.18Vertical chromatisity -2.64Transition gamma 2.391

All the physical quantities used in the simulations are chosen to be as close as possible to the specifications in the . design of RCMS.

The space charge tune-shift can be estimated with the analytical formula:

where rp=1.54×10-18 m is the classical proton radius, N is the total number of proton in the bunch, εN is the normalized beam emittance, Bf is the bunching factor, β and γ are relativistic factors. The largest spaced charge tune shift in RCMS is at the injection. Its value from the simulation results is 0.09 which agrees with the estimate with the analytical formula.

16Friday, April 3, 2009

Page 17: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

SOR Method vs. FFT Method RMS emittance from RCMS simulations

RMS horizontalemittance

RMS vertical emittance

17Friday, April 3, 2009

Page 18: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

SOR Method vs. FFT Method Maximum emittance from RCMS simulations

Maximum horizontalemittance

Maximum vertical emittance

18Friday, April 3, 2009

Page 19: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

SIMBAD/ORBIT (FFT) VS. SIMPSONS original SNS FODO lattice

105 macro particles

100 turns

peak current100A

corresponding to the proton accumulation of 2MW

Beam Kinetic Energy 1 GeVBeam Average Power 1.0-2.0 MWProton Revolution Period 0.8413 µsecRing Circumference 220.688 mNumber of Turns Injected 1225Beam Emittance εx,y 120 πmm-mrTunes νx / νy 1 1/290Max. βx / max. βy 19.2 / 19.2 mDispersion Xp (max/min) 4.1 / 0.0 m

19Friday, April 3, 2009

Page 20: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

SIMBAD/ORBIT (FFT) VS. SIMPSONS KV distribution, original SNS FODO lattice

Horizontalemittancedistribution

Verticalemittancedistribution

20Friday, April 3, 2009

Page 21: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

SIMBAD/ORBIT (FFT) vs. SIMPSONS Waterbag distribution, original SNS FODO lattice

Horizontalemittancedistribution

Verticalemittancedistribution

21Friday, April 3, 2009

Page 22: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

SIMBAD/ORBIT (FFT) VS. SIMPSONS Gaussian distribution, original SNS FODO lattice

Horizontalemittancedistribution

Verticalemittancedistribution

22Friday, April 3, 2009

Page 23: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

Conclusion1. The results of this study have demonstrated good agreements between the SOR and convolution (FFT) method in SIMBAD / ORBIT, as well as the method in SIMPSONS.

2. Very good understanding of these complex codes and a minimum 64x64 transverse grid points are necessities.

3. A smoothing parameter is introduced in the denominator to avoid singularities that arise when an individual representative macro-particle is too close to another particle in the integral formalism. Systematic simulations have shown that the importance of a smoothing factor decreases while the number of macro-particles increases.

4. The nature of Poissons equation solver in SIMPSONS makes it convenient for studies by modes.

5. All three codes are 2D+1D. Only suitable for bunches Lz >> Lx, Ly.

23Friday, April 3, 2009

Page 24: SPACE CHARGE SIMULATION METHODS INCORPORATED IN …

Joanne Beebe-Wang

Discussion (boundary condition)

The convolution (FFT) method takes less CPU time. However, it

(1) Could not include a conductive wall, as in most of realistic systems. (2) Requires square boundary which often is not the case of a beam line.

The SOR method allows to specify boundary conditions of any shape.

SIMPSONS assumes a boundary condition of a perfectly conducting circular pipe, which often is a good approximation of beam lines.

24Friday, April 3, 2009