LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg...

21
LCODE: a code for fast simulations of plasma wakefield acceleration Konstantin Lotov Budker Institute of Nuclear Physics SB RAS, Novosibirsk, Russia Novosibirsk State University, Novosibirsk, Russia AWAKE Collaboration

Transcript of LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg...

Page 1: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

LCODE: a code for fast simulations of plasma wakefield acceleration

Konstantin Lotov

Budker Institute of Nuclear Physics SB RAS, Novosibirsk, Russia Novosibirsk State University, Novosibirsk, Russia AWAKE Collaboration

Page 2: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

presented by K.Lotov at DESY, Hamburg 10.06.2016

Goals defined by plasma-based accelerators

Collider-oriented simulation tasks are order of magnitude “heavier” than those related to proof-of-principle experiments

104 105 106 107 10810

102

103

Propagation distance [c/ωp]

Win

dow

leng

th [c

/ωp]

AWAKE6 TeV @ LHC

TeV @ LWFA

Afterburner

E-167FACET

LWFA

Page 3: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

These goals are difficult to reach with general-purpose PIC codes:

Nils Moschuring, Hartmut Ruhl (LMU Munich) Presented at AWAKE Collaboration Meeting, CERN, March 13, 2015 Time and cost estimates for 3D PIC simulation of AWAKE baseline scenario (16 cm long proton bunch, 10 m plasma, 7 1014cm-3, proton-driven plasma wakefield acceleration experiment)

Time efficient specialized codes are needed

presented by K.Lotov at DESY, Hamburg 10.06.2016

Page 4: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

What is AWAKE? Experiment under preparation at CERN

presented by K.Lotov at DESY, Hamburg 10.06.2016

>50 mJ, 100 fsec, 810 nm

Beam portrait (2nd half)

Excited field (Φ) 40%

Page 5: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

Ways to speed-up simulations

• Cylindrical 2D or quasi-2D (azimuthal harmonics)

• Boosted frame: helps to resolve laser fields, most physics retained

• Fluid model: applicable to low-amplitude waves with no wavebreaking

• Quasistatic approximation: good for slowly evolving drivers and slowly changing plasma density (along the beam path)

When we calculate the plasma response, the driver is “rigid” (not evolving in time). The fields depend on ξ = z − ct and can be found layer-by-layer starting from the driver head, because all particles started from some r0 copy the motion of each other, their parameters are functions of ξ. A plasma “macroparticle” is a particle tube, i.e., a group of real particles started from r0 with a given momentum. This greatly reduces the memory required for storing plasma particles (dimension – 1). The fields are used to modify the driver. The time step Δt can be large (several orders of magnitude speed-up).

presented by K.Lotov at DESY, Hamburg 10.06.2016

Page 6: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

Quasi-static codes

