{'fraction_non_alphanumeric': 0.050682213458099604, 'fraction_numerical': 0.01641231658623815, 'mean_word_length': 4.196537678207739, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 16, '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}}
The effects of sub-shells in highly magnetized relativistic flows

Astrophysical sources of relativistic jets or outflows, such as gamma-ray bursts (GRBs), active galactic nuclei (AGN) or micro-quasars, often show strong time variability. Despite such impulsive behavior, most models of these sources assume a steady state for simplicity. Here I consider a time-dependent outflow that is initially highly magnetized and divided into many well-separated sub-shells, as it experiences impulsive magnetic acceleration and interacts with the external medium. In AGN the deceleration by the external medium is usually unimportant and most of the initial magnetic energy is naturally converted into kinetic energy, leading to efficient dissipation in internal shocks as the sub-shells collide. Such efficient low-magnetization internal shocks can also naturally occur in GRBs, where the deceleration by the external medium can be important. A strong low-magnetization reverse shock can develop, and the initial division into sub-shells allows it to be relativistic and its emission to peak on the timescale of the prompt GRB duration (which is not possible for a single shell). Sub-shells also enable the outflow to reach much higher Lorentz factors that help satisfy existing constraints on GRBs from intrinsic pair opacity and from the afterglow onset time.


Introduction
The composition and acceleration mechanism of the relativistic outflows that power gamma-ray bursts (GRBs) are important open questions in this field (for a review see Piran 2005). In particular, their degree of magnetization and the role of magnetic fields in the acceleration or collimation of GRB outflows is of great interest. In recent years, models in which the outflow is highly magnetized close to the source, and possibly also at very large distances from the source where much of the observed emission is produced, have been gaining popularity (Drenkhahn & Spruit 2002;Vlahakis & Königl 2003;Lyutikov & Blandford 2003;Giannios & Spruit 2006;Komissarov et al. 2007;Tchekhovskoy et al. 2010;Lyubarsky 2010b) and may provide a viable alternative to the traditional fireball model. Some other relativistic outflow sources are even more likely strongly magnetized near the central source. Pulsar winds are almost certainly Poynting flux dominated near the source, and the same very likely also holds for active galactic nuclei (AGN) and tidal disruption events (TDEs) of a star by a super-massive black hole. In AGN and TDEs, which are often highly variable (i.e. impulsive) suggesting sub-shells in the outflow, since the central accreting black hole is super-massive then even close to it the Thompson optical depth τ T may not be high enough for thermal acceleration by radiation pressure -the main competition to magnetic acceleration -to work efficiently (e.g., Ghisellini 2011). Observations of relevant sources, such AGN, GRBs or pulsar wind nebulae suggest that the outflow magnetization is rather low at large distances from the source. An important outstanding question concerning outflows that start off highly magnetized near the source is how they convert most of their initial electromagnetic energy into the energy in the bulk and random motions particles, where the latter also produces the radiation we observe from these sources. This is known as the σ problem, namely how to transform from σ ≫ 1 near the source to σ ≪ 1 very far from the source, where the magnetization parameter σ is the Poynting-to-matter energy flux ratio. Different approaches to this problem have been considered so far.
Outflows that are initially Poynting flux dominated are usually treated (for simplicity) under ideal MHD, axi-symmetry and steady-state. Under these conditions, however, it is difficult to achieve sufficiently low magnetization (σ < 1 or even σ ≪ 1) at large distances from the source that would allow efficient dissipation in internal shocks (Komissarov et al. 2009;Lyubarsky 2009Lyubarsky , 2010a. A possible solution is that the magnetization remains high (σ ≫ 1) also at large distances from the source and the observed emission is powered by magnetic reconnection rather than by internal shocks (Lyutikov & Blandford 2003;Lyutikov 2006). Alternatively, the non-axi-symmetric kink instability could randomize the direction of the magnetic field, making it behave more like a fluid and enhancing magnetic reconnection, which both increase the acceleration and help lower the magnetization (Heinz & Begelman 2000;Drenkhahn & Spruit 2002;Giannios & Spruit 2006). Another option that may be relevant for AGN and GRBs (Lyubarsky 2010b), is that if the Poynting flux dominated outflow has alternating fields (e.g. a striped wind) then the Kruskal-Schwarzschild instability (i.e. the magnetic version of the Rayleigh-Taylor instability) of the current sheets could lead to significant magnetic reconnection, which in turn increases the initial acceleration resulting in a positive feedback and self-sustained acceleration that leads to a low magnetization.
Here I focus on the effects of strong time dependence -impulsive outflows that are initially highly magnetized, with σ 0 ≫ 1, under ideal MHD. Granot, Komissarov & Spitkovsky (2011, hereafter paper I) have recently found a new impulsive magnetic acceleration mechanism for relativistic outflows, which is qualitatively different from its Newtonian analog (Contopoulos 1995), and can lead to kinetic energy dominance and low σ that allow for efficient dissipation in internal shocks. Paper I focused mainly on the acceleration of an initially highly magnetized shell of plasma into vacuum. The initial magnetic energy can be almost fully converted into kinetic form as the shell expands radially under its own magnetic pressure. Initially, while it is still highly magnetized, this expansion leads to impulsive acceleration and the resulting increase in the Lorentz contraction almost exactly cancels the increase in the shell's width in its own rest frame, leading to a constant width in the lab (i.e. central source) frame. Once it becomes kinetically dominated it starts spreading radially significantly also in the lab frame, and its magnetization quickly drops to σ ≪ 1.
Paper I only briefly discussed the effects of the interaction with the external medium. The interaction with an unmagnetized external medium whose density varies as a powerlaw with the distance from the central source is analyzed in detail in an accompanying paper (Granot 2011, hereafter paper II). The present work generalizes this self-consistent treatment of the combined impulsive magnetic acceleration and deceleration by the external medium, by examining the effects of an outflow that is initially divided into many well separated sub-shells, instead of a single shell. Such multiple sub-shells are both naturally expected in highly variable sources, and are also required in order to produce internal shocks (where enabling efficient internal shocks is one of the main motivations for this type of model).
The basic test case examined in paper I was a highly magnetized shell initially at rest, whose back leans against a conducting wall and whose front edge faces vacuum, while in paper II the vacuum is replaced by an unmagnetized external medium. As discussed in paper I, while such a setup might be directly applicable for, e.g, a giant flare from a soft gamma repeater, for most relevant astrophysical sources (such as GRBs, AGN or micro-quasars) we expect that initially a quasi-steady acceleration takes place and saturates at some radius (i.e. distance from the source), while the impulsive acceleration mechanism takes over at a larger radius. The dynamics most relevant for our purposes occur after the impulsive acceleration takes over, and are insensitive to whether part of the earlier acceleration occurred in the quasi-steady regime (while the jet was being collimated). However, during the impulsive acceleration phase the outflow still retains memory of its initial properties when it was ejected from the central source, namely the time history of its initial magnetization σ 0 and ejected energy per unit time, which is reflected in the isotropic equivalent luminosity L (i.e. energy flux through a sphere of fixed radius if the outflow occupied all of the solid angle). During this phase the outflow opening angle remains roughly constant, and its dynamics are essentially spherical, and equivalent to those for the planar case, as shown in paper I.
The sub-shells are assumed to be initially well separated, uniform with sharp edges and separations comparable to or larger than their widths, and with a large contrast (e.g. in energy density) between the sub-shells and the "gaps" between them (as might be the result of large variations in the energy output rate from the central source into the outflow). A modest contrast and/or very smooth edges for the sub-shells might cause the sub-shells to collide and merge earlier on, while they are still highly magnetized, making the outflow subsequently behave closer to the steady regime than to the impulsive regime. Quantifying these effects, however, is beyond the scope of this paper and is left for a separate work.
The basic physical setup explored in this work is described in § 2, while § 3 studies in detail the main test case, namely the dynamics of N ≫ 1 identical sub-shells. I find several different cases for the dynamics, which naturally divide into three groups: (i) a low magnetization "thin shell" (cases 1 and 2 * ) where a strong mildly relativistic reverse shock develops on a timescale larger than the duration of the prompt GRB emission (T dec ≫ T GRB ), (ii) a low or mild magnetization "thick shell" (cases 2 and 3A), where a relativistic reverse shock develops whose emission peaks on a timescale comparable to that of the prompt GRB emission (T dec ∼ T GRB ), (iii) a high magnetization "thick shell" (case 3B), where the reverse shock and its associated emission are strongly suppressed (with T dec ∼ T GRB where T dec in this case can be identified through the afterglow emission, which peaks on this timescale). The first two groups, (i) and (ii), naturally produce internal shocks at mild magnetization and high Lorentz factors, which can help accommodate GRB observations. The effects of varying the initial magnetization between different sub-shells are explored in § 4, and I show that this is not expected to strongly affect the main results, even for strong initial variations (and the same holds for order unity variations in the other model parameters). The new results found in this work are summarized in § 5 and their implications are discussed in § 6.

Sub-shells versus a single shell
Here the results of paper II for a single spherical shell of initial (lab-frame) width ∆ 0 ≈ R 0 , energy E, luminosity L ≈ Ec/∆ 0 and initial magnetization σ 0 = B 2 0 /(4πρ 0 c 2 ) ≫ 1 (with a magnetic field normal to the radial direction, where B 0 and ρ 0 are its initial magnetic field and rest-mass density, respectively), are generalized to the case where the same initially uniform shell is divided into N ≫ 1 identical sub-shells of initial widths ∆ 0,sh = ∆ 0 /N and separations ∆ gap ∆ 0,sh , energy E sh = E/N, with the same luminosity (L sh = E sh c/∆ 0,sh = Ec/∆ 0 = L) and initial magnetization (σ 0,sh = σ 0 ) as the original single shell. The total initial width of all the sub-shells including the gaps between them is ∆ tot ≈ (∆ 0,sh + ∆ gap )N = ∆ 0∆ where∆ ≡ 1 + ∆ gap /∆ 0,sh .
The unperturbed external medium is taken to be cold, unmagnetized, and with a rest mass density that varies as a power-law (of index k) with the distance R from the central source, ρ 1 = AR −k . The external medium interacts directly only with the first (i.e. leading) sub-shell, which sweeps it up and drives a strong relativistic shock into it, where a contact discontinuity (CD) separates the shocked external medium and the material in the first sub-shell. The subsequent (or trailing) sub-shells do not directly interact with the external medium. Instead, they interact directly only with their neighboring sub-shells (i.e., each subshell interacts only with the sub-shell/s just in front of it and/or just behind it), and initially they propagate in the relatively evacuated region left behind by the preceding sub-shell.
Since the sub-shells are assumed to be initially well separated, each sub-shell starts accelerating independently. The first (or leading) sub-shell interacts with the external medium, and until the second sub-shell collides with it from behind its dynamics essentially follow those of a single (albeit, relatively narrow) shell, which were studied in detail in paper II. Following the results of paper II (and adding 'sh' to the subscripts of quantities that refer to a single sub-shell rather than to the whole outflow), it has the following critical radii: Here R 0,sh (R 0 ) is the initial radius of the sub-shell (or the original single shell), essentially equal to its initial width, ∆ 0,sh (∆ 0 ), where its typical Lorentz factor and magnetization are Γ sh ∼ σ 1/3 0,sh ( Γ ∼ σ 1/3 0 ) and σ sh ∼ σ 2/3 0,sh ( σ ∼ σ 2/3 0 ), respectively, and in regimes I or II from paper II at R > R 0,sh (R > R 0 ) they start to evolve as is the coasting radius where if the external density is low enough, corresponding to regime I from paper II, the subshell (or the original single shell) becomes kinetically dominated and starts to coast at Γ sh ∼ σ 0,sh ( Γ ∼ σ 0 ) while its magnetization rapidly drops with radius, σ sh (R > R c,sh ) ∼ R c,sh /R ( σ (R > R c ) ∼ R c /R); R u,sh (R u ) is the radius where, in regime II from paper II, the typical Lorentz factor of the sub-shell (or the original single shell) becomes similar to that just behind the CD, stops growing as R 1/3 , and instead starts evolving as is the deceleration radius in regime II (from paper II) where most of the energy originally in the sub-shell (or the original single shell) is transfered to the shocked external medium.
The critical Lorentz factors, Γ cr,sh or Γ cr , which signify the borderline between regimes I (σ 0,sh < Γ cr,sh or σ 0 < Γ cr ) and II (Γ cr,sh < σ 0,sh < Γ This essentially reflects the fact that since the sub-shell and the corresponding (or original) single shell have the same luminosity, they share the same line in the Γ -R plane corresponding to a pressure balance at the CD between the bulk of the shell (or sub-shell) and the shocked external medium (for details see paper II), . When comparing to observational constraints, the numerical value of Γ cr is very useful, (paper II) where ζ = (1 + z)/3, z is the source redshift, T GRB = (1 + z)∆ tot /c = 30T 30 s is the observed duration of the GRB and E = 10 53 E 53 erg is the total (isotropic equivalent) energy of the ejecta. Numerical values are provided for the physically interesting cases of k = 0 (a uniform medium of number density n = A/m p = n 0 cm −3 ), and k = 2 (corresponding to the stellar wind of a massive star progenitor, with A = 5 × 10 11 A * gr cm −1 ). The subsequent sections largely follow paper II, build upon it and use consistent notations.
3. Identical sub-shells: dynamical regimes for different values of k and σ 0,sh 3.1. Moderate (or no) external density stratification: k < 2 Fig. 1) then even the first (leading) sub-shell reaches its coasting radius R c,sh without being significantly affected by the external medium. Since the subsequent (trailing) sub-shells start propagating in the evacuated region behind the first shell, they are initially not affected by the external medium. Thus, all of the sub-shells accelerate largely independently until becoming kinetically dominated at R c,sh ∼ R 0,sh σ 2 0,sh ∼ R c /N, where they start coasting (at Γ sh ∼ σ 0,sh ) and spreading radially. Then, they soon collide with each other and form internal shocks at R IS ∼ (∆ gap /∆ 0,sh )R c,sh . After the internal shocks subside, the resulting merged shell of width ∼ ∆ tot ≈ ∆ 0∆ ∼ ∆ 0 (∆ gap /∆ 0,sh ) starts spreading radially only at R s ∼ ∆ tot σ 2 0,sh ∼ (∆ gap /∆ 0,sh )R c ∼ NR IS where its mean magnetization is still similar to that near the internal shocks radius, to the single wide shell that corresponds to the sub-shells considered here if they had no initial gaps between them. Thus, the merged shell similarly follows the unmagnetized "thin shell" case (regime I from paper II), and the reverse shock that forms becomes mildly relativistic near the deceleration radius, is the radius at which a rest mass E/Γ 2 0 c 2 of the external medium is swept up; see Eq.
[4] of paper II), where it finishes crossing the merged shell and most of the energy is transfered to the shocked external medium. The magnetization at this radius is already low Fig. 1), then similarly to case 1 above all of the sub-shells accelerate independently until becoming kinetically dominated at R c,sh , where they start to coast (at Γ sh ∼ σ 0,sh ) and spread radially, and soon collide with each other at R IS ∼ (∆ gap /∆ 0,sh )R c,sh . The main difference is that in this case the resulting merged shell is decelerated significantly by the external medium before it starts to spread radially 1 , while its typical magnetization is modest, ∼ σ (R IS ) ∼ ∆ 0,sh /∆ gap 1, and therefore a strong, highly relativistic reverse shock develops. Hence, case 2 effectively reverts to the unmagnetized (or at most mildly magnetized) "thick shell" case, where a bright reverse shock emission on a timescale comparable to that of the prompt GRB emission (T dec ∼ T GRB ) is expected. Note that both the observed deceleration time, T dec ∼ R dec /c Γ 2 (R dec ) (i.e. the timescale on which both the reverse shock and afterglow emission peak) and T GRB scale linearly with∆ in this case so that their ratio (or the relation T dec ∼ T GRB ) is independent of∆. The effective luminosity of the merged shell is somewhat lower than that of the original sub-shells or the corresponding single wide shell, L merged ≈ Ec/∆ tot = L/∆, and therefore a strong relativistic reverse shock develops at the radius R 2 where the Lorentz factor of the CD at larger radii, Γ CD (R 2 < R < R dec ) ∼ (L merged /Ac 3 ) 1/4 R (k−2)/4 , becomes comparable to the coasting Lorentz factor, Γ CD (R < R 2 ) ∼ Γ (R c,sh < R < R dec ) ∼ σ 0,sh . This implies R 2 ∼∆ −1/(2−k) R 1 where 2 R 1 is the radius at which σ = 1 just behind the CD (for the corresponding single wide shell) and it is given by [27] and [34] in paper II). The relativistic reverse shock finishes crossing the shell at the deceleration radius, R dec ∼∆ 1/(4−k) R cr , where most of the energy is transfered to the shocked external medium. This is the reason behind the sharp drop in the energy weighted mean Lorentz factor of the flow, Γ , near R dec (see middle panel of Fig. 1) since essentially on a single dynamical time it changes from being dominated by the coasting (unshocked) part of the merged shell with Γ ∼ σ 0,sh to being dominated by the shocked external medium with Γ(R dec ) ∼ Γ cr∆ −(3−k)/(8−2k) ≪ σ 0,sh (where near the transition, at R ∼ R dec , the shocked part of the merged shell, which has a Lorentz factor similar to that of the shocked external medium, also holds a good fraction of the total energy). At R > R dec the flow quickly approaches the Blandford & McKee (1976) self-similar solution. The maximal Lorentz factor reached by the outflow in case 2 is Γ ∼ σ 0 , and can approach Γ cr,sh ∼ Γ cr N (2−k)/(8−2k) > Γ cr .
then the first sub-shell starts to decelerate significantly (because of the P dV work that it performs across the CD on the shocked external medium) at > 1) and before spreading radially appreciably, thus effectively following regime II (from paper II). The second sub-shell, however, would effectively collide and merge with the first sub-shell only at a radius R col,1 ∼ (∆ gap /∆ 0,sh ) 2/(4−k) R cr,sh (see Appendix A), and until that radius the bulk of this sub-shell 3 would still accelerate almost as if into vacuum, following Γ sh ∼ σ 0,sh / σ sh ∼ (σ 0,sh R/R 0,sh ) 1/3 . The same holds for subsequent collisions, where the radius of the n th collision is R col,n ∼ (n∆/N) 2/(4−k) R cr ∼ (n/N) 2/(4−k) R dec (see Appendix A), as long as R col,n < R c,sh or equivalently 4 n/N < (σ 0 /Γ 3B ) 4−k (which is always satisfied in case 3B below, but not in case 3A), where Γ 3B is defined bethat in both cases it is basically the radius where the Lorentz factor of the contact discontinuity (CD), Γ CD ∼ (L/Ac 3 ) 1/4 R (k−2)/4 , which is determined by pressure balance at the CD between the shocked external medium and the bulk of the shell (where the latter is provided by magnetic pressure for R 1 in regime II and by thermal pressure behind the mildly relativistic reverse shock for R 2 ), is ∼ σ 0 = σ 0,sh .
3 The front part of the sub-shell would start interacting with the tail of the preceding sub-shell at smaller radii, but the interaction would start to significantly affect the bulk of the second sub-shell only at R ∼ R col,1 . By R col,1 the first sub-shell has already expanded significantly in the lab frame, by a factor of ∼∆, and therefore its electromagnetic energy is reduced by the same factor (since it scales as E EM ∝ B 2 ∆ ∝ 1/∆), however its magnetization is still high so that most of its energy is still in magnetic form and this represents mainly the loss of energy to the shocked external medium due to the work it performs on it at the CD.
4 If R col,n > R c,sh or n/N (σ 0 /Γ 3B ) 4−k , then the sub-shell would spread radially and collide at R IS ∼ ∆R c,sh , and would eventually be decelerated by the relativistic reverse shock at R ∼ R col,n (which might in that sense still be considered as an effective "collision" radius).
Case 3B: for R c,sh > R dec ∼ R cr∆ 2/(4−k) (or σ 0,sh > Γ 3B ∼ Γ cr N 1/2∆1/(4−k) ) even the last sub-shells are still highly magnetized and do not spread radially appreciably by the time they collide and merge with the preceding sub-shell (as the latter is decelerated by the external medium or the preceding sub-shell and spreads radially just before colliding with the subsequent sub-shell). Thus, subsequent collisions with later ejected sub-shells proceed at the back end of the growing, highly magnetized, quasi-uniform, merged shell behind the CD, whose Lorentz factor evolves (on average) as Γ merged ∼ (L merged /Ac 3 ) 1/4 R (k−2)/4 , until the deceleration radius 5 , R dec ∼ R cr∆ 2/(4−k) . The last collision occurs at R col,N ∼ R dec and the last shell reaches the maximal Lorentz factor of Γ sh,N ∼ Γ 3B (σ 0,sh /Γ 3B ) 1/3 , which is larger than Γ 3B by a factor of (σ 0,sh /Γ 3B ) 1/3 > 1. Since R col,n ∼ R dec (n/N) 2/(4−k) , most of the collisions occur rather close to R dec . Hence, case 3B largely follows the highlymagnetized "thick shell" case of regime II, with L → L merged ∼ L/∆ 2 , where Γ (R < R dec ) ∼ (σ 0,sh R/R 0,sh ) 1/3 is dominated by the almost freely expanding and accelerating shells at the back of the flow. Near R dec , essentially within a single dynamical time, all 5 In case 3B R dec is slightly larger than in cases 2 or 3A because the sub-shells remain highly magnetized near R dec ∝ L merged (R dec ) −1/(4−k) , so that the energy of each sub-shell decreases by a factor of ∼∆ while its width grows by a similar factor, resulting in L merged ∼ L/∆ 2 and R dec ∼ R cr∆ 2/(4−k) . In case 2 (or 3A), all (or late) sub-shells become kinetically dominated and their energy remains constant until they are decelerated by the reverse shock, while their width increases by a factor of∆ well before R dec , so that L merged ∼ L/∆ and R dec ∼ R cr∆ 1/(4−k) .
Case 2 * : what used to be case 2 for k < 2 now corresponds to Γ cr,sh < σ 0 = σ 0,sh < Γ cr (i.e. N (2−k)/(8−2k) < σ 0 /Γ cr < 1) or R cr,sh < R c,sh < R 0,sh Γ 2 cr (i.e. N −2/(4−k) < R c,sh /R cr < N −1 ), and is called case 2 * since its properties are somewhat different (see middle panel of Fig. 2). The first sub-shell is in regime II, i.e. it starts to be significantly affected by the external medium (accelerates more slowly, as Γ sh ∝ R (k−2)/4 instead of R 1/3 ) at R u,sh ∼ R u N −4/(10−3k) . The first few subsequent sub-shells would still collide with the back of the growing highly magnetized merged shell behind the CD. However, once the radius of this merged shell (or of the CD) exceeds R c,sh the sub-shells first become kinetically dominated at R c,sh , start coasting at Γ sh ∼ σ 0,sh , expand radially, and collide with each other (at R IS ∼ (∆ gap /∆ 0,sh )R c,sh ) with a moderate magnetization ( σ (R IS ) ∼ ∆ 0,sh /∆ gap 1) before effectively colliding with (or being decelerated by) the back end of the merged shell. Therefore, once they start being decelerated by the merged shell behind the CD (which has Γ ∼ Γ CD ) it occurs in the form of a highly relativistic reverse shock, as long as Γ CD ≪ σ 0,sh . However, this shock becomes Newtonian and weak at R 2 ∼∆ −1/(2−k) R 1 (where Γ CD ∼ σ 0,sh ), and from that point on the merged mildly magnetized shell essentially coasts at Γ ∼ σ 0,sh = σ 0 . The resulting merged shell of width ∼ ∆ tot ≈ ∆ 0∆ ∼ ∆ 0 (∆ gap /∆ 0,sh ) starts spreading radially only at R s ∼ ∆ tot σ 2 0,sh ∼ (∆ gap /∆ 0,sh )R c ∼ NR IS where its mean magnetization is still similar to that near the internal shock radius, σ (R s ) ∼ σ (R IS ) ∼ ∆ 0,sh /∆ gap 1, and evolves similarly to case 1. At R > R s it starts evolving as ∆ ∼ (R/R s )∆ tot ∼ (R/R c )∆ 0 and σ ∼ (R s /R) σ (R s ) ∼ R c /R, similar to the original single wide shell, thus following the unmagnetized "thin shell" case. One possible difference is that the early short-lived phase of a strong relativistic reverse shock might result in an observable early and short-lived spike in the reverse shock emission, on a timescale of ∼ (R 2 /R Γ )T dec ∼ (Γ cr /σ 0 ) (8−2k)/[(3−k)(2−k)] T dec that is precedes the main reverse shock emission peak (which peaks on a larger timescale of T dec ). For k < 3 the shell is eventually decelerated at R dec ∼ R Γ by the reverse shock, which becomes mildly relativistic by that radius, and then the flow approaches the Blandford & McKee (1976) self-similar solution.

