# Moving window and optimal Lorentz boosted frame

The simulations of plasma accelerators from first principles are extremely computationally intensive, due to the need to resolve the evolution of a driver (laser or particle beam) and an accelerated particle beam into a plasma structure that is orders of magnitude longer and wider than the accelerated beam. As is customary in the modeling of particle beam dynamics in standard particle accelerators, a moving window is commonly used to follow the driver, the wake and the accelerated beam. This results in huge savings, by avoiding the meshing of the entire plasma that is orders of magnitude longer than the other length scales of interest.

Even using a moving window, however, a full PIC simulation of a plasma accelerator can be extraordinarily demanding computationally, as many time steps are needed to resolve the crossing of the short driver beam with the plasma column. As it turns out, choosing an optimal frame of reference that travels close to the speed of light in the direction of the laser or particle beam (as opposed to the usual choice of the laboratory frame) enables speedups by orders of magnitude [1, 2]. This is a result of the properties of Lorentz contraction and dilation of space and time. In the frame of the laboratory, a very short driver (laser or particle) beam propagates through a much longer plasma column, necessitating millions to tens of millions of time steps for parameters in the range of the BELLA or FACET-II experiments. As sketched in Fig. 39, in a frame moving with the driver beam in the plasma at velocity \(v=\beta c\) (where \(c\) is the speed of light in vacuum), the beam length is now elongated by \(\approx(1+\beta)\gamma\) while the plasma contracts by \(\gamma\) (where \(\gamma=1/\sqrt{1-\beta^2}\) is the relativistic factor associated with the frame velocity) The number of time steps that is needed to simulate a “longer” beam through a “shorter” plasma is now reduced by up to \(\approx(1+\beta) \gamma^2\) (a detailed derivation of the speedup is given below).

Note

For additional reading on inputs and outputs in boosted frame simulations, consider the following pages:

The modeling of a plasma acceleration stage in a boosted frame involves the fully electromagnetic modeling of a plasma propagating at near the speed of light, for which Numerical Cerenkov [3, 4] is a potential issue, as explained in more details below. In addition, for a frame of reference moving in the direction of the accelerated beam (or equivalently the wake of the laser), waves emitted by the plasma in the forward direction expand while the ones emitted in the backward direction contract, following the properties of the Lorentz transformation. If one had to resolve both forward and backward propagating waves emitted from the plasma, there would be no gain in selecting a frame different from the laboratory frame. However, the physics of interest for a laser wakefield is the laser driving the wake, the wake, and the accelerated beam. Backscatter is weak in the short-pulse regime, and does not interact as strongly with the beam as do the forward propagating waves which stay in phase for a long period. It is thus often assumed that the backward propagating waves can be neglected in the modeling of plasma accelerator stages. The accuracy of this assumption has been demonstrated by comparison between explicit codes which include both forward and backward waves and envelope or quasistatic codes which neglect backward waves [5, 6, 7].

## Theoretical speedup dependency with the frame boost

The derivation that is given here reproduces the one given in Vay *et al.* [2], where the obtainable speedup is derived as an extension of the formula that was derived earlier [1], taking in addition into account the group velocity of the laser as it traverses the plasma.

Assuming that the simulation box is a fixed number of plasma periods long, which implies the use (which is standard) of a moving window following the wake and accelerated beam, the speedup is given by the ratio of the time taken by the laser pulse and the plasma to cross each other, divided by the shortest time scale of interest, that is the laser period. To first order, the wake velocity \(v_w\) is set by the 1D group velocity of the laser driver, which in the linear (low intensity) limit, is given by [8]:

where \(\omega_p=\sqrt{(n_e e^2)/(\epsilon_0 m_e)}\) is the plasma frequency, \(\omega=2\pi c/\lambda\) is the laser frequency, \(n_e\) is the plasma density, \(\lambda\) is the laser wavelength in vacuum, \(\epsilon_0\) is the permittivity of vacuum, \(c\) is the speed of light in vacuum, and \(e\) and \(m_e\) are respectively the charge and mass of the electron.

