The Structure and Evolution of Relativistic Jetted Blast Waves

We study, analytically and numerically, the structure and evolution of relativistic jetted blast waves that propagate in uniform media, such as those that generate afterglows of gamma-ray bursts. Similar to previous studies, we find that the evolution can be divided into two parts: (i) a pre-spreading phase, in which the jet core angle is roughly constant, $\theta_{c,0}$, and the shock Lorentz factor along the axis, $\Gamma_a$, evolves as a part of the Blandford-Mckee solution, and (ii) a spreading phase, in which $\Gamma_a$ drops exponentially with the radius and the core angle, $\theta_c$, grows rapidly. Nevertheless, the jet remains collimated during the relativistic phase, where $\theta_c(\Gamma_a\beta_a=1)\simeq 0.4\theta_{c,0}^{1/3}$. The transition between the phases takes place when $\Gamma_a\simeq 0.2\theta_{c,0}^{-1}$. We find that the"wings"of jets with initial"narrow"structure ($\frac{d \log\,E_{iso}}{d\log\,\theta}<-3$ outside of the core, where $E_{iso}$ is isotropic equivalent energy), start evolving during the pre-spreading phase. By the spreading phase these jets evolve to a self-similar profile, which is independent of the initial structure, where in the wings $\Gamma(\theta)\propto\theta^{-1.5}$ and $E_{iso}(\theta)\propto \theta^{-2.6}$. Jets with initial"wide"structure roughly keep their initial profile during their entire evolution. We provide analytic description of the jet lateral profile evolution for a range of initial structures, as well as the evolution of $\Gamma_a$ and $\theta_c$. For off-axis GRBs, we present a relation between the initial jet structure and the light curve rising phase. Applying our model to GW170817, we find that initially the jet had $\theta_{c,0}=0.4-4.5~\deg$ and wings which are consistent with $E_{iso} \propto \theta^{-3}-\theta^{-4}$.


INTRODUCTION
Afterglows of gamma-ray bursts (GRBs) of all types, as well as jetted tidal-disruption events, are well explained by the emission from a jetted blast wave propagating in the surrounding medium, emitting synchrotron radiation.While many aspects of the afterglow physics are well understood, the jet fluid dynamical evolution remains a challenge.This evolution has a significant impact on the observed emission for both on-, and off-axis observers.It determines the lightcurve decline rates (e.g., Sari et al. 1999;Granot 2007), the relation between the jet core angle measured from observations and it's initial opening angle, and may have a significant effect on the afterglow image (Fernández et al. 2022;Govreen-Segal & Nakar 2023) and the evolution of light polarization (Rossi et al. 2004).For offaxis observers, the jet structure evolution also impacts the rising of the light-curve, and the timing and flux of the light-curve peak (e.g., Ryan et al. 2020;Takahashi & Ioka 2021;Nakar & Piran 2021).
Given its importance, a significant effort has been made to understand the jet hydrodynamic evolution.This effort focused mainly on the characterization of two global quantities -the blast wave's characteristic Lorentz factor, Γ, and its opening angle θ c .The key property of relativistic jets in this regard is that sideways motion of fluid elements and sound waves, as measured in the observer frame, is at most at a velocity of about 1/Γ of the speed of light.This implies that the jet is causally connected over an angular scale of ∼ Γ −1 .Therefore, as long as Γ ≫ 1/θ c every point on the core evolves as a part of a spherical blast wave, according to the Blandford & McKee (1976) solution (Piran 1995).However, once Γ ∼ 1/θ c the evolution is expected to change as sideways spreading becomes important.The first to discuss this change was Rhoads (1997Rhoads ( , 1999)), which showed that if the core expands at the speed of sound then once Γ ∼ 1/θ c the evolution changes so Γ drops exponentially with the radius while θ c grows exponentially.Based on these considerations Sari et al. (1999) approximated that at any time after spreading starts Γθ c ∼ 1, and used this approximation to predict the post jet-break light curve.
Early numerical studies of the evolution (Granot et al. 2001;Meliani et al. 2007;Zhang & MacFadyen 2009;van Eerten et al. 2010;Wygoda et al. 2011;De Colle et al. 2012) proved stimulating jets to be extremely challenging due to the large dynamic range between the shock radius, R, and the width of the shocked matter ∼ R/Γ 2 .This scale separation limited the initial shock Lorentz factor in most of these simulations to be moderate (in the range of 20-60) and the corresponding initial opening angle to be 0.1-0.2rad.As a result the dynamical range over which the relativistic spreading phase could have been simulated was small, making the interpretation of the results difficult.For example, Zhang & MacFadyen (2009); van Eerten & MacFadyen (2012) and Wygoda et al. (2011) studied the jet spreading numerically, and although their numerical results were similar, the two former studies concluded that the jet spreading is logarithmic while the latter argued for a short phase of exponential spreading followed by slower evolution.In view of the numerical results, Granot & Piran (2012) revisited the analytic solution for the evolution of Γ and θ c during the spreading phase.They used the assumption that the jet is a top hat at all times (i.e., it is uniform over its opening angle and there is no energy outside of that angle), and considered different approximations for assessing the amount of mass swept up by the shock as it propagates.For each approximation they used conservation of energy and momentum to calculate the evolution of Γ and θ c .They also extended the solutions to the Newtonian regime.Their solution suggested (for all approximations) that the spreading is slower than the naive prediction of Rhoads (1999), similarly to what was seen in the simulations.Yet, in their solutions spreading is exponential during the ultra-relativistic phase.They concluded that unless the initial opening angle of the jet is smaller than about 0.05 rad, the dynamic range is too small to properly identify the relativistic exponential spreading phase.
Recently, Duffell & Laskar (2018) carried out numerical simulations with a larger dynamic range.They simulated jets with several initial opening angles, the smallest being about 0.04 rad and the highest initial Lorentz factor being almost 100.They calibrated one of the approximations suggested by Granot & Piran (2012), which includes the transition to the mildly relativistic phase, to obtain an analytic model that fits the evolution of Γ and θ c in their simulations.They find that while the jet spreading is slower than the Rhoads (1999) approximation, it does seem to spread rapidly during the short relativistic phase in their simulations.
To conclude, while it is clear that the jet spreads during the relativistic phase, it is unclear to what extent.There is a semi-analytic description that fits a limited number of simulations, but there is no simple analytic description for the evolution of Γ and θ c during the relativistic phase, or for its dependence on the jet initial conditions.Obtaining such a solution is one of the goals of this paper.
Another important aspect of the jets' dynamics is the evolution of its angular structure.It is clear that realistic jets have some initial angular structure when they emerge from the stellar envelope in the case of long GRBs or the merger ejecta in the case of short GRBs.Moreover, regions outside of the core, where the Lorentz factor is much lower, must evolve also before the onset of core spreading.The evolution of the jet structure outside the jet core is of special interest in the context of GRBs observed off-axis, as the structure outside the core dominates the rising phase of the light curve.Since the jet structure at a given time of its propagation is a result of the initial conditions as well as the jet evolution at earlier times, we need to understand the structure evolution of jets with various initial structures.So far the hydrodynamic evolution of the jet structure was not studied in detail.Gill et al. (2019) made an attempt to test whether a jet with initial condition of a top hat can evolve to a shallow enough structure so it may explain the rising phase of the afterglow of GW170817.They suggested that it may be possible, although their numerical resolution was not sufficient to verify this claim.This exemplifies the type of questions that we would like to better understand.
In this work we study the hydrodynamic evolution of relativistic jetted blast wave that propagates in a constant density medium.We examine global properties, such as Γ and θ c as well as structure evolution.Our goal is to understand the dependence of the jet evolution on the jet's initial structure and to provide a simple analytic description of this evolution.For that, we use analytic considerations as well as numerical simulations with the public code GAMMA (Ayache et al. 2022).This code enables us to start our simulations with a matter Lorentz factor of 100-400 (the shock Lorentz factor is larger by a factor of √ 2) and an initial opening angle as small as 0.005 rad, so there is ample separation between the beginning of the spreading phase and the Newtonian phase.
We proceed as follows: in §2 we give an analytic model to the evolution of Γ and θ c .In 3, we present our numerical simulations.We test and calibrate the analytic model of Γ and θ c and study, numerically, the evolution of the jet lateral structure.In §4 we discuss the implications of our finding to the afterglow emission.This includes a comparison of light curves from the full hydrodynamic simulations to semi-analytic light curve models and an analytic formula that relates the slope of the rising phase to the initial jet structure.In this context we give in appendix A an analytic approximation of the structure evolution of power-law jets, which can be used to obtain improved modeling of the light curves from such jets.In §5 we use our results to derive constraints on the initial opening angle and lat-eral structure of the jet in GW170817.We summarize our results in §6.