Varying the initial magnetization σ 0,sh between different sub-shells
It is reasonable to expect that the magnetization of different sub-shells might differ, at least by factors of order unity. Here we consider the effects of such a variation, while keeping the other sub-shell parameters fixed (namely ∆ 0,sh ≈ R 0,sh , ∆ gap , L sh ≈ L).
If the trailing sub-shell has a lower initial magnetization than the leading one (σ 0,2 < σ 0,1 ) then the (effective) separation between the sub-shells initially increases during the acceleration stage. Once the trailing sub-shell becomes kinetically dominated and starts coasting at R c,2 < R c,1 it starts spreading radially, but even if its head moves at very close to the speed of light it would effectively collide with the bulk of the first sub-shell only after the latter starts spreading appreciably. Such a spreading of the first sub-shell can occur either if it reaches its coasting radius (R c,1 ) and becomes kinetically dominated (in which case both sub-shells would have a mild or low magnetization when they collide), or alternatively if it is still highly magnetized but decelerates as it transfers a good part of its energy to the sub-shell in front of it (or the shocked external medium across the CD) through P dV work.
Altogether, a reasonable spread in the initial magnetization of the sub-shells, of δσ 0,sh ∼ σ 0,sh , would not have a very large effect on the overall dynamics or the efficiency of the resulting internal shocks. Even a very high contrast, of δσ 0,sh ≫ σ 0,sh , is expected to typically affect the overall efficiency of the internal shocks only by a factor of order unity (since at least one of the sub-shells in each collision is expected to have mild or low magnetization). Moreover, it is not even clear whether the overall efficiency would actually be decreased or increased, since while some of the collisions might occur where one of the colliding sub-shells has a higher magnetization (compared to the case δσ 0,sh ≪ σ 0,sh ), the relative Lorentz factor of the colliding shells can be higher, thus increasing the the efficiency of the dissipation in the low magnetization colliding sub-shell. Similarly, order unity variations in ∆ 0,sh , ∆ gap , or L sh = E sh c/∆ 0,sh are not expected to have a very large effect on the overall dynamics or on the efficiency of the resulting internal shocks or reverse shock.
As for the reverse shock, if some of the sub-shells remain highly magnetized within the merged shell that accumulates behind the CD, then this could suppress the reverse shock as it passes these sub-shells, thus effectively causing its emission to turn on and off as it passes regions (corresponding to different original sub-shells) of low and high magnetization. Such a variable reverse shock emission might have been observed in some cases [e.g., GRB 080319B (Racusin et al. 2008), GRB 070419A (Melandri et al. 2009), GRB 110205A (Cucchiara et al. 2011)].