In practice, the runs are typically stopped when the last electron beam macro-particle exits the plasma, and a measure of the total time of the simulation is then given by

where \(\lambda_p\approx 2\pi c/\omega_p\) is the wake wavelength, \(L\) is the plasma length, \(v_w\) and \(v_p=\beta_p c\) are respectively the velocity of the wake and of the plasma relative to the frame of reference, and \(\eta\) is an adjustable parameter for taking into account the fraction of the wake which exited the plasma at the end of the simulation. For a beam injected into the \(n^{th}\) bucket, \(\eta\) would be set to \(n-1/2\). If positrons were considered, they would be injected half a wake period ahead of the location of the electrons injection position for a given period, and one would have \(\eta=n-1\). The numerical cost \(R_t\) scales as the ratio of the total time to the shortest timescale of interest, which is the inverse of the laser frequency, and is thus given by

In the laboratory, \(v_p=0\) and the expression simplifies to

In a frame moving at \(\beta c\), the quantities become

where \(\gamma=1/\sqrt{1-\beta^2}\).

The expected speedup from performing the simulation in a boosted frame is given by the ratio of \(R_{lab}\) and \(R_t^*\)

We note that assuming that \(\beta_w\approx1\) (which is a valid approximation for most practical cases of interest) and that \(\gamma<<\gamma_w\), this expression is consistent with the expression derived earlier [1] for the laser-plasma acceleration case, which states that \(R_t^*=\alpha R_t/\left(1+\beta\right)\) with \(\alpha=\left(1-\beta+l/L\right)/\left(1+l/L\right)\), where \(l\) is the laser length which is generally proportional to \(\eta \lambda_p\), and \(S=R_t/R_T^*\). However, higher values of \(\gamma\) are of interest for maximum speedup, as shown below.

For intense lasers (\(a\sim 1\)) typically used for acceleration, the energy gain is limited by dephasing [9], which occurs over a scale length \(L_d \sim \lambda_p^3/2\lambda^2\). Acceleration is compromised beyond \(L_d\) and in practice, the plasma length is proportional to the dephasing length, i.e. \(L= \xi L_d\). In most cases, \(\gamma_w^2>>1\), which allows the approximations \(\beta_w\approx1-\lambda^2/2\lambda_p^2\), and \(L=\xi \lambda_p^3/2\lambda^2\approx \xi \gamma_w^2 \lambda_p/2>>\eta \lambda_p\), so that Eq.(48) becomes

For low values of \(\gamma\), i.e. when \(\gamma<<\gamma_w\), Eq.(49) reduces to

Conversely, if \(\gamma\rightarrow\infty\), Eq.(Eq_scaling1d) becomes

Finally, in the frame of the wake, i.e. when \(\gamma=\gamma_w\), assuming that \(\beta_w\approx1\), Eq.(49) gives

Since \(\eta\) and \(\xi\) are of order unity, and the practical regimes of most interest satisfy \(\gamma_w^2>>1\), the speedup that is obtained by using the frame of the wake will be near the maximum obtainable value given by Eq.(51).

Note that without the use of a moving window, the relativistic effects that are at play in the time domain would also be at play in the spatial domain [1], and the \(\gamma^2\) scaling would transform to \(\gamma^4\). Hence, it is important to use a moving window even in simulations in a Lorentz boosted frame. For very high values of the boosted frame, the optimal velocity of the moving window may vanish (i.e. no moving window) or even reverse.

## Numerical Stability and alternate formulation in a Galilean frame

The numerical Cherenkov instability (NCI) [10] is the most serious numerical instability affecting multidimensional PIC simulations of relativistic particle beams and streaming plasmas [11, 12, 13, 14, 15, 16]. It arises from coupling between possibly numerically distorted electromagnetic modes and spurious beam modes, the latter due to the mismatch between the Lagrangian treatment of particles and the Eulerian treatment of fields [17].

In recent papers the electromagnetic dispersion relations for the numerical Cherenkov instability were derived and solved for both FDTD [15, 18] and PSATD [19, 20] algorithms.

