A. Pukhov Institute for Theoretical Physics I University ...

39
18.11.2014 1 Particle-in-Cell Codes for plasma-based particle acceleration A. Pukhov Institute for Theoretical Physics I University of Dusseldorf, Germany Relativistic plasmas, acceleration and the simulation tools Explicit PIC codes Lorentz boost Quasi-static approximation Hybrid methods Outline

Transcript of A. Pukhov Institute for Theoretical Physics I University ...

Page 1: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

1

Particle-in-Cell Codes for plasma-based

particle acceleration

A. Pukhov

Institute for Theoretical Physics I

University of Dusseldorf, Germany

• Relativistic plasmas, acceleration and the simulation tools

• Explicit PIC codes

• Lorentz boost

• Quasi-static approximation

• Hybrid methods

Outline

Page 2: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

2

Atomic physics

Plasma physics

Relativistic plasmas, eA>mc2

Ultra-relativistic optics, eA>Mpc2

Field ionization: B

2

a

eE =

Physics of vacuum, 22~ mceE Cλ⋅

Laser technology and new physics

11/18/2014 [email protected] 3

1010

1015

1020

1025

1030

1960 1970 1980 1990 2000 2010

La

ser

Inte

nsi

ty, W

/cm

2 ELI, ExaWatt

CPA technology

iZEST, ZetaWatt

Important relativistic laser-plasma parameters

18.11.2014 [email protected] 4

Dimensionless laser amplitude2mc

eAa =

relativistic when a ≈ 1 ↔ Iλ2=1.37×1018 W µm2/cm2

S-number caN

NS = Gordienko & Pukhov

Phys. Plasmas 12, 043109 (2005)

Critical plasma density 2

2

0c

4 e

mN

π

ω= ~ 1021 cm-3

Page 3: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

3

Virtual Laser Plasma Lab

11/18/2014 [email protected] 5

Plasma or neutral gas

A. P u kho v, J. P la sm a Ph ysi cs , vol . 61, p a r t 3, p . 425 (1999).

Gas of an arbitrary element can be used.

The code VLPL is written in C++, object oriented,

parallelized using MPI for Massively Parallel performance

109 particles and 108 cells can be treated

Advanced physics & numerics

• Inelastic processes

• Radiation damping

• QED effects

• hybrid hydro model

• quasi-static approximationtc

ctc

∂−=×∇

+∂

∂=×∇

BE

jE

B

1

41 π

2

