Computation of Electromagnetic Fields Generated by ...

48
Algorithms and Applications Computation of Electromagnetic Fields Generated by Relativistic Beams in Complicated Structures Igor Zagorodnov 2016 North American Particle Accelerator Conference Chicago, USA 12. October 2016

Transcript of Computation of Electromagnetic Fields Generated by ...

Algorithms and Applications

Computation of Electromagnetic Fields Generated by Relativistic

Beams in Complicated Structures

Igor Zagorodnov

2016 North American Particle Accelerator Conference

Chicago, USA12. October 2016

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 2

Overview

Motivation Numerical Methods low-dispersive schemes boundary approximation indirect integration algorithm modelling of conductive walls

Code Status and Applications geometries of revolution (ECHOz1, ECHOz2 ) rectangular structures (ECHO2D) fully 3D geometries (ECHO3D) Particle-In-Cell code

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 3

Motivation

First codes in time domain ~ 1980A. Novokhatski (BINP), T. Weiland (CERN)

∂Ω

+∞−∞j cρ=

Wake field calculation – estimation of the effect of the geometry variations on the bunch

Wake potential

|| 0 01( , , ) , , ,z

z sW s E z dzQ c

−∞

− = r r r r

0 || 0( , , ) ( , , )s W ss ⊥ ⊥

∂ = ∇∂

W r r r r

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 4

MotivationMAFIA* (the Year 2000) rotationally symmetric and 3D longitudinal and transverse

wakes triangular geometry

approximation; arbitrary materials moving window dispersion error

NOVO** (the Year 2000) rotationally symmetric only longitudinal wake

(scalar wave equation) “staircase” geometry

approximation; only PEC moving mesh low dispersion error

** A. Novokhatski, M. Timm, T.Weiland, Transition Dynamics of the Wake Fields of Ultra Short Bunches, Proc.ICAP1998, Monterey, USA.

* MAFIA Collaboration, MAFIA Manual, CST GmbH, Darmstadt, 1997.

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 5

MotivationNew projects with short bunches; long structures; tapered collimators

Solutions zero dispersion in longitudinal direction; “conformal” meshing; moving mesh and “explicit” or “split” methods

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 6

Low-dispersive schemes

1 1

, ,

, ,

,

d ddt dt

ε μ− −

= − = +

= =

= =

Ce b Ch d j

Sb 0 Sd q

e M d h M b

z y

z x

y x

curl − = − −

0 P PC P 0 P

P P 0

( )* * *x y zdiv =S P P P

Dual grid

mm jd,

ih

ie

mb

Primary grid

Maxwell Grid Equations*

* T. Weiland, A discretization method for the solution of Maxwell’s equations for six-component fields, Electronics and Communication (AEÜ) 31, p. 116 (1977)

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 7

Low-dispersive schemes

xz

y

transverse planelongitudinal direction

y

x

y x

= − −

0 0 P

P 0T 0 0 P

P

z

z

− =

0 P 0P 0 00 0 0

L

z y

z x

y x

− = − −

0 P PC P 0 P

P P 0

I. Zagorodnov, T. Weiland, AConformal Scheme for WakeField Calculation, Proc. EPAC2002, Paris

Curl operator splitting (2002)

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 8

Low-dispersive schemes

nx

n nynz

=

hh h

h

0.5

0.5 0.5

0.5

nx

n nynz

+

+ +

+

=

ee e

e

FDTD (1966)

1

1

1 2 1 2

1

*

1 2

*( )n n

n n n

n nn n

t

t

ε

μ

+ −

++

− = + −Δ− =

Δ

e e M h h j

h h h M Ce

T L

Implicit Scheme* (2002)

1 1(1 2 )n n n nθ θ θ+ −≡ + − +h h h h

1

1

1 2 1 2*

11 2

( )n n

n n

n nn n

t

t

ε

μ

+ −

++

− = −Δ− =

Δ

e e M C h j

h h h M Ce

* I. Zagorodnov, R. Schuhmann, T. Weiland, Long-TimeNumerical Computation of Electromagnetic Fields in theVicinity of a Relativistic Source, Journal of ComputationalPhysics 191, No.2 , pp. 525-541 (2003)

C = T + L

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 9

Low-dispersive schemes

