{'fraction_non_alphanumeric': 0.03219030986713237, 'fraction_numerical': 0.014584759162674344, 'mean_word_length': 4.668004280363831, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Shock Vorticity Generation from Accelerated Ion Streaming in the Precursor of Ultrarelativistic Gamma-Ray Burst External Shocks

We investigate the interaction of nonthermal ions (protons and nuclei) accelerated in an ultrarelativistic blastwave with the pre-existing magnetic field of the medium into which the blastwave propagates. While particle acceleration processes such as diffusive shock acceleration can accelerate ions and electrons, the accelerated electrons suffer larger radiative losses. Under certain conditions, the ions can attain higher energies and reach farther ahead of the shock than the electrons, and so the nonthermal particles can be partially charge-separated. To compensate for the charge separation, the upstream plasma develops a return current, which, as it flows across the magnetic field, drives transverse acceleration of the upstream plasma and a growth of density contrast in the shock upstream. If the density contrast is strong by the time the fluid is shocked, vorticity is generated at the shock transition. The resulting turbulence can amplify the post-shock magnetic field to the levels inferred from gamma-ray burst afterglow spectra and light curves. Therefore, since the upstream inhomogeneities are induced by the ions accelerated in the shock, they are generic even if the blastwave propagates into a medium of uniform density. We speculate about the global structure of the shock precursor, and delineate several distinct physical regimes that are classified by an increasing distance from the shock and, correspondingly, a decreasing density of nonthermal particles that reach that distance.


INTRODUCTION
The standard model for gamma-ray burst (GRB) afterglow emission requires nonthermal acceleration of electrons to ultrarelativistic energies. This can take place in the "external" relativistic shock wave driven into the circumburst medium by the burst ejecta (e.g., Piran 2005a; Meszaros 2006, and references therein). Candidate mechanisms for shock acceleration, such as the first order Fermi mechanismalso known as diffusive shock acceleration (DSA; e.g., Bell 1978;Blandford & Ostriker 1978;Blandford & Eichler 1987)-can accelerate all charged particles, including the positively charged ions, for whose acceleration in GRB afterglows we still do not have direct observational evidence. While theoretical models for particle acceleration in shocks have largely been based on analytic or semianalytic prescriptions for particle injection into the acceleration cycle and its scattering in the random magnetic field of the shock (e.g., Achterberg et al. 2001;Ellison & Double 2002;, and references therein), recent two-dimensional first-principles particle-in-cell simulations of unmagnetized pair shocks have delivered the first encouraging direct evidence for the formation of the signature nonthermal power-law tail (Keshet et al. 2008;Spitkovsky 2008b). The power law tail seems to arise in tandem with a self-sustained electromagnetic structure in the shock precursor, where the nonthermal particles that move ahead of the shock excite plasma instabilities. In their nonlinear development, the instabilities generate a magnetic field that scatters the nonthermal particles back toward the shock and thus closes the acceleration cycle. Our aim here is to explore the consequences of the formation of a power-law tail of accelerated particles for shock hydrodynamics when a weak, large scale magnetic field is present in the shock upstream.
Inverse Compton cooling of the nonthermal electrons imposes an upper limit on the energy of electrons that are accelerated by DSA (e.g., Li & Waxman 2006). Since higher energy ions reach farther from the shock into the shock upstream, there may exist a region in the shock upstream devoid of nonthermal electrons that still contains nonthermal ions; we restrict our analysis to this region. In the reference frame in which the shock upstream is at rest, the nonthermal ions are beamed forward within the narrow angle ∼ Γ −1 , where Γ ≫ 1 is the shock Lorentz factor. The upstream plasma responds to the forward-beamed nonthermal ions by developing a return current (see, e.g., Thode & Sudan 1975;Spicer & Sudan 1984, and references therein) which flows toward the shock. The return current cancels the charge separation between the nonthermal ions that reach farther from the shock and the nonthermal electrons that are confined closer to the shock by the inverse Compton losses. If the upstream plasma is weakly magnetized, the flow of return current across a weak magnetic field accelerates the upstream plasma transversally, i.e., perpendicular to the direction of shock propagation, which creates inhomogeneities in the plasma (Reville et al. 2006;Pelletier, Lemoine, & Marcowith 2008); this is a relativistic version of the mechanism discussed by Bell (2004Bell ( , 2005. We show that even when the upstream magnetic field is weak, these density inhomogeneities may be sufficient to generate a stronger magnetic field in the shock downstream via vorticity production at the shock transition (Goodman & MacFadyen 2007;Sironi & Goodman 2007). This process converts the bulk kinetic energy of the shock downstream into vortical and magnetic energy. An advantage of this process is that it can take place even when the circumburst medium is uniform and therefore it is relevant for, as required by observations, both long and short GRBs (Nakar 2007). Alternative sources of vorticity that were previously discussed in the literature are preexisting density inhomogeneities in situations where an ultrarelativistic blastwave propagates into a clumpy stellar wind (Sironi & Goodman 2007), or an initially anisotropic blastwave (Milosavljevic, Nakar, & Zhang 2007). Nonthermal particle streaming may generate or amplify a magnetic field in the shock upstream (Bell & Lucek 2001;Milosavljević & Nakar 2006;A. Spitkovsky, priv. comm., but also see Pelletier, Lemoine, & Marcowith 2008). The relative efficiencies of the direct, nonthermal particle-driven field amplification in the shock upstream, and the amplification in the shock transition via vorticity generation in the presence of streaming-generated density inhomogeneity will depend on how the shock energy is partitioned between the thermal fluid and the nonthermal accelerated particles and on the efficiency with which magnetic field is generated by cosmic ray-driven turbulence in the shock upstream.
Throughout this work we assume that in ultraretivistic collisionless shocks, DSA accelerates ions to high nonthermal energies. While there is direct observational evidence of electron acceleration in such shocks, the assumption that protons are accelerated also may not necessarily be justified and deserves further investigation. Specifically, on theoretical grounds, particle acceleration should be inefficient when a compressed oblique large scale upstream magnetic field dominates particle dynamics in the shock downstream. In this case shock compression leads to a downstream magnetic field that is almost perpendicular to the shock normal. Then, a particle with a gyroradius smaller than the coherence length of the field cannot complete two full DSA cycles across the shock before becoming irreversibly bound to and escaping into the shock downstream (e.g., ). Therefore, a field that contains large-amplitude magnetic field perturbations on small scales seems to be required for acceleration (e.g., Ostrowski & Bednarz 2002;Niemiec & Ostrowski 2004, 2006. Even in the conditions in which a shock propagates in a weakly magnetized medium and generates magnetic turbulence that serves as a scattering agent for energetic particles, it cannot be taken for granted that the resulting particle spectrum will extend up to the high Lorentz factors that are required for the mechanism that we present. These potential limitations should be born in mind in what follows.
This work is organized as follows. In § 2.1 we analyze charge separation in the shock precursor and relate the nonthermal ion density ahead of the shock to the maximum energy to which nonthermal ions are accelerated in the shock. In § 2.2 we study the motion of the upstream medium in response to the Lorentz force associated with the nonthermal ion streaming across a weak magnetic field. In § 2.3 we determine the conditions under which nonlinear density inhomogeneities can result and estimate the energy density of the magnetic field produced by vortical motions that are excited as the shock transition sweeps past the inhomogeneities. In § 2.4 we examine the production of a small scale reversing magnetic field structure that was assumed in § 2.2, in the weak large-scale magnetic field of the circumburst medium by the nonresonant streaming instability introduced by Bell (2004Bell ( , 2005. In § 3 we speculate about the global structure of the shock precursor, and delineate several distinct physical regimes that are classified by an increasing distance from the shock. In § 4, we summarize our main conclusions. We consider a relativistic blast wave described by Lorentz factor Γ in which electrons and positive ions are accelerated by DSA. Unless otherwise explicitly noted, all quantities are defined in the rest frame of the upstream. The maximum energy to which the electrons are accelerated, γ e,max m e c 2 , is limited by inverse Compton cooling as the electrons traverse the shock upstream during a DSA cycle (e.g., Li & Waxman 2006). The ions experience much smaller radiative losses and can be accelerated to higher energies, γ i,max m i c 2 , than the electrons. Here, m i is the ion mass, and γ e and γ i denote the electron and ion Lorentz factors, respectively. Hence, the accelerated ions can travel farther ahead of the shock than the electrons. If γ i,max m i > γ e,max m e , the shock precursor consisting of accelerated particles will not be charge neutral far from the shock, at distances that the nonthermal electrons cannot reach. There, charge neutrality is recovered by a small polarization of the upstream, unshocked plasma. The polarization is established by the flow of a return current in the upstream plasma (see, e.g., Thode & Sudan 1975;Spicer & Sudan 1984, and references therein). This return current drives the growth of upstream plasma inhomogeneity (Bell 2004(Bell , 2005 that is the subject of this work. The maximum distance ∆(γ) that a nontermal particle with Lorentz factor γ can reach from the shock is determined by the magnetic field structure in the shock upstream. The magnetic field can come from the weak pre-existing magnetization of the circumburst medium, or can be generated by plasma self-organization resulting from an interaction with the streaming of nonthermal particles. Depending on the structure of the magnetic field, nonthermal particle orbits are either deflected in a circular fashion if the magnetic field is coherent, or execute random walks if the field is tangled, i.e., reverses on scales λ smaller than the gyroradius of the nonthermal particles divided by the shock Lorentz factor, r g /Γ ∼ γmc 2 /eBΓ, whereB is the RMS field strength. Since the magnetic field can have different strength and structure on different scalesB(λ), we employ the subscript "def" to denote the magnetic field length scale that produces the largest (circular or random) deflection of the nonthermal particle.
When a nonthermal particle is deflected by angle Γ −1 from the shock normal, its velocity parallel to the direction of shock propagation becomes smaller than that of the shock and the shock can catch up with the particle (see, e.g., Achterberg et al. 2001, and references therein). A particle that has been overtaken by the shock can be scattered back into the shock upstream, as is necessary to close the DSA cycle. Therefore, working in the reference frame in which the shock upstream is at rest, for the coherent field we have ∆(γ) ∼ r g /Γ 3 , whereas for the tangled field we obtain ∆(γ) ∼ r 2 g /λ def Γ 4 , where r g = γmc 2 /eB def . Since we do not estimate the magnetic field strength and geometry from first principles, we parametrize the effect of the deflecting, possibly small scale magnetic field by the maximum Lorentz factor of a nonthermal ion γ p,max , which we here take to be a proton, that can be accelerated with the aid of the magnetic field. We separately treat the cases in which the deflecting field is coherent and tangled. In the case of a tangled field, we assume that the field is tangled on spatial scales λ def ≪ r g /Γ that are independent of the distance from the shock ∆. This assumption may not be valid in general (see, e.g., Milosavljević & Nakar 2006;Katz et al. 2007), in which case our analysis should be interpreted as applying to the highest energy accelerated particles, and to the magnetic field component, with its own char-acteristic correlation length λ def , that has the greatest influence on the dynamics of these particles.
We also assume that the blastwave propagates into a quasihomogeneous medium with average densityρ ∼ m p n. The highest energy protons can reach the farthest from the shock to a distance ∆ p (γ p,max ) ∼ R/8Γ 2 , where R is the radius of the blastwave, and the factor of one eighth is peculiar to adiabatic spherical ultrarelativistic blastwaves propagating into uniform density media (Blandford & McKee 1976). Let U sh denote the energy density in radiation at radius R in the shock frame which is a fraction ǫ rad = (4π/3)R 3 U sh /E tot of the total isotropic equivalent energy of the blastwave E tot . Equating the inverse Compton power 4 3 σ T cγ 2 e,sh U sh , where γ e,sh ∼ γ e /Γ is the electron Lorentz factor in the shock frame, σ T is the Thompson cross section, and we neglected the Klein-Nishina effects (e.g., Li & Waxman 2006), to the energy gain ∼ γ e,sh m e c 2 per DSA cycle of duration ∼ ∆ e,sh /c ∼ Γ∆ e /c, we obtain the maximum Lorentz factor to which electrons can be accelerated, in spite of the cooling, as a function of the Lorentz factor to which the non-cooling protons can be accelerated which, as usual, is expressed in the rest frame of the shock upstream. Here, we have eliminated the blastwave radius R via the relation R = (17E tot /8πΓ 2ρ c 2 ) 1/3 applicable to an adiabatic spherical blastwaves propagating into uniform density media (Blandford & McKee 1976). The magnetic field length scale λ def (in the case of a tangled field) and strength squared B 2 def do not appear in equation (1) because they have been expressed in terms of the maximum proton Lorentz factor that can be accelerated by deflection in a field with these properties via B def = [(γ p,max m p c 2 /e)/Γ 3 ]/(R/8Γ 2 ) (coherent field) and λ def B 2 def = [(γ p,max m p c 2 /e) 2 /Γ 4 ]/(R/8Γ 2 ) (tangled field). The nondimensional distance from the shock that the most energetic electrons can reach, relative to the distance that the protons can reach, can be expressed as For typical values of ǫ rad , E tot , Γ, and n, this becomes which shows that for γ p,max ≫ 10 3 , regardless of the magnetic field geometry, the electrons are unable to travel as far from the shock as the protons and x cool ≪ 1 in either case. Note that for a coherent confining field γ p,max ∼ 7 × 10 5 B def 10 −6 E tot 10 53 erg (4) implying that if the confinement is dominated by a preexisting microgauss upstream magnetic field we expect that γ p,max ∼ 10 5 − 10 6 , while a larger value is expected if the shock precursor generates a magnetic field in which the tangled component dominates particle deflection. Therefore we always expect that x cool ≪ 1. In what follows, we ignore the interior region ∆ < ∆ e (γ e,max ) populated by nonthermal particles of either sign and assume that the exterior region ∆ > ∆ e (γ e,max ) contains only nonthermal ions, which we have assumed to be protons.
The nonthermal particle concentration at a given distance ahead of the shock will be dominated by the lowest energy particles that reach that distance. Thus, we can relate the nonthermal proton density n ntp in the shock upstream to their energy distribution where N (up) ntp (γ) is the total number of nonthermal protons in the shock upstream with Lorentz factors less than γ.
We assume that the accelerated particle spectrum in the shock downstream resulting from DSA contains equal energy on all energy scales, dN (down) ntp /dγ ∝ γ −2 (Lemoine & Pelletier 2003;Ellison & Double 2002, 2004; this assumption is not critical as somewhat steeper spectra, expected when particle scattering in the shock downstream is not isotropic (e.g., Keshet & Waxman 2005;, lead to similar conclusions. Ignoring the energy in nonthermal protons located in the upstream, we may normalize the spectrum by requiring that γp,max γp,min where ǫ nt is the fraction of the total energy in the accelerated protons. The minimum Lorentz factor of the nonthermal particles, resulting from a single scattering across the shock is γ p,min ∼ Γ 2 (Gallant & Achterberg 1999), but the dependence on γ p,min is only logarithmic.
To relate N (up) ntp to N (down) ntp , let P ∼ 1 2 denote the probability that a particle in the shock upstream, upon returning to the shock, is scattered again into the shock upstream. The downstream then contains the particles that are not re-scattered into the upstream, but are entrapped within and are advecting with the downstream. Conservation of nonthermal proton flux at the shock transition then implies 3 Here t acc is the time between the emission of a nonthermal proton from the shock and its reabsorption in the shock whereβ ,sh ∼ 1 2 is the average component parallel to the direction of shock propagation of the velocity of nonthermal protons in the shock frame, and t dyn ∼ R/c is the dynamical age of the blastwave. From this, where s ≡ d ln ∆/d lnγ, so that s = 1 for the coherent field, and s = 2 for the tangled field. This shows that the integral spectrum of all the nonthermal particles located in the shock upstream is substantially harder than that in the downstream. Substituting equation (9) in equation (5), we find that the total density of the accelerated protons equals where again ∆(γ) = (γ/γ p,max ) s R/8Γ 2 and we have defined denote the nondimensionalized distance from the shock; in terms of this parameter, where q = s −1 , so that q = 1 for the coherent field and q = 1 2 for the tangled field, and we have set Λ = 10. Equation (11) gives the nonthermal proton density in the rest frame of the shock upstream. For large Γ or small γ p,max , this density can formally exceed the upstream density; in reality, n ntp may be limited by kinetic plasma instabilities. In the rest frame of the nonthermal proton shock precursor, the density ratio n ntp /n is reduced by factor Γ −2 .

Dynamics
Here we study the response of the shock upstream to the streaming of the nonthermal protons in the shock precursor. The streaming of nonthermal protons with density n ntp will give rise to a return current whereR is a unit vector in the direction of propagation of the shock. The return current cancels the charge separation among the nonthermal particles resulting from the inverse Compton cooling suppression of the acceleration of nonthermal electrons. Consider a fluid element in the upstream medium containing a magnetic field B that reverses direction on length scales λ. This may not be the same magnetic field scale that is the most effective at deflecting the orbits of the nonthermal particles, see § 2.1. A magnetic field that reverses on the relevant scales may exist in the upstream at the outset.
If not, as we show in § 2.4, it can be produced by the return current from an initially coherent microgauss field. Let µ denote the sine of the angle between the magnetic field and the direction of shock propagation.
As the return current flows across the field, the plasma experiences a Lorentz force acting perpendicular to both the direction of shock propagation and the field direction. Let τ denote the time measured since the arrival of the photon shell; in this time coordinate, the shock transition sweeps a fluid element at τ = R/8Γ 2 c. The equation of motion for the transverse Lagrangian displacement of the fluid element in response to the Lorentz force, valid while the motion is Newtonian, i.e., while |d ξ/dτ | ≪ c, reads From this, assuming that B ∼ B sin(2πr ·B/λ)B, where r is a spatial coordinate and B is peak field, the amplitude of the transverse acceleration is where φ ≡ 2πr ·B/λ, and ǫ B ≡ B 2 /8πρc 2 is the energy density in the magnetic field on scales λ divided by the rest energy density of the shock upstream. Note that ǫ B depends on the length scale λ and is not directly related to the confining magnetic field energy density measured on scales λ def .
We define x ≡ ∆/(R/8Γ 2 ) so that the unperturbed motion of an upstream fluid element toward the shock follows the characteristic dx/dτ = −c/(R/8Γ 2 ). Ignoring the amplification of the magnetic field during the linear phase of the nonthermal proton-driven streaming instability ( § 2.4) we obtain Given that the upstream fluid starts from rest, ξ(1) = dξ/dx(1) = 0, equation (15) can be integrated to find the transverse displacement where g(x) = x ln x − x + 1 for the coherent field and g(x) = 4 3 x 3/2 − 2x + 2 3 for the tangled field. Setting µ = 1 and Λ = 10 we obtain Thus for γ p,max ≫ 10 4 , the distance traveled by the upstream fluid is ≪ R/8Γ, which is the width of the blastwave in the frame of the shock downstream. The value of ξ(x = 0) decreases with increasing γ p,max because when protons are accelerated to higher energies, the number of nonthermal protons between which the available energy ∼ ǫ nt E tot is partitioned decreases, while the lower energy nonthermal protons are confined closer to the shock, both of which decrease the density of nonthermal protons far from the shock where the Ampère force-driven acceleration takes place.
Under what circumstances will the transverse displacement result in a nonlinear density contrast on scales λ? This requires ξ(x) ∼ λ before the fluid element is overtaken by the shock at x = 0. However, before the fluid arrives at the shock transition, some assumptions entering the derivation of equation (16) may be compromised: its motion may become relativistic (dξ/dτ ∼ c), it may enter the region in which the pressure transfered by the nonthermal protons to the upstream fluid starts to accelerate the upstream fluid in the original rest frame of the shock upstream, and it may also enter the region containing accelerated nonthermal electrons where the return current vanishes. The latter problem arises when x ∼ x cool where x cool ≡ ∆ e (γ e,max )/(R/8Γ 2 ) is given in equation (2). It is evident from equation (3) that the return current vanishes only in the region populated by the lowest-energy nonthermal protons (γ p 10 3 ), which for γ p,max ≫ 10 3 , as expected, will be confined very close to the shock transition. We are not able determine the value of x at which the upstream starts to be accelerated in its own frame but we do assume that it is smaller than x cool .
To assess the distance at which the transverse motion of the fluid becomes relativistic, we focus on the special case of a tangled deflecting field; the case of a coherent deflecting field is qualitatively similar. The time at which the upstream motion becomes relativistic is obtained by setting dξ/dx = −R/8Γ 2 (i.e., dξ/dτ = c) to find When γ p,max > γ rel,crit , the fluid does not attain relativistic transverse velocity before it reaches the shock. Then, the numerical estimate in equation (17) at x = 0 where g(x) ∼ 1, which was derived assuming Newtonian motion, shows that the transverse displacement decreases with γ p,max .
Conversely, for γ p,max ≪ γ rel,crit , the fluid motion formally becomes relativistic well before the fluid reaches the shock. The maximum transverse displacement that can be attained in the Newtonian regime can be evaluated by substituting x = x rel in equation (16) to obtain for γ p,max ≪ γ rel,crit . Acceleration of the fluid may not stop in the Newtonian regime; indeed, it will likely continue into the transrelativistic regime, where the equation of motion is simply dξ/dτ ∼ c. Then, however, the motion will not be purely perpendicular to the direction of shock propagation and the fluid will start accelerate, in the upstream frame, in the parallel direction. Here we do not take into account this behavior and conservatively restrict our attention to the maximum transverse displacement that the fluid reaches while its motion remains Newtonian. Since the transverse displacement increases with γ p,max when the transverse motion becomes transrelativistic and decreases with γ p,max when it does not, the largest Newtonian displacement is possible when the maximum proton Lorentz factor is about equal to γ rel,crit in equation (19) and is simply given by ξ max ∼ 1 3 R/8Γ 2 , which is much larger than the proton plasma skin depth c/ω p ≡ c/(4πe 2 n/m p ) 1/2 of the shock upstream. Of course, the maximum transverse displacement is achieved only if a magnetic field that reverses on scales λ ∼ ξ max is present. We speculate about the origin of the reversing field in § 2.4 below. Note that ξ max is close to the maximal value allowed by causality, R/8Γ 2 .

Density Inhomogeneity, Vorticity, and Dynamo
Here, we study the evolution of an initially uniform density fluid in response to the Lorentz force-driven transverse motion discussed in §2.2. If the magnetic field reverses itself on scales ∼ λ, the average linear density contrast arising from the transverse motion, for linear displacements, ξ ≪ λ, will be given by We expect nonlinear density contrast on scales λ provided that ξ(x max ) λ, where x max = max{x cool , x rel }. This condition places an upper limit on the magnetic field reversal length scales λ on which a nonlinear density contrast can build up before the fluid reaches the shock. When fluid with nonlinear density contrast reaches the shock transition, provided that the width of the density jump of the shock transition is smaller than the length scale associated with the contrast, vorticity is generated at the transition. Sironi & Goodman (2007) have calculated the fraction of shock energy that is converted into vortical energy for an ultrarelativistic blastwave propagating into a clumpy medium. They provide a fitting formula for vortical energy fraction ǫ vort as a function of clump size L, peak density contrast δ max , and volume-filling factor n clump L 3 , which reads For L ∼ λ and n clump ∼ λ −3 and mildly nonlinear density contrast δ max ∼ 1, this implies ǫ vort ∼ (3Γ) −1 . The collisions of and compression in accelerated plasma shells (Bell 2004(Bell , 2005 may amplify the density contrast into the strongly nonlinear regime δ max ≫ 1, but we do not attempt to estimate the magnitude of this effect. If vorticity is generated on scales λ ≪ R/Γ, the resulting eddies can amplify the downstream magnetic field to levels ǫ B,down ∼ ǫ vort via a turbulent dynamo mechanism (Meneguzzi et al. 1981;Schekochihin et al. 2004). Strong amplification is expected when the number of vortical eddy turnovers in the shock downstream is larger than unity, but this is automatically expected when the density contrast is nonlinear on scales ≪ R/8Γ. Indeed, our analysis in § 2.2 suggests that nonlinear density contrast will be generated on scales λ ξ max ∼ 1 3 R/8Γ 2 , for which the expected number of vortical eddy turnovers is ≫ 3Γ (see § 4.2 in Sironi & Goodman 2007). On the other hand, since ξ max is much larger than the plasma skin depth c/ω p , the magnetic field that the turbulent dynamo generates will not be susceptible to the fast collisionless decay discussed by Chang et al. (2008) that affects the much smaller scale field that kinetic instabilities can generate in the shock transition layer (e.g., Gruzinov 2001; Frederiksen et al. 2004;Medvedev et al. 2005;Keshet et al. 2008;Spitkovsky 2008b, and references therein).

Reversing Field from Bell's Streaming Instability
In § 2.2 we assumed that the magnetic field reverses direction on scales λ. Bell (2004Bell ( , 2005 has shown that an instability driven by the nonthermal ion streaming can convert an initially uniform field into a reversing, helical magnetic field (see, also, Reville et al. 2006;Zirakashvili et al. 2008;Pelletier, Lemoine, & Marcowith 2008). For ultrarelativisic streaming and helical perturbations of the form ξ x + iξ y ∝ exp i(kR − ωt) (x and y are two coordinates perpendicular tô R), the instability has dispersion relation where v A is the Alfvén velocity and B R ≡ B ·R. The fastest growing mode has wavelength and growth rate respectively. 4 For nonlinear density contrast production on scales λ fast we need ξ(x cool ) > λ fast and ξ(x rel ) > λ fast as well as Υ fast > 8Γ 2 c/R. However, the wavelength of the fastest growing mode is very small if B is the microgauss field typical of the interstellar medium. All longer wavelengths λ > λ fast also grow on rates This seems to suggest that a reversing field may be generated on a wide range of scales. The instability has enough time to reach nonlinear growth only when the growth rate exceeds the inverse crossing time of the shock precursor To evaluate the growth rate, we substitute equations (10; coherent field) with ∆ = R/8Γ 2 and (24) in equation (25) to obtain Where ǫ B0 parametrizes the strength of the pre-existing coherent field, not to be confused with the same symbol expressing strength of the length scale-dependent tangled field in previous sections. The condition for nonlinear growth in equation (26) which suggests that nonlinear growth is very broadly expected on scales λ ξ max ∼ R/8Γ 2 when γ p,max γ rel,crit . When γ p,max ≫ γ rel,crit , nonlinear growth is still expected on scales smaller than R/8Γ 2 but still much larger than the plasma skin depth.
3. DISCUSSION The complexity of the structure of ultrarelativistic collisionless shocks stems from the multiscale nature of plasma selforganization. This and the preceding analytical and numerical analysis have identified organization on various spatial scales between the proton plasma skin c/ω p ∼ 2 × 10 7 cm and the width of the blastwave in the upstream frame R/8Γ 2 ∼ 10 12 − 10 18 cm. While the dynamical organization of the plasma on different scales is interdependent, our understanding of the scale interdependence in the precursors of ultrarelativistic collisionless shocks is still in its infancy. Motivated by the present and other preliminary investigations (see, e.g., Milosavljević & Nakar 2006;Katz et al. 2007;Keshet et al. 2008;Spitkovsky 2008b), we propose several possible regions within the structure of an ultrarelativistic shock precursor in which the physical processes that drive plasma organization change character as a function of distance from the shock. We, however, caution that not all of these regions have to be present in all-or perhaps any-of the blastwave precursors. Similarly, we are not able to determine the relative ordering of the regions, with respect to their distance from the shock transition, with any degree of certainty. In a shock that produces a power-law spectrum of accelerated nonthermal particles (see §1 for potential limitations of this key assumption), we propose that the shock precursor may contain the following concentric regions: 1. An outermost region extending to the maximum possible radial distance from the shock, measured in the reference frame of the shock upstream, of ∼ R/8Γ 2 , that is causally associated with the explosion. This region contains a low density of nonthermal protons in the high-energy tail of the nonthermal proton spectrum. Because inverse Compton cooling losses prohibit the existence of nonthermal electrons in this region, a return current neutralizing the charge separation created by the high-energy accelerated nonthermal protons flows in the upstream plasma ( § 2.1). The effect of the return current is twofold: (a) starting from an initial, weak, coherent, quasiuniform magnetic field, the return current nonresonantly excites circularly-polarized Alfvén waves, thereby converting the field component parallel to the direction of shock propagation into a wound, perpendicular, helical component ( § 2.4); (b) given a perpendicular magnetic field, which could be preexisting or generated by the return current, the Ampère force associated with the return current accelerates the upstream plasma in the perpendicular direction ( § 2.2) and produces a density contrast in the plasma ( § 2.3). More speculatively, it has been hypothesized that besides generating nonlinear density contrast, the return current interaction significantly amplifies the pre-existing magnetic field; this possibility awaits verification in numerical simulations. Because the density of nonthermal particles in this region is low, the region is either stable to small-scale plasma instabilities, such as the transverse Weibel (or filamentation) instability (e.g., Fried 1959) and its relatives, or more likely, the small-scale instabilities are present but their growth times are longer than the crossing time of the region R/8Γ 2 c. 5 This region should exist unless 5 Small scale instabilities may also occur of the upstream medium is en-the compression layer, which is the region 4 below, extends all the way to the edge of the maximum radial distance from the shock (∼ R/8Γ 2 ), which renders the shock transition layer as wide as the downstream.
2. A region still devoid of nonthermal electrons and endowed with the return current, but where the density of nonthermal protons is high enough to drive the small-scale plasma instabilities, with wave vectors k ∼ ω p /c. At present, the dominant unstable kinetic mode in the regime in which a very low density beam of particles with an ultrarelativistic forward momentum and an ultrarelativistic transverse momentum spread streams through a cold background plasma has not been identified. It is possible that the small-scale instabilities can generate an electromagnetic field efficiently and that the field enhances the perpendicular velocity diffusion of nonthermal particles, which is a necessary element of the DSA cycle. The magnetic field in this region is a combination of a small-scale field generated by the instabilities and a larger scale field generated from the pre-existing field by the return current. If the latter is strong enough, depending on its resulting orientation relative to the shock normal, it may suppress some of the small-scale instabilities, or it may drive small-scale turbulence in the flow, especially if the resulting field is perpendicular to the shock normal (Hededal & Nishikawa 2005).
3. A region close enough to the shock transition that the inverse Compton cooling time of the nonthermal electrons is longer than the duration of the DSA cycle. Since this region is populated by nonthermal electrons and protons, the nonthermal particle precursor is neutral overall, and no return current is present. However, small scale instabilities are still present and are more intense than in the preceding regions. The small scale instabilities generate a strong magnetic field in the upstream plasma, which, when advected to the shock transition, facilitates upstream particle scattering and thermalization. The small scale field may also play a critical role in the injection and acceleration of particles in the DSA mechanism (e.g., . The relative ordering of regions 2 and 3 may vary. Depending on the parameters and initial conditions, it may happen that the region containing nonthermal electrons extends farther from the shock than that in which small scale plasma instabilities excited by nonthermal particles play an important role in setting the shock structure. 4. The shock transition region, where the upstream plasma is compressed. At the leading edge of this transition layer, the compression may result from an efficient momentum transfer from the nonthermal particles (e.g., Blandford 1980;Drury & Völk 1981), which could be coupled to the upstream plasma by the small scale instabilities. In this region, the upstream plasma starts to accelerate (in the rest frame of the far upstream) and decelerate (in the rest frame of the shock). The final stage of compression, where the upstream becomes Newtonian in the rest frame of the shock, takes place when the upstream interpenetrates the downstream isotropized plasma, and so the hydrodynamic jump conditions are realized. If the nonthermal particles play a role in initiating the compression, than the width of this layer is much larger than the plasma skin depth. If, however, efficient compression commences only where the upstream interpenetrates the downstream thermalized plasma, the width of the compression layer may be as small as of the order of the skin depth. While in the preceding regions we expect a decrease in the mean magnetic field correlation length λ ≡ λB 2 (λ) / B 2 (λ) as the riched by an e ± -pair cascade (Ramirez-Ruiz et al. 2007). plasma approaches the shock, in the shock transition region we expect an opposite trend: the small scale instabilities have reached saturation and the small field they have generated decays via a kinetic damping mechanism as the shocked plasma travels downstream (Gruzinov 2001;Medvedev et al. 2005;Chang et al. 2008;Keshet et al. 2008;Spitkovsky 2008b). As the small scale field decays, the residual field, which partakes in the synchrotron emission of the GRB afterglows (see, e.g., Panaitescu & Kumar 2002;Yost et al. 2003) and must be much stronger than the shock compressed pre-existing mangetic field of the normal interstellar medium (see, e.g., Gruzinov 2001;Piran 2005b), is the larger scale field generated in regions 1-3 above. The shock transition region is also the site of the onset of the establishment of electron-ion equipartition (Spitkovsky 2008a).
Finally we note that if the highest energy nonthermal particles traverse regions 1-3 during a DSA cycle, that is, these particles are deflected by the magnetic field of the nonaccelerated upstream, then an upper limit on γ p,max can be set (Milosavljević & Nakar 2006). This limit is derived from the constraint of causality on the self organization scale of the upstream magnetic field (∼ R/8Γ 2 ) and the maximal magnetic field energy density in the non accelerated upstream (∼ nm p c 2 ). This upper limit is, roughly, γ p,max 10 10 n 1/2 (R/10 18 cm) implying the GRB external shocks are not promising sources of ultra-high energy cosmic rays (UHECR) with Lorentz factors, under the assumption that they are protons, of γ p 10 11 . 4. CONCLUSIONS We have examined the influence of a pre-existing magnetic field on the structure of ultrarelativistic shock waves, such as in the external GRB shocks that may be behind the GRB afterglow phenomenon. From the hypothesis that the shock wave accelerates charged particles to high Lorentz factors, we were able to derive the following conclusions: In GRB external shocks that accelerate ions to Lorentz factors γ i ≫ 10 3 , inverse Compton cooling in the shock upstream hinders nonthermal electron acceleration to high energies. Because of this, nonthermal electrons do not penetrate as far into the shock upstream as the highest-energy nonthermal ions do. Thus, a region exists in the shock upstream far from the shock transition at R ∼ ct[1 − (8Γ 2 ) −1 ], but still behind the photon shell at R = ct, where return current flows to cancel the charge separation between the nonthermal electrons and ions.
As the return current flows across the weak pre-existing magnetic field of the shock upstream, the Ampère force accelerates the upstream plasma perpendicular to the direction of shock propagation. If the upstream field reverses on scales λ ≪ R/8Γ 2 , the transverse acceleration produces a nonlinear density contrast on the same scales. If the pre-existing field is quasi-uniform (non-reversing), Bell's streaming instability will efficiently convert the quasi-uniform field into a reversing field during the light-crossing time of the shock precursor.
As the shock transition sweeps the resulting density clumps, the bulk kinetic energy of the blastwave is converted into vortical energy. The vortical eddies in the shock downstream turn over many times and amplify the magnetic field via a dynamo mechanism. For clumps of peak density contrast of about one, the vortical energy (Sironi & Goodman 2007) and with it the magnetic energy density can be amplified to ǫ B ∼ (3Γ) −1 , where in GRB external shocks, Γ few × 100. This is consistent with the observed GRB light curves and spectra. The generated magnetic field will be coherent on scales much larger than the plasma skin depth and will, as such, not be susceptible to rapid collisionless decay. Taken together, these results indicate that the microgauss magnetic field (ǫ B ∼ 10 −9 ) typical of the interstellar medium is sufficient to drive Bell's mechanism in ultrarelativistic GRB external shocks and deliver nonlinear density inhomogeneities to the shock transition. Therefore, magnetic field amplification through shock vorticity generation is expected even when the circumburst medium is not initially clumpy, and we expect it to operate in long and short GRBs.
We speculatively propose a structure for the shock precursor consisting of four concentric zones characterized by different forms of plasma self-organization. First, the outermost region of the precursor is the region populated by streaming, nonthermal protons but devoid of nonthermal electrons. There, the plasma develops non-linear density inhomogeneities. Second, a region that still contains a return current but where the nonthermal particle precursor streaming through the shock upstream is susceptible to small-scale kinetic plasma instabilities. Third, a region containing the relatively low-energy nonthermal electrons that can be accelerated in the shock in spite of the inverse Compton cooling losses; in this region, the return current is absent. Finally, the fourth region is the shock transition itself, where kinetic instabilities and plasma waves facilitate plasma isotropization and establish the hydrodynamic jump. The relative ordering of the second and the third region may vary.