44
TREDI test for Photo-injectors L. Giannessi – M. Quattromini C.R. ENEA-Frascati Presented at

TREDI test for Photo-injectors

  • Upload
    becky

  • View
    36

  • Download
    0

Embed Size (px)

DESCRIPTION

TREDI test for Photo-injectors. Presented at. L. Giannessi – M. Quattromini C.R. ENEA-Frascati. TREDI …. … is a multi-purpose macroparticle 3D Monte Carlo, devoted to the simulation of electron beams through. Rf-guns Linacs (TW & SW) Solenoids Bendings Undulators Quads’ …. Motivations. - PowerPoint PPT Presentation

Citation preview

Page 1: TREDI test for Photo-injectors

TREDI test forPhoto-injectors

L. Giannessi – M. QuattrominiC.R. ENEA-Frascati

Presented at

Page 2: TREDI test for Photo-injectors

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

devoted to the simulation of electron beams through

Rf-gunsLinacs (TW & SW)SolenoidsBendingsUndulatorsQuads’…

Page 3: TREDI test for Photo-injectors

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 4: TREDI test for Photo-injectors

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)FEL1996 - 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)

J.B.Rosenzweig & P. Musumeci, PRE 58, 27-37, (1998) – Diamagnetic fields due to finite dimensions of intense beams in high-gain FELs

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 5: TREDI test for Photo-injectors

Features

• 15000 lines in C language;• Scalar & Parallel (MPI 2.0);• Unix & Windows versions;• Tcl/Tk Gui (pre-processing);• Mathematica & MathCad frontends (post-

processing);• Output format in NCSA HDF5 format

(solve endian-ness/alignement problems)

Page 6: TREDI test for Photo-injectors

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 7: TREDI test for Photo-injectors

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 8: TREDI test for Photo-injectors

Upgrades to be done (six months ago, in Zeuthen):

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

• SDDS support for data exchange with FEL code

• Fix Data/Architectural dependences (portability of data)

• Introduce radiative energy loss

• Smooth (regularize) acceleration fields (for CSR tests)

Page 9: TREDI test for Photo-injectors

six months later, Chia Laguna…• SDDS support for data exchange with FEL code

Fix Data/Architectural depences done, now use HDF5 data format support to fix endian-ness/alignments problems (output portability to different platforms)

Introduce radiative energy loss done

? Smooth acceleration fields (for CSR tests) done (more work required, no manifestly covariant, CPU consuming)

Big speed up (improved retarded time condition routine): Zeuthen: 300 particles 4h on IBM-SP3/16x400MHz)

Chia Laguna: 1000 particles 35m 10000 particles in 27h on a 32CPUs platform!

Many improvements and bug fixes (surely many still lurking in the code); recently introduced a “Parmela-like” mode (instantaneous

interactions,MUCH faster still experimental)

Page 10: TREDI test for Photo-injectors

Eqs Of motion…

mc

p

r

N.B. : τ = c·t

BEmc

e

d

d

mc

p

d

d

2

Page 11: TREDI test for Photo-injectors

SELF FIELDS…

R(t’)

Target

Source

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

Page 12: TREDI test for Photo-injectors

Retard Condition

02ret rxt

Page 13: TREDI test for Photo-injectors

EM fields:

EnB

Rn

nn

c

q

Rn

nqE

ˆ

termAccel.

ˆ1

ˆˆermVelocity t

ˆ1

ˆ3232

c

tRtt

tR

tR

trx

