Advances in Self-Consistent Accelerator modeling John R. Cary - - PowerPoint PPT Presentation

advances in self consistent accelerator modeling
SMART_READER_LITE
LIVE PREVIEW

Advances in Self-Consistent Accelerator modeling John R. Cary - - PowerPoint PPT Presentation

Advances in Self-Consistent Accelerator modeling John R. Cary University of Colorado and Tech-X Corporation Presented at TJNAF 25 May 06 and the VORPAL TEAM Dan Barnes, David Bruhwiler, Richard Busby, Johan Carlsson, John R. Cary, Dimitre


slide-1
SLIDE 1

Advances in Self-Consistent Accelerator modeling

John R. Cary University of Colorado and Tech-X Corporation Presented at TJNAF 25 May 06 and the VORPAL TEAM Dan Barnes, David Bruhwiler, Richard Busby, Johan Carlsson, John R. Cary, Dimitre Dimitrov, Eugene Kashdan, Peter Messmer, Chet Nieter, Viktor Przebinda, Nate Sizemore, Peter Stoltz, Raoul Trines, Seth Veitzer, Wen-Lan Wang, Nong Xiang NSF, the DOE SBIR program

slide-2
SLIDE 2

2

Advances in Self-Consistent Electromagnetic Modeling

  • Complex cavity computations with particles have

been improved through algorithms, including parallelization, making possiblle computations of wakefields in complex structures, intrabunch effects, injectors, …

  • Summary of some of what has made this possible

– Local charge and current deposition methods – Parallelization – Improved stability – Boundary representations

  • Comparison with

– Finite element approaches – Unitary separation approaches

slide-3
SLIDE 3

3

The goals of modeling?

  • Part of the design process

– Create – Simulate – Build – Test

  • Simulation for prediction of

– Cavity losses – Instability

  • In general for

– Exploration – Confirmation – Elucidation

slide-4
SLIDE 4

4

Modeling allows one to answer questions without construction cost

NLC ILC (Tesla)

slide-5
SLIDE 5

5

Basic problem in charge particles moving in EM fields

  • Maxwell
  • Particle sources
  • Particle dynamics

B t = E E t = c2 Bµ0j

[ ]

  • B = 0
  • E = /0

j = qivi(x xi)

  • =

qi(x xi)

  • d v

( )

dt = qi mi E(xi,t)+ vi B(xi,t)

[ ]

dxi dt = vi

Auxiliary equations

slide-6
SLIDE 6

6

With much other physics added for a complete model

  • Particle injection
  • Dark currents
  • Multipactoring
  • Photon (short wavelength) production
  • Surface resistance
  • Secondary emission
slide-7
SLIDE 7

7

ELECTROMAGNETICS

slide-8
SLIDE 8

8

Yee: 2nd order accurate spatial differentiation

  • At the midpoint
  • Leads to special layout
  • f values in a cell
  • Yee mesh gives 2nd
  • rder accuracy of spatial

derivatives

Bx t = Ez y + Ey z

Ez

y yj yj+1 Ez y = Ez, j+1 Ez, j y +O(y2) x z

Bx Ez Ez Ey Ey By Ex Bz

slide-9
SLIDE 9

9

Second-order in time by leap frog

  • Time centered differences give second order accuracy in Δt
  • Can get time-collocated values by half-stepping in B
  • Similar for E update, except c2 factor

tn tn+1 tn+1/2 tn+3/2 En En+1 En+2 Bn+1/2 Bn+3/2 Bn+1

Bx t = Ez y + Ey z Bx,i, j,k

n+1/2 Bx,i, j,k n1/2 = t Ez,i, j,k n

Ez,i, j+1,k

n

y + Ey,i, j,k+1

n

Ey,i, j,k

n

z

slide-10
SLIDE 10

10

Matrix representation useful for stability

  • Magnetic and electric spaces are different
  • C, C’ are adjoints, so D is self-adjoint (symmetric)
  • Diagonalize into separate harmonic oscillators
  • Leap frog for harmonic oscillator, stability limit at

dBx,i, j,k dt = Ez,i, j,k Ez,i, j+1,k y + Ey,i, j,k+1 Ey,i, j,k z

  • db

dt = C•e de dt = c2 C •b d2b dt2 = c2C•

  • C •b = D•b

maxtCFL = 2 tCFL = 1 c 1 x2 + 1 y2 + 1 z2

slide-11
SLIDE 11

11

Gershgorin Circle Theorem gives stability bound

  • Frequencies are eigenmodes of D = c2 C’C
  • Eigenvalues in range
  • Gives precise range for infinite grid
  • Points to relation between coefficients and

frequencies for other cases

0 <2 < max Dij

j

  • ver i
slide-12
SLIDE 12

12