ANALYTIC MODEL FOR Γ AND θ C
We start by describing our analytical expectations for the fluid dynamical evolution of a jet, focusing on the evolution of the typical angular scale, and the typical Lorentz factor.Consider a jet, with a core angle θ c (to be defined rigorously later), and a typical shock Lorentz factor Γ a , defined as the Lorentz factor along the jet axis (here and in the rest of the paper, we use the subscript "a" to denote the value along the jet axis).The fluid behind the shock is in causal contact on an angular scale of ∼1 Γ .Therefore, while Γ a θ c ≫ 1, different regions in the core are not yet causally connected, and the jet core evolves as part of a Blandford-Mckee (BM) solution (Blandford & McKee 1976) with the local initial isotropic equivalent energy, which we denote E iso,i .Hence, the Lorentz factor of the shock along the jet axis can be expressed as: where ρ is the external density, R a is the blast wave radius along the axis, c is the speed of light and E iso,a,i is the initial isotropic equivalent energy along the axis.During this phase, we expect the jet core angle to be roughly constant.
Once the edges of the core become causally connected, when Γ a θ c ≃ 1, the core starts to spread.Keshet & Kogan (2015) (see also Gruzinov 2007) showed that the axisymmetric fluid equations obey a scaling that is indicative of the existence of a self-similar solution.They showed that in such a solution, scaling laws indicate that the Lorentz factor in the jet core decreases more rapidly than a power law and they assumed that it decreases exponentially.In the numerical section, we indeed find an evolution that is consistent with an attractive self-similar solution in which the Lorentz factor decreases exponentially 1 , although naturally, we cannot prove numerically that the solution is indeed fully self-similar.
We choose to formulate the spreading phase with an exponential scaling in radius rather than in time, as we find that in that manner it remains relevant also in the mildly relativistic case.For this reason, we also write the expression in terms of the proper velocity.Denoting Γβ sp and R sp as the values of Γβ a and R a (the shock proper velocity and the shock radius along the axis, respectively) at the transition between the BM and spreading regimes, the proper velocity in the spreading regime is given by: where R is the length scale over which Γβ a decreases by an e-fold during the spreading phase.To find R we note that it should be of the same order of magnitude as R sp , where the relations of the BM solutions are applicable and at the same time Γ a ∼ θ −1 c .Thus, E iso,a ∼ R3 Γ 2 a ρc 2 ∼ R3 θ −2 c ρc 2 , and since the total blast wave energy satisfies E tot ∼ E iso,a θ 2 c we obtain R ∼ (E tot /ρc 2 ) 1/3 , and introducing a calibration constant C: We would now like to determine the evolution of θ c during the spreading phase.The relation between Γβ a and θ c generally depends on the mass and energy transfer within the complete jet structure, which is difficult to model analytically.Under the assumption that the solution is self-similar, the angular structure of various properties describing the shock depends only on θ θ c , and therefore, the core energy is a constant fraction of the jet energy.
where C tot is a constant that depends on the exact self-similar structure2 .We use Eq. ( 4) to determine θ c by means of energy conservation: where θ c,sp = θ c (R a = R sp ).We can now determine θ c,sp , by solving Γβ sp from Eq. ( 4), equating it with Eq. ( 1) and assuming Γ sp ≫ 1, i.e; Γβ sp ≃ Γ sp , we find that: We can use Eq. ( 4) to find R sp : here C sp = Γβ sp θ c,sp ∼ 1, and its exact value will be calibrated numerically.
We obtained an analytic model of Γ a and θ c for which we need to find three order unity calibration constants: C -the normalization of the e-folding radius, C tot -the total energy normalization constant, and C sp = Γβ sp θ c,sp .In the following section, we validate the analytic model and find these constants (for our specific definition of θ c ) using numerical simulations.Their value can depended on the initial jet structure, where we find that for top hat jets C = 0.65, C tot = 0.54, and C sp = 0.38.For these parameters R sp = 3.6 R. To apply the model to structured jets, additional generalizations are needed, these are discussed in §3.3.For convenience, we provide a glossary in table 1.

Simulation setup
We use GAMMA3 (Ayache et al. 2022), a code optimized for simulations of relativistic hydrodynamic blast waves, to run 2D jetted blast waves in spherical coordinates.We simulated jets in a uniform medium, setting the energy, external density, and initial radius so that the entire jet structure has passed its deceleration radius.As our focus is the ultra-relativistic evolution, we use an ideal gas equation of state with an adiabatic index γ = 4/3, though we test a few cases with an equation of state that transitions smoothly to 5/3 in the sub-relativistic regime, finding it has minor effects on the evolution during the mildly relativistic phase (see discussion in Appendix C).The initial jet angular structures simulated include top hat, multiple power-law structures, Gaussian jets and hollow jets (see structure definitions in Table B).Given an angular energy structure E iso (θ ), we set the initial conditions at each angle as part of a BM solution with the local value of E iso (θ ).Additional information on the simulation setup can be found in Appendix B.