Several solutions have been proposed to mitigate the NCI [19, 20, 21, 22, 23, 24]. Although these solutions efficiently reduce the numerical instability, they typically introduce either strong smoothing of the currents and fields, or arbitrary numerical corrections, which are tuned specifically against the NCI and go beyond the natural discretization of the underlying physical equation. Therefore, it is sometimes unclear to what extent these added corrections could impact the physics at stake for a given resolution.

For instance, NCI-specific corrections include periodically smoothing the electromagnetic field components [11], using a special time step [12, 13] or applying a wide-band smoothing of the current components [12, 13, 25]. Another set of mitigation methods involve scaling the deposited currents by a carefully-designed wavenumber-dependent factor [18, 20] or slightly modifying the ratio of electric and magnetic fields (\(E/B\)) before gathering their value onto the macroparticles [19, 22]. Yet another set of NCI-specific corrections [23, 24] consists in combining a small timestep \(\Delta t\), a sharp low-pass spatial filter, and a spectral or high-order scheme that is tuned so as to create a small, artificial “bump” in the dispersion relation [23]. While most mitigation methods have only been applied to Cartesian geometry, this last set of methods [23, 24] has the remarkable property that it can be applied [24] to both Cartesian geometry and quasi-cylindrical geometry (i.e. cylindrical geometry with azimuthal Fourier decomposition [26, 27, 28]). However, the use of a small timestep proportionally slows down the progress of the simulation, and the artificial “bump” is again an arbitrary correction that departs from the underlying physics.

A new scheme was recently proposed, in Kirchen *et al.* [29], Lehe *et al.* [30], which
completely eliminates the NCI for a plasma drifting at a uniform relativistic velocity
– with no arbitrary correction – by simply integrating
the PIC equations in *Galilean coordinates* (also known as
*comoving coordinates*). More precisely, in the new
method, the Maxwell equations *in Galilean coordinates* are integrated
analytically, using only natural hypotheses, within the PSATD
framework (Pseudo-Spectral-Analytical-Time-Domain [4, 31]).

The idea of the proposed scheme is to perform a Galilean change of coordinates, and to carry out the simulation in the new coordinates:

where \(\boldsymbol{x} = x\,\boldsymbol{u}_x + y\,\boldsymbol{u}_y + z\,\boldsymbol{u}_z\) and \(\boldsymbol{x}' = x'\,\boldsymbol{u}_x + y'\,\boldsymbol{u}_y + z'\,\boldsymbol{u}_z\) are the position vectors in the standard and Galilean coordinates respectively.