trxn

)( timeRetarded

ˆret

ret

ret

ret

Page 14: TREDI test for Photo-injectors

Problem: fields regularization

• Real beam~ 1010 particles

• Macroparticles ~ 103-106 huge charges

Pseudo-collisional effects

Page 15: TREDI test for Photo-injectors

Known therapy:• Share charge among vertices of a regular grid

(require a fine mesh to reduce noise)

Typical problems: • non Lorentz invariant;• assume instantaneous interactions • sensible for quasi-static Coulomb fields, low

energy spread etc.

Page 16: TREDI test for Photo-injectors

Alternative

• Get rid of 3-anything (i.e. quantities not possessing a definite Lorentz character)

• Use 4-quantities instead

R

dRBE0

...,cos,,

F

Vrx

WV

Vrx

q

)(

,

)(

,

Page 17: TREDI test for Photo-injectors

Field strength produced by an accelerated charge (covariant form)

(see e.g. Classical Electrodynamics, J. D. Jackson)

is the (source) proper time and

V is the (source) 4-velocity:

ret

Vrx

VrxVrx

d

d

Vrx

qF

,V

Page 18: TREDI test for Photo-injectors

Separation in vel.+accel. terms

on termsAccelerati

ermVelocity t

32

3

323

WWSVS

qW

VS

q

VVS

q

VS

WWS

VS

W

VS

Vq

TT

T

TTTF

Page 19: TREDI test for Photo-injectors

Separation in vel.+accel. terms (cont’d)

• Where:

tensorricantisymmetan is

scalar Lorentz a is

onaccelerati-4 theis

UrxUrxU

rxUUS

d

dVW

T

,

ˆ1S e.g. ,

RUTUT

nRVRUSUS

Note:

Page 20: TREDI test for Photo-injectors

The natural decomposition of EM fields can be cast in a covariant form!

AV FFF

Page 21: TREDI test for Photo-injectors

Velocity term:

VVS

qF TV

3

Lorentz scalar

Lorentz scalar

0 0 VSR

Page 22: TREDI test for Photo-injectors

Smoothing of vel. fields

• Solution: source macro particles are given a form factor (i.e. a finite extension in space: Debye screening, Q.E.D. f.f. corrections to current M.E.)

• Effective charge

• A scaled replica of the (retarded) beam:

• Same aspect ratio

0lim

3eff

0

VS

rxQR

3

beammp

N

Page 23: TREDI test for Photo-injectors

Boosts change macroparticles’ shape

Page 24: TREDI test for Photo-injectors

Smoothing of vel. fields (cont’d)

• Velocity (static,Coulomb) fields travel at speed of light, too! introduce a covariant (4D) generalization of purely geometric form factor:

(primed) frame Lab

ˆˆ

ˆˆˆ

frameRest

0

ˆ0

0

0000

ˆ33

1

13

1

31

1

11

1

11

1

TT

Page 25: TREDI test for Photo-injectors

Smoothing of vel. fields (cont’d)

vectors)-(4 Frame Lab

1120

ˆˆ

vectors)-(3 FrameRest

xxxxR TT

vectors)-(4 Frame Lab

2

ˆexp

ˆdet2

vectors)-(3 FrameRest

2

ˆexp

ˆdet2

1

3

1

3

xxqr

xxqr

T

T

e.g.: gaussian shape:

Page 26: TREDI test for Photo-injectors

Smoothing of vel. fields (cont’d)

• Effective charge total charge included by the iso-density surface associated to the value of ρ (ρ’) at observer point:

ˆQE

2exp

2

2erfˆQ

2

1eff

eff

21

eff

x

xxRR

RR

RqxxR

T

T

Page 27: TREDI test for Photo-injectors

Smoothing of vel. fields (cont’d)

Eff. Charge

Effective vel. field

Un-smoothed (1/R2) fields

Page 28: TREDI test for Photo-injectors

Acceleration term

WWSVS

qW

VS

qF TTA

32

Lorentz scalars

Lorentz scalars

Page 29: TREDI test for Photo-injectors

Smoothing of accel. fields

• Fields blow up when (“collinear divergencies)

• Solution: target macro particles are given a finite extension in space:

• Let be

nxVxS ˆ10

Page 30: TREDI test for Photo-injectors

Smoothing of accel. fields (cont’d)

022

02

2

3

20

2

022

02

2

3

20

2

2exp

2

1

2exp

2

1

SGdS

VS

SGdS

VS

Where:

and G3 is a too complicated to be worth seeing

422220

40

20

20

02 12

22

SS

SSSG

Page 31: TREDI test for Photo-injectors

Effectiveness of smoothing

• S0 ~10-5 (“collinear”)

R

σQ vseff

Page 32: TREDI test for Photo-injectors

Effectiveness of smoothing (cont’d)

• S0 ~10-3 (“non collinear”)

R

σQ vseff

Page 33: TREDI test for Photo-injectors

SPARC INJECTOR

RF-GUN LINAC

SOLENOID

SOLENOID

Gradient 140 MV/m

Charge 1nC

Pulse length 10 ps (flat top)

Spot radius 1 mm

Extraction phase ~35º (center)

Solenoid field ~0.3 T

(BNL RfGun+Solenoid+Drift)

104 macro-particles x 3·103 grid points ~13h

Page 34: TREDI test for Photo-injectors

Energy Spread:

Homdyn data: courtesy of M. Ferrario

Tredi

Homdyn

Page 35: TREDI test for Photo-injectors

Envelopes

Tredi

Homdyn

Parmela

Parmela data: courtesy of C. Ronsivalle

Page 36: TREDI test for Photo-injectors

The emittance in the Gun+Sol

Tredi

Homdyn

Page 37: TREDI test for Photo-injectors

Sol. at standard position

Tredi

Homdyn

Page 38: TREDI test for Photo-injectors

Sol. 2cm ahead

Tredi

Tredi, sol 2cm ahead

Homdyn

Page 39: TREDI test for Photo-injectors

Sol. 1cm ahead

Tredi

Tredi, B 2cm ahead

Tredi, B 1cm ahead

Homdyn

Page 40: TREDI test for Photo-injectors

The emittance in the Gun revisited

Tredi

Tredi, B 2cm ahead

Tredi, B 1cm ahead

Homdyn

Page 41: TREDI test for Photo-injectors

TODO’s

• The nature of discrepancies with other codes (Parmela, Homdyn) need to be investigated and/or explained;

• Test results obtained in Parmela-like mode; • Speed up the code (Accel. Fields, OpenMP

version? 3D runs with 105 -106 particles?)• Make smoothing of Accel. Fields manifestly

covariant• Save SC fields onto output to estimate noise

Page 42: TREDI test for Photo-injectors

CONCLUSIONS

• Some internals of the code need to be fully understood but…

• TREDI proved to be an usable tool for simulations of quasi-rectilinear set of devices from mildly-to-wildly relativistic regimes (5-5000 MeV):

• Start-to-end simulations?

Page 43: TREDI test for Photo-injectors

AcknoledgementsM. Ferrario, P. Musumeci, C.Ronsivalle, J.B. Rosenzweig, L.

Serafini

For providing results (Homdyn, Parmela), support, hints, feedback or directly partecipating to the development of TREDI.

Page 44: TREDI test for Photo-injectors

Energy spread (cont’d)

Tredi

Homdyn