Evolution of top hat jets
We start by considering the evolution of top hat jets, before moving on to extend our study to more general structures.Before validating and calibrating the analytic equations for the evolution of Γβ a and θ c , we briefly discuss the initial conditions of top hat jets.The exact initial conditions of top hat jets in our simulations are not expected in nature, and they are "unstable" in the sense that the hydrodynamic evolution changes the blast wave structure over a duration that is much shorter than the dynamical timescale of the system.Thus, following the beginning of the simulation the blast wave quickly assumes a more "stable" structure (i.e., one that evolves over a dynamical timescale) via a flow of energy outside of the core.The result is that during the pre-spreading phase, the core angle of the blast wave, θ c , is smaller than θ i , the initial opening angle of a top hat jet.In the following we approximate the core angle during the pre-spreading phase as constant and we denote this angle by θ c,0 .
We can now go on to validate and calibrate the equations from §2, as well as the value of θ c,0 , and then we go on to investigate the jet structure evolution during the pre-spreading phase and the spreading self-similar evolution.

Evolution of Γβ a and θ c
We adopt the following definitions of θ c from Govreen-Segal & Nakar (2023): We choose this definition for the following reasons.First, it can be identified from the observations, since it corresponds to the region of the jet that dominates the emission at the time of the peak of the light curve of off-axis jets (Govreen-Segal & Nakar 2023).Second, this definition is also meaningful in terms of jet energy.For a jet structure in which d log E iso d log θ decreases monotonously, this definition means that in the core the energy per ∆θ ∼ θ increases with θ , and outside the core the added energy decreases with the angle.This promises that the jet core dominates (or at least contains a significant fraction of) the total jet energy.In our simulations, we find that while this definition works very well during the relativistic phase it cannot be extended to the mildly relativistic phase.The reason is that d log E iso d log θ evolves during the transition to the sub-relativistic phase in a way that the location of θ c according to this definition is not continuous.See appendix D for a comparison of various definitions of θ c .
Fig. 1 shows a comparison of our analytic model with C = 0.65, C tot = 0.54, and C sp = 0.38 to the results of all our simulations of top hat jets.Both Γβ a and θ c fit the analytical model well as long as the jet is relativistic, and reasonably well while the jet is mildly relativistic, for initial opening angles up to 0.3 rad.

Symbol Definition
Γ a /Γβ a The shock Lorentz factor/proper velocity along the jet axis Γβ sp The shock proper velocity along the jet axis at the onset of spreading, Γβ a ( R sp ) γ i The initial Lorentz factor of the matter just behind the shock R a The shock radius along the jet axis R sp The shock radius at the transition from BM to exponential decay of Γβ a , which we denote as the onset of the spreading phase R The e-folding radius of the Lorentz factor deceleration during the spreading phase.In top hat jets R sp = 3.6 R. θ c The jet core angle θ i Opening angle set in the initial conditions, used to identify which simulation is used.θ c,0 The core angle once the jet structure becomes stable and before the onset of spreading θ c,sp The core angle at the onset of the spreading phase, θ c ( R sp ).In top hat jets θ c,sp ≃ 2 θ c,0 .E iso,i (θ ) The initial isotropic equivalent energy ⟨E iso ⟩ The energy averaged isotropic equivalent energy E iso,i,a The initial isotropic equivalent energy along the axis E tot The total energy ρ External density, assumed to be constant Table 2. Initial conditions for simulations used in this work.γ i denotes the highest matter Lorentz factor right behind the shock in the initial conditions.
Note that θ c starts spreading at R ≃ 2 R almost at half the radius at which the proper velocity along the axis starts dropping exponentially, R sp , this is because they are both local properties and the edge of the core is affected by the spreading before the jet axis.Using this, we can define θ c,0 : which implies θ c,0 ≈ 0.8θ i .This is indeed smaller than the top hat jet initial opening angle, as we expected.These results imply that , which explains part of the difficulty to observe the relativistic spreading phase in previous simulations.For example, in a simulation of a top hat jet with θ i = 0.1 rad, the proper velocity along the axis at R sp is Γβ sp ≃ 2.4, so the shock is already mildly relativistic at the begining of the spreading phase.
Figure 2 shows the product Γβ a θ c as a function of R a / R. In both the pre-and post-spreading relativistic regimes energy conservation dictates Γβ a θ c ∝ R 3/2 a .However, the normalization, which reflects the ratio between the core energy and the total energy is expected to be different between the top hat pre-spreading phase and the selfsimilar post-spreading phase.In Figure 2 we see that all top hat jets follow the same track in this relation while the shock is relativistic, but only the simulation with θ i = 0.005 starts the spreading The analytic approximation is plotted in dashed lines -Eqs.( 1) and ( 2) for Γβ a and Eqs. ( 5) and ( 9) for θ c .
The product of the core angle and proper velocity along the axis as a function of R a / R. Both in the BM phase and in the spreading phase, the product is proportional to R −3/2 (marked in black dashed lines), however, the normalization is different.Of all the top hat jet simulations, only the one with θ i = 0.005 has enough dynamical range to clearly show this scaling in the spreading phase.The simulation curves are plotted in solid lines in the relativistic regime ( Γβ a > 2) and as dots after the shock becomes mildly relativistic ( Γβ a < 2).
phase relativistic enough to follow the relativistic spreading curve of Γβ a θ c ∝ R −3/2 for a significant period before becoming mildly relativistic.Note, that this figure validates the energy conservation equation 4 and the fact that the collected mass behind the core satisfies the "conical" relation M ∝ R 3 θ 2 c .

Pre-spreading jet structure
We use the simulation of a top hat jet with an initial opening angle of 0.005 rad, and an initial shock Lorentz factor of Γ i ≃ 560 (the initial Lorentz factor of the matter just behind the shock is γ i = 400) to investigate the pre-spreading evolution, as this is the simulation with the most dynamical range.Fig. 3 portrays Γβ (θ ), E iso (θ ) and (1 − R ct )(θ ) at various times, as well as the logarithmic derivatives of these quantities with respect to θ .First, as expected, it shows two phases.A pre-spreading phase, during which the core angle is almost constant and E iso along the jet axis does not change in time, and a spreading phase during which the core angle increases significantly, and energy is transferred to larger angles.The transition between the two is when the shock Lorentz factor is lower by a factor of a few compared to one over the initial opening angle.A second interesting feature is that the blast wave develops wings outside of the core immediately after the beginning of the simulation (already during the pre-spreading phase).These wings exhibit an interesting behavior: in each of the properties plotted, the wings approach a constant profile.Γβ ∝ θ −α where α ≃ 1.5, E iso ∝ θ −2α E , where α E ≃ 1.3, and 1 − R ct ∝ θ α R , where α R ≃ 2.6.Note, that unlike the BM solution and the conditions at the core where Γ ∝ E 1/2 iso , in the wings α E ̸ = α and Γ ̸ ∝ E 1/2 iso .This is evidence for the continuous lateral transfer of energy through the wings.The value α R similarly provides evidence for the lateral motion of matter.If the radial location of the matter was strictly due to its own radial velocity, we would expect a power-law of 3 or steeper, rather than 2.6.We can fit the numerical pre-spreading evolution of a top hat jet structure.The proper velocity is roughly uniform in the jet core and is therefore roughly Γβ a .The wings develop a power-law, with a constant index where at each angle the shock propagate at a constant velocity.Altogether, We find the structure is well described by: where α ≃ 1.5.At the same time, the energy profile is constant in the core and it develops wings outside of the core, which gradually approach E iso ∝ θ θ c −2α E .Like the energy and the Lorentz factor, the shock radius is also uniform in the core, and can be easily found by integrating over the shock velocity in the core.We use this to determine the normalization of (1 − R ct ), and find: where α R = 2.6.
is plotted for a top hat jet with an initial opening angle of 0.005 rad.Top panel: Γβ (θ ).Lower curves correspond to later times.The "wings" of the structure approach the edge of the shaded region and move with a constant velocity.Second panel: The logarithmic derivative of Γβ with respect to θ , the wings approach a power-law of ≃ −1.5.Third panel: E iso (θ ).During the pre-spreading phase energy flows continuously from the core to the wings, which approach the self-similar solution.Fourth panel: The logarithmic derivative of E iso with respect to θ , the wings can be seen approaching a power-law of ≃ −2.6.Fifth panel: The normalized distance between the shock radius and ct as a function of angle.Sixth panel: The logarithmic derivative of 1 − R ct with respect to θ , the wings approach a power-law of ≃ −2.6.