When choosing \(\boldsymbol{v}_{gal}= \boldsymbol{v}_0\), where \(\boldsymbol{v}_0\) is the speed of the bulk of the relativistic plasma, the plasma does not move with respect to the grid in the Galilean coordinates \(\boldsymbol{x}'\) – or, equivalently, in the standard coordinates \(\boldsymbol{x}\), the grid moves along with the plasma. The heuristic intuition behind this scheme is that these coordinates should prevent the discrepancy between the Lagrangian and Eulerian point of view, which gives rise to the NCI [17].

An important remark is that the Galilean change of coordinates in Eq. (53) is a simple translation. Thus, when used in the context of Lorentz-boosted simulations, it does of course preserve the relativistic dilatation of space and time which gives rise to the characteristic computational speedup of the boosted-frame technique.

Another important remark is that the Galilean scheme is *not*
equivalent to a moving window (and in fact the Galilean scheme can be
independently *combined* with a moving window). Whereas in a
moving window, gridpoints are added and removed so as to effectively
translate the boundaries, in the Galilean scheme the gridpoints
*themselves* are not only translated but in this case, the physical equations
are modified accordingly. Most importantly, the assumed time evolution of
the current \(\boldsymbol{J}\) within one timestep is different in a standard PSATD scheme with moving
window and in a Galilean PSATD scheme [30].

In the Galilean coordinates \(\boldsymbol{x}'\), the equations of particle motion and the Maxwell equations take the form

where \(\boldsymbol{\nabla'}\) denotes a spatial derivative with respect to the Galilean coordinates \(\boldsymbol{x}'\).

Integrating these equations from \(t=n\Delta
t\) to \(t=(n+1)\Delta t\) results in the following update equations (see
Lehe *et al.* [30] for the details of the derivation):

where we used the short-hand notations \(\mathbf{\tilde{E}}^n \equiv \mathbf{\tilde{E}}(\boldsymbol{k}, n\Delta t)\), \(\mathbf{\tilde{B}}^n \equiv \mathbf{\tilde{B}}(\boldsymbol{k}, n\Delta t)\) as well as:

Note that, in the limit \(\boldsymbol{v}_{gal}=\boldsymbol{0}\),
Eqs. (58) and (59) reduce to the standard PSATD
equations [4], as expected.
As shown in Kirchen *et al.* [29], Lehe *et al.* [30],
the elimination of the NCI with the new Galilean integration is verified empirically via PIC simulations of uniform drifting plasmas and laser-driven plasma acceleration stages, and confirmed by a theoretical analysis of the instability.

J.-L. Vay. Noninvariance Of Space- And Time-Scale Ranges Under A Lorentz Transformation And The Implications For The Study Of Relativistic Interactions. *Physical Review Letters*, 98(13):130405/1–4, 2007.

J.-L. Vay, C. G. R. Geddes, E. Esarey, C. B. Schroeder, W. P. Leemans, E. Cormier-Michel, and D. P. Grote. Modeling Of 10 GeV-1 TeV Laser-Plasma Accelerators Using Lorentz Boosted Simulations. *Physics of Plasmas*, Dec 2011. doi:10.1063/1.3663841.

J. P. Boris and R. Lee. Nonphysical Self Forces In Some Electromagnetic Plasma-Simulation Algorithms. *Journal of Computational Physics*, 12(1):131–136, 1973.

I. Haber, R. Lee, H. H. Klein, and J. P. Boris. Advances In Electromagnetic Simulation Techniques. In *Proc. Sixth Conf. Num. Sim. Plasmas*, 46–48. Berkeley, Ca, 1973.

C. G. R. Geddes, D. L. Bruhwiler, J. R. Cary, W. B. Mori, J.-L. Vay, S. F. Martins, T. Katsouleas, E. Cormier-Michel, W. M. Fawley, C. Huang, X. Wang, B. Cowan, V. K. Decyk, E. Esarey, R. A. Fonseca, W. Lu, P. Messmer, P. Mullowney, K. Nakamura, K. Paul, G. R. Plateau, C. B. Schroeder, L. O. Silva, C. Toth, F. S. Tsung, M. Tzoufras, T. Antonsen, J. Vieira, and W. P. Leemans. Computational Studies And Optimization Of Wakefield Accelerators. In *Journal of Physics: Conference Series*, volume 125, 012002 (11 Pp.). 2008.

C. G. R. Geddes, E. Cormier-Michel, E. Esarey, C. B. Schroeder, and W. P. Leemans. Scaled Simulation Design Of High Quality Laser Wakefield Accelerator Stages. In *Proc. Particle Accelerator Conference*. Vancouver, Canada, 2009.

B. Cowan, D. Bruhwiler, E. Cormier-Michel, E. Esarey, C. G. R. Geddes, P. Messmer, and K. Paul. Laser Wakefield Simulation Using A Speed-Of-Light Frame Envelope Model. In *Aip Conference Proceedings*, volume 1086, 309–314. 2009.

E. Esarey, C. B. Schroeder, and W. P. Leemans. Physics Of Laser-Driven Plasma-Based Electron Accelerators. *Rev. Mod. Phys.*, 81(3):1229–1285, 2009. doi:10.1103/Revmodphys.81.1229.

C. B. Schroeder, C. Benedetti, E. Esarey, and W. P. Leemans. Nonlinear Pulse Propagation And Phase Velocity Of Laser-Driven Plasma Waves. *Physical Review Letters*, 106(13):135002, Mar 2011. doi:10.1103/Physrevlett.106.135002.

B. B. Godfrey. Numerical Cherenkov Instabilities In Electromagnetic Particle Codes. *Journal of Computational Physics*, 15(4):504–521, 1974.

S. F. Martins, R. A. Fonseca, L. O. Silva, W. Lu, and W. B. Mori. Numerical Simulations Of Laser Wakefield Accelerators In Optimal Lorentz Frames. *Computer Physics Communications*, 181(5):869–875, May 2010. doi:10.1016/J.Cpc.2009.12.023.

J.‐L. Vay, C. G. R. Geddes, C. Benedetti, D. L. Bruhwiler, E. Cormier‐Michel, B. M. Cowan, J. R. Cary, and D. P. Grote. Modeling Laser Wakefield Accelerators In A Lorentz Boosted Frame. *AIP Conference Proceedings*, 1299(1):244–249, Nov 2010. URL: https://doi.org/10.1063/1.3520322, arXiv:https://pubs.aip.org/aip/acp/article-pdf/1299/1/244/11928106/244\_1\_online.pdf, doi:10.1063/1.3520322.

J.-L. Vay, C. G. R. Geddes, E. Cormier-Michel, and D. P. Grote. Numerical Methods For Instability Mitigation In The Modeling Of Laser Wakefield Accelerators In A Lorentz-Boosted Frame. *Journal of Computational Physics*, 230(15):5908–5929, Jul 2011. doi:10.1016/J.Jcp.2011.04.003.

L. Sironi and A. Spitkovsky. No Title. 2011.

B. B. Godfrey and J.-L. Vay. Numerical stability of relativistic beam multidimensional \PIC\ simulations employing the Esirkepov algorithm. *Journal of Computational Physics*, 248(0):33–46, 2013. URL: http://www.sciencedirect.com/science/article/pii/S0021999113002556, doi:http://dx.doi.org/10.1016/j.jcp.2013.04.006.

X. Xu, P. Yu, S. F. Martins, F. S. Tsung, V. K. Decyk, J. Vieira, R. A. Fonseca, W. Lu, L. O. Silva, and W. B. Mori. Numerical instability due to relativistic plasma drift in EM-PIC simulations. *Computer Physics Communications*, 184(11):2503–2514, 2013. URL: http://www.sciencedirect.com/science/article/pii/S0010465513002312, doi:http://dx.doi.org/10.1016/j.cpc.2013.07.003.

B. B. Godfrey. Canonical Momenta And Numerical Instabilities In Particle Codes. *Journal of Computational Physics*, 19(1):58–76, 1975.

B. B. Godfrey and J.-L. Vay. Suppressing the numerical Cherenkov instability in FDTD PIC codes. *Journal of Computational Physics*, 267:1–6, 2014.

B. B. Godfrey, J.-L. Vay, and I. Haber. Numerical stability analysis of the pseudo-spectral analytical time-domain PIC algorithm. *Journal of Computational Physics*, 258:689–704, 2014.

B. B. Godfrey, J.-L. Vay, and I. Haber. Numerical stability improvements for the pseudospectral EM PIC algorithm. *IEEE Transactions on Plasma Science*, 42(5):1339–1344, 2014.

B. B. Godfrey, J.-L. Vay, and I. Haber. Numerical stability analysis of the pseudo-spectral analytical time-domain \PIC\ algorithm. *Journal of Computational Physics*, 258(0):689–704, 2014. URL: http://www.sciencedirect.com/science/article/pii/S0021999113007298, doi:http://dx.doi.org/10.1016/j.jcp.2013.10.053.

B. B. Godfrey and J.-L. Vay. Improved numerical Cherenkov instability suppression in the generalized PSTD PIC algorithm. *Computer Physics Communications*, 196:221–225, 2015.

P. Yu, X. Xu, V. K. Decyk, F. Fiuza, J. Vieira, F. S. Tsung, R. A. Fonseca, W. Lu, L. O. Silva, and W. B. Mori. Elimination of the numerical Cerenkov instability for spectral EM-PIC codes. *Computer Physics Communications*, 192:32–47, Jul 2015. URL: https://apps.webofknowledge.com/full{\_}record.do?product=UA{\&}search{\_}mode=GeneralSearch{\&}qid=2{\&}SID=1CanLFIHrQ5v8O7cxqV{\&}page=1{\&}doc=3, doi:10.1016/j.cpc.2015.02.018.

P. Yu, X. Xu, A. Tableman, V. K. Decyk, F. S. Tsung, F. Fiuza, A. Davidson, J. Vieira, R. A. Fonseca, W. Lu, L. O. Silva, and W. B. Mori. Mitigation of numerical Cerenkov radiation and instability using a hybrid finite difference-FFT Maxwell solver and a local charge conserving current deposit. *Computer Physics Communications*, 197:144–152, Dec 2015. URL: https://apps.webofknowledge.com/full{\_}record.do?product=UA{\&}search{\_}mode=GeneralSearch{\&}qid=2{\&}SID=1CanLFIHrQ5v8O7cxqV{\&}page=1{\&}doc=2, doi:10.1016/j.cpc.2015.08.026.

J.-L. Vay, C. G. R. Geddes, E. Cormier-Michel, and D. P. Grote. Effects of hyperbolic rotation in Minkowski space on the modeling of plasma accelerators in a Lorentz boosted frame. *Physics of Plasmas*, 18(3):030701, Mar 2011. URL: https://doi.org/10.1063/1.3559483, arXiv:https://pubs.aip.org/aip/pop/article-pdf/doi/10.1063/1.3559483/16019930/030701\_1\_online.pdf, doi:10.1063/1.3559483.

A. F. Lifschitz, X. Davoine, E. Lefebvre, J. Faure, C. Rechatin, and V. Malka. Particle-in-Cell modelling of laser-plasma interaction using Fourier decomposition. *Journal of Computational Physics*, 228(5):1803–1814, 2009. URL: http://www.sciencedirect.com/science/article/pii/S0021999108005950, doi:http://dx.doi.org/10.1016/j.jcp.2008.11.017.

A. Davidson, A. Tableman, W. An, F. S. Tsung, W. Lu, J. Vieira, R. A. Fonseca, L. O. Silva, and W. B. Mori. Implementation of a hybrid particle code with a PIC description in r–z and a gridless description in \Phi into OSIRIS. *Journal of Computational Physics*, 281:1063–1077, 2015. doi:10.1016/j.jcp.2014.10.064.

R. Lehe, M. Kirchen, I. A. Andriyash, B. B. Godfrey, and J.-L. Vay. A spectral, quasi-cylindrical and dispersion-free Particle-In-Cell algorithm. *Computer Physics Communications*, 203:66–82, 2016. doi:10.1016/j.cpc.2016.02.007.

M. Kirchen, R. Lehe, B. B. Godfrey, I. Dornmair, S. Jalas, K. Peters, J.-L. Vay, and A. R. Maier. Stable discrete representation of relativistically drifting plasmas. *Physics of Plasmas*, 23(10):100704, Oct 2016. URL: https://doi.org/10.1063/1.4964770, arXiv:https://pubs.aip.org/aip/pop/article-pdf/doi/10.1063/1.4964770/14024121/100704\_1\_online.pdf, doi:10.1063/1.4964770.

R. Lehe, M. Kirchen, B. B. Godfrey, A. R. Maier, and J.-L. Vay. Elimination of numerical Cherenkov instability in flowing-plasma particle-in-cell simulations by using Galilean coordinates. *Phys. Rev. E*, 94:053305, Nov 2016. URL: https://link.aps.org/doi/10.1103/PhysRevE.94.053305, doi:10.1103/PhysRevE.94.053305.

J.-L. Vay, I. Haber, and B. B. Godfrey. A domain decomposition method for pseudo-spectral electromagnetic simulations of plasmas. *Journal of Computational Physics*, 243:260–268, Jun 2013. doi:10.1016/j.jcp.2013.03.010.