B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS [email protected] Outline:...

17
B. Faatz S2E workshop, August 18-2 2, 2003 1 XFEL simulations with GENESIS [email protected] Outline: •Undulator layout (real/simulated) •Matching •Genesis input files •Post-processing •Genesis output Free-Electron Laser at the TESLA Test Facilit

Transcript of B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS [email protected] Outline:...

Page 1: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 1

XFEL simulations with GENESIS

[email protected]

Outline:•Undulator layout (real/simulated)•Matching•Genesis input files•Post-processing•Genesis output

Free-Electron Laser at the TESLA Test Facility

Page 2: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 2

Undulator description: real

Parameters Symbol Value Unit

Undulator segment length Ls 5 m

Undulator cell length Lc 6.1 m

Undulator gap g 10 mm

Undulator period (SASE1) u 48 mm

Quadrupole optical length 192 mm

Quadrupole gradient at 20 GeV Q 20 T/m

Undulator segment

Phase shifter combined with horizontal corrector Vertical corrector

Focusing Defocusing quadrupole

Ls

Lc

Matchingsection

Free-Electron Laser at the TESLA Test Facility

Page 3: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 3

Undulator description: simulated

Undulator segment

Defocusing quadrupoleFocusing

• Increased quadrupole length in order to increase stepsize (adjusted gradient)• Automatic phase matching between undulators

Free-Electron Laser at the TESLA Test Facility

Actual undulator geometry is defined in the magnet lattice file

Page 4: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 4

Elegant2genesis (SDDS toolkit)*•Check # slices/# particles per slice•Adjust initial and for optimal slice•Adjust initial offset and angle for optimal slice•Add wakefield along the undulator

Matching at the undulator entrance

*elegant2genesis <input.file> <output.file> -totalCharge= <charge> -slices= <#slices>

Free-Electron Laser at the TESLA Test Facility

1e-9 100

Electron beam information starts with output from Elegant(In this example until the undulator entrance with 200k particles)

Page 5: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 5

Genesis input

•E-beam slice file (Elegant2genesis+match)•“Elegant2genesis” produces global beam parameters for each slice•“match” adjusts <x>, <y> and <x’>, <y’> for slice with maximum current

•Magnetic lattice file•Genesis namelist input (Numerical and IO-parameters, …)

Free-Electron Laser at the TESLA Test Facility

From global parameters, Genesis fills the 5D+1 phase space with a Gaussian distribution

Page 6: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 6

Input distribution

Free-Electron Laser at the TESLA Test Facility

-150 -125 -100 -75 -50 -25 0 25 50 750

2

4

6

8

10

12

Cur

rent

(A

)

s (m)

-150 -125 -100 -75 -50 -25 0 25 50 75

20.520

20.522

20.524

20.526

20.528

20.530

20.532

20.534

20.536

s (m)

En

erg

y (G

eV

)

0.0

0.5

1.0

1.5

2.0

En

erg

y spre

ad

(Me

V)

-150 -125 -100 -75 -50 -25 0 25 50 75-100

-50

0

50

100

150

200

Large betatron oscillation <x> <y>

Be

am

ce

ntr

oid

po

sitio

n (m

)

s (m)

-150 -125 -100 -75 -50 -25 0 25 50 750

1

2

3

4

x

y

No

rma

lize

d e

mitt

an

ce (

mm

mra

d)

s (m)

0 20 40 60 80 100

Slice number

Tail of the bunch

Page 7: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 7

Post-processing

•Xgenesis (IDL)•Interactive (GUI)

•Gen2Spread: Separate Genesis output file•In slices along undulator•At different undulator position temporal profile

Free-Electron Laser at the TESLA Test Facility

Page 8: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 8

Steady state results: no wakefields

Unmatched angle/offset

Free-Electron Laser at the TESLA Test Facility

Matched angle/offset

0 50 100 150 200

10-5

10-4

10-3

10-2

10-1

100

101

102

Po

we

r (G

W)

z (m)

0 50 100 150 2000.00

0.05

0.10

0.15

0.20

0.25

0.30

Bu

nch

ing

z (m)

0 10 20 30 40 50 60 70 80 90 100 110

0.005

0.010

0.015

0.020

Po

we