2

)(1

mcp

c

qq

dt

d

+=

×+=

γ

γBpE

p

Fields Particles

A. Pukhov, J. Plasma Phys. 61, 425 (1999)

The standard PIC time step cycle

18.11.2014 [email protected] 6

Depositj and ρ

Advancefields

Particles push

Page 4: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

4

Equations to solvein full electromagnetic codes

18.11.2014 [email protected] 7

Ampere’s law jBE

ctc

π41−×∇=

Faraday’s law EB

×−∇=∂

tc

1

Poisson’s eq. πρ4=⋅∇ E

0=⋅∇ BNo magnetic

dipoles

Dynamic

equations

Static equations

Charge continuityand locality of the equations

18.11.2014 [email protected] 8

Continuity Eq.

jBE

ctc

π41−×∇=

∂Ampere’s law

0=⋅∇+∂

∂j

t

ρ

Poisson’s eq. πρ4=⋅∇ E

0=⋅∇ BNo magnetic

dipoles Global initial

conditions

Local equations

Page 5: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

5

Locality of the equations

18.11.2014 [email protected] 9

Only particles within the radius

of cτ communicate to each other

at every time step τ.

This allows for efficient

parallelization using

domain decomposition

Distribution function and kinetic equation

18.11.2014 [email protected] 10

Sttfmc

qtf

mt

tf=⋅∇

×++⋅∇+

∂),(),(

),(pr,B

pEpr,

ppr,pr

γγγ

N-particles distribution function: ),...,,( 11 NNN tF p,rp,r

Nearly ideal plasma:

single particle distribution function:),( pr,tf

How to solve this equation?

Page 6: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

6

Eulerian approach, FDTD“Vlasov codes”

18.11.2014 [email protected] 11

Very inefficient:

a lot of empty phase space

has to be processed.

However, temperature effects

may be described more carefully.

Low noise.

May be subject

to numerical diffusion.

“Finite elements” approach, integrating along characteristics

18.11.2014 [email protected] 12

stmc

qdt

dFB

pE

p+

×+=

γ

γmdt

d pr=

Characteristics of the Vlasov Eq.

coincide with the equations of motion

Thus, we just push

the numerical macroparticles

in self-consistent

electromagnetic fields

Page 7: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

7

Sampling phase space:numerical macroparticles

18.11.2014 [email protected] 13

Computationally efficient:

only filled parts of phase space

have to be processed.

However, temperature effects

are poorly described,

or require very many particles.

Noisy as N1/2.

Maxwell solver: Yee latticeThe conservative scheme

18.11.2014 [email protected] 14

Page 8: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

8

Yee lattice and the continuity equation

18.11.2014 [email protected] 15

The Yee solver conserves div E and rot E.

In Coulomb gauge, e.g.:

;1

||tc ∂

∂−−∇=+= ⊥

AEEE ϕ ;|| ϕ−∇=E

πρϕ 42 −=∇However, we don’t solve the Poisson Eq.

Rather, we solve jBE

ctc

π41−×∇=

We must define the currents correctly

to satisfy the continuity Eq0=⋅∇+

∂j

t

ρ

Numerical macro-particles

18.11.2014 [email protected] 16

We define the charge density at the centers of the grid cells

( )∑ −= ++++++n

nkjinkji SW rr 2/1,2/1,2/12/1,2/1.2/1

ρρρ

The macro-particles may have arbitrary shapes S.

The most common shapes are bricks

( ) ( ) ( ) ( )zSySxSS zyx

ρρρρ =r

( )2

||,||

21 ii

i

iii r

rrS

∆<

∆−=ρ

x∆

y∆

Page 9: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

9

Pushing macro-particles in a cell

18.11.2014 [email protected] 17

We assume the second order numerical scheme.

Thus, the particle trajectory within the time step τ is a straight line.

( )∫∫

∫∫∆+

+++

Ω

Ω

−Ω=

Ω=

rr

r

rrr

VJ

dSWd

dtSWd

kji 2/1,2/1,2/1

0

ρρ

τρρτ

Pushing macro-particles in a cell

18.11.2014 [email protected] 18

For the simple brick shape, the equations are:

( )( )

( )xyyx

z

kji

xzzx

y

kji

yzzy

x

kji

baazWJ

baayWJ

baaxWJ

+=

+=

+=

++

++

++

ρ

ρ

ρ

δ

δ

δ

,2/1,2/1

2/1,,2/1

2/1,2/1,

zyx

xxb

ra

,,,

12

1

|5.0|21

=

=

∆+−=

βα

δδ βααβ

α

ααα

2/12/11 4 +++ −×∇+= nnnnc JBEE πττ

Leap-frog field pusher:

Villacenor, Buneman CPC 69, 306 (1992)

Page 10: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

10

Pushing macro-particles across cells

18.11.2014 [email protected] 19

In its motion within one single time step, the particle can cross

several cells. The algorithm must handle all these cases.

Interpolating fields to the particle positions

18.11.2014 [email protected] 20

One can interpolate the fields to the centers for the cells first

and then interpolate them to the particle center

in the same way as one deposits charges

yE yExE

xEThis scheme “conserves”

momentum but not energy

Page 11: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

11

Interpolating fields to the particle positions

18.11.2014 [email protected] 21

Alternatively, one can interpolate the electric fields

in the same way as one deposits currents

yE yExE

xE

This scheme “conserves”

energy, but not momentum

When the particle crosses

the cell boundaries,

all conservations fail

Energy (in-)conservation in PIC

18.11.2014 [email protected] 22

The total energy: ( ) ( )∫∑ ++−=Vn

n dVBEcm 222

8

11

πγE

Debye length resolved: h=0.5rD Cold plasma: h=10-3rD

Page 12: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

12

Numerical dispersion in the Yee Maxwell solver

18.11.2014 [email protected] 23

Numerical waves do not propagate with the speed of light.

Even in vacuum.

The standard Yee dispersion relation is:

2sin

1

2sin

1

2sin

1

4

ˆ

2sin

1 2

2

2

2

2

2

2

2

2

zz

z

yy

y

xx

x

p hk

h

hk

h

hk

h+++=

ωωτ

τ

The stability condition is:222

2

2

111

4

ˆ1

zyx

p

hhh+++>

ω

τ

Numerical dispersion in the Yee Maxwell solver

18.11.2014 [email protected] 24

cτ = 0.01h

ω

k

Numerical frequency is

lower than the real one

this leads to lower phase

velocity

cτ = 0.99h

Page 13: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

13

Numerical dispersion in the Yee Maxwell solver

18.11.2014 [email protected] 25

cτ = 0.01h

ω

k

Waves with

the shortest wavelengths

are very slow!

Small time steps

lead to a bad dispersion

cτ = 0.99h

Implementation of a PIC codeSingle processor optimization

18.11.2014 [email protected] 26

The central problem

of a PIC code:

particles must

interact with

the array of cells

Page 14: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

14

Implementation of a PIC codeSingle processor optimization

18.11.2014 [email protected] 27

The linked list of

particles with the

bases in the cells

help to optimize

the cache and

memory usage

Implementation of a PIC codeParallelization: domain decomposition

18.11.2014 [email protected] 28

Page 15: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

15

Implementation of a PIC codeParallelization: domain decomposition

18.11.2014 [email protected] 29

Algorithm locality:

only guard cells must

communicate between

processors.

No global

communications

Possibility for load balancing

18.11.2014 [email protected] 30

The adaptive partitioning

according to the number

of particles per processor

Page 16: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

16

PIC codes for plasma-based accelerationBubble regime

18.11.2014 [email protected] 31

A.Pukhov & J.Meyer-ter-Vehn, Appl. Phys. B, 74, p.355 (2002)

The multi-scale problem

18.11.2014 [email protected] 32

The plasma acceleration has several very disparate scales

1. Small scale: laser wavelength λ or plasma wavelength λp

2. Medium scale: driver length

3. Large scale: acceleration length LA=104…107 λ, λp

Page 17: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

17

Energy gain and simulation time

18.11.2014 [email protected] 33

Energy gain and simulation time

18.11.2014 [email protected] 34

Page 18: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

18

Energy gain and simulation time

18.11.2014 [email protected] 35

Energy gain and simulation time

18.11.2014 [email protected] 36

Page 19: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

19

Energy gain and simulation time

18.11.2014 [email protected] 37

Numerical Cerenkov Instability

18.11.2014 [email protected] 38

Page 20: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

20

Numerical Cerenkov Instability

18.11.2014 [email protected] 39

Numerical Cerenkov Instability

18.11.2014 [email protected] 40

Page 21: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

21

Numerical Cerenkov Instability persists even for dispersion-free solvers

18.11.2014 [email protected] 41

Numerical Cerenkov Instability persists even for dispersion-free solvers

18.11.2014 [email protected] 42

Page 22: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

22

Numerical Cerenkov Instability persists even for dispersion-free solvers

18.11.2014 [email protected] 43

Numerical Cerenkov Instability persists even for dispersion-free solvers

18.11.2014 [email protected] 44

Page 23: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

23

Numerical Cerenkov Instability is mitigated by filtering

18.11.2014 [email protected] 45

Electron acceleration in a channel:towards high quality acceleration

18.11.2014 [email protected] 46

A channel helps to

moderate the accelerating

field and adjust the laser

depletion length

A region of constant

accelerating field appears

where monoenergetic

acceleration is possible

A Pukhov et al. 2014 preprint arXiv:1408.0155, accepted in PRL

Page 24: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

24

Electron acceleration in a channel:towards high quality acceleration

18.11.2014 [email protected] 47

3D PIC simulation

in a Lorentz-boosted frame

Energy gain: 24 GeV

Laser pulse: 140 J, 16 fs

Plasma: 3x1017 1/cm3.

Acceleration distance: 100 cm

A Pukhov et al. 2014 preprint arXiv:1408.0155, accepted in PRL

Electron acceleration in a channel:Field Reversed Bubble

18.11.2014 [email protected] 48

The transverse electric field reverses

Uniform plasma Deep channel

A Pukhov et al. 2014 preprint arXiv:1408.0155, accepted in PRL

Page 25: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

25

Electron acceleration in a channel:towards high quality acceleration

18.11.2014 [email protected] 49

Analytical methods to bridge the scales gap

18.11.2014 [email protected] 50

First-principles PIC codes are universal but computationally

expensive. Efficient analytical methods exist to handle the

multi-scale problems.

1. Envelope approximation for the laser removes the laser

wavelength λ scale

2. Quasi-static approximation explicitly separates the fast

coordinate ζ=z-ct and the slow evolution time τ=t

Any approximation means some physics is neglected though…

Page 26: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

26

Envelope approximation for the laser

18.11.2014 [email protected] 51

When the laser pulse amplitude changes slowly on the laser

wavelength scale, the envelope approximation can be used

LL

n

mc

qik

tcAA

γ

π

ς 2

22

0

42=

∇+

∂+

This approximation excludes, e.g. sharp fronts of laser pulses.

Particle motion in ponderomotive approximation

18.11.2014 [email protected] 52

The laser pulse acts on particles then via its ponderomotive

force only

This approximation works only when the particle excursion

length is smaller than the laser pulse focal spot.

22

||2

LAm

q

mcq

dt

d∇−

×+=

γγB

pE

p

Page 27: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

27

Ponderomotive guiding center PIC

18.11.2014 [email protected] 53

D.F.Gordon et al. IEEE TPS 28, 1224 (2000)

Fields are separated in low frequency and high frequency

components. The LF is treated by standard PIC, the HF is

treated in envelope approximation

Depositj and ρ

AdvanceLF fields

Lorentzpush

Calculate<nq2/γm>

Advance HF fields

Ponderomotivepush

+

Quasi-static approximation

18.11.2014 [email protected] 54

We separate the fast coordinate ζ=z-ct

and the slow evolution time τ=t.

It is assumed that the driver does not change during the time it

passes its own length

ζ∂

∂<<

t

Ez

z

Page 28: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

28

Quasi-static approximationIntegral of motion

18.11.2014 [email protected] 55

Particles have an additional integral of motion in the QS

approximation:

Where the wake potential is

and we use the axial gauge

so that

1=+−= ψγ qpH z

zA−= ϕψ

2/ψϕ =−= zA

γ

ψς qv

dt

dz

−−=−=

11

Quasi-static approximationField equations

18.11.2014 [email protected] 56

We change variables to the fast coordinate ζ=z-ct

and the slow evolution time τ=t in Maxweel Eqs.:

and neglect

the time derivatives

in (1) and (2), so that

Thus, the quasi-static approximation cannot treat radiation

anymore!

)4(

)3(0

)2(

)1(

ρ=⋅∇

=⋅∇

−∂=×∇

∂+=×∇

E

B

BE

EjB

t

t

τ∂

ξ∂−=∂ t

Page 29: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

29

Quasi-static approximationField equations

18.11.2014 [email protected] 57

It is possible to write the quasi-static equations on the fields

only (K.V.Lotov 2007):

⊥⊥⊥⊥ ∇−∇=∇ jE ||

2 ρ

jB ×−∇=∇⊥2

⊥⊥⊥ ⋅∇=∇ j||

2E

Alternatively, one can use potentials.

In all cases, the quasi-static equations are not local anymore in

the transverse planes. This is the result of removing the wave

behavior. Instead of the wave equation, we obtain a set of

elliptic equations on the fields.

Pushing particles

18.11.2014 [email protected] 58

In quasi-static codes, one seeds a single layer of particles at the

leading edge of the simulation box and pushes them through

the driver

Page 30: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

30

Quasi-static approximationEquations of motion

18.11.2014 [email protected] 59

We push the particles along the ζ coordinate

( )ς

ς

ς d

dv

dt

d

d

d

dt

dz

ppp1−==

so that

( )ς

ς

ς d

dv

dt

d

d

d

dt

dz

rrrv 1−===

∇−

×+

−= 2

2

||1

1L

z

Aq

mcq

vd

d

γγςB

pE

p

11/18/2014 [email protected] 60

Page 31: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

31

Compare quasi-static qs-VLPL3D vs explicit VLPL3D

18.11.2014 [email protected] 61

Ne E||

ExampleCompare quasi-static VLPL3D vs explicit

18.11.2014 [email protected] 62

E B

Page 32: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

32

Efficiency of the PIC codes

18.11.2014 [email protected] 63

Explicit PIC effort (number of operations): zyxop NNNNN τ=

pzyx hhhc λλλτ <<<<<< ,,,/ 00

Lorentz-boost: relativistic gain up to2γ

Quasi-static codes

gain in performance as

pzypxp hhhc λλλλτ <<<<<< ,,,/ 0

2

( )30/ λλp

Hybrid PIC/hydro codes

18.11.2014 [email protected] 64

The kinetic PIC description is rather expensive

Alternative: Computational Fluid Dynamics (CFD)

• Euler’s equations, Navier-Stokes equations or variants are

solved on a grid

• Very established field of research - large number of solvers

available

• Faster and more efficient

• Less physics: cannot e.g. model wave breaking

Page 33: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

33

Hybrid PIC/hydro codes

18.11.2014 [email protected] 65

Hybrid PIC/hydro codes

18.11.2014 [email protected] 66

Tuckmantel et al., IEEE TPS 38 (2012)

Page 34: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

34

Hybrid PIC/hydro codes

18.11.2014 [email protected] 67

Tuckmantel et al., IEEE TPS 38 (2012)

Hybrid PIC/hydro codes

18.11.2014 [email protected] 68

Page 35: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

35

Hybrid PIC/hydro codes

18.11.2014 [email protected] 69

www.cern.ch/awake

Hybrid PIC/hydro codes

18.11.2014 [email protected] 70T Tückmantel, A Pukhov Journal of Computational Physics 269, 168-180 (2014)

Page 36: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

36

Hybrid PIC/hydro codes

18.11.2014 [email protected] 71T Tückmantel, A Pukhov Journal of Computational Physics 269, 168-180 (2014)

Hybrid PIC/hydro codes

18.11.2014 [email protected] 72

Page 37: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

37

Hybrid PIC/hydro codes

18.11.2014 [email protected] 73T Tückmantel, A Pukhov Journal of Computational Physics 269, 168-180 (2014)

Hybrid PIC/hydro codes

18.11.2014 [email protected] 74T Tückmantel, A Pukhov Journal of Computational Physics 269, 168-180 (2014)

Page 38: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

38

Hybrid PIC/hydro codes

18.11.2014 [email protected] 75T Tückmantel, A Pukhov Journal of Computational Physics 269, 168-180 (2014)

Hybrid PIC/hydro codes

18.11.2014 [email protected] 76

Page 39: A. Pukhov Institute for Theoretical Physics I University ...

18.11.2014

39

Summary

11/18/2014 [email protected] 77

PIC codes are the established tools for plasma simulation

Lorentz boost can bridge the gap of scales in plasma acceleration

still keeping the first principles. Unfortunately, it is subject to

numerical instabilities.

Quasi-static codes use analytic approaches to separate the scales

Hybrid hydro-PIC codes help to improve the numerical

dispersion and stability