For fully rotationally symmetric problems (monopole mode m=0) our scheme in staircase approximation with θ=0.5 coincides with the equation realized in code NOVO**.

( )1 1 1

1 11 2 1 12 ,

2r z

n nn n n T n T n

z z r rtϕ

ϕ ϕϕ ϕ ϕ ϕ ϕμ ε ε− − −

+ −− − + − +

Δ − + = + +a a

M a a a P M P a P M P F

( ) ( )1 1 1 1

1 1 11 1 1

2 21

* *1

2 (1 2 )

,

ntn

s

n n n n n n n

d

t tμ ε μ ε

τ

θ θ θ

− − − −

−∞

+ − −

=

+ = − − − + − +

= Δ = Δ

a h

I T a a a T a a L a F

T M CM L M CMT L

Implicit Scheme (2002)

** A. Novokhatski, M. Timm, T. Weiland, Transition Dynamics of theWake Fields of Ultra Short Bunches, Proc. ICAP 1998, Monterey,California, USA.

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 10

nx

n nynz

=

hh h

h

xe

ye

zh

ze

xh

0τ 0 / 2τ τ+ 0τ τ+

yh

0.5

0.5 0.5

0.5

nx

n nynz

+

+ +

+

=

ee e

e

E/M splitting (Yee’s Scheme)0.5

0.5 0.5

0.5

nx

n nynz

+

+ +

+

=

hu h

e

nx

n nynz

=

ev e

h

TE/TM splitting

Subdue the updating procedureto the bunch motion

E/M and TE/TM* splitting (2004)

Low-dispersive schemes

* Zagorodnov I.A, Weiland T., TE/TMField Solver for Particle BeamSimulations without NumericalCherenkov Radiation, Phys. Rev. STAccel. Beams 8, 042001 (2005)

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 11

Low-dispersive schemes

1 1

0 0

1 1/ 2 1/ 2 1 00

1 1

z y

z x

y x

c μ ε− −−

− = = − −

0 P PC M CM P 0 P

P P 0

( ) ( )i

* *

, 0,1

iyix

i iy x

i

− = = −

0 0 PT 0 0 P

P P 0

0

1z

z

= −

0 P 0L P 0 0

0 0 0

transversal plane longitudinal direction

Curl operator splitting

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 12

Low-dispersive schemes

0.5 0.5 0.5 0.5

0 ,2

n n n nn n

+ − + −− += + +Δ

u u u uT Lv j

1 1* 0.5 0.5

1 2

n n n nn n

+ ++ +− += − +

Δv v v vT L u j

0.5 0.5*0

10.5

0

,n n

n n

n nn

τ

τ

+ −

++

− = +Δ− = −

Δ

e e C h j

h h C e

nx

n nynz

=

hh h

h

0.5

0.5 0.5

0.5

nx

n nynz

+

+ +

+

=

ee e

e

0.5

0.5 0.5

0.5

nx

n nynz

+

+ +

+

=

hu h

e

nx

n nynz

=

ev e

h

E/M splitting (1966) TE/TM splitting (2004)

dispersion error dispersion error suppressed forzτΔ = ΔzτΔ < Δ

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 13

Low-dispersive schemes

# #

1

0.5 0.5* *

z

n ne nz z

y x x y zετ −

+ −− =Δ

− + e eW M P h P h j

# #

1

1

z

n nh z z

y x x yμτ −

+

Δ− = −

h hW M P e P e

1 1 1 1

2 2* *

4 4z x z y

e eCN y y x xε μ ε μ

τ τ− − − −

Δ Δ= = + +W W I M P M P M P M P

Implicit TE/TM formulation

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 14

Low-dispersive schemes

TE/TM-ADI scheme

42 ( )e e

CN ADI O τ= + ΔW W

- splitting error

Explicit TE/TM scheme*

e h= =W W I

2( )eCN O τ= + ΔW I

ADI and Explicit TE/TM formulations (2009)

- splitting error

* Dohlus M., Zagorodnov I., Explicit TE/TM Scheme for ParticleBeam Simulations, Journal of Computational Physics 225, No. 8, pp.2822-2833 (2009)

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 15

Low-dispersive schemes

n+1 nn n- + =

τΔy yB Ay f

The stability condition

2 2 2

1x y z

τ− − −

Δ ≤Δ + Δ + Δ zτΔ ≤ Δ