r (G

W)

slice number

Page 9: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 9

Free-Electron Laser at the TESLA Test Facility

-150 -125 -100 -75 -50 -25 0 25 50 750

2

4

6

8

10

12

s (m)

Cu

rre

nt

(A)

-0.2

-0.1

0.0

0.1w

ake

(MV

/m)

Energy loss due to the wakefield*

*resistive wall wake only

assumed an inner radius of 4 mm copper coated stainless steel

Page 10: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 10

Steady state results: including wakefields (matched)

Without taper

Free-Electron Laser at the TESLA Test Facility

0 20 40 60 80 1000.0

0.2

0.4

0.6

0.8

1.0

1.2

1.4

0 20 40 60 80 100

10-5

10-4

10-3

10-2

10-1

100

Po

we

r (G

W)

slice number

Including taper

0 50 100 150 2000.00

0.05

0.10

0.15

0.20

0.25

0.30

0.35

Bu

nch

ing

z (m)

0 50 100 150 20010-7

10-6

10-5

10-4

10-3

10-2

10-1

100

101

102

Po

we

r (G

W)

z (m)

Page 11: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 11

Free-Electron Laser at the TESLA Test Facility

-150 -125 -100 -75 -50 -25 0 25 50 750

2

4

6

8

10

12C

urr

en

t (A

)

s (m)

Time dependent simulations: no wakefields

Part of the bunch selected for time dependent simulations

Simulate 20000 photon slices to assure overlap, 8000 particles each

NTAIL

NSLICE

Page 12: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 12

Free-Electron Laser at the TESLA Test Facility

0 10 20 30 40 500

40

80

120

160

200

240

280

0 10 20 30 40 500.01

0.1

1

10

100

Pow

er (

GW

)

s (m)

70 GW power, 3m FWHM pulse (10 fs)

Page 13: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 13

Free-Electron Laser at the TESLA Test Facility

Frequency spectrum

?

Page 14: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 14

Free-Electron Laser at the TESLA Test Facility

0 50 100 150 2000

20

40

60

80

100

120

Po

we

r (G

W)

z (m)

0 50 100 150 200-40

-32

-24

-16

-8

0

8

16

24

32

40

Be

am

ce

ntr

oid

po

sitio

n (m

)

z (m)

<x> <y>

0 50 100 150 2000

10

20

30

40

50

Be

am

siz

e (m

)

z (m)

xrms

yrms

-150 -125 -100 -75 -50 -25 0 25 50 750

2

4

6

8

10

12

Cur

rent

(A

)

s (m)

17000

Page 15: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 15

Free-Electron Laser at the TESLA Test Facility

0 50 100 150 2000

20

40

60

80

100

120

Po

we

r (G

W)

z (m)

0 50 100 150 200

-4

-2

0

2

4

Be

am

ce

ntr

oid

po

sitio

n (m

)

z (m)

<x> <y>

0 50 100 150 2000

10

20

30

40

50

Be

am

siz

e (m

)

z (m)

xrms

yrms

-150 -125 -100 -75 -50 -25 0 25 50 750

2

4

6

8

10

12

Cur

rent

(A

)

s (m)

17500

Page 16: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 16

Free-Electron Laser at the TESLA Test Facility

0 50 100 150 2000

20

40

60

80

100

120

Po

we

r (G

W)

z (m)

0 50 100 150 200

-28-24-20-16-12

-8-4048

1216202428

Be

am

ce

ntr

oid

po

sitio

n (m

)

z (m)

<x> <y>

0 50 100 150 2000

10

20

30

40

50

Be

am

siz

e (m

)

z (m)

xrms

yrms

-150 -125 -100 -75 -50 -25 0 25 50 750

2

4

6

8

10

12

Cur

rent

(A

)

s (m)

18000

Page 17: B. FaatzS2E workshop, August 18-22, 20031 XFEL simulations with GENESIS Bart.Faatz@desy.de Outline: Undulator layout (real/simulated) Matching Genesis.

B. Faatz S2E workshop, August 18-22, 2003 17

Free-Electron Laser at the TESLA Test Facility

Conclusion

Extend time windowGet frequency informationInclude all wakes, quantum fluctuations, …

Much more work needs to be done