Spreading phase -self-similar Evolution
After the spreading starts we find that the blast wave assumes what seems as a self-similar lateral structure4 .It is shown in Fig. 4, which depicts the angular structure at various times in normalized dimensions; Γβ / Γβ a , E iso /E iso,a and (1 − R/ct)/(1 − R a /ct) as a function of θ /θ c .This figure also shows analytic smoothed broken powerlaw approximations for these structures.The approximation for the proper velocity is: where in the second equality we set α = 1.5 and the calibration coefficients s = 0.5, k = 0.75 (corresponding to Γβ (θ c ) = 0.46 Γβ a ).Similarly, the radius follows a self-similar structure: where we find s R = 0.5 and α R = 2.6.The self-similar structure of E iso can also be approximated very well by a smoothed broken power law: where α E = 1.3 and s E = 0.5.The 1 α E −1 factor ensures that Note, however, that E iso takes longer to approach the self-similar solution, most probably because it involves integrating over the complete radial coordinate and is, therefore, more sensitive to the evolution history, while Γβ and R can change more rapidly.
Another interesting aspect of this phase is the hydrodynamic radial profile.We find that the pressure, density and velocity all have what seems as a self similar radial structure both in time (i.e., at a given angle at different times) and in angle (i.e., at a given time at different angles).We discuss this in Appendix E.
The self-similar structure and its evolution enable us to define an important angleθ NR , the location along the wings where the blast wave becomes sub-relativistic ( Γβ ( θ NR ) = 1) during the spreading phase.Using the wing structure, Γβ (θ ) ∝ θ −α , we can express this angle as θ NR = θ c Γβ 1/α θ = θ c , and using equations ( 2), ( 5) and ( 12) we obtain: While asymptotically θ NR grows exponentially with the radius, in the range relevant to us, this function varies very little before the jet core becomes mildly relativistic.Qualitatively, θ NR initially decreases as a power-law in R, and only then starts increasing.At the onset of spreading, at R R = 3.6, θ NR = 0.315 θ c,sp 1/3 , while at it's minimum, R R = 4.5 and θ NR = 0.305 θ c,sp 1/3 .For example, a jet with θ c,sp = 0.1 rad ( θ c,0 ≃ 0.05 rad), becomes mildly relativistic at R R = 4.9, when it opening angle is only 0.306 θ c,sp 1/3 .A jet with θ c,sp = 0.01 rad ( θ c,0 ≃ 0.005 rad) will become mildly relativistic at R R = 7.2 when θ c ≃ 0.37 θ c,sp 1/3 .Even a jet with unrealistic θ c,sp = 0.001 rad ( θ c,0 ≃ 0.0005 rad), which becomes mildly relativistic at R R = 9.5, have at this time an opening angle of 0.52 θ c,sp 1/3 , meaning that even in this extreme case, where the core angle grows by two orders of magnitude during the relativistic phase (from 0.0005 to 0.05 rad), the maximal angle at which there is relativistic matter, θ NR , grows by less than a factor of 2 (from 0.03 to 0.05 rad).In the simulations, we find that θ NR is approximately constant not only during the spreading phase, but also during the entire pre-spreading phase of top hat jets (see Fig. 3).We conclude that for any reasonable jet, we can use: The fact that θ NR is nearly-constant, is consistent with the fact that at any given angle along the jet wings, the Lorentz factor remains roughly constant throughout the self-similar evolution, and also earlier as the jet approaches the self-similar structure.
Eq. 16 has an interesting implication.Although the jet expands significantly during the spreading phase, it remains highly collimated even at the time that the shock becomes mildly relativistic.For example, for θ c,0 = 0.05 rad (as observations suggest for the jet in GW 170817) the opening angle when Γβ a = 1 is only 0.14 rad (about 8 • ).In addition, the opening angle at the transition to the sub-relativistic regime depends on the initial opening angle, and it therefore has a "memory" of the initial conditions.This is in contrast to the naive expectation that Γθ c ∼ 1 (which implies θ NR ∼ 1 rad) and inline with previous numerical results ( van Eerten & MacFadyen 2013;Duffell & Laskar 2018).θ NR ≪ 1 mainly due to the fact that while Γ a ∝ exp[−R a / R], the exponential spreading of θ c is mitigated by a power-law term ( ).Thus, the core angle spreads "slower" than the shock decelerates and it remains highly collimated also when the shock becomes sub-relativistic.

Evolution of a jet with a general structure
Next, we generalize our findings for top hat jets to jets with a general structure.In the top hat case, we have seen that the jet develops wings that approach self-similar energy and Lorentz factor gradients, passing through a range of increasingly shallower jet structures in the process.We, therefore, expect any jet with an initial structure in which the wings are steeper than in the self-similar solution to approach the self-similar solution.While we don't have an exact definition of which jets will approach the self-similar solution, we expect a self-similar structure to form for all jets in which E iso,i (θ ) in the wings decreases more sharply than ≃ θ −3 , though the convergence to the self-similar structure depends on the exact initial structure.Indeed, we find that the b ≥ 3 power-law jets, Gaussian jets, and even our hollow jet simulation all approach the same self-similar solution as top hat jets.
The top hat results, however, do not indicate what will be the evolution of a jet with wings that are wider than those of the self-similar solution.Therefore, we separate our discussion of general jet structures into two cases.First, we discuss the case of a jet with initial wings that are steeper than the self-similar profile.We denote this case as a "narrow structure".The second case is jets with an initial structure that is wider than the self-similar solution, which we denote as a "wide structure".