E/M splitting TE/TM implicit(FDTD scheme)

Stability, energy and charge conservation

2 2

1min , zx y

τ− −

Δ ≤ Δ Δ + Δ

TE/TM explicit

0.5 0τΔ≡ − ≥Q B A

dispersion error suppressed for zτΔ = Δ

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 16

Low-dispersive schemes

22222

2 2 2 2

sinsinsinsin cosyxzKKK

z x yτ Ω = + + Ω Δ Δ Δ Δ

2222 22

2 2 2 2 2

sinsinsinsin 1 sinyxzz

KKK Kz x y z

ττ

Ω Δ= + + − Δ Δ Δ Δ Δ

No dispersion in z-direction + no dispersion along XY diagonals

Dispersion relation in the transverse plane

Implicit TE/TM scheme

Explicit TE/TM scheme

-1 0 10.88

0.9

0.92

0.94

0.96

0.98

1

-1 0 10.88

0.9

0.92

0.94

0.96

0.98

1

( )1tan x yk k− ( )1tan x yk k−

kcω

kcω5Nλ = 10Nλ =

explicit

implicit

explicit

implicit

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 17

Low-dispersive schemes

0 5 10 15 20 25 30 35 40 45 50

-5

0

5

-4 -2 0 2 40

20

40

60

80

100

120

140

160

180

-4 -2 0 2 40

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

Transverse Deflecting Structure

Gaussian bunch with sigma=300μm

explicit

implicit

VWpC m⊥

/s σ/s σ

[%]δ

exp

exp exp *100%max min

impW WW W

δ ⊥ ⊥

⊥ ⊥

−=

5hσ =

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 18

Boundary approximationStandard Conformal Scheme (1997)

zijsjyil 1+

xijl

PEC

reduced cell area time step must be reduced

Dey S, Mittra R. A locally conformal finite-difference time-domain (FDTD) algorithm for modeling threedimensional perfectly conducting objects, IEEE Microwave and Guided Wave Letters 7(9):273–275 (1997)

Thoma P. Zur numerischen Lösung der Maxwellschen Gleichungen im Zeitbereich, Dissertation Dl7: TH Darmstadt,1997.

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 19

Boundary approximation

New Conformal Scheme* (2002)

PEC

PEC lL

β =

1i jb +

,i j i jb

1i ju−

virtual cell

* Zagorodnov I., Schuhmann R.,Weiland T., A Uniformly Stable Conformal FDTD-Method on Cartesian Grids, International Journal on Numerical Modeling, vol. 16, No.2, pp. 127-141 (2003)

Time step is not reduced!

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 20

Boundary approximation

Square rotate by angle /8.

2

2

h

h

z z L

z L

H H

−=

PFC (Partially Filled Cells) ~ Dey-MittraUSC (Uniformly Stable Conformal)

101

10210

-4

10-3

10-2

10-1

100

( )O h

3( )O h

2( )O hUSC

/d h

δ

PFC

staircase

0 20 40 60 80 1000

0.2

0.4

0.6

0.8

1

PFC

USC

/d h

Ctt ΔΔ /

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 21

δ

1 10 100

0.01

0.1

1

( )O h

2( )O h

staircase

conformal

38 mm

z

r

1.9 mm335mrad

1e-3

1e-4

1e-5

δ

1 10 100

0.01

0.1

1

( )O h

2( )O h

staircase

conformal

38 mm

z

r

1.9 mm335mrad

1e-3

1e-4

1e-5

Error in loss factor for a taper

The error δ relative to the extrapolated loss factor L=-7.63777 V/pCfor bunch with σ=1 mm is shown.

0 5 10 15 20 25 30 35 405.8

6

6.2

6.4

6.6

6.8

7

7.2

7.4

7.6

7.8VpC

staircase

conformal

1calcL L Lδ −= −

Boundary approximation

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 22

Indirect Integration Algorithm

0C1C

0r 2C

z0z z=

1 0

szC

szC

m e dQ z e dzW−

= +

0 1 20 0

12

m mD S S SmC Cz m C

s ra

e z rdaβ βω ω ω ω− = − + − −

-1C

I. Zagorodnov, R. Schuhmann, T. Weiland, Journal ofComputational Physics 191, No.2 , pp. 525-541 (2003)