Many other methods available

  • Finite element - later
  • Hamiltonian splitting (de Raedt): into exactly solvable

parts – known: – stable approximate solution (since unitary): – Similar to drift-kick of symplectic integration – Lee and Fornberg (2005) have improved method based on Zheng et al (1999)

  • Smith, Cary, Carlsson now have implicit, charge-

conserving algorithm

d b,e

( )

dt = A• b,e

( ) = M•N• b,e ( )

dUM dt = M•UM dUN dt = N•UN U(t) = UN(t /2)•UM (t)•UN(t /2)

slide-13
SLIDE 13

13

PARTICLES

slide-14
SLIDE 14

14

Computing particle-particle interactions is prohibitive

  • Coulomb interaction leads to Np2 force

computations

  • Lenard-Weichert (retarded potentials) - worse due

to need to keep history

divi dt = qi 0mi qj xi x j xi x j

3 j

  • divi

dt = qi 0mi qjFij(xi,

j

  • x j(t ))
slide-15
SLIDE 15

15

Particle In Cell (PIC) reduces to Np scaling

  • Particle contributions to

charges and currents are added to each cell: O(Np)

  • perations
  • Forces on a particle are

found from interpolation of the cell values: O(Np)

  • perations
slide-16
SLIDE 16

16

Finding the force: interpolation (gather)

  • Linear weighting for each

dimension

– 1D: linear – 2D: bilinear = area weighting – 3D: trilinear = volume weighting

  • Force obtained through 1st
  • rder, error is 2nd order
  • For simplicity, no loss of

accuracy, weight first to nodal points

Ex,yee Ex,yee Ex,node

slide-17
SLIDE 17

Efficiency

Avoiding Poisson

slide-18
SLIDE 18

18

Only certain EM algorithms ensure Poisson satisfied

E t = c2 Bµ0j

[ ]

  • E = /0

satisfied always if and

  • E = /0

and

  • t = • j

Ex x + Ey y + Ez z = /0

initially

Ex x + Ey y + Ez z = /0

finite difference version

  • t = jx

x + jy y + jz z

slide-19
SLIDE 19

19

A special scatter ensures finite difference charge conservation

  • Principle: apportion via some weighting
  • Computing the charge density

– Compute the current density and find the charge density from finite difference – Directly weight particles to the grid

  • If these two methods do not agree, then
  • ne can have false charge buildup from

the Ampere-Maxwell equation. Requires Poisson solve to remove.

  • Villasenor/Buneman explicitly

conserves charge, but is noisier

Current contrib. to this interface must match charge difference change across separated cells

j t

slide-20
SLIDE 20

20

EM algorithm must take numerically divergenceless to numerically divergenceless

Ex

n

x + Ey

n

y + Ez

n

z = 0 Ex

n+1

x + Ey

n+1

y + Ez

n+1

z = 0 En+1 = M•En

and implies

slide-21
SLIDE 21

21

Mardahl and Verboncoeur show importance of getting this right

slide-22
SLIDE 22

22

Parallelism: domain decomposition

Domain 1 Domain 2 Domain 3 Domain 4

slide-23
SLIDE 23

23

Parallelism rules of thumb

  • Communication is expensive
  • Global solves are really expensive
slide-24
SLIDE 24

24

Overlap of communication and computation needed for speed

  • Non overlap algorithms:

– Compute domain – Send skin (outer edge) – Receive guard – Repeat

  • Overlap algorithms

– Compute skin – Send skin – Compute interior – Receive guard – Repeat

Skin Guard GuardPlus Body

slide-25
SLIDE 25

25

Similar overlap possible for particles

  • Move particles and weight

currents to grid

  • Send currents needed by

neighboring processors

  • Send particles to neighboring

processors

  • Update B for half step
  • Receive currents and add in
  • Update E, B
  • Receive particles

Without charge conserving current deposition, further costly global solve

slide-26
SLIDE 26

26

1 104 104 # processors s(N)

VORPAL implements basic algorithms in highly scalable manner

  • Self-consistent EM modeling

– Full EM or electrostatic + cavity mode – Particle in cell with relativistic or nonrelativistic dynamics

  • But has other capabilities

– Impact and field ionization – Fluid methods for plasma or neutral gases – Implicit EM – Secondary emission

VORPAL scales well to 1,000’s of processors (strong scaling)

Object-oriented and flexible (Arbitrary dimensional)

  • And is modern

– Serial or Parallel (general domain decomposition) – Cross-platform (Linux, AIX, OS X, Windows) – Cross-platform binary data (HDF5)

slide-27
SLIDE 27

27

Simplest algorithm allows complex computations

  • Example: formation of beams in laser-plasma

interaction

slide-28
SLIDE 28

28

Elucidation: long pulses shorten to resonance, capture, loading, acceleration

slide-29
SLIDE 29

29

