# Field initialization for relativistic species¶

As explained in PIC algorithms, if a net charge is present at the beginning of the simulation, the initial electromagnetic fields are computed. For static charge distributions, the solution of Poisson’s equation will be necessary to find the initial electrostatic field. If the initial charge has a non-zero initial speed, in general the electric and magnetic field should be computed solving the full set of Maxwell’s equations or equivalently the potentials equations. In some physical setups of interest, one or more relativistic species are injected in a plasma. In these cases, the computation of the initial electromagnetic fields can be reduced to the solution of a modified version of Poisson’s equation.

## The relativistic Poisson’s equation¶

From the continuity equation \(\partial_t \rho + \nabla \cdot \mathbf{J} = 0\) and Maxwell’s equations, it can be shown that the quantities \(\nabla\cdot\mathbf{B}\) and \(\nabla\cdot\mathbf{E}-\rho\) do not change over time:

Thus, if a simulation starts with \(\rho\neq0\), the electromagnetic fields must be properly initialized.

In the case of a static charge distribution, i.e. \(\rho\neq0\), \(\mathbf{J}=0\), the initial electrostatic potential \(\Phi\) can be computed solving Poisson’s equation:

and then be integrated to find the initial electric field: \(\mathbf{E}=-\nabla\Phi\). The initial magnetic field \(\mathbf{B}\) will be zero.

In general when the initial current \(\mathbf{J}\) is not zero, the full set of fields equations should be solved to correctly initialize the electromagnetic fields.

However, if a species is already relativistic when the simulation starts, e.g. a relativistic electron bunch, its initial electromagnetic fields can be computed through a simplified procedure, described in [Vay2008], [Londrillo2014], [Massimo2016] and [Marocchino2018].

An important assumption of this calculation is that the species is highly relativistic, moving in the positive \(x\) direction, with negligible momentum spread. Under this hypothesis, the transverse components of the species current density are neglected and the four-current quadrivector can be written as:

where \(\beta_0\) is the initial mean velocity of the relativistic species. At least locally, the potentials \(\mathbf{A}\), \(\Phi\) in the laboratory frame will be only function of \(x-\beta_0 t\), as they are propagating with the species at uniform relativistic velocity.

In the relativistic species rest frame \(S'\), the charge distribution is static and the electrostatic potential in that reference frame \(\Phi'\) is related to the charge density in that reference frame \(\rho'\) through Poisson’s equation:

where the Laplacian operator is computed in the reference frame \(S'\):

The vector potential in the species rest frame can be set to zero: \(\mathbf{A'}=0\). Through the above mentioned assumptions, it is possible to rewrite Eq. (68) only in terms of laboratory frame quantities.

Lorentz transformation of the four-vector \(\left(\mathbf{J},\rho \right)\) yields \(\rho'=\rho/\gamma_0\), where \(\gamma_0=1/\sqrt{1-\beta^2_0}\) is the average Lorentz factor of the relativistic species. Similarly, the potential \(\Phi'\) can be rewritten in terms of the potential in the laboratory frame: \(\Phi'=\Phi/\gamma_0\). The Lorentz back-transformation of coordinates

allows to transform the derivatives in Eq. (68) as

The partial derivative along the \(x'\) direction can be further simplified, through the hypothesis of temporary dependence of all quantities on \(x-\beta_0 t\), implying \(\partial_t=-\beta_0\partial_x\):

Equation (68) can thus be rewritten as

here informally referred to as the relativistic Poisson’s equation. In **Smilei**, as for Eq. (68), the solution of the relativistic Poisson’s equation is performed through the conjugate gradient method.

Once the potential \(\Phi\) is found, we can compute all the components of the electromagnetic field, using again the relations \(\partial_t=-\beta_0\partial_x\), \(\Phi'=-\Phi/\gamma_0\) and the Lorentz back-transformation of the vector potential \(\mathbf{A}\):

From all these relations, the electromagnetic field can be computed as usual, through the definitions of potentials \(\mathbf{E}=-\nabla\Phi-\partial_t\mathbf{A}\), \(\mathbf{B}=-\nabla\times\mathbf{A}\):

or in more compact form: \(\mathbf{E}=\left( -\frac{1}{\gamma_0^2}\partial_x \Phi, -\partial_y \Phi,-\partial_z \Phi \right)\), \(\mathbf{B}=\beta_0\mathbf{\hat{x}}\times\mathbf{E}\).

From the previous equations, it can be inferred that, in a 1D cartesian geometry, the fields computed through this procedure equal those obtained through the standard Poisson’s problem. This can also be inferred from the relativistic transformations of fields, which conserve the \(x\) components of the electromagnetic fields for boosts in the \(x\) direction.

## Recommendations for relativistic species field initialization¶

In **Smilei**, each species can independently benefit from this field initialization procedure. Its field will be initialized when the species will start to move, in order not to interfere with the other species’ dynamics.
The initialized fields will be superimposed to the electromagnetic fields already present in the simulation. To have physically meaningful results, we recommend to place a species which requires this method of field initialization far from other species, otherwise the latter could experience instantaneous unphysical forces by the relativistic species’ fields.

Remember that the transverse field of a moving charge with relativistic factor \(\gamma\) is greater than the electrostatic transverse field of that charge, by a factor \(\gamma\). This means that for highly relativistic particles, you will need to use a transversely large simulation window to let the field decrease enough to reduce border effects during its propagation. A complete absence of boundary effects in this case would be provided by perfectly absorbing boundary conditions, which are not implemented yet in the code. If the relativistic species propagates in a plasma, these border effects could be partially screened by the plasma.

A relativistic mean velocity in the \(x\) or \(-x\) direction and a negligible energy spread are assumed for each species in the hypotheses of this procedure. In particular it is assumed that all \(p_x\) of the macro-particles of a species are of the same sign. The user must ensure these conditions when defining the species requiring field initialization in the namelist. In order to describe a non-monoenergetic species, it is necessary to divide it into into several sub-species for which the assumptions hold.

## References¶

- Vay2008
- Londrillo2014
P. Londrillo, C. Gatti and M. Ferrario, Nucl. Instr. and Meth. A 740, 236-241 (2014)

- Massimo2016
F. Massimo, A. Marocchino and A. R. Rossi, Nucl. Instr. and Meth. A 829, 378-382 (2016)

- Marocchino2018
A. Marocchino, E. Chiadroni, M. Ferrario, F. Mira and A.R. Rossi, Nucl. Instr. and Meth. A (2018)