2.2.1. Inputs from Theoretical Investigations

Analytical approaches and Monte Carlo simulations generally rely on the assumption that electromagnetic waves, providing the scattering centers to regulate and govern the acceleration, are present on both sites of the shock, with a given strength and spectrum, so that the Fermi mechanism can operate. The particle distribution is then evolved under some assumption (such as diffusion in pitch angle) on the scattering process, and considering a test-particle approximation (i.e., the high-energy particles do not modify the properties of the waves).

The main success of these approaches is the verification that under these conditions power-law spectra are indeed produced and the predicted spectral index is in very good agreement with observations of afterglow radiation from GRBs [61]. The spectral index has been calculated for different assumptions on the equation of state, diffusion prescription and for a wide range of shock velocities [61]. A quasi-universal value *p* ' 2.2 − 2.3 is found in the ultra-relativistic limit. Figure 1 shows a comparison between analytical and numerical results as a function of the shock velocity for three different types of shocks (see [61] for details). In the ultra-relativistic limit (*γβ* 1), the estimates of the spectral slopes converge to a universal value *p* = *s* − 2 ∼ 2.2.

**Figure 1.** Spectral index (*s<sup>p</sup>* = *p* + 2) of the electrons accelerated in shocks as a function of the shock velocity. Curves refer to the equation derived by [61] under the hypothesis of isotropic, small-angle scattering and is a generalization of the non-relativistic formula. Symbols show the comparison with numerical studies. Different curves refer to different assumptions on the type of shock (see [61] for details): in all cases, the value of the spectral index approaches the same value *s<sup>p</sup>* ∼ 4.2 (corresponding to *p* ∼ 2.2) in the ultra-relativistic limit.

The investigation of relativistic shocks is complemented by particle-in-cell (PIC) simulations, where the non-linear coupling between particles and self-generated magnetic turbulence is captured from first principles.

The limitations of this technique are imposed by the computation time: for accuracy and stability, PIC simulations need to resolve the electron plasma skin depth *c*/*ωpe* of the upcoming electrons (where *ωpe* = p 4*πe* <sup>2</sup>*ne*/*m<sup>e</sup>* is the plasma oscillation frequency of the upstream plasma, *n<sup>e</sup>* is the proper density and *m<sup>e</sup>* is the electron mass), which is orders of magnitudes smaller than the scales of astrophysical interest. It is then difficult to follow the evolution on time-scales and length-scales relevant for astrophysics. Low dimensionality (1D or 2D instead of 3D) and small ion-to-electron mass ratios are additional limitations imposed by the computation time. Results of PIC simulations need then to be extrapolated to bridge the gap between the micro-physical scales and the scales of interest. With these caveats in mind, we summarize here the main achievements.

PIC simulations have shown that magnetic turbulence can be efficiently (*e<sup>B</sup>* ∼ 0.01 − 0.1) generated by the accelerated particles streaming ahead of the shock (in the so-called precursor region), where they generate strong magnetic waves, which in turn scatter the particles back and fourth across the shock. In particular, in the weakly magnetised shocks discussed in this section, the dominant plasma instability is thought to be the so-called Weibel (or current filamentation) instability [62], generated by the counter-streaming of the accelerated particles against the background plasma in the precursor region [42,63]. PIC simulations have demonstrated that as long as the fluid is ultra-relativistic (Γ > 5),

the main parameter governing the acceleration is the magnetization *σ*, i.e., the efficiency of the process is insensitive to Γ, as the precursor decelerates the incoming background plasma.

An example of downstream particle spectra derived by PIC simulations is shown in Figure 2 ([42]). The ion and electron spectra are shown for a 2D simulation with Γ = 15, as an ion-to-electron mass ratio *mi*/*m<sup>e</sup>* = 25, and *σ* = 10−<sup>5</sup> . The temporal evolution is followed up to *t* = 2500 *ω* −1 *pi* . The formation of a non-thermal tail is clearly visible.

**Figure 2.** PIC simulations: temporal evolution of the downstream spectrum of ions (**upper** panel) and electrons (**bottom**) for mass ratio *mi*/*m<sup>e</sup>* = 25, shock Lorentz factor Γ = 15 and magnetization *σ* = 10−<sup>5</sup> . The evolution is followed until *t* = 2500*ω* −1 *pi* . Inset (a): mean post-shock ion (red) and electron (blue) energy (in units of the bulk energy of the upstream flow). The dashed blue line shows the electron energy at injection. Inset (b): temporal evolution of the maximum Lorentz factor of ions (red) and electrons (blue). For comparison, the black dashed line shows the scaling *γmax* ∝ (*ωpi t*) 1/2 . From [42]. ©AAS. Reproduced with permission.

The downstream non-thermal population is found to include around *ξ* ' 3% of the electrons, carrying *e<sup>e</sup>* ' 10% of the energy. The spectral index is around *p* ∼ 2.5. The acceleration proceeds similarly for electrons and ions, since they enter the shock in equipartition (i.e., their relativistic inertia is comparable) as a result of efficient pre-heating in the self-excited turbulence in the precursor.

The maximum energy *γmax* increases proportionally to *t* 1/2 (see inset in Figure 2), slower than the commonly adopted Bhom rate [64], in which case *γmax* ∝ *t*. Extrapolating the *γmax* behavior to the relevant time-scales and considering that synchrotron cooling will limit the acceleration for high-energy particles, the electron maximal Lorentz factor is

found to reach values *<sup>γ</sup>max* <sup>∼</sup> <sup>10</sup><sup>7</sup> in the early phase of GRB afterglows, corresponding to synchrotron photon energies around 1 GeV, which is roughly consistent with observations. All these results on the particle spectrum are obtained on time-scales that are too short for the supra-thermal particles to reach a steady-state and their extrapolation to longer time-scales is not trivial.

A still debated open question (because it is computationally demanding) is how the magnetization evolves downstream. PIC simulations have found values of *e<sup>B</sup>* ∼ 0.1 − 0.01 in the vicinity of the shock front. How this turbulence evolves on longer time-scales is still a matter of debate. The turbulence is expected to decay rapidly, on time-scales orders of magnitude shorter than the synchrotron cooling time. Magnetization is then predicted to be very different close to the shock and in the region where particle cooling takes place. Electrons would then cool in a region of weak magnetic field [65,66]. These considerations suggest that it might not be correct to define a single magnetization *e<sup>B</sup>* in GRB modeling, infer its value from observations and compare with predictions from PIC simulations referring to the magnetization near the shock front. Magnetization values inferred from observations most likely probe a region downstream, far from the front shock (see Section 3.3 for a discussion).

Theoretical efforts are fundamental to provide physically motivated inputs for the phenomenological parameters included in the afterglow model. The large number of unknown model parameters, coupled with a limited number of constraints provided by observations, implies that constraints from the theory are of paramount importance for a correct interpretation of the emission in GRBs and for grasping the origin of their non thermal emission, from radio to TeV energies. On the other hand, despite the huge progresses in the theoretical understanding of relativistic acceleration, the theory is not quite yet to the point of providing robust inputs for modeling observations. It is then clear how the two approaches must be combined to gain knowledge on the micro-physics of acceleration and magnetic field generation, on the one hand, and on the origin of radiative processes and macro-physics of the emitting region (bulk Lorentz factor and energy content) of the sources, on the other hand.
