an overview of tredi & csr test cases

35
An overview of TREDI & CSR test cases L. Giannessi – M. Quattromini Presented at “Coherent Synchrotron and its impact on the beam dynamics of high brightness electron beams” January 14-18, 2002 at DESY-Zeuthen (Berlin, GERMANY)

Upload: feoras

Post on 06-Jan-2016

37 views

Category:

Documents


4 download

DESCRIPTION

An overview of TREDI & CSR test cases. L. Giannessi – M. Quattromini. Presented at. “Coherent Synchrotron and its impact on the beam dynamics of high brightness electron beams” January 14-18, 2002 at DESY-Zeuthen (Berlin, GERMANY). TREDI …. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: An overview of TREDI & CSR test cases

An overview of TREDI& CSR test cases

L. Giannessi – M. Quattromini

Presented at

“Coherent Synchrotron and its impact on the beam dynamics of high brightness electron beams”

January 14-18, 2002 at DESY-Zeuthen (Berlin, GERMANY)

Page 2: An overview of TREDI & CSR test cases

TREDI …… is a multi-purpose macroparticle 3D Monte Carlo,

devoted to the simulation of electron beams through

Rf-gunsLinacs (TW & SW)SolenoidsBendingsUndulatorsQuads’…

where Self Fields are accounted for by means of Lienard-Wiechert retarded potentials

Page 3: An overview of TREDI & CSR test cases

SELF FIELDS

EnB

Rn

n

Rn

nnE

23

2

31

1

1

c

tRtt

R

