*2.2. How and Where Is the Energy Dissipated?*

The composition of the outflow has a strong impact on the dominant energy dissipation channel. To produce the prompt GRB emission, the baryonic electrons as well as any *e* ±-pairs, which are the primary radiators, cannot be cold, and they need to be accelerated or heated to raise their internal energy. The observed photon energy spectrum is not only shaped by the underlying radiation mechanism but also the radial location in the flow where energy is dissipated. If most of the energy is dissipated much below the photospheric radius, at *R R*ph, where the Thomson optical depth of the flow is *τ<sup>T</sup>* 1 and where the radiation field and particles are tightly coupled via Compton scattering (baryons are coupled with the leptons via Coulombic interactions) and assume a thermal distribution, the final outcome is a quasi-thermal spectrum [31,33,34]. The observed spectrum in this case is not a perfect blackbody, due to the observer seeing different parts of the jet with different Doppler boosts, but close to one with a low-energy (below the spectral peak energy) photon index *α*ph = *d* ln *Nγ*/*d* ln *E* ≈ 0.4, which is softer from *α*ph = 1 expected for a Rayleigh–Jeans thermal spectrum [53,54]. If instead most of the energy is dissipated in the optically thin (*τ<sup>T</sup>* < 1) parts of the flow, then a non-thermal spectrum emerges. When the flow is continuously heated across the photosphere, the final spectrum is a combination of two components: quasi-thermal and non-thermal.

If the flow is uniform (i.e., quasi-spherical with negligible angular dependence within angles of . 1/Γ around the line of sight), then any thermal component will show negligible polarization as there is no preferred direction for the polarization vector to align with. Even if different parts of the flow may be significantly polarized at the photosphere [55], the net polarization averages out to zero after integrating over the GRB image on the sky. However, angular structure in the flow properties can lead to modest (Π . 20%) polarization [24,56–58]. The polarization of the non-thermal spectral component ultimately depends on the radiation mechanism, discussed in Section 2.3.

In a KED flow, after an initial phase of rapid acceleration of the fireball when the bulk LF saturates, the particles are cold in the comoving frame with negligible pressure (*P* <sup>0</sup> *ρ* 0 *c* 2 ). The energy of the flow is dominated by the kinetic energy of the baryons, which is very *ordered*. To produce any radiation, particle motion needs to be *randomized*. A simple and robust method to achieve that is via shocks. The canonical model of internal shocks [30,59–61] posits that the central engine accretes intermittently and ejects shells of matter that are initially separated by a typical length scale ∼ *ctv*/(1 + *z*) and have fluctuations in their bulk LFs of order ∆Γ ∼ Γ, with Γ being the mean bulk LF. Here, *t<sup>v</sup>* is the observed variability of the prompt emission lightcurve, and *z* is the redshift of the

source. Typically, *<sup>R</sup>*<sup>0</sup> <sup>∼</sup> <sup>10</sup><sup>7</sup> cm and <sup>Γ</sup><sup>∞</sup> <sup>∼</sup> <sup>10</sup><sup>2</sup> <sup>−</sup> <sup>10</sup><sup>3</sup> so that the acceleration saturates at *<sup>R</sup><sup>s</sup>* <sup>∼</sup> <sup>Γ</sup>∞*R*<sup>0</sup> <sup>∼</sup> <sup>10</sup><sup>9</sup> <sup>−</sup> <sup>10</sup><sup>10</sup> cm. For *<sup>R</sup>* <sup>&</sup>gt; *<sup>R</sup><sup>s</sup>* , faster-moving shells catch up from behind with slower ones and collide to dissipate their kinetic energy at internal shocks occurring at the dissipation radius of *R*dis = 2Γ 2 <sup>∞</sup>*ctv*/(<sup>1</sup> <sup>+</sup> *<sup>z</sup>*) = <sup>6</sup> <sup>×</sup> <sup>10</sup>13(<sup>1</sup> <sup>+</sup> *<sup>z</sup>*) <sup>−</sup>1Γ 2 <sup>∞</sup>,2*tv*,−<sup>1</sup> cm.