Summary
To summarize, when the outflow consists of a large number of well separated sub-shells there are three main regimes. One of them -the highly magnetized "thick shell" (case 3B; R c,sh > R dec ∼ R cr∆ 2/(4−k) or R c,sh /R cr >∆ 2/(4−k) ) is expected to result in a severe suppression of the reverse shock and its associated emission. Nevertheless, the thick shell nature of this regime can be deduced from the fact that the onset time of the afterglow emission, T dec , is similar to the duration of the prompt GRB emission (T dec ∼ T GRB ). Therefore, this leaves two regimes for which a reasonably bright reverse shock emission may occur. In the low magnetization "thick shell" case (i.e. cases 2 or 3A; N −1 < R c,sh /R cr <∆ 1/(4−k) ), which was described in this work, the mean magnetization of the merged shell at the time when its bulk is crossed by the relativistic reverse shock (near it is expected to be less than unity but not by a large factor (0.1 − 0.3 σ (R dec ) 1). Thus, very low values of σ are not expected in this regime, whose main observational signature is that the afterglow emission and the reverse shock emission both peak on a timescale similar to the duration of the prompt GRB emission (T dec ∼ T GRB ∼ (1 + z)∆ tot /c). The expectations of this regime (both in terms of T dec ∼ T GRB and the value of σ (R dec )) appear consistent with the bright prompt optical emission from GRB 990123, which had been attributed to the reverse shock (Akerlof et al. 1999;Sari & Piran 1999;Fan et al. 2002;Zhang et al. 2003;Nakar & Piran 2005). In the low magnetization "thin shell" case (regime I; cases 1 or 2 * ; R c,sh /R cr < N −1 ), the deceleration time T dec that corresponds to the duration of the peak reverse shock and afterglow emission components is expected to be larger than the prompt GRB duration, T dec ≫ T GRB , and the magnetization at the radius where most of the energy is dissipated in the reverse shock (near R dec ∼ R Γ ) is expected to be σ (R dec ) ∼ (σ 0 /Γ cr ) 2(4−k)/(3−k) ∼ R c /R dec ∼ T GRB /(T dec∆ ) ≪ 1, i.e. a factor of ∼ T dec /T GRB ≫ 1 smaller than in the low magnetization "thick shell" case. Thus, a clear prediction of this model is a positive linear correlation between T GRB /T dec and σ (R dec ) when there is a bright reverse shock emission (i.e. when σ (R dec ) ∆ 0,sh /∆ gap 1). Moreover, this model also has predictions for the internal shocks, which could be tested against observations if the prompt GRB emission is indeed from such internal shocks. The internal shocks radius is given by This shows that the relevant regimes correspond to reasonable model parameters, and could potentially occur in different GRBs. The most uncertain parameter is the initial magnetization, σ 0,sh or σ 0 , whose value can be estimated in the low magnetization regimes, where the outflow becomes kinetically dominated (with Γ ∼ σ 0 ; lower limits on Γ also serve as lower limits on σ 0 in this model, without requiring kinetic dominance). Current constraints from pair opacity in the prompt emission and from the onset of the afterglow suggest 10 2 σ 0 10 3 . In case 3B, which corresponds to R c,sh /R cr >∆ 2/(4−k) > 1, all of the sub-shells collide while they are still highly magnetized, which suppresses the internal shocks and their associated emission, making them unlikely to power the prompt GRB emission (which in this case might be alternatively powered by magnetic reconnection events in the highly magnetized outflow). In all other cases the internal shocks occur at mild or low magnetization, allowing them to be reasonably efficient and potentially power the prompt GRB emission.

Discussion
The effects of sub-shells in an impulsive, initially highly magnetized relativistic outflow have been studied, and compared to the case of a single wide shell. It has been shown that if a single wide uniform outflow shell is divided into a large number of sub-shells with a reasonable initial contrast and spacing between them (∆ gap ∆ 0,sh ) then it could reach a significantly higher Lorentz factor. 6 The leading sub-shells effectively clear the way for the subsequent sub-shells, allowing them to accelerate for a longer time without feeling the effects of the external medium (almost as if into vacuum), thus enabling them to reach a higher Lorentz factor. Moreover, internal shocks arise from collisions between different sub-shells, which naturally occur at relatively high Lorentz factors and at low magnetizations that are vital in order to have a reasonable energy dissipation efficiency in the internal shocks.
A sufficiently high Lorentz factor is needed to overcome the compactness problem and avoid excessive pair production within the source (Krolik & Pier 1991;Fenimore et al. 1993;Woods & Loeb 1995;Baring & Harding 1997;Lithwick & Sari 2001). It has been recently argued (Levinson 2010) that the interaction with the external medium might not enable an impulsive highly magnetized outflow in GRBs to accelerate up to sufficiently high Lorentz factors, and in particular that its maximal achievable Lorentz factor is largely limited to Γ Γ cr . This would pose a particularly severe problem for a stellar wind-like external medium (k = 2) for which typically Γ cr 10 2 (see Eq. [3]). Recent high-energy observations by the Fermi Large Area Telescope (LAT) have set a lower limit of Γ 10 3 for the emitting region in a number of GRBs with a bright high-energy emission (Abdo et al. 2009a,b;Ackermann et al. 2010) using a simplified one-zone model. However, a more detailed and realistic treatment shows that the limit is lower by a factor of ∼ 3 (Granot, Cohen-Tanugi & do Couto e Silva 2008;Ackermann et al. 2011), which would correspond to Γ 10 2.5 for the brightest Fermi LAT GRBs (see also Hascoët et al. 2011). This might nevertheless still pose a problem for a single highly magnetized shell in a stellar-wind environment. The present work, however, shows that if it is divided into a large number of sub-shells, then its Lorentz factor Γ could exceed Γ cr by up to a factor of ∼ Γ 3A /Γ cr ∼ N 1/2∆1/(8−2k) ≫ 1. Moreover, most of the dissipation in internal shocks is expected to occur near the maximal Lorentz factor attained by the outflow. This would greatly help satisfy the lower limits on Γ from compactness arguments, or from the onset of the afterglow emission (usually around a few hundred; Sari & Piran 6 Levinson (2010) has argued that for ∆ gap ∼ ∆ 0,sh the sub-shells would effectively collide an merge well before their coasting radius (by a factor of ∼ σ 2/3 0,sh ≫ 1), while they are still highly magnetized ( σ sh ∼ σ 2/9 0 ≫ 1), and would thus have a very small effect on the outflow, and in particular would not help to increase its maximal Lorentz factor. However, this conclusion is wrong and arises due to an error in his Eq. (29), which results in an incorrect expression for the collision time or radius. 1999; Nakar & Piran 2005;Molinari et al. 2007;Zou & Piran 2010;Gruber et al. 2011), also for a stellar wind environment.
It has been found (in papers I and II) that for a single shell there are two main dynamical regimes: the low magnetization "thin shell" (regime I, where the shell becomes kinetically dominated, coasts and spreads radially, and a reverse shock develops that becomes mildly relativistic near the deceleration radius, R dec ∼ R Γ , and whose emission peeks at T dec ≫ T GRB ), and the high magnetization "thick shell" (regime II or III, where the shell remains highly magnetized without reaching a coasting stage or spreading radially, and the the reverse shock is suppressed along with its associated emission). A high magnetization "thin shell" or a low magnetization "thick shell" are not possible for a single initially highly magnetized shell. In this work, it has been shown that a low magnetization "thick shell" regime becomes possible (and occurs in cases 2 or 3A) if such an initially highly magnetized shell is divided into a large number of sub-shells with reasonable initial separations (∆ gap ∆ 0,sh ). This would allow a relativistic reverse shock with bright emission on a timescale comparable to that of the prompt GRB emission (T dec ∼ T GRB ). Moreover, if there are large variations in the magnetization between different sub-shells, this might result in alternating regions of high and low magnetization through which the reverse shock passes, causing it and its associated emission to be alternately suppressed and revived, resulting in a variable reverse shock emission. Such a reverse shock emission may bear some temporal correlation to the prompt emission from the internal shocks (somewhat analogous to the pure hydrodynamic case; Nakar & Piran 2004), as both are affected by the magnetization of the sub-shells, though some delay might be expected between corresponding features in the internal shocks and in the reverse shock. with radius, R, for N ≫ 1 equal, initially highly magnetized (σ 0,sh ≫ 1) sub-shells, compared to a single uniform shell (thick dashed line; purple in the top panel corresponding to regime I, and dark green in the middle or bottom panels corresponding to regime II), with the same initial magnetization (σ 0 = σ 0,sh ) and luminosity (or energy density), as well as the same total energy and net width (not counting the initial gaps between the sub-shells), for k < 2.  A. Estimating the collision radius of sub-shells with the uniform region behind the CD I consider here sub-shells that are still highly magnetized and have not spread radially significantly before colliding with the previous sub-shell that is decelerated by its P dV work on the shocked external medium across the CD (or on the preceding sub-shell). Let us begin with the first such collision. The first sub-shell is significantly decelerated by the external medium at R u,sh ∼ R u N −4/(10−3k) , at which stage its separation from the subsequent shell is still close to its initial value, ∆ gap . One way of estimating the collision radius is that the head of the second sub-shell travels faster than the tail of the second sub-shell so that the difference in their velocities in the lab frame is ∆β ≈ 1/2Γ 2 CD ∝ R (2−k)/2 and their effective separation changes with radius as Since the sub-shell's Lorentz factor before it is significantly decelerated is Γ sh (R < R u,sh ) ∼ (σ 0,sh R/R 0,sh ) 1/3 , we have R u,sh /Γ 2 CD (R u,sh ) ∼ ∆ 0,sh (R u,sh /R c,sh ) 1/3 ∼ ∆ 0,sh (R cr,sh /R u,sh ) (k−4)/2 or ∆ gap Γ 2 CD (R u,sh )/R u,sh ≈ (∆ gap /∆ 0,sh )(R cr,sh /R u,sh ) (4−k)/2 . The collision occurs when the separation reaches zero, and in the relevant regime the second term in the square brackets in Eq. (A1) can can neglected, giving a collision radius of R col,1 ≈ (4 − k) ∆ gap ∆ 0,sh 2/(4−k) R cr,sh ∼∆ 2/(4−k) R cr,sh .
A comparable estimate of R col,1 is obtained when asking at what radius the radial spreading of the first sub shell due to the dispersion in its Lorentz factor (δΓ sh ∼ Γ sh ) and deceleration because of the work it performs on the shocked external medium across the CD becomes large enough to bridge the initial gap, ∆ gap , from the subsequent sub-shell. This is since taking l(R) = 0 in Eq. (A1) is essentially equivalent to the requirement on the spreading of the shell, The above considerations can be readily generalized in order to estimate when a point with an initial lag of ∆ moving at Γ ≫ Γ CD catches up with the CD. Simply replacing ∆ gap with ∆ ≈ n∆ 0,sh∆ gives the radius of the n'th collision, R col,n ∼ ∆ ∆ 0,sh 2/(4−k) R cr,sh ∼ (n∆) 2/(4−k) R cr,sh ∼ n∆ N 2/(4−k) R cr ∼ n N 2/(4−k) R dec , (A4) keeping in mind that R dec ∼∆ 2/(4−k) R cr in this regime.