Rn

)( timeRetarded

R(t’)

Target

Source

Page 4: An overview of TREDI & CSR test cases

Motivations

Three dimensional effects in photo-injectors Inhomogeneities of cathode quantum efficiency

Laser misalignmentsMultipolar terms in accelerating fields

“3-D” injector for high aspect ratio beam production

…. on the way …… Study of coherent radiation emission in

bendings and interaction with beam emittance and energy spread

Page 5: An overview of TREDI & CSR test cases

History• 1992-1995 - Start: EU Network on RF-Injectors*

Fortran / DOS (PC-386 – 20MHz)Procs: “VII J.D'Etude Sur la Photoem. a Fort Courant” Grenoble 20-22 Septembre 1995

• 1996-1997 - Covariant smoothing of SC Fields Ported to C/Linux (PC-Pentium – 133MHz)FEL

1996 - NIM A393, p.434 (1997) - Procs. of 2nd Melfi works. 2000 - Aracne ed.(2000)

• 1998-1999 - Simulation of bunching in low energy FEL** Added Devices (SW Linac – Solenoid - UM) (PC-Pentium – 266MHz)

FEL 1998 - NIM A436, p.443 (1999) (not proceedings …)

• 2001-2002 - Italian initiative for Short FEL• Today: Many upgrades - First tests of CSR in new version

*Contributions from A. Marranca** Contributions from P. Musumeci

Page 6: An overview of TREDI & CSR test cases

FEL lasing (1998)

Page 7: An overview of TREDI & CSR test cases

Major upgrade to:

Accomodate more devices (Bends, Linacs, Solenoids …)

Load field profiles from files

Point2point or Point2grid SC Fields evaluation (NxN NxM)

Allowed piecewise simulations

Graphical User Interface for Input File preparation (TCL/Tk)

Graphical Post Processor for Mathematica / MathCad / IDL

Porting to MPI for Parallel Simulations

• Fix Data / Code architectural dependence

• SDDS support for data exchange with FEL codes

? Smoothing of acceleration fields (still more work required)

• Radiative energy loss

5000 lines 12.000+ lines of code + pre/post processors

Page 8: An overview of TREDI & CSR test cases

TREDI FlowChart

StartLoad configuration& init phase space

Charge distribution & external fields known at time t

Adaptive algorithm tests accuracy & evaluates step length t

Trajectories are intagrated to t+ t

Self Fields are evaluated at timet+ t

Exit if Z>Zend

Page 9: An overview of TREDI & CSR test cases

Parallelization

Node 3Node 2Node 1

…………Node n

Par

ticl

e tr

aje

cto

ry 1

Time

Par

ticl

e tr

aje

cto

ry 2

Par

ticl

e tr

aje

cto

ry 3

Par

ticl

e tr

aje

cto

ry k

-2

Par

ticl

e tr

aje

cto

ry k

-1

Par

ticl

e tr

aje

cto

ry k

……………………..

Present BeamNOW

Self Fields

Page 10: An overview of TREDI & CSR test cases

CSR Tests with TREDIProblems:

CSR cases are memory and cpu consuming Parallelization required very few particles

(300 particles 4h on IBM SP3/16 nodes - 400 MHz each)The program seems much slower than expected

The real enemy is the noise:Analysis and suppression of numerical noise

Test cases • Basic - No compression 5 nC - 5 GeV• 500 MeV - 1.0 nC - Gaussian• 5 GeV - 1.0 nC/0.5nC - Gaussian

Page 11: An overview of TREDI & CSR test cases

R(t’)

Targets

Source

Target

Source

Collective (coherent) effect

2 Particles interaction incoherent “collision”

Page 12: An overview of TREDI & CSR test cases

Effect of Noise (1st bend - no screening)

Page 13: An overview of TREDI & CSR test cases

Suppression of noise

Acceleration fields • Can be very large in high energy cases• Decrease only with distance as 1/R• Produce transverse forces

In the case of pure coulomb fields Regularization is obtained

by giving macroparticles a finite size

In the case of radiative fields Regularization is obtained

by giving macroparticles a finite sizein momentum space

Page 14: An overview of TREDI & CSR test cases

Suppression of noise II

retpPP

retP

rdrrrEpdpppE

rdpdrprprpEE

00

),( )( ),( )(

),,,( ),(

01r

01

001

The spatial integral istreated applying the Gauss theorem …

The momentum integral can be estimated by assigninga minimum momentum dispersion

0 1 2 3 4 5 6 7 81

0.5

0

Transverse momentum dispersionNo dispersion

Exkk

Eaxk

k

.Tra

nsv

ers

e

Ele

ctri

c Fi

eld

View angle

= 10-4

= 104

Page 15: An overview of TREDI & CSR test cases

Suppression of noise III

The integral in momentum space with a Gaussiandistribution is CPU time consuming

Alternative: Limit angle of “influence” of particles to force collective interactions

P = impact parameter

P=0 point like particles - no smoothing collisions dominate

P=1 limited spread particles - collective effects are dominant

P>1 spread out macroparticle - reduced interaction

nn 11

Page 16: An overview of TREDI & CSR test cases

Effect of impact parameter(Simulation of first bend - “basic”

case)

0 0.5 1 1.5 2 2.5 30.8

0.9

1

1.1

1.2

1.3

1.4

P=0.1P=0.5P=1.0P=2.0

Z (m)

X E

mitt

ance

(m

m-m

rad)

.

Page 17: An overview of TREDI & CSR test cases

Definitions

Step s 188Z 15.96Angle 0

Optic functionsx 2.173

x 34.184

x 0.167

y 1.582

y 31.015

y 0.113

z 0.665

z 0.036

z 39.54

0 5 10 150

0.1

0.2

X - Z Trajectory

Z (m)

X (

mm

)

0.1 0.05 0 0.05 0.1 0.15 0.250

0

50

100Z Projection

Z (mm)

Pz

(mc)

0.1 0 0.1

0.05

0

0.05

Y Projection

Y (mm)

Py

(mc)

2 1 0 1 2 3 4 52

1

0

1

2

3X Projection

X (mm)

Px

(mc)

Phase space at exit still noisy !

Basic case - P=1 - No compression - 5 GeV 1.0 nC

Page 18: An overview of TREDI & CSR test cases

No compression - 5 GeV 1.0 nCEstimation of emittance

0 10 20 30 40 50 60 70 80 90 1001

10

100

1 103

Charge (%)

Em

ittan

ce/(

% C

harg

e)

85

.

Page 19: An overview of TREDI & CSR test cases

No compression - 5 GeV 1.0 nC - x=10.1 mm-mradDefinitions

Step s 188Z 15.96Angle 0

Optic functionsx 1.768

x 31.572

x 0.131

y 1.542

y 30.57

y 0.11

z 0.266

z 0.06

z 17.905

0 5 10 150

0.1

0.2

X - Z Trajectory

Z (m)

X (

mm

)

0.04 0.02 0 0.02 0.0410

5

0

5

10Z Projection

Z (mm)

Pz

(mc)

0.4 0.2 0 0.2 0.40.5

0

0.5X Projection

X (mm)

Px

(mc)

0.1 0 0.1

0.05

0

0.05

Y Projection

Y (mm)

Py

(mc)

Page 20: An overview of TREDI & CSR test cases

No compression - 5 GeV 1.0 nCEmittances

0 2 4 6 8 10 12 14 160

5

10

15

XYBounds of devices

Z (m)

Em

ittan

ce (

mm

-mra

d)

.

Page 21: An overview of TREDI & CSR test cases

0 2 4 6 8 10 12 14 160

0.02

0.04

0.06

X

Bounds of devices

Z (m)

Ene

rgy

Spr

ead

(%)

.

No compression - 5 GeV 1.0 nC

Page 22: An overview of TREDI & CSR test cases

Energy variation ??

0 2 4 6 8 10 12 14 166 10

7

4 107

2 107

0

XBounds of devices

Z (m)

Ene

rgy

Var

iatio

n(M

eV)

.

Page 23: An overview of TREDI & CSR test cases

No compression - 5 GeV 1.0 nCTransverse rms

0 2 4 6 8 10 12 14 160

50

100

150

200

X RMSY RMS

Bounds of devices

Z (m)

Tra

nsve

rse

RM

S (

um)

.

0 2 4 6 8 10 12 14 160

10

20

30

Z RMS

Bounds of devices

Z (m)

Z R

MS

(um

)

Page 24: An overview of TREDI & CSR test cases

E= 5 GeV - Q=1 nC0 2 4 6 8 10 12 14 16

0

500

1000

1500

2000

X RMSY RMSBounds of devicestrace 4

Z (m)T

rans

vers

e R

MS

(um

)

0 2 4 6 8 10 12 14 160

50

100

150

200

Z RMS

Bounds of devices

Z (m)

Z R

MS

(um

)

.

Bunch Length

Page 25: An overview of TREDI & CSR test cases

Phase space at exit still noisy !

Definitions

2 1.5 1 0.5 0 0.52

1

0

1

2X Projection

X (mm)

Px

(mc)

0.1 0.05 0 0.05 0.10.2

0.1

0

0.1

0.2Y Projection

Y (mm)

Py

(mc)

Step s 94Z 15.881

Angle 1.819 105

Optic functionsx 0.724

x 6.403

x 0.238

y 1.099

y 15.131

y 0.146

z 2.406

z 7.384 103

z 919.209

0.08 0.06 0.04 0.02 0 0.02 0.04 0.06400

200

0

200Z Projection

Z (mm)

Pz

(mc)

0 5 10 150

0.1

0.2

X - Z Trajectory

Z (m)

X (

mm

)

Page 26: An overview of TREDI & CSR test cases

Estimation of emittance

0 10 20 30 40 50 60 70 80 90 1001

10

100

Charge (%)

Emitt

ance

/(% C

harg

e)

85

.

Page 27: An overview of TREDI & CSR test cases

0 2 4 6 8 10 12 14 160

20

40

60

80

XY

Bounds of devices

Z (m)

Em

ittan

ce (

mm

-mra

d)

.

Z (m)E

nerg

y (G

eV)

7.154 106

0

15.9810.1

Emittance vs. z

dispersion

Page 28: An overview of TREDI & CSR test cases

Energy spread

0 2 4 6 8 10 12 14 160.697198

0.697199

0.6972

0.697201

Z (m)

Ene

rgy

Spr

ead

(%)

s1

% s1

Rs1 2

m

Rs1 2

m M km 0

.

Page 29: An overview of TREDI & CSR test cases

Phase space at exit with 85% of the charge, x=2.3 mm-mrad

Definitions

0.15 0.1 0.05 0 0.050.2

0.1

0

0.1

0.2

X Projection

X (mm)

Px

(mc)

0.1 0.05 0 0.05 0.10.1

0

0.1

0.2Y Projection

Y (mm)

Py

(mc)

Step s 94Z 15.881

Angle 2.632 105

Optic functionsx 0.45

x 4.582

x 0.263

y 1.276

y 16.83

y 0.156

z 5.33

z 0.015

z 1.95 103

0.06 0.04 0.02 0 0.02 0.04 0.06400

200

0

200Z Projection

Z (mm)

Pz

(mc)

0 5 10 150

0.1

0.2

X - Z Trajectory

Z (m)

X (

mm

)

Page 30: An overview of TREDI & CSR test cases

0 2 4 6 8 10 12 14 160

500

1000

1500

2000

X RMSY RMSBounds of devicestrace 4

Z (m)Tr

ansv

erse

RM

S (u

m)

0 2 4 6 8 10 12 14 160

50

100

150

200

Z RMS

Bounds of devices

Z (m)

Z R

MS

(um

)

.

E= 5 GeV - Q=0.5 nC

Bunch Length

Page 31: An overview of TREDI & CSR test cases

Phase space at exit with 85% of the charge, x=1.4 mm-mradDefinitions

0.15 0.1 0.05 0 0.050.2

0.1

0

0.1

0.2X Projection

X (mm)

Px

(mc)

0.15 0.1 0.05 0 0.05 0.1 0.150.2

0.1

0

0.1

0.2Y Projection

Y (mm)

Py

(mc)

Step s 94Z 15.93

Angle 3.468 105

Optic functionsx 0.466

x 5.188

x 0.235

y 1.178

y 16

y 0.149

z 5.839

z 0.016

z 2.146 103

0.06 0.04 0.02 0 0.02 0.04 0.06400

200

0

200Z Projection

Z (mm)

Pz

(mc)

0 5 10 150

0.1

0.2

X - Z Trajectory

Z (m)

X (

mm

)

Page 32: An overview of TREDI & CSR test cases

0 2 4 6 8 10 12 14 160

500

1000

1500

2000

X RMSY RMSBounds of devicestrace 4

Z (m)

Tra

nsve

rse

RM

S (

um)

0 2 4 6 8 10 12 14 160

50

100

150

200

Z RMSBounds of devices

Z (m)

Z R

MS

(um

)

.

E= 500MeV - Q=1.0 nC

Bunch Length

Page 33: An overview of TREDI & CSR test cases

Emittance at exit - 500 MeV - 1.0 nC ??

0 10 20 30 40 50 60 70 80 90 1001

10

100

Charge (%)

Em

ittan

ce/(

% C

harg

e)

.

Page 34: An overview of TREDI & CSR test cases

Phase space at exit with 92% of the charge, x=21 mm-mrad

Definitions

1 0.5 0 0.5 10.2

0

0.2

X Projection

X (mm)

Px

(mc)

0.6 0.4 0.2 0 0.2 0.4 0.60.05

0

0.05Y Projection

Y (mm)

Py

(mc)

Step s 94Z 15.89Angle 0.003

Optic functionsx 0.493

x 3.967

x 0.313

y 2.065

y 22.26

y 0.237

z 0.869

z 6.571 103

z 267.046

0.1 0.05 0 0.05 0.120

10

0

10

20Z Projection

Z (mm)

Pz

(mc)

0 5 10 150

0.1

0.2

X - Z Trajectory

Z (m)

X (

mm

)

Page 35: An overview of TREDI & CSR test cases

Conclusions

• The noise suppression method has reduced the effects of SF on longitudinal phase space, without being completely effective in the transverse phase space

• A rigorous model of fields regularization, relying on a realistic momentum dispersion of macroparticles will be soon implemented

• The low number of macroparticles in severely limiting the reliability of the results

• Diagnostic on fields will be implemented to improve insight on the smoothing procedure

• The reason of the slow down of the code must be understood

• Before the end of the workshop the 1000 particles case will be finished - we will see.