Evolution of "narrow structure" jets
As we saw in §3.2, the self-similar solution to which a top hat jet evolves can be fully defined in terms of two parameters.The first defines the natural length scale of the jet evolution, R, which can be found from the initial condition E tot /ρ (Eq.3).The second defines  the angular scale of the solution, θ c,sp , which can be found from the initial condition E tot E iso,i (Eq.6).We expect that all jets with narrow structures will evolve to the same self-similar structure found in top hat jets, and indeed all our simulations of narrow jets do (a few examples are shown in Fig. 5).The main question is then, what is the mapping from the jet initial structure, E iso,i (θ ), to the length scale R and the angle θ c,sp of the self-similar solution that it assumes.We did not find functions that provide an exact mapping of a general initial structure to the self-similar solution that it evolves to, and it is poossible that there are no such simple and general functions.Instead we find a simple approximation that agrees well with our set of simulations.According to this approximation, in Eqs. ( 1)-( 7), E tot is taken as the total jet energy, including the wings, E tot = dE dΩ dΩ, and E iso,i is replaced with the energy weighted average initial isotropic equivalent energy as defined by Duffell & MacFadyen (2011), Note that for a top hat jet, this definition coincides with E iso,i .The three order unity parameters that were found numerically, C, C tot and C sp , are the same as for the case of top hat jets, since they reflect the properties of the self-similar solution.
The core angle before the onset of spreading is more difficult to approximate, as it depends on the transition between the initial structure and the self-similar solution, during which the core angle evolves in some manner from θ i , to θ c,0 , but this manner is not necessarily monotonic.Approximating θ c ≃ θ c,0 (where θ c,0 is taken from Eq. 9) before the onset of spreading is a reasonable choice, although it can result in errors of up to a factor of 2. The quality of the approximation can be seen in Fig. 6.Note that for jets in which the energy profile varies significantly within the core, such as hollow jets (the red curve), the initial phase in which the core flattens out is not included in our model, and using ⟨E iso ⟩ is a reasonable choice only from when the core becomes approximately flat.Even then, the approximation is not nearly as good as the description we find for other jets.
The evolution of the jet structure depends on its initial angular profile and the initial Lorentz factor.Approximating θ NR as constant, we can qualitatively describe it as follows.If initially θ ( Γβ = 1) < θ NR , the structure will quickly widen to fill the region upto θ NR with relativistic material.Then, as the core decelerates, the profile is gradually approaching the power law Γβ ∝ θ −α , reaching it at the onset of the self-similar solution.If initially θ ( Γβ = 1) > θ NR , then at every angle, the structure will initially evolve as part of a BM solution with the local value of E iso,i (θ ), until it decelerates enough that θ ( Γβ = 1) = θ NR .From this point, the structure will start flattening out and approaching the self-similar solution.
Fig. 7 shows two examples for the structure evolution of powerlaw jets before the onset of spreading, both of "narrow structure" jets.In one (b=6, left panels) initially θ ( Γβ = 1) < θ NR and in the other (b=4, right panels) initially θ ( Γβ = 1) > θ NR .In both cases, the jets approach the self-similar solution in the manner described above.While we do not find an exact formula for the structure evolution, we find that once θ (Γβ = 1) = θ NR , the structure of Γβ in our simulations evolves approximately as a single power-law spanning from θ c to θ NR : where approximating . Similarly: that is, the relation between 1 − R ct and Γβ remains as in the selfsimilar case, and here too the power-law gradually changes.Using these approximations provides a reasonable approximation for the light curve.Formulae that can be used for approximation of powerlaw jets as well as several examples of light curves are shown in Appendix A.
The above description holds well for many structures.However, while steep enough jets approach the self-similar solution, if the initial core is very far from uniform, the core evolution may be dominated by flattening out, and not resemble a BM evolution.An example of this can be seen in a hollow jet, in Fig. 8.While this jet forms the same lateral structure outside the core and approaches the same self-similar solution, the flattening of the core does not evolve as part of a BM solution.We do not provide a description of the core evolution of hollow jets before the onset of spreading.

Evolution of a jet with a wide structure
We now extend our discussion to jets initial wings that are shallower than E iso ∝ θ −3 , but still steeper than E iso ∝ θ −2 , so that the energy integral is convergent.We restrict the discussion to power-law jets with 2 < b < 3, although the arguments can be easily applied to jets with a more general wide structure.
Wide structure jets do not converge to the same self-similar solution reached by narrow structure jets.However, many aspects of the jet evolution remain the same as for narrow jets, and we can generalize our model for narrow structure jets to adapt it to wide structure jets.As can be seen in Figure 9, like narrow jets, the proper velocity along the axis initially decreases as part of a BM solution during the pre-spreading phase, where for this phase we use E iso,i,a (and  B) -a jet with the following core structure: E iso,i (θ ≤ θ i /2) = const and E iso,i (θ i /2 ≤ θ ≤ θ i ) ∝ θ −1 .Outside the core E iso,i (θ > θ i ) ∝ θ −6 .In the right panels, a b = 4 power-law jet with a flat core.Both jets show the expected evolution, where the wings approach a power law with an index −α.During the spreading phase both jets assume the same self-similar profile as top hat jets (marked by the shaded region), and during this phase their evolution is generic and independent of the initial jet structure.not ⟨E iso ⟩) in Eq. (1).Similarly, once spreading starts Γβ a decreases exponentially while θ c grows exponentially.In order to describe this evolution we need to find the expression for R for wide structure jets.Eq. ( 3) does not give a good approximation, since the energy in the wings is significant and its effect on the evolution of Γβ a is different than in the self-similar evolution of narrow jets.Thus, using the true value of E tot for wide structure jets in Eq. ( 3) we obtain value of R that is too large, as if some of the energy in the wings does not contribute to the propagation of the matter along the axis.To adjust further for that, we take the energy in Eq. ( 3) to be the one that a jet would have if its wings had b = 3. Formally, since the fraction of the  energy in the core of a power-law jet with index b is we replace E tot in equations ( 3) and ( 6) by 3) .Figure 9 shows that this is a reasonable approximation of Γβ a and a less accurate, but still reasonable, approximation of θ c .This approximation could be adjusted by re-calibrating the value Γβ sp θ c,sp , which we generally do not expect to remain the same.However, we do not find this value changes very significantly, and therefore, for the sake of simplicity, we do not re-calibrate it.
The evolution of the structure of wide jets is also different than that of narrow jets.Instead of approaching the self-similar solution they retain the initial power-law in the wings throughout the whole evolution, both before and after spreading starts.In addition, E iso (θ ) ∝ Γ 2 (θ ) at all angles (including the wings) and at all times.The only change to the structure, in this case, is that the transition between the core and the wings smooths out, at the onset of spreading, it reaches approximately: After spreading starts the profile continues to smooth out as it evolves (i.e., there is no single profile that fits the entire evolution).However, taking the power-law outside of the core to be the same as the initial one provides a reasonable approximation.In Fig. 10 this evolution is shown for a b=2.5 power-law jet.
The shock radius follows the following relation: where the relation between R a and t can be found by integrating over β a .This relation is BM-like at every angle until the onset of spreading and then reaches the relation expected given the relationship between the energy and Γβ .