Simulations have found the hosing problem

slide-30
SLIDE 30

30

Complications: boundaries

slide-31
SLIDE 31

31

Modes computed with combination of FFT and fitting

  • Spherical cavity
  • Resonant current

driver

  • FFT measurement
  • f frequency, for

accuracy by fitting

slide-32
SLIDE 32

32

Early work on structured meshes had stair-step boundary conditions

  • N (L/Δx) cells in each direction
  • Error of (Δx/L)3 at each surface cell
  • O(N2) cells on surface
  • Error = N2(Δx/L)3 = O(1/N)

120x24x24 = 71,424 cells = 215,000 degrees of freedom

slide-33
SLIDE 33

33

Convergence studies confirm result, indicate modeling problem

  • Stair-step error is 10-3

at 5000 cells per dimension, error linear with cell size

  • 1011 cells for 3D

problem This approach will not give answer even on large, parallel hardware

slide-34
SLIDE 34

34

Finite elements give one approach to improved boundary modeling

  • Tau3P, HFSS, …

B = bk (t)uk

B(x)

  • B

t = dbk dt (t)uk

B(x)

  • E =

el(t)ul

E(x)

  • E =

el(t) ul

E(x)

  • dbk

dt (t)uk

B(x)

  • =

el(t) ul

E(x)

  • d3x

dbk dt (t)u

k B (x)uk B(x) k

  • =

d3x el(t)u

k B (x)• ul E(x) l

  • Mb • db

dt = C•e Me • de dt = c2 C •b

slide-35
SLIDE 35

35

Finite elements require global solves, more intense particle calculations

  • Global mass matrix inversion required at each step
  • Self consistency difficult and charge conservation not

guaranteed

  • Difficult to follow particles

– List of regions – List of FE’s with support in that region – Complex FE element evaluation at each time step for each particle

Me • de dt = c2

  • C •b µ0j

( )

Mb • db dt = C•e jl = qiviul

E xi((n+1/2)t)

( )

ptcls i

slide-36
SLIDE 36

36

Resurgence of regular grids: cut cells give same accuracy as finite elements

  • For cells fully interior, us

regular update

  • For boundary cells:

– Store areas and lengths – Update fluxes via – Update fields via Ex Ey Φxy

˙

  • xy = Exl x Eyl y

Bz = xy / Axy

slide-37
SLIDE 37

37

Cut-cell boundary conditions accurately represent geometry

  • Tesla 2000 cavities
  • 312x56x56 (106) cells
slide-38
SLIDE 38

38

Dey-Mittra (1997) cut-cells allow 10-4 accuracy

  • Fewer than 107 cells

for cavity modeling at

  • ne part in 105
  • Implementation exists

now in VORPAL

  • No significant

additional computational cost

slide-39
SLIDE 39

39

Beam problems provide motivation for further work

  • SRF accelerating cavities
  • SRF guns
  • Crab cavities
slide-40
SLIDE 40

40

Regular, structured grids allow for self- consistent integration of particles

Wakefield for Tesla cavities computed by VORPAL in 3D

slide-41
SLIDE 41

41

Self-consistent EM gun simulations in complex cavities

  • Emitted

beam

  • Wakes from

constrictions

slide-42
SLIDE 42

42

Now simulating dipole modes in symmetric cavities

slide-43
SLIDE 43

43

Crab cavity generation, visualization, computation of splitting

  • CAD representations
  • Python coding of shapes
slide-44
SLIDE 44

44

Dey-Mittra problem: small triangles give high frequencies, small time steps

  • B update matrix coefs ~ length/area
  • Length/area becomes infinite as area vanishes
  • Get localized, high-frequency modes
  • Must throw out small cell fragments
slide-45
SLIDE 45

45

Improvement on cut-cell recently discovered

  • New method gives error lower than Dey-Mittra
  • Does not have reduction of stable Δt
  • Favorable properties re particle introduction
  • Now being implemented
slide-46
SLIDE 46

46

Each new study inspires capability, brings requests

  • Laser-plasma: self-consistency, parallelism

– Higher-order particle shapes

  • Accelerating cavities: shape modeling

– Higher-order field to particle near walls – Resistive walls for complex shapes – Implicit EM solvers

  • Electron guns

– Better emission models

  • Crab cavities

– Notch filters, LOM couplers

slide-47
SLIDE 47

47

Summary

  • Self-consistent EM modeling has progressed

– High-performance, self-consistent computations – Accurate treatment of boundaries – Secondary emission – Absolutely stable charge-conserving algorithm

  • Remain algorithm needs

– Conformal resistive walls

  • Remain implementation needs

– Surface resistance – Dark currents – Photonic emission – Absolutely stable charge-conserving algorithm

  • Remains work in simulation setup

– Defines cavity shapes – Define particle beams