# Basics

In the code, the simulation window moves with the speed of light, and the quasistatic approximation is used to calculate the plasma response. Beams and plasma are modeled by macroparticles. The code is furnished with extensive diagnostic tools which include the ability of in-flight graphical presentation of the results.

The essence of the quasistatic approximation is illustrated by Figure 1 (cylindrical geometry). When we calculate the plasma response, the beam is considered as a ‘’rigid’’ (non-evolving in time) distribution of charges and currents propagating at the speed of light \(c\). The fields produced by this beam depend on the longitudinal coordinate \(z\) and time \(t\) only in the combination \(\xi=z-ct\) and can be found layer-by-layer starting from the beam head. Since the beam does not change, all particles starting from some transverse position \(r_0\) copy the motion of each other, and their parameters (transverse coordinate and momenta) can be found as functions of \(\xi\). Thus, a plasma macroparticle in the quasistatic model is not a ‘’big’’ particle, but a ‘’string’’ composed of real particles entering the simulation window at the same transverse coordinate and with the same initial momentum. This greatly reduces the memory required to store the plasma particles.

The calculated fields are then used to push the beam particles. For highly relativistic beams, the time step \(\Delta t\) for the beam particles can be made large, which speeds up simulations by several orders of magnitude. The quasistatic approximation is thus useful if and only if the time scale of beam evolution is much longer than the period of the plasma wave.

## Useful papers:

Various details of LCODE and its underlying physics are described in the following papers:

K.V. Lotov,

*Fine wakefield structure in the blowout regime of plasma wakefield accelerators.*Phys. Rev. ST - Accel. Beams**6**, 061301 (2003). —**The beam model and the 2d plasma model.**K.V. Lotov,

*Blowout regimes of plasma wakefield acceleration.*Phys. Rev. E**69**, 046405 (2004). —**Energy fluxes in the co-propagating window.**A.P. Sosedkin, K.V. Lotov,

*LCODE: A parallel quasistatic code for computationally heavy problems of plasma wakefield acceleration.*Nuclear Instr. Methods A**829**, 350 (2016). —**Parallelization.**P.V. Tuev, R.I. Spitsyn, K.V. Lotov,

*Advanced Quasistatic Approximation.*Plasma Physics Reports**49**, 229 (2023). [arxiv][in Russian] —**Advantages of quasistatic approximation, its applicability area and possible extensions.**R.N. Spitsyn,

*Numerical realization of quasistatic model of laser driver for plasma wakefield acceleration*(in Russian). Master theses, Novosibirsk State University (2016). —**2d laser solver.**I.Yu. Kargapolov, N.V. Okhotnikov, I.A. Shalimova, A.P. Sosedkin, and K.V. Lotov,

*LCODE: Quasistatic code for simulating long-term evolution of three-dimensional plasma wakefields*. [arxiv] —**3d plasma and beam solvers, iteration loop of the plasma solver, declustering.**K.V. Lotov, V.I. Maslov, I.N. Onishchenko, and E.N. Svistun,

*Resonant excitation of plasma wakefields by a non-resonant train of short electron bunches.*Plasma Phys. Control. Fusion**52**, 065009 (2010). —**Discussion on applicability of quasistatic codes to simulations of long beams.**