IMPLICATIONS FOR THE EMISSION
The initial jet structure as well as the structure evolution shape the afterglow emission.Below we discuss the implications of our findings to the emission seen by on-axis and off-axis observers.We also compare the results of our 2D simulations to semi-analytic light curve modeling.

The post jet-break decline rate for on-axis observers
For jets observed on-axis (θ obs < θ c,0 ), the initial core structure shapes the emission until the jet break, and the shape of the jet break is affected by the onset of spreading.The Lorentz factor decline rate in the jet core during the spreading phase together with the spreading of the core, sets the asymptotic decline rate of the light curve after the jet break.Sari et al. (1999) have shown that the combination of an exponential drop in Γ and an exponential growth of θ c , such that Γ a θ c ≈ 1, implies an asymptotic post break power-law index −p for observed frequencies ν a < ν obs .We find that the core angle spread more slowly than the Lorentz factor decline so Γ a θ c ∝ R −3/2 a during the spreading phase, and therefore the power-law index of the decline is expected to be steeper than −p.This expectation is confirmed by the simulations where we find that for p = 2.2 the asymptotic decline index is about −2.4.This result is consistent with the numerical findings of van Eerten & MacFadyen (2013).We note however that typically for θ c,0 ≳ 0.05 rad this asymptotic decay is never observed, unless the observer viewing angle is almost along the axis (i.e., θ obs ≪ θ c,0 ).The reason is that immediately after the jet break there is an "overshoot" and the decay is steeper than the asymptotic one (e.g., for p = 2.2 immediately after the break we find d log(F ν )/d log(T ) ≈ −2.6).Now, for observe that is not exactly along the axis the light curve approaches the asymptotic decay index over a duration that is long enough so the transition to the subrelativistic phase starts affecting the observed emission before the asymptotic decay rate is achieved.Finally, the expectation is that the emission seen by on-axis observers is almost insensitive to the initial structure of the jet.Our results verify this expectation.

The rising phase power-law index
For off-axis observers (θ obs ≳ 2 θ c,0 ) there is a rising phase, during which the emitting zone scans through the jet wings.Therefore, this phase may depend on the jet initial structure.If the emission during the rise is dominated by the self-similar phase of the jet evolution, then we expect the light curve for all initial structures (of narrow structure jets) to coincide.As it turns out, for reasonable jets and observing angles, this is hardly the case and the transition of the jet to the self-similar phase take place only after the peak.To assess when the self-similar solution affects the rise of the light curve, we can calculate for which ratio of θ obs /θ c the peak coincides with the onset of the spreading phase.The self-similar phase only starts when Γ a θ c ≃ 0.38, and the light curve peaks when Γ c (θ obs − θ c,p ) ≃ 1.8, where θ c,p is the core angle at the lab time that dominates the contribution to the light at the peak of the light curve (see Govreen-Segal et al. (2021)).Plugging in Γ c ≃ 0.5Γ a , as we find in the self-similar solution, we find that for θ obs ≲ 10θ c,p , the light curve peaks before the self-similar evolution starts dominating the emission.Thus, for most observable off-axis jets we expect the rising phase to depend on the jet initial conditions.
While we do not have an analytical description for the dependence of the light curve rising phase on the evolving jet structure, we can numerically scan the phase space of parameters, and find the best-fit power-law for the rising phase, as a function of the jet initial structure, and the ratio θ obs /θ c,p .We consider observed frequencies in the range ν a , ν m ≤ ν obs ≤ ν c .Focusing on power-law and Gaussian jets, we find that for every jet structure the rise becomes steeper the farther off-axis the observer is, and reaches a constant value for an observer with θ obs > 10θ c,p .Fitting the rising phase in observed frequency ν a , ν m ≤ ν obs ≤ ν c during the period T ≲ 0.5T p we find that for power-law jets: .The light curve power-law index during the rising phase as a function of the ratio between the observing angle, θ obs , and the core angle at the time of the peak, θ c,p .The solid lines are the approximation given in Eq. ( 23), with the calibration constants listed below it.The orange shaded region marks the observational constraints on the rising power-law and angle ratio of GW170817 (see text for details).
where a 1 = 0.22 for all power-law jets, and a 2 depends on the powerlaw.We find that a 2 = 3.8−7.5/b is an excellent approximation.For a Gaussian jet, a 1 = 0.35 and a 2 = 2.8.The values of d log F ν d log T (T ≤ 0.5T p ) from this relation are accurate to within ±0.25.The quality of this approximation can be seen in Fig. 11.This figure also shows the parameters estimated for GW170817, which we discuss in §5.

Comparing to afterglowpy
We compare light curves obtained using our full hydrodynamic simulations to those of afterglowpy (Ryan et al. 2020), as it is the most commonly used semi-analytical scheme.Other commonly used semi-analytic modeling (e.g., Soderberg et al. 2006;Lazzati et al. 2018) use the non-spreading approximation, which is similar to the non-spreading option in afterglowpy.We calculate the light curve as a post-processing of hydrodynamic simulations using the same method described in Govreen-Segal & Nakar (2023).
In the following examples, we plot the comparison, for an observed frequency ν m , ν a ≤ ν obs ≤ ν c , where ν a , ν m , ν c are the self absorption, typical synchrotron and cooling frequencies respectively.Fig. 12 shows the light curves of a top hat jet with θ i = 0.005 rad observed at various angles, alongside afterglowpy light curves, using both the spreading and the non-spreading options.Afterglowpy light curves are normalized to fit the peak of the light curve based on our simulations.The shape of the light curve is well described by the non-spreading approximation before the time of the peak, while the spreading approximation is usually good for the decline, though it seems to approach an asymptotic decline that is slightly too shallow and transition to this decline slightly earlier, most prominently at θ obs /θ c ≳ 20, an angle ratio that is most likely too faint to be observed.Our conclusion is that afterglowpy can provide a very good approximation to top hat jet light curves, if the non-spreading option is used before the peak and the spreading option is used after the peak.A similar comparison to a power-law jet with b = 6 is shown in Fig. 13.The afterglowpy scheme is set up with θ w as the angle in the initial conditions at which the matter becomes Newtonian.Here the non-spreading mode is much less accurate while the spreading mode seems to capture the jet evolution reasonably well.The main deviations is that at angles that are more likely to be observed ( θ obs θ i ≲ 20), afterglowpy predicts rising slopes that are systematically too shallow and peak durations that are systematically is too short.We conclude that afteglowpy gives a good approximation to the light curve of structured jets when the spreading option is used, however the differences between afterglowpy light curves and those obtained by the full hydrodynamic model are not negligible and can lead, for example, to an overestimate of the value of b that is needed to fit a given rising light curve.Thus, the errors on the model parameters based on the fit of afterglowpy light curve to the data are most likely to be dominated by systematic errors inherent to the inaccuracy of afterglowpy and not by statistical error.