O. Napoly, Y. Chin, and B. Zotter, Nucl. Instrum. Methods Phys. Res. Sect. A 334, 255 (1993)

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 23

Indirect Integration Algorithm

Zagorodnov I., Indirect Methods for Wake PotentialIntegration, Phys. Rev. STAB 9, 102002 (2006)H. Henke and W. Bruns, in Proceedings of EPAC 2006,Edinburgh, Scotland (WEPCH110, 2006)

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 24

Indirect Integration Algorithm

Gaussian bunch with rms length 25 µm

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 25

Modelling of Conductive Walls

Tsakanian A., Dohlus M., Zagorodnov I., Hybrid TE-TMscheme for time domain numerical calculations ofwakefields in structures with walls of finite conductivity,Phys. Rev. STAB 15, 054401 (2012)

Zagorodnov I., Bane K., Stupakov G., Calculations ofwakefields in 2D rectangular structures, Phys. Rev. STAB18, 104401 (2015)

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 26

Modelling of Conductive Walls

2w= 10 cm, T=5 cm, 2b=2cm, L=12 cm.Gaussian bunch with rms length 25mm

Longitudinal wake potential of tapered collimator

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 27

Code Status

ECHOz1, ECHOz2 (rotationally symmetric) ECHO2D (rectangular and rotationally

symmetric) ECHO3D (fully 3D) ECHO-PIC (Particle-In-Cell for rotationally

symmetric and rectangular)

https://www.desy.de/~zagor/WakefieldCode_ECHOz/

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 28

ECHOz1

,

,0

,

cos( )r mr

mm

z z m

EEH H mE E

θ θ θ∞

=

=

,

,0

,

sin( )r mr

mm

z z m

HHE E mH H

θ θ θ∞

=

=

( )|| 0 0 0 00

( , , , , ) ( ) cos ( )m mm

m

W r r s W s r r mθ θ θ θ∞

=

= −

Rotationally Symmetric Geometries

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 29

ECHOz1ECHO

Only fully rotationally symmetric problems (m=0 mode) vector potential wave equation (slide 9) only PEC stand-alone Windows GUI application

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 30

ECHOz2Rotationally symmetric geometries (all modes) TE/TM implicit (slide 10) surface conductivity stand-alone Windows GUI application

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 31

ECHOz2Short-Range Wake Functions for TESLA Cryomodule

Longitudinal wake functions was found earlier with code NOVONovokhatski A., Timm M., Weiland T., Single Bunch Enetgy Spread in

the TESLA Cryomodule, DESY TESLA-99-16, 1999Transverse wake functions is found with code ECHOT. Weiland, I. Zagorodnov, The short-range transverse wake functionfor TESLA accelerating structure, TESLA Report 2003-19, 2003

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 32

ECHOz2

0||( )

ssW s Ae

=

11

1

( ) 1 1sssW s A e

s

= − +

( ) 0|| 0 0( ) 1

ssW s A eβ β

− = + −

Novokhatski A., Timm M., Weiland T. (1999, NOVO)

Weiland T., Zagorodnov I. (2003, ECHO)*

Bane K.L.F., SLAC-PUB-9663, LCC-0116, 2003

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 33

ECHO2DRectangular Geometries with Constant Width

2a

2wT L

2b

Zagorodnov I., Bane K., Stupakov G.Calculations of wakefields in 2Drectangular structures, Phys. Rev. STAB18, 104401 (2015)

,

,1

,

1 cos2

x mx

y y mm

z z m

EEH H mx

w wH E

π∞

=

=

,

,1

,

1 sin2

x mx

y y mm

z z m

HHE E mx

w wE E

π∞

=

=

Novokhatski A., Wakefield potentials ofcorrugated structures, Phys. Rev. STAB18, 104402 (2015)

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 34

ECHO2D

( ) ( )|| 0 0 0 , 0 ,0

1( , , , , ) ( , , )sin sinm x m x mm

W x y x y s W y y s k x k xw

=

=

General case

With symmetry in y

0 , 0 ,

, 0 ,

( , , ) ( )cosh( )cosh( )

( )sinh( )sinh( )

ccm m x m x m

ssm x m x m

W y y s W s k y k y

W s k y k y

= +

+

Wake field expansion is new (to our knowledge)

( ) ,0 , 0 , 0