WAKE [P.Mora and T.M.Antonsen, Phys. Plasmas 4, 217 (1997)]: widely used for LWFA, includes particle trapping, recently adopted for PWFA LCODE [K.V.Lotov, Phys. Plasmas 5 (1998)]: originally developed for PWFA, tuned for long beams and propagation distances, recently adopted for LWFA QUICKPIC [C. Huang et al., Journal of Computational Physics 217, 658 (2006)]: workhorse for SLAC PWFA experiments, first 3d code HiPACE [T. Mehrling et al., [Plasma Phys. Control. Fusion 56, 084012 (2014)]: recently joined the family

presented by K.Lotov at DESY, Hamburg 10.06.2016

Page 7: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

Unique features of LCODE • Two plasma solvers (fluid and PIC), two 2d3v geometries (plane and cylindrical)

• On-flight graphic diagnostics (tool for fast view of results without dumping huge amounts of data)

Example: hosing of electron beam (plane geometry)

The fluid solver is unique; it is ~10 times faster than PIC and more precise at the same resolution

presented by K.Lotov at DESY, Hamburg 10.06.2016

Page 8: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

• PIC solver solves equations for fields (not potentials, unique feature) and makes no use of constants of motion

This makes easier simulations of plasmas with arbitrary initial distributions of particles (transversely nonuniform, heated, non-neutral, moving, excited etc.)

Example: wakefield of a positron bunch in cold and heated plasma channels

Unique features of LCODE

presented by K.Lotov at DESY, Hamburg 10.06.2016

Page 9: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

PIC plasma solver

presented by K.Lotov at DESY, Hamburg 10.06.2016

Maxwell equations in the co-moving frame are

but we solve, instead of the first two,

with boundary conditions (perfectly conducting tube)

Plasma particles are pushed as usual

Page 10: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

Fluid plasma solver

presented by K.Lotov at DESY, Hamburg 10.06.2016

Equation of motion for electron fluid:

Integrals of motion:

Final set of equations:

Page 11: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

• Energy flux control

The wakefield acceleration is the process of energy transfer from one beam to another:

Natural and convenient measure of beam-plasma and beam-beam energy exchange is

Unique features of LCODE

presented by K.Lotov at DESY, Hamburg 10.06.2016

Page 12: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

• Energy flux control

The energy flux must be constant between the beams. Too coarse grid, too few macro-particles, too close wall, escape of fast plasma particles etc. → Ψ ≠ const We (almost) always know if simulations go wrong (especially important for long beams)

Example: The energy flux between electron driver and witness, linear plasma response

Unique features of LCODE

presented by K.Lotov at DESY, Hamburg 10.06.2016

Page 13: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

• Energy flux in blowout regime

Example:

presented by K.Lotov at DESY, Hamburg 10.06.2016

Page 14: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

• Automatic substepping in beam and PIC plasma solvers

Example: SLAC E-157 simulation ∆ξ=0.025c/ωp

∆ξ=2.5×10-5c/ωp

Time step ∆t for low energy electrons is individually reduced with respect to the main driver time step ∆t0

Grid step ∆ξ is automatically reduced in regions of abrupt field change

Unique features of LCODE

presented by K.Lotov at DESY, Hamburg 10.06.2016

Page 15: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

Features of LCODE • Parallel operation

“Pipe-line” concept: plasma solvers move along the beam and change its state Several time steps are made in a single pass of the simulation window by several solvers

t1 t1+∆t t1+2∆t

presented by K.Lotov at DESY, Hamburg 10.06.2016

Page 16: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

Examples of heavy tasks

Self-modulating LHC beam: 20 cm long simulation window travelled 17 km in 3×1015 cm-3 plasma (λp=0.6 mm) in 6 months (single CPU) [Phys. Plasmas 18, 103101 (2011)]

Map of density steps: A small up-step of the plasma density during beam self-modulation results in a stronger established wakefield

zs

2400 full length runs to produce this graph (beam length 160c/ωp, propagation distance 104c/ωp) [Phys. Plasmas 22, 103110 (2015)]

presented by K.Lotov at DESY, Hamburg 10.06.2016

Page 17: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

Availability of LCODE

I invite you to use LCODE for your studies. It is free to use. We do not ask for money, but expect collaboration with users. Executables and manual can be downloaded from http://www.inp.nsk.su/~lotov/lcode/

presented by K.Lotov at DESY, Hamburg 10.06.2016

Page 18: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

Degree of maturity – always young

presented by K.Lotov at DESY, Hamburg 10.06.2016

thoroughtesting

novelfeatures

research tool

commercial product

Recent advances and plans: Highly precise plasma solver (for AWAKE) Parallel operation Laser solver 3d code Plasma particle trapping Ionization injection

Scientifically interesting problems need new features of the code, hottest results are obtained during the testing stage, after the testing stage everything works reliably, but the best results are already published

Page 19: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

LCODE team & user support It may not be easy to start using LCODE with 30-page manual only, so we invite users to become a part of LCODE team:

Solver developer (mathematician)

Architect (computer scientist)

Experienced user (physicist)

Less experienced user (physicist, student)

Beginning user

Solver developer (mathematician) Solver developer

(mathematician) algorithms

Less experienced user (physicist, student)

Beginning user Beginning user

Experienced user (physicist)

guidance

disc

ussi

ons

Our students are ready to help new users, e.g., by making a configuration file for the first run. Discussions are very important as a quality check of simulation results

disc

ussi

ons

presented by K.Lotov at DESY, Hamburg 10.06.2016

Page 20: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

SLAC E-157 experiment, example of the code run

presented by K.Lotov at DESY, Hamburg 10.06.2016

Page 21: LCODE: a code for fast simulations of plasma ... - DESY · presented by K.Lotov at DESY, Hamburg 10.06.2016. SLAC E-157 experiment, example of the code run . presented by K.Lotov

Thank you

Welcome to use LCODE for your research