IMPLICATIONS FOR THE THE JET IN GW170817
Our results can be applied to the observations of the afterglow of GW170817 to constrain its jet structure.The geometry of the jet, θ obs and θ c,p , was measured using the combination of the light-curve and flux centroid motion (Mooley et al. 2018;Ghirlanda et al. 2019;Mooley et al. 2022;Govreen-Segal & Nakar 2023).Figure 11 shows the constraints on GW170817 in the plane of the rising phase powerlaw index and the ratio θ obs /θ c,p .The power-law index, 0.86 ± 0.04, is from Makhathini et al. (2021) and the constraint on θ obs /θ c,p is from Govreen-Segal & Nakar (2023) that measure θ c,p = 1.5 −4 deg and θ obs − θ c,p = 16.8 ± 2 deg.This figure shows that the jet must have initially a relatively shallow structure outside of the core (at least at angles that dominated the light during the rising phase).Specifically, if the jet had power-law wings then b ≃ 3 − 4. A Gaussian jet is also marginally consistent with the observations, although it is less favored.We stress that the jet must have this structure after its emergence from the merger ejecta and before it interacts with the inter-stellar medium, and therefore the origin of the jet structure must be a combination of its structure upon injection from the engine and the jet propagation in the merger ejecta.Interestingly, simulations of the propagation of hydrodynamic and weakly magnetized jets in merger ejecta find that mixing processes during the propagation induce a power-law structure with b in this range (Gottlieb et al. 2020(Gottlieb et al. , 2021)).Jet with steeper initial wings can be ruled out, implying for example that the observations cannot be a result of a top hat jet that developed its structure during its propagation in the interstellar medium (as suggested by Gill et al. 2019).
Our results can be used also to constrain the initial opening angle of the jet.Govreen-Segal & Nakar 2023 find that at the time of the peak, Γ(θ c,p )(θ obs − θ c,p ) ≃ 1.8 (see their appendix E1).Thus, the measured value of θ obs − θ c implies that the shock Lorentz factor at the edge of the core at the time of the peak is Γ(θ c,p ) ≃ 6.2, which in turn means that Γ c θ c,p = 0.16 − 0.43.Assuming that the peak took place in the self-similar regime (we check that later) we can use Eqs.
(2) and ( 5), with the relation Γβ (θ c ) = 0.46 Γβ a , Γβ sp θ c,sp = 0.38 and R sp = 3.6 R, to find that at the time of the peak R a ≃ (1 − 4) R. The lower limit, R a ≃ R, is obtained for θ c,p = 4 deg, and it corresponds to a peak that takes place before the spreading starts.During that time the structure is not self-similar and therefore the measured value of R a cannot be fully trusted, but in any case the implication is that if θ c,p = 4 deg then we see the peak before spreading starts and thus θ c,0 ≃ 4 deg as well.For R a ≃ 4 R, which corresponds to θ c,p = 1.5 deg, the peak is at the beginning of the self-similar phase and therefore the estimate of R a can be trusted.From Figure 6 we see that for a power-law jet with b = 3, θ c (R a / R = 4) ≈ 4 θ c,0 .Thus, if θ c,p = 1.5 deg then θ c,0 ≈ 0.4 deg.We conclude that the initial opening angle of the jet in GW170817 can be constrained from observations to:

CONCLUSIONS
We use analytic arguments alongside a set of 2D relativistic fluid dynamics simulations to investigate the fluid dynamical evolution of relativistic jetted blast waves.Our findings are as follows: • As predicted by many previous studies (e.g., Rhoads 1997Rhoads , 1999;;Sari et al. 1999), the hydrodynamic relativistic evolution has two phases.During the first, pre-spreading phase, the evolution is as a part of the BM solution.During the second, spreading phase, the shock Lorentz factor drops exponentially with the radius.We find that the transition to the spreading phase takes place roughly when Γβ sp ≃ 0.2θ −1 c,0 , implying that for jets with initial opening angle > 0.1 rad the blast wave is mildly relativistic during the transition.
• The core opening angle is roughly constant during the prespreading phase and its asymptotic growth during the spreading phase is exponential.During both phases Γβ a θ c ∝ R −1.5 a , with a different normalization in each phase.While the asymptotic growth of the core angle is exponential, its expansion at early times of the spreading phase is mitigated by a power-law term ( θ c ∝ R −3/2 a exp[R a / R]).As a result the core angle remains much smaller than unity (i.e., the blast wave remains narrowly collimated) also when the shock enters the sub-relativistic regime.To a good approximation, the core opening angle at the time that the shock along the axis becomes mildly relativistic satisfies θ c ( Γβ a = 1) ≃ 0.4θ 1/3 c,0 .
• The profile of jets with narrow initial structure (E iso,i (θ ) in the wings drops faster than θ −3 ) starts to evolve outside of the core already during the pre-spreading phase.The wings develop a powerlaw structure that gradually approaches Γβ (θ ) ∝ θ −1.5 , and the entire structure evolves to a self-similar profile by the beginning of the spreading phase.The energy profile in the wings during the selfsimilar phase is E iso ∝ θ −2.6 .All narrow structure jets that we studied, regardless of their initial structure (including Gaussian and hollow jets), evolve to the same self-similar profile.
• Jets with initial wide structure (E iso,i (θ ) drops more slowly than θ −3 ) roughly keep their initial wing profile throughout the evolution, and they do not evolve to the self-similar profile.Nevertheless, the evolution of Γβ a and θ c in these jets is largely similar to these of narrow jets.
• We show that for off-axis observers, at reasonable observing angles, the self-similar phase contributes to the light curve only after the time of the peak, and therefore the rising of the light curve depends on the initial conditions.We numerically scan parameter space and provide simple formula that relate light curve rising rate to the initial structure and observing angle for observed frequency ν a , ν m < ν obs < ν c .
• We compare light curves obtained by the full hydrodynamic simulation to semi-analytic modeling of afterglowpy, for observed frequency ν a , ν m < ν obs < ν c .We find that it provides good fits when the following modes are chosen.For top hat jets the rising phase should be approximated with the non-spreading mode while the decaying phase (after the peak) should be approximated with the spreading mode.For structured jet it is better to use the spreading mode at all times.We stress, though, that while the approximation of the semi-analytic modeling is reasonable, its inaccuracy is still expected to be the main source of error in fits to well observed cases (such as GW170817).Thus, error estimates that are based on methods such as MCMC, which do not account to systematic errors of the model, cannot be trusted.
• We apply our results to learn about the properties of the jet in GW170817 after it emerged from the merger ejecta and before its interaction with the interstellar medium.We find that the rising phase of the light curve implies that the jet initial structure had a relatively shallow wings, such as a power-law with b = 3 − 4. A Gaussian initial profile is marginally consistent with the rising phase.The initial core angle of the jet was 0.4 − 4.5 deg.
Based on our results we provide an approximation of the evolution of power-law jets (Appendix A) which can be used for an improved modeling of the light curve, centroid motion and polarization.In future studies we plan to explore jetted blast waves in other density profiles as well as the transition from the mildly relativistic narrowly collimated blast wave to the spherical Newtonian Taylor-von Neumann-Sedov blast wave.