When the shells collide, a double-shock structure forms with a forward shock going into the slower shell and accelerating it while a reverse shock goes into the faster shell and decelerates it. These shocks heat a fraction *ξ<sup>e</sup>* of the electrons into a power-law energy distribution, with *dNe*/*dγ<sup>e</sup>* ∝ *γ* −*p e* for *γ<sup>e</sup>* > *γm*, where these electrons hold a fraction *e<sup>e</sup>* of the total internal energy density behind the shock. The LF of the minimal energy electrons, *γ<sup>m</sup>* = [(*p* − 2)/(*p* − 1)](*ee*/*ξe*)(*mp*/*me*)(Γud − 1) (for *p* > 2), depends on the relative bulk LF, Γud, of the upstream to downstream matter across the relevant shock. A fraction *e<sup>B</sup>* of the internal energy density behind the shock is held by the shock-generated magnetic field of strength *B* <sup>0</sup> <sup>∼</sup> <sup>10</sup><sup>2</sup> <sup>−</sup> <sup>10</sup><sup>3</sup> G. More generally, one can express the comoving magnetic field in terms of the radius and outflow Lorentz factor and magnetization at that radius, as well as the observed isotropic equivalent *γ*-ray luminosity, *Lγ*,iso, and the *γ*-ray emission efficiency, *e<sup>γ</sup>* (i.e., fraction of the total outflow energy channeled into gamma-rays), *B* <sup>0</sup> <sup>=</sup> 1.8 <sup>×</sup> <sup>10</sup>5<sup>Γ</sup> −1 2 *R* −1 <sup>14</sup> ( *σ* 1+*σ* ) 1/2*L* 1/2 *<sup>γ</sup>*,iso,52*e* −1/2 *<sup>γ</sup>*,−<sup>1</sup> G. The exact structure of the magnetic field is still an open question, but it has been argued that streaming instabilities [62–66], e.g., the relativistic two-stream and/or Weibel (filamentation) instability, are responsible for generating a small-scale field with coherence scale on the order of the electron and/or proton skin depth, *c*/*ω*0 *<sup>p</sup>* = *c*(4*πn* 0 *e* <sup>2</sup>/*m*) <sup>−</sup>1/2 where *ω*<sup>0</sup> *p* is the plasma frequency, which depends on the particle number density *n* 0 ; mass *m* is the particle mass; and *e* is the elementary charge. Since the coherence length of the shock-generated field is much smaller than the angular size of the beaming cone (*θ<sup>B</sup>* 1/Γ), the net polarization is limited to Π . 30%.

Alternatively, interactions of the shock with density inhomogeneities in the upstream can cause macroscopic turbulence in the downstream (e.g., excited by the Richtmyer– Meshkov instability), which can in turn amplify a shock-compressed large-scale upstream magnetic field to near-equipartition with the downstream turbulent motions [67–72]. The dynamo-amplified magnetic field is expected to form multiple mutually incoherent patches (with angular sizes up to a fraction of the visible region) in which the field is largely ordered. The expected polarization, after averaging over such patches in the observed region, is typically expected to be small, with Π . 2% [69].

As mentioned earlier, in a PFD flow, the main dissipation channel is magnetic reconnection and /or MHD instabilities. Both of these are non-ideal effects that cannot be treated in an ideal MHD formalism. Magnetic field energy is dissipated when opposite polarity field lines reconnect, which leads to acceleration of electrons that then cool by either emitting synchrotron radiation outside of the reconnection sites or inverse-Compton scattering of either synchrotron photons or a pre-existing radiation field advected with the flow. Exactly where dissipation commences depends on the initial magnetic field geometry in the flow as the field lines expand outward from the central engine to larger distances [73]. If the flow is axisymmetric and is not permeated by polarity-switching field lines, magnetic energy can still be dissipated due to current-driven instabilities, e.g., the kink instability [74–77]. Such an instability may also occur at the interface between the jet and the confining medium, e.g., the stellar interior of a Wolf–Rayet star in long-soft GRBs [78] and the dynamically ejected wind during a binary neutron star merger in shorthard GRBs. Magnetic field lines that reverse polarity on some characteristic length scale *λ* can be embedded into the outflow in a variety of ways [79]. These can indeed be injected at the base of the flow where field polarity reversals are obtained in the accretion disk due to the magnetorotational instability, as demonstrated in several shearing-box numerical MHD simulations [80] as well as in global simulations of black hole accretion [81]. Depending on how particles are heated/accelerated when magnetic energy is dissipated, as the flow becomes optically-thin, as discussed in the next section, the polarization will be energy

dependent and can be Π . 60% if synchrotron emission dominates and the B-field angular coherence length near the line of sight is *θ<sup>B</sup>* & 1/Γ.

In the striped-wind model [49,50,82], magnetic dissipation commences beyond the Alfvén radius and becomes the dominant contributor towards flow acceleration. Below the Alfvén radius the flow is accelerated due to magneto-centrifugual effects as well as collimation provided by the confining medium [39,83]. If the confining medium has a sharp outer boundary (e.g., the edge of the massive star progenitor for a long GRB), then as the jet breaks out of the confining medium, the flow becomes conical and expands ballistically. The sudden loss of pressure also leads to some further acceleration via the mechanism of *rarefaction acceleration* [44] that operates in PFD relativistic jets. While these ideal MHD processes may continue to operate at length scales relevant for prompt GRB emission, magnetic reconnection in a striped wind provides a source for gradual acceleration out to the saturation radius *R<sup>s</sup>* . Beyond this radius magnetic reconnection subsides, and therefore acceleration ceases and the flow starts to coast. When the prompt emission is produced in an accelerating flow, the degree of polarization is not affected. Instead, the duration of the pulses becomes shorter in comparison to that obtained in a coasting flow—see, e.g., [84].

Other variants of the PFD model, as presented above, include the internal-collisioninduced magnetic reconnection and turbulent (ICMART) model [85], in which high-*σ* shells are intermittently ejected by the central engine that dissipate their energy at *R* ∼ <sup>10</sup><sup>15</sup> <sup>−</sup> <sup>10</sup><sup>16</sup> cm, where collision-induced magnetic reconnection and turbulence radiates away the magnetic energy and reduces the initially high magnetization of the ejecta to order unity. The expected polarization from an ICMART event has been presented in Deng et al. [86] using 3D numerical MHD simulations where they also find a 90◦ change in polarization angle.