,

cosh( )( ) ( )( , , ) cosh( ) sinh( )

sinh( )( ) ( )

cc csx mm m

m x m x m sc ssx mm m

k yW s W sW y y s k y k y

k yW s W s

=

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 35

ECHO2D

0zH =

2Q

0zE =

2Q

0 , 0 , , 0 ,( , , ) ( )cosh( )cosh( ) ( )sinh( )sinh( )cc ssm m x m x m m x m x mW y y s W s k y k y W s k y k y= +

0 0 0( , , ) ( , , ) ( , , )H Em m mW y y s W y y s W y y s= +

0 02

, 0

( , , )( )cosh( )

Hcc mm

x m

W y y sW sk y

= 0 02

, 0

( , , )( )sinh( )

Ess mm

x m

W y y sW sk y

=

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 36

ECHO2DRectangular and rotationally symmetric problems (all modes) TE/TM implicit (slide 10) surface conductivity stand-alone console application (Windows, Mac OS, Linux) Parallelized (MPI and threads)

Zagorodnov I., Bane K., Stupakov G.,Calculations of wakefields in 2Drectangular structures, Phys.Rev. STAB 18, 104401 (2015)

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 37

ECHO2DPohang Dechirper Experiment

2w= 5 cm, p=0.5 mm, h=0.6mm,t=p/2, L=1 m, 2a= 6mm.Gaussian bunch with rmslength 0.5mm

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 38

ECHO2DPohang Dechirper Experiment*

measured 0.75analytical

r = =

ECHO (1m structure)

ECHO (periodic)

||( , , )V/pC

W s0 0

*P. Emma et al., Phys. Rev. Lett. 112, 034801 (2014)

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 39

ECHO3D

https://www.desy.de/~zagor/WakefieldCode_ECHOz/

Arbitrary 3D geometry TE/TM ADI scheme Only PEC Serial version only

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 40

20 TESLA cells structureMoving mesh

3 geometry elements

The geometric elements are loaded when the moving mesh reaches them. During the calculation only 2 geometric elements are in memory.

3D simulation. Cavity

ECHO3D

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 41

Comparison of the wake potentials obtained by different methodsfor structure consisting of 20 TESLA cells excited by Gaussianbunch

-0.5 0 0.5 1 1.5-40

-30

-20

-10

0

-0.5 0 0.5 1 1.5

-40

-30

-20

-10

0

/s cm

||

/WV pC

/ 2.5( /5)( /10)

E M Dzz

σσ

−Δ =Δ =

2.5POT D−

/s cm

||

/WV pC

/ 3( /3 /3 / 2.5)TE TM Dz x y σ

−Δ = Δ = Δ =

2.5POT D−

1mmσ =3

~zL

σΔ ~z σΔE/M splitting TE/TM splitting

E/M ECHO-3D (TE/TM)

ECHO3D

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 42

ECHO3DCoupler Kick (One cryomodule ~ 12 meters)

M. Dohlus, I. Zagorodnov, E. Gjonaj, T. Weiland, Coupler Kick for Very Short Bunches and its Compensation, Proc.EPAC 2008

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 43

ECHO-PICStupakov G., Using pipe with corrugated walls fora subterahertz free electron laser, PR-STAB 18,030709 (2015)

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 44

ECHO-PIC

Wakefield code ECHO(with resistivity)

Particle-in-Cell code ECHO-PIC(only longitudinal dynamics)

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 45

ECHO-PICParameter Value

Pipe length , m 1-2Bunch enegry , MeV 5-20

Gausian bunch rms , mm 0.3*8Charge , nC 0.96

-5 0 50

10

20

30

40

50

[mm]

[A]

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 46

ECHO-PICMeV

[mm][A]

∆ [eV]

MeV

[mm]

[A]

∆ [eV]

[mm] [mm]

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 47

ECHO-PIC

0 0.5 1 1.5 20

0.05

0.1

0.15

20MeV0.3THz

5 MeV0.35 THz

[m]

∆ [mJ] 140µJ

Igor Zagorodnov | NAPAC 2016, Chicago | 12. October 2016 | Seite 48

ECHO-PIC

0 0.5 1 1.5 20

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45 410µJ

20MeV0.3 THz

8MeV0.33 THz

[m]

∆ [mJ]

125µJ