-3
10 -2 10 -1 [rad]  of state is minor.This can be seen in Fig. C1, in which Γβ a and θ c are plotted as a function of the normalized radius for top hat jets with θ i = 0.02 rad and θ i = 0.2 rad.In the narrower jet there is no noticeable difference while in case of θ i = 0.2 rad there is a small  difference during the spreading phase (about 10%).When considering the self-similar solution, we find that Γβ (θ ) still follows the same behavior, also when changing the EOS.This can be seen in Fig. C2, in which the self-similar solution is shown for a top hat jet simulation with θ i = 0.02 and a Synge equation of state.shows the evolution of θ c using various definitions.It shows that the two popular definitions in which the core angle is defined as the region that contains 90% or 95% of the energy are highly sensitive to the shape of the wings and are only weakly sensitive to the properties of the core.As a result, θ c according to these definitions grows very rapidly at early times, long before the spreading phase starts, when the wings outside of the core evolve.In contrast, during the spreading phase, θ c according to these definitions barley grows, even though the central region where the energy profile is rel- .It shows that definitions in which θ c contains a very large fraction of blast wave energy (90% and 95%) are sensitive to the wings and are insensitive to the core (see main text for discussion) and therefore, these are not good definitions (at least for the purposes of this paper).All other popular definitions: the region that contains 50% of the energy, the average angle defined by Duffell & Laskar (2018) and our definition, are rather similar and can probably serve well for the type of analysis we carry out in this paper.
atively flat (which is defined as the core using the other definitions) grows exponentially.The reason is that during the self-similar phase the wings remains almost unchanged.We conclude that these definitions are too sensitive to the wings and are not capturing the essence of the core evolution well.All other definitions, including the region that contains 50% of the energy, the average angle defined by Duffell & Laskar (2018) and our definition, are pretty similar and it's likely MNRAS 000, 1-?? (2023) Evolution of Relativistic Jetted Blast Waves 17 that for most jets, the analysis used here could be adapted to these definitions.These definitions will differ from ours in several cases.For example, for a hollow jet, in which the core energy is smaller than a top hat jet with the same energy, but the core size relevant for observations is still the same and is correctly recovered using our definition.

Figure 1 .
Figure 1.The evolution of the proper velocity along the axis, Γβ a (top panel), and core angle, θ c (bottom panel), of top hat jets with various opening angles.The plot is semi-log with radius normalized by R, to elucidate the exponential dependence during the spreading phase.The simulation curves are plotted in solid lines, with exception of the angles in the bottom panel that are plotted as dots after the shock becomes mildly relativistic ( Γβ a < 2).The analytic approximation is plotted in dashed lines -Eqs.(1) and (2) for Γβ a and Eqs.(5) and (9) for θ c .

Figure 4 .
Figure 4.The bottom three curves from the top panel of Fig. 3, plotted in normalized coordinates.The blue curve is from the final stages of the transition into the self-similar solution, while the two later jet profiles indicate a self-similar evolution.The analytic fits to smoothed broken power-laws (Eqs.12-14) are marked in black.

Figure 5 .
Figure5.The normalized shock proper-velocity profile in the self-similar regimes.Various simulations and times coincide with a similar structure.The thin black solid line is the smoothed broken power-law fit (Eq.12)

Figure 6 .
Figure 6.Same as Fig, 1, for a variety of jet structures.

Figure 7 .
Figure 7.The evolution of Γβ (θ ) and d log Γβd log θ is plotted for two structured jets.In the two left panels, simulation b6c1 (see TableB) -a jet with the following core structure:E iso,i (θ ≤ θ i /2) = const and E iso,i (θ i /2 ≤ θ ≤ θ i ) ∝ θ −1 .Outside the core E iso,i (θ > θ i ) ∝ θ −6 .In the right panels, a b = 4 power-law jet with a flat core.Both jets show the expected evolution, where the wings approach a power law with an index −α.During the spreading phase both jets assume the same self-similar profile as top hat jets (marked by the shaded region), and during this phase their evolution is generic and independent of the initial jet structure.

Figure 8 .
Figure 8.The evolution of Γβ (θ ) and d log Γβd log θ for a hollow jet.The core is flattened significantly during the pre-spreading phase, and it approaches the self-similar structure (plotted schematically in shaded blue) by the transition to the spreading phase.

Figure 10 .
Figure 10. he evolution of Γβ (θ ) and d log Γβd log θ of a b=2.5 power-law jet.As opposed to a narrow jet, here the profile outside the core does not evolve significantly, and E iso ∝ Γβ 2 at all angles.
Figure11.The light curve power-law index during the rising phase as a function of the ratio between the observing angle, θ obs , and the core angle at the time of the peak, θ c,p .The solid lines are the approximation given in Eq. (23), with the calibration constants listed below it.The orange shaded region marks the observational constraints on the rising power-law and angle ratio of GW170817 (see text for details).

Figure 12 .
Figure12.A comparison between light curves calculated using afterglowpy, in spreading and non-spreading modes, and a full 2D simulation.All curves are of a top hat jet (θ i = 0.005 rad) observed at various viewing angles, where at all times the observed frequency is in the segment ν a , ν m < ν obs < ν c .The light curves at each viewing angle are all normalized so they coincide at the peak.

Figure A1 .
Figure A1.The lateral structure of the freshly shocked material proper velocity, γβ (θ ), at various stages of the shock propagation.colored solid lines: results of the full 2D hydro simulations.Dashed black lines: Semi-analytic formulae, Eqs.(A1)-(A18).The left panel shows a top hat jet and the right panel shows a b = 6 power-law jet.

Figure A2 .
Figure A2.Light curves from the full 2D hydrodynamic simulations of a b = 6 power-law jet (solid lines) are compared to light curves calculated with the approximated structure (Appendix A; see text) and the thin shell approximation (dashed lines).The light curves are normalized to coincide at the peak.

Figure A3 .
Figure A3.Same as Fig. A2, for a top hat jet.

Figure C1 .
Figure C1.The effect of the equation of state on the evolution of Γβ a and of θ c is studied, by comparing simulations of top hat jets with θ i = 0.02 and 0.2 with an adiabatic index of 4/3 and a Synge-like equation of state.

Figure C2 .Figure D1 .
Figure C2.The self-similar solution plotted for a top hat jet with θ i = 0.02 and a Synge-like equation of state.The analytical expression plotted is 12.Note that the definition of θ c is not applicable to the curve with Γβ a = 3 (our definition of θ c does not behave well when Γ c becomes mildly relativistic, see discussion below Eq. 8).Therefore, the value of θ c for this curve is found by the angel at which d log( Γβ ) d log(θ ) = −1.

Table 1 .
Glossary of our notations.