Numerical Simulations of an Initially Top-Hat Jet and the Afterglow of GW170817$\,$/$\,$GRB170817A
Ramandeep Gill Jonathan Granot Fabio De Colle Gerardo Urrutia
























































0000-0003-0516-2968]Ramandeep Gill
Department of Natural Sciences, The Open University of Israel, P.O Box 808, Ra'anana 43537, Israel
Physics Department, Ben-Gurion University, PO Box 653, Beer-Sheva 84105, Israel

0000-0001-8530-8941]Jonathan Granot
Department of Natural Sciences, The Open University of Israel, P.O Box 808, Ra'anana 43537, Israel
Department of Physics, The George Washington University, Washington, DC 20052, USA



Instituto de Ciencias Nucleares, Universidad Nacional Autónoma de México, A. P. 70-543 04510 D. F. Mexico




Instituto de Ciencias Nucleares, Universidad Nacional Autónoma de México, A. P. 70-543 04510 D. F. Mexico

























The afterglow of GRB170817A/GW170817 was very unusual, slowly rising as 
F_ν∝t_obs^0.8ν^-0.6, peaking at t_obs,pk∼ 150days, and sharply decaying as 
∼t_obs^-2.2. VLBI observations revealed an unresolved radio afterglow image whose flux centroid 
apparently moved superluminally with v_app≈4c between 75 and 230days, 
clearly indicating that the afterglow was dominated by a relativistic jet's compact core. 
Different jet angular structures successfully explained the afterglow lightcurves: Gaussian and steep power-law 
profiles with narrow core angles θ_c≲5^∘ and significantly larger viewing angles 
θ_obs/θ_c∼3-5. However, a top-hat jet (conical with sharp edges at 
θ=θ_0) was ruled out since it appeared to produce an early flux rise much steeper 
(∝t_obs^a with a≳3) than observed. 
Using 2D relativistic hydrodynamic
simulations of an initially top-hat jet we show that the initial steep flux rise is an artifact caused by the simulation's finite start time, t_0, missing its flux contributions from t<t_0 and sometimes “compensated” using an analytic 
top-hat jet. While an initially top-hat jet is not very physical, such simulations are particularly useful at t_obs≳t_obs,pk when the afterglow emission is dominated by the jet's core and becomes insensitive to its exact initial angular profile if it drops off sharply outside of the core.
We demonstrate that an initially top-hat jet fits GW170817/GRB170817A's afterglow lightcurves and flux centroid motion at t_obs≳t_obs,pk,
for θ_obs/θ_0≈3 and may also fit the earlier lightcurves for Γ_0=Γ(t_0)≳10^2.5.

We analytically express the degeneracies between the model parameters, and find a minimal jet energy of E_min≈5.3×10^48erg and circum-burst medium density of n_min≈5.3×10^-6  cm^-3.





















































§ INTRODUCTION








































The first gravitational wave (GW) detection of a binary neutron star (NS) merger, GW170817 <cit.>, 
was accompanied by the first electromagnetic counterpart to any GW detection – the weak, short duration gamma-ray burst, 
GRB170817A <cit.>, that

originated in the nearby (D≈40Mpc) elliptical galaxy NGC 4993 <cit.>. An impressive observational campaign detected the 
quasi-thermal kilonova emission

in the NIR-optical-UV energy 
bands over the next few weeks <cit.>. 
The non-thermal afterglow emission was detected after 8.9days in X-rays <cit.> and 
after 16.4days in the radio  <cit.>.

GW170817/GRB170817A's long-lived X-ray to radio afterglow emission was highly unusual. In contrast to the 
flux decay seen in almost all GRB afterglows, it showed an exceptionally long-lasting 
flux rise, as F_ν(t_obs)∝ν^-0.6t_obs^0.8, up to the peak at t_obs,pk∼ 150days post merger 
<cit.>, followed by a sharp decay as
F_ν∝t_obs^a where a≃-2.2 <cit.>. 

The broadband (X-rays, radio, and 
late-time optical) afterglow emission is consistent with arising from a single power-law 
segment (PLS) of the afterglow synchrotron spectrum, ν_m≤ν≤ν_c.[Here ν_m 

is the synchrotron frequency of minimal energy electrons and 

ν_c of electrons that cool on the dynamical time <cit.>.]
















Almost all successful off-axis jet models for this afterglow have an angular profile that is 
either a (quasi-) Gaussian or a narrow core with sharp power-law wings 
<cit.>.


Moreover, several works have argued that a top-hat jet can be ruled out 
<cit.> since it would produce a very sharp initial flux rise (F_ν∝t_obs^a with 
a≳3) compared to the observed one. 

Such a sharp initial flux rise was obtained both 
numerically from 2D hydrodynamic simulations <cit.>, and analytically 
assuming an idealized top-hat jet 

<cit.>










Here we show that while an idealized top-hat jet would indeed produce sharply rising early lightcurves for off-axis observers, a more realistic description of the dynamics (using numerical 
simulations) for an initially top-hat jet leads to a much shallower flux rise that can explain the GRB170817A afterglow observations (lightcurves, flux centroid motion, and upper limits on the image size). 



The main difference arises since within the simulation's first dynamical time an 
initial top-hat jet develops a bow-shock like angular structure, which produces afterglow emission resembling 
that from a core-dominated structured jet,[I.e. a jet in which most of the energy resides within a narrow core, outside of which the energy per solid angle sharply drops.] with a much shallower flux rise, making the two models 
practically indistinguishable at t_obs≳t_obs,pk, and not always that easy to distinguish between even at earlier times.  










Numerical simulations have a finite lab-frame start time, t=t_0>0, thus missing contributions to F_ν from t<t_0. This is often compensated for by adding emission at t<t_0 from a conical wedge from the <cit.> spherical self-similar solution <cit.>. This still results in an unphysically sharp flux rise at early observed times, t_obs≲2t_obs,0, corresponding to lab-frame times t≲2t_0.












The effects of t_0 including t_obs,0(θ_obs,t_0) are analytically explained in  <ref>.   







The effect of starting the simulations with a larger Lorentz factor (LF) Γ_0=Γ(t_0) and 
correspondingly smaller t_0 is shown in  <ref> through 2D relativistic hydrodynamic 
simulations. 



In  <ref> model scalings and the minimal energy and circum-burst medium density estimates are provided. 
In  <ref> we calculate and compare the flux centroid location and the image size and shape 
with radio afterglow measurements of GW170817/GRB170817A. Our conclusions are discussed in  <ref>.





§ THE EFFECT OF SIMULATION START TIME


We perform 2D relativistic hydrodynamical simulations with initial conditions of a conical wedge 
of half-opening angle θ_0 taken out of the BM76 solution. This initially narrow and relativistic 
jet expands into a cold circum-burst medium (CBM) with a power-law rest-mass density profile with 
radius R from the central source, ρ(R)=AR^-k, where for uniform (wind-like) density  environment 
k=0 (k=2). The BM76 spherical self-similar phase occurs after the original outflow is significantly 
decelerated 

and most of the energy is in the 
shocked CBM behind the forward (afterglow) shock. The material just behind the shock moves with velocity β c, 
with c being the speed of light, and bulk LF Γ=(1-β^2)^-1/2=Γ_shock/√(2). 
The BM76 phase reasonably holds for a top-hat jet while Γ>1/θ_0 (assuming Γ_0θ_0≫1, 
as typically inferred for GRBs) before significant lateral spreading can occur. 


The radial width behind the forward shock containing most of the blastwave's energy is Δ∼0.1 R/Γ^2. 







During the BM76 self-similar phase Γ^2R^3-k=Γ_0^2R_0^3-k=(17-4k)E_k,iso/16πAc^2=const, 
with R_0=R(t_0)≈ct_0 being the initial shock radius. Thus the initial radial width Δ_0=Δ(t_0)∼0.1R_0/Γ_0^2∝R_0^4-k∝Γ_0^-2(4-k)/(3-k) (∝Γ_0^-8/3 for k=0) 
becomes much narrower and harder to resolve for larger Γ_0 or correspondingly smaller t_0≈R_0/c∝Γ_0^-2/(3-k) 
(∝Γ_0^-2/3 for k=0). This practically limits Γ_0 from above and t_0 from below. 

An on-axis observer (θ_obs<θ_0) receives the first photons from the simulation after a radial time delay of 

    t_obs,r/(1+z)=t_0-R_0/c≈R_0/4(4-k)cΓ_0^2≈t_0/4(4-k)Γ_0^2 ,

z being the source's cosmological redshift.
For an off-axis observer (Δθ≡θ_obs-θ_0>0), there is an additional angular time delay,

    t_obs,θ/(1+z)   =   R_0/c[1-cos(Δθ)]≈Δθ^2/2t_0
        ≈   Δθ^2/2[(17-4k)E_k,iso/16πAc^5-kΓ_0^2]^1/3-k ,

<cit.>, which dominates the total time delay 
t_obs,0=t_obs,r+t_obs,θ≈t_obs,θ for Δθ>1/Γ_0. For such off-axis viewing angles one can conveniently express Γ_0∝t_obs,0^-(3-k)/2, which for k=0, E_k,iso≈(2/θ_0^2)E and z≪1 gives


    Γ_0   ≈   √(17Eθ_0^-2(Δθ)^6/64πnm_pc^5t_obs,0^3)
        =   149E_50.3^1/2n_-3.6^-1/2θ_0,-1^-1Δθ0.21^3t_obs,010 d^-3/2 ,

where for the numerical value we normalize by our best-fit model parameters derived in  <ref>, for which t_obs,0=38.1, 23.0, 18.3days for Γ_0=20, 40, 60.

The compactness argument implies that GRB jets typically have Γ_0≳100 for the emission region to be optically thin to γγ-annihilation <cit.>. 
Such large Γ_0 are very difficult to simulate, and current numerical works usually set Γ_0∼20-25 <cit.>.

Simulations initialized at t_0

do not contribute any flux at t_obs<t_obs,0 (see Fig. <ref>). 

Over the first dynamical time (t_0<t≲2t_0), as the simulated jet relaxes from its artificially sharp top-hat initial condition, 

the flux sharply rises at times 
t_obs,0≤t_obs≲2t_obs,0, 

after which the flux evolves smoothly with time. During this relaxation phase, the top-hat jet is slowed down due 
to its interaction with the CBM and develops a bow-shock like structure 
<cit.>. 
Its structure at this point resembles a `structured jet' with a highly energetic core, whose velocity is almost radial, surrounded by less energetic 
slower-moving material whose velocity points more sideways. Therefore, an initially top-hat jet inevitably transforms 
into a structured jet. The slower material at angles 

θ>θ_0 has a much wider beaming cone and its emission starts dominating the off-axis flux. 
As the jet gradually decelerates, its beaming cone widens and off-axis observers start to 
receive flux from smaller θ closer to the jet's core, resulting in a more gradual flux rise compared 
to an analytic perpetually sharp-edged jet.










To compensate for the missing flux at t_obs<t_obs,0, as shown in Fig. <ref>, 

lightcurves derived from numerical simulations 
are often supplemented with synthetic lightcurves obtained for the initial conditions <cit.>
over a wide range of earlier lab-frame times, t_*<t<t_0 with t_*≪t_0.




We also compare the lightcurve obtained from the publicly available afterglow modeling 
code BOXFITv2 <cit.>, which has been widely used to fit afterglow observations of GRB170817A. 
Lightcurves obtained from our numerical simulations are in excellent agreement with that obtained from BOXFITv2. 





The observed flux density is given by <cit.>

    F_ν(t_ obs)=(1+z)/4π d_L^2(z)∫dt δ_t∫δ_D^3dL'_ν'∝δ_D^3L'_ν' ,

where d_L(z) is the luminosity distance, the δ-function, 
δ_t=δ(t-t_obs/(1+z)-Rμ̃/c), accounts for the photon arrival 
times <cit.>, Rμ̃=n̂·R⃗ where n̂ is the direction to the 
observer and R⃗ is the radius vector (measured from the central source) of each fluid element 
having velocity v⃗=β⃗c and Doppler factor δ_D=[Γ(1-n̂·β⃗)]^-1. 
For radial velocities (e.g. a spherical shell), n̂·β⃗=βμ̃ and 
δ_D≈2Γ/[1+(Γθ̃)^2] for Γ≫1. 






In Eq. (<ref>), F_ν∝δ_D^3L'_ν' holds where L'_ν' and δ_D are those of the part of the source that dominates the observed emission, which for a top-hat jet viewed off-axis is within an angle ∼max(Γ^-1,Δθ) of the point in the jet closest to the observer (where θ̃≈Δθ), occupying a solid angle Ω_*∼min[max(Γ^-2,Δθ^2),θ_0^2]. During the early flux-rising phase while the radiation is beamed away from the observer (Γ>1/Δθ), Ω_*=const and one can use the scalings of L'_ν' for a spherical flow, 

L'_ν'∝R^aν'^b∝R^aδ_D^-b, where the PLS-dependent power-law indices a and b are explicitly calculated in <cit.>. 



















Therefore, F_ν∝δ_D^3-bR^a where 
<cit.> δ_D≈2/ΓΔθ^2∝R^(3-k)/2⟹F_ν∝R^[2a+(3-k)(3-b)]/2. 









For GRB170817A, PLS G is relevant and a=[15-9p-2k(3-p)]/4, b=(1-p)/2. From Eq. (<ref>), t_obs∝R which implies F_ν∝t_obs^3(5-p)/2 for a 
uniform CBM (k=0).

In Fig. <ref>, we show the extension of the lightcurve to t_obs<t_obs,0,

where we reproduce the analytic flux scaling derived above. It is clear that BOXFITv2 also supplements the lightcurve at early times (t<t_0⇔t_obs<t_obs,0) with the flux from a conical wedge out of the BM76 self-similar solution (also used for the initial conditions).

Although BOXFITv2 allows the user to not include this extension in the final lightcurve, many works 
indeed do include it, even when fitting to observations. 

Either way, the flux at t_obs≲2t_obs,0 is strongly affected by the rather arbitrary simulation start time t_0.
Initializing the simulation at a smaller t_0 corresponding to a larger Γ_0 would shift this feature to earlier times and 
recover the much shallower flux rise in the lightcurve.









§ DIFFERENT Γ_0 FITS TO THE AFTERGLOW DATA OF GW170817/GRB170817A



Here we show results of 2D hydrodynamic simulations using the special-relativistic 
hydrodynamics code Mezcal, post-processed by a complimentary radiation code 

<cit.>. The simulations are initialized with a conical wedge of half-opening angle θ_0=0.1, 0.2rad and initial LF Γ_0=20, 40, 60 expanding into a uniform CBM (k=0) of rest-mass  density 
ρ_0=nm_p and number density n, m_p being the proton mass. 

The outflow has an isotropic-equivalent kinetic energy E_k,iso=10^53erg, 
corresponding to a true jet energy of E=(1-cosθ_0)E_k,iso≈5×10^50erg for θ_0=0.1 
and E≈2×10^51erg for θ_0=0.2.











We consider synchrotron radiation from relativistic electrons that are accelerated at the 
afterglow shock to a power-law energy distribution, dN_e/dγ_e∝γ_e^-p
for γ_e>γ_m with p=2.16, which are a fraction ξ_e of all post-shock electrons, and hold a fraction ϵ_e=0.1 of the post-shock internal energy density, where a fraction ϵ_B=0.1 goes to the magnetic field.










The radiation is calculated numerically for a fixed set of model parameters (E, n, ϵ_e, ϵ_B, p, θ_0) 
and for a grid of θ_obs values. When including the parameter ξ_e, the set of model parameters become degenerate, 
where the afterglow flux is invariant under the change E→ E/ξ_e, n→n/ξ_e, ϵ_e→ϵ_eξ_e, 
and ϵ_B→ϵ_Bξ_e, for m_e/m_p<ξ_e≤1. We then use the scaling relations described in <cit.> for arbitrary values of (E, n), as well as the scaling with the shock microphysical parameters in each PLS 
 <cit.>. See <cit.> for further details.
 
There are in total 8 model parameters, 
i.e. E, n, ϵ_e, ϵ_B, p, ξ_e, θ_0, θ_ obs.
There are 5 effective observational constraints: (i) 



the spectral index b≈-0.58 
(F_ν∝ν^b; b=[1-p]/2 for PLS G, which determines p=1-2b≈2.16), (ii)
the lightcurve peak time t_ obs,pk≈150days, (iii) the peak flux F_ν, pk, (iv) the shape of the lightcurve near the peak (which approximately determines θ_obs/θ_0), (v) the radio flux centroid's apparent velocity. These 5 constraints involve equalities and reduce the dimensionality of the allowed parameter space from an 8D to a 3D. 
There are also 3 additional constraints that involve inequalities 
and hence only reduce its volume but not its dimensionality:
the fact that all the broadband afterglow observations lie within PLS G, ν_m<ν<ν_c, and θ_ obs≲0.5 
from the GW detection. 
















































Our afterglow lightcurve fitting is guided by the measured peak at

t_obs,pk∼150days <cit.> and the data points near the peak. Fig. <ref> shows 
the fit to the afterglow data 

for different initial Γ_0 (top-left panel) and viewing angles θ_obs (top-right panel). 
We do not attempt to fit the early time data at t_obs≲40 days, before the simulated lightcurves contain the 
dominant and dynamically relaxed contribution from the hydrodynamic simulation. Nevertheless, 
we obtain a reasonable fit to the afterglow data for different values of Γ_0, where our lightcurves for larger 
Γ_0 extend to earlier times and can adequately explain the data at t_obs≳40days. 








The best constrained parameters are <cit.>: (i) p≈2.16,  

and (ii) θ_obs/θ_0≈3.1±0.1, since it significantly affects the shape of the 
lightcurve before and around 
the peak time. In the bottom-right panel of Figure <ref>, we compare the model lightcurves for θ_0=0.1, 0.2 and show 
that in both cases θ_obs/θ_0=3.1 provides a comparably good fit, while fixing the same values for the shock microphysical 
parameters but  varying the true jet energy E and CBM density n. 
















We compare the simulation lightcurves with those obtained from semi-analytic models of different jet 
structures, namely a top-hat (THJ), Gaussian (GJ), and a power law jet (PLJ) <cit.>. 
For the top-hat jet we prescribe the same dynamics as that for the two structured jets, i.e. every part of the jet evolves 
locally as if it were part of a spherical flow, with no sideways spreading. As a result, all three semi-analytic models yield very 
similar lightcurves right after the peak when the compact core of the jet becomes visible to the off-axis observer.
On the other hand, the simplified dynamics of the semi-analytic models leads to a significantly shallower post-peak flux decay rate 
compared to the simulated one, which may be attributed to the combination of a shallower asymptotic decay and a smaller overshoot 
just after the peak <cit.>. The post-peak flux decay behavior of different structured jets will be investigated 
in more detail using 2D numerical simulations in another work (Urrutia et al. 2019, in preparation). 
For the semi-analytic models one set of model parameter values that can explain the observations sufficiently well are: 
E_ k,iso,{c, jet}≈10^51.6erg, θ_{c,jet}≈5^∘, 
θ_ obs=27^∘, ϵ_e≈10^-1, ϵ_B≈10^-2.8, and the only difference is in the 
core Lorentz factors between the three models, with Γ_ c^ PLJ=100, Γ_ jet^ THJ=Γ_ c^ GJ=600.




§ FLUX SCALINGS, MODEL DEGENERACIES, AND MINIMUM JET ENERGY AND CBM DENSITY ESTIMATES









For the lightcurve fits we assume ξ_e=1,






and use the dependence on the shock microphysical parameters in PLS G 
from <cit.>, now including the degeneracy due to ξ_e <cit.>, F_ν,G∝ϵ_e^p-1ϵ_B^(p+1)/4ξ_e^2-pν^(1-p)/2. We also use the global scaling 
relations <cit.>, which are conveniently parameterized through 

length and time, 



    α=ℓ'/ℓ=t'/t=t'_obs/t_obs=(E'/E/n'/n)^1/3 ,

and through mass and energy, ζ=m'/m=E'/E, where the rescaled parameters 

are denoted with a prime, ℱ = F'_ν,G(t'_obs,ϵ'_e,ϵ'_B,ξ'_e)/F_ν,G(t_obs,ϵ_e,ϵ_B,ξ_e), 

    ℱ = ζ^(p+5)4α^-3(p+1)4ϵ'_eϵ_e^p-1ϵ'_Bϵ_B^(p+1)4ξ'_eξ_e^2-p .






Next, we constrain E from below by using these scaling relations and our (partly degenerate) 
best-fit parameters: E=10^50.4 erg, n=10^-3.6 cm^-3, ϵ_e=10^-1.8, 
ϵ_B=10^-3.12, θ_obs/θ_0=3.1 (fixing ξ_e=1, p=2.16, θ_0=0.1). Matching the peak time of 
the simulated lightcurve to t_obs,pk≈150days requires no significant time rescaling, and yields 
α=t'_obs/t_obs≈1. Matching the peak flux to that observed requires equating Eq. (<ref>) to 
unity. Altogether, replacing the unprimed quantities by the best-fit values, and then making the rescaled quantities unprimed, 
and solving for ζ, yields

    ζ      =E/10^50.4 erg=n/10^-3.6 cm^-3
          ≈ϵ_e10^-1.8^4(1-p)(p+5)ϵ_B10^-3.12^-(p+1)(p+5)ξ_e^4(p-2)(p+5) ,

where the equality in Eq. (<ref>) results from Eq. (<ref>) when α=1. 
This leaves us with a 3D allowed parameter space since we started with 7 free model parameters (θ_0=0.1 was fixed by 
the simulation, leaving E, n, ϵ_e, ϵ_B, p, ξ_e, θ_ obs) and used 4 observational constraints. 
The jet energy in Eq. (<ref>) 
decreases with increasing ϵ_e, ϵ_B and increases only weakly with ξ_e. A minimal energy 
constraint can be obtained by maximizing the values of ϵ_e, ϵ_B and minimizing that of ξ_e. This 
is demonstrated in Fig. <ref>, where we show planes in the 3D parameter space [ξ_e, ϵ_e, ϵ_B] 
for different jet energies. Here we first use the fact that the broadband afterglow observations lie on a single PLS, 
with ν>ν_m, where we obtain

    ν_m = 8.93×10^5 ξ_e^-2E_ k,iso,52.7^1/2ϵ_e,-1.8^2ϵ_B,-3.12^1/2t_ obs,150d^-3/2  Hz

for t_ obs,150d=t_ obs/(150  days) and p=2.16 from the expression for PLS G given in <cit.>. 
This expression is only valid for a spherical flow and for an on-axis observer, for 
whom the flux is dominated by emission from material along the LOS. At t_ obs≥ t_ obs,pk≈150days, the flux is dominated 
by that from the core of the jet with E_ k,iso,c≲10^52.7erg. At t_ obs<t_ obs,pk, the flux is dominated by emission from 
material outside of the core at θ>θ_0 with E_ k,iso<E_ k,iso,c. To obtain the value of ν_m for an off-axis observer, we 
calibrated Eq. (<ref>) by comparing it with the value of ν_m obtained from our numerical simulation around the time of the earliest radio observations at t_ obs≈16.4days. 

Next, we use the relation from Eq. (<ref>) in Eq. (<ref>) and replace E_ k,iso to obtain an expression that depends 
only on shock microphysical parameters, which, for ν_m( 16.4 days)<ν_ obs=3GHz, yields a lower limit on ξ_e


    ξ_e>ξ_e,min≈ 0.84 ϵ_e,-1^6/7ϵ_B,-1^1/7 .

This constraint is shown as a shaded black plane in Fig. <ref> above which Eq. (<ref>) is satisfied. 
Another useful constraint here is that ξ_e,min<1, which yields

    ϵ_e<ϵ_e,max=0.12ϵ_B,-1^-1/6 .

We first use the constraint on ξ_e from Eq. (<ref>) in Eq. (<ref>) and remove the dependence on ξ_e. 
Next, we use the additional constraint on ϵ_e from Eq. (<ref>) (which is equivalent to substituting ξ_e=1 and ϵ_e=ϵ_e,max in Eq. [<ref>]) to obtain


    E_min≈7.7×10^48 ϵ_B,-1^-1/3 erg=5.3×10^48ϵ_B,-0.5^-1/3 erg ,

as also demonstrated in Fig. <ref> by the intersection of the black plane with planes marked by jet energies E>E_min.

If we consider only some ξ_e<1, as may be expected on theoretical grounds, then Eq. (<ref>) will lead to 
ϵ_e,max=0.12ϵ_B,-1^-1/6ξ_e^7/6 and accordingly increase E_min to

    E_min   ≈   3.6×10^49 ϵ_B,-1^-1/3ξ_e,-1^-2/3 erg
       =   5.3×10^48ϵ_B,-0.5^-1/3ξ_e^-2/3 erg .

Finally, according to Eq. (<ref>) E_min also corresponds to a minimal CBM density,

    n_min   ≈   3.6×10^-5 ϵ_B,-1^-1/3ξ_e,-1^-2/3 cm^-3
       =   5.3×10^-6ϵ_B,-0.5^-1/3ξ_e^-2/3 cm^-3 .




















§ MODEL COMPARISON WITH AFTERGLOW IMAGE SIZE AND FLUX CENTROID MOTION

We compare the afterglow image size and flux centroid motion

on the plane of the sky as obtained 
from our simulations to the  GW170817/GRB170817A radio observations. VLBI observations between 75 and 230days revealed an unresolved 
source whose flux centroid showed apparent superluminal motion with ⟨ v_app⟩/c=⟨β_app⟩=4.1±0.5 <cit.>. The flux centroid's location on the plane of the sky is defined as 

    𝐫̃_fc=(x̃_fc, ỹ_fc)=∫dF_ν 𝐫̃/∫dF_ν=∫dx̃ dỹ I_ν𝐫̃/∫dx̃ dỹ I_ν

<cit.>, where dF_ν=I_ν dΩ=I_νd_A^-2dS_⊥, with I_ν being the specific intensity, d_A the angular distance, and dS_⊥=dx̃ dỹ a transverse area element on the plane of the sky. The jet symmetry axis is in the x̃-z̃ plane, where the z̃-axis points to the observer.

Because of the flow's axisymmetry, the image has the reflection symmetry I_ν(x̃,ỹ)=I_ν(x̃,-ỹ). 
Therefore, 𝐫̃_ fc=(x̃_fc,0) and the flux centroid moves along the x̃-axis. Since I_ν=d_A^2dF_ν/dS_⊥∝F_ν/S_⊥ where S_⊥∝ℓ^2, it scales in PLS G as 
ℐ = I'_ν,G(t'_obs,x̃',ỹ')/I_ν,G(t_obs,x̃,ỹ), 

    ℐ 
    =ζ^(p+5)4α^-(3p+11)4ϵ'_eϵ_e^p-1ϵ'_Bϵ_B^p+1/4ξ'_eξ_e^2-p .

The image size, flux centroid location, and observed time all scale as α=x̃'/x̃=ỹ'/ỹ=x̃'_fc/x̃_fc=t'_obs/t_obs, independent of the r.h.s of Eq. (<ref>). The flux centroid's apparent velocity β_app remains unchanged, but shifts to the rescaled observer time


<cit.>. 









Fig. <ref> shows how our best-fit simulated ⟨β_app⟩ varies with α. The measured ⟨β_app⟩=4.1±0.5 corresponds to α=0.661^+0.242_-0.141, and is consistent (at the 1.35σ level) with 

our fiducial model that fits the afterglow lightcurve (α=1), which thus passes an important consistency check.

To calculate the afterglow image size and shape, we fit the surface brightness to an elliptical Gaussian,  I_ν∝exp[-(x̃-x̃_el)^2/2σ_x^2-ỹ^2/2σ_y^2] centered at (x̃_el,0), where (σ_x,σ_y) are the 
standard deviations of the semi-minor and semi-major axes along the x̃-axis and ỹ-axis, respectively <cit.>. 
The top-panel of Fig. <ref> shows the evolution of the afterglow flux-centroid location, and the afterglow image size and shape for α=1 and for the β_app best-fit α=0.661. Our image size is consistent with the upper limits from radio VLBI observations
<cit.>. The bottom-panel of Fig. <ref> shows the flux centroid's location, x̃_fc(t_obs), 
as well as its instantaneous (β_app=|dx̃_fc/d(ct_obs)|) and mean 
(β_app_0=|x̃_fc|/ct_obs) apparent velocities, for our fiducial model (α=1), 
and over the 1σ confidence interval of α derived in Fig. <ref>. We find that β_app(t_obs,pk)≈β_app.




The measured β_app favors a slightly larger θ_0 compared to our θ_0=0.1.
The lightcurve peak occurs when 1/Δθ≈Γ(t_obs,pk)≈β_app(t_obs,pk)≈β_app, 
implying θ_0≈[β_app(θ_obs/θ_0-1)]^-1≈0.116^+0.016_-0.013 
using the measured ⟨β_app⟩=4.1±0.5 and our inferred θ_obs/θ_0=3.1±0.1. 
The latter implies Γ(t_obs,pk)∝θ_0^-1, which in turn 
for the measured t_obs,pk(θ_0)≈150 days, and either pre- or post-jet break simple 
analytic dynamics, implies E/n∝θ_0^-6. This agrees with the best-fit values for our 
θ_0=0.1, 0.2 to within 34%, (0.2/0.1)^6(10^50.32/10^-2)/(10^50.4/10^-3.6)≈1.337.
Even for θ_0=0.2, a derivation of E_min following the one done above for θ_0=0.1 gives 
a result very similar to Eq. (<ref>), implying that it is quite robust.


Altogether, β_app provides an additional observational constraint that allows us to 
constrain an additional model parameter, θ_0, which still leaves us with a 3D allowed parameter space.





§ DISCUSSION AND CONCLUSIONS



 This work demonstrates using afterglow lightcurves and image size, shape and flux centroid motion, 
 all derived from 2D hydrodynamical numerical simulations, that an initially top-hat jet can fit the afterglow 
 observations of GW170817/GW170817A for θ_0≈0.1 and θ_obs/θ_0≈3 
 at t_ obs≳ t_ obs,pk. 
 We show that simulations of initially top-hat jets with a modest Γ_0∼20-25 can only be used to fit 
 the late-time observations near the lightcurve's peak at t_obs,pk≈150days. Fitting earlier 
 observations at t_obs≲60days requires Γ_0≳25. 

We analytically express the allowed parameter space (Eqs. [<ref>]) showing the full degeneracies 
between the model parameters, and find a robust lower limit on the jet's true energy, 
E_min≈5.3×10^48erg (Eq. [<ref>]), and the CBM density, 
n_min≈5.3×10^-6  cm^-3 (Eq. [<ref>]).
 
Our numerical simulations are initialized using a conical wedge from the BM76 self-similar  solution; 
 a similar setup is used in the BOXFITv2 code. The simulation is initialized at a finite lab-frame time 
 t_0=t(Γ_0) corresponding to the modest Γ_0=Γ(t_0). Therefore, no flux contributions 
 are obtained from the simulated region at t<t_0⇔ t_obs<t_obs,0. 


Artificially supplementing the lightcurve at those times with flux arising from the initial 
condition (a top-hat jet) over a wide time-range produces an early sharply-rising flux for an off-axis 
(θ_obs>θ_0) observer.



However, within a dynamical time (t_0<t≲2t_0⇔t_obs,0<t_obs≲2t_obs,0), as 
the outflow relaxes from the initial conditions it develops a bow-shock like angular structure that resembles a structured jet 
 having an energetic relativistic core surrounded by mildly (and sub-) relativistic low-energy material. Outside the 
 highly-relativistic core, whose emission is strongly beamed, the slower material makes the dominant contribution to the flux 
 for off-axis observers due to its much wider beaming cone.


As the jet's core decelerates, its beaming cone widens and the observer sees a gradual rise in flux until the entire core becomes 
visible, at which point the flux peaks and starts to decline thereafter, gradually joining the on-axis lightcurve.
 
We demonstrate here that by using increasingly larger Γ_0=20, 40, 60 the initial observed time 
can be shifted to correspondingly earlier times, t_obs,0=38.1, 23.0, 18.3days, thereby replacing the sharp  rise in 
flux with a much more gradual rise. 


In GRB170817A, the shallow flux rise seen from t_obs,0≃10days can potentially be 
reproduced for Γ_0≳10^2.5, which are physically plausible but computationally challenging, 
although the exact shape of the early rising lightcurve in this case is still unclear.

Nevertheless, the initially top-hat jet model has some limitations. For example, the early time afterglow lightcurve 
shows a power-law rise (F_ν∝ t_ obs^0.8) to the peak, whereas the model lightcurve has some 
curvature. In this work we did not carry out a detailed model fit to the data to determine the goodness of fit since 
our simulations were limited to Γ_0 = 60 and could not fit observations at t_ obs≲40days. 
Numerical simulations of structured jets that show a greater degree of complexity, and therefore are more realistic, 
also have larger number of model parameters, which allows them to capture the subtleties of the observed afterglow data 
more effectively.

Numerical simulations of a relativistic jet penetrating through the dynamical ejecta/neutrino-driven wind of 
BNS merger <cit.> find that the emergent jet develops a core-dominated 
angular structure similar to what we find. Moreover, our afterglow 
model fit parameters are consistent with works featuring initially structured core-dominated jets. This renders 
both scenarios practically indistinguishable from afterglow observations alone, particularly close to and after 
the peak time of the lightcurve <cit.> when emission from the core starts dominating 
the observed flux, thereby validating the use of initially top-hat jet simulations as an attractive tool for afterglow 
modeling of core-dominated jets.


Both the jet's dynamics and initial angular structure outside its core, before it is decelerated by the external medium, 
affects the afterglow emission before the lightcurve peak time. From the afterglow observations alone, it might be difficult 
to disentangle their effects, however, they may be better probed by the prompt emission.

For example, in the case of GRB170817A, its highly sub-luminous and mildly soft 
prompt γ-ray emission rules out an initial top-hat jet <cit.>, favoring instead emission from sub-energetic mildly-relativistic material near our line of sight.



















 
 








R.G. and J. G. are supported by the Israeli Science Foundation under grant No. 719/14.
FDC aknowledges support from the UNAM-PAPIIT grant IN117917.
We acknowledge the support from the Miztli-UNAM supercomputer (project LANCAD-UNAM-DGTIC-281) 
in which the simulations were performed.






natexlab#1#1

[Abbott et al.(2017a)Abbott, Abbott, Abbott,
  Acernese, Ackley, Adams, Adams, Addesso, Adhikari, Adya, &
  et al.]Abbott+17-GW170817-Ligo-Detection
Abbott, B. P., Abbott, R., Abbott, T. D., et al. 2017a,
  Physical Review Letters, 119, 161101

[Abbott et al.(2017b)Abbott, Abbott, Abbott,
  Acernese, Ackley, Adams, Adams, Addesso, Adhikari, Adya, &
  et al.]Abbott+17-GW170817-GRB170817A
—. 2017b, , 848, L13

[Abbott et al.(2017c)Abbott, Abbott, Abbott,
  Acernese, Ackley, Adams, Adams, Addesso, Adhikari, Adya, &
  et al.]Abbott+17-GW170817A-MMO
—. 2017c, , 848, L12

[Bietenholz et al.(2014)Bietenholz, De Colle, Granot,
  Bartel, & Soderberg]Bietenholz+14
Bietenholz, M. F., De Colle, F., Granot, J., Bartel, N., &
  Soderberg, A. M. 2014, , 440, 821

[Blandford & McKee(1976)]Blandford-McKee-76
Blandford, R. D., & McKee, C. F. 1976, Physics of Fluids, 19, 1130

[Bromberg et al.(2018)Bromberg, Tchekhovskoy, Gottlieb,
  Nakar, & Piran]Bromberg+18
Bromberg, O., Tchekhovskoy, A., Gottlieb, O., Nakar, E., & Piran, T.
  2018, , 475, 2971

[Coulter et al.(2017)Coulter, Foley, Kilpatrick, Drout,
  Piro, Shappee, Siebert, Simon, Ulloa, Kasen, Madore,
  Murguia-Berthier, Pan, Prochaska, Ramirez-Ruiz, Rest, &
  Rojas-Bravo]Coulter+17
Coulter, D. A., Foley, R. J., Kilpatrick, C. D., et al. 2017, Science,
  358, 1556

[D'Avanzo et al.(2018)D'Avanzo, Campana, Salafia,
  Ghirlanda, Ghisellini, Melandri, Bernardini, Branchesi,
  Chassande-Mottin, Covino, D'Elia, Nava, Salvaterra, Tagliaferri,
  & Vergani]DAvanzo+18
D'Avanzo, P., Campana, S., Salafia, O. S., et al. 2018, , 613, L1

[De Colle et al.(2012a)De Colle, Granot,
  López-Cámara, & Ramirez-Ruiz]DeColle+12a
De Colle, F., Granot, J., López-Cámara, D., & Ramirez-Ruiz, E.
  2012a, , 746, 122

[De Colle et al.(2012b)De Colle, Ramirez-Ruiz,
  Granot, & Lopez-Camara]DeColle+12b
De Colle, F., Ramirez-Ruiz, E., Granot, J., & Lopez-Camara, D.
  2012b, , 751, 57

[Dobie et al.(2018)Dobie, Kaplan, Murphy, Lenc, Mooley,
  Lynch, Corsi, Frail, Kasliwal, & Hallinan]Dobie+18
Dobie, D., Kaplan, D. L., Murphy, T., et al. 2018, , 858, L15

[Eichler & Granot(2006)]Eichler-Granot-06
Eichler, D., & Granot, J. 2006, , 641, L5

[Geng et al.(2019)Geng, Zhang, Kölligan, Kuiper, &
  Huang]Geng+19
Geng, J.-J., Zhang, B., Kölligan, A., Kuiper, R., & Huang, Y.-F.
  2019, arXiv e-prints, arXiv:1904.02326

[Ghirlanda et al.(2019)Ghirlanda, Salafia, Paragi, Giroletti, Yang,
  Marcote, Blanchard, Agudo, An, Bernardini, Beswick, Branchesi, Campana,
  Casadio, Chassande-Mottin, Colpi, Covino, D’Avanzo,
  D’Elia, Frey, Gawronski, Ghisellini, Gurvits, Jonker, van
  Langevelde, Melandri, Moldon, Nava, Perego, Perez-Torres, Reynolds,
  Salvaterra, Tagliaferri, Venturi, Vergani, & Zhang]Ghirlanda+18
Ghirlanda, G., Salafia, O. S., Paragi, Z., et al. 2019, Science,
  doi:10.1126/science.aau8815

[Gill & Granot(2018)]Gill-Granot-18b
Gill, R., & Granot, J. 2018, , 478, 4128

[Gottlieb et al.(2018)Gottlieb, Nakar, &
  Piran]Gottlieb+18
Gottlieb, O., Nakar, E., & Piran, T. 2018, , 473, 576

[Gottlieb et al.(2019)Gottlieb, Nakar, &
  Piran]Gottlieb+19
—. 2019, arXiv e-prints, arXiv:1903.08173

[Granot(2005)]Granot-05
Granot, J. 2005, , 631, 1022

[Granot(2007)]Granot-07
Granot, J. 2007, in Revista Mexicana de Astronomia y Astrofisica Conference
  Series, Vol. 27, Revista Mexicana de Astronomia y Astrofisica, vol. 27,
  140–165

[Granot(2012)]Granot-12
—. 2012, , 421, 2610

[Granot et al.(2018a)Granot, De Colle, &
  Ramirez-Ruiz]Granot+18b
Granot, J., De Colle, F., & Ramirez-Ruiz, E. 2018a, ,
  481, 2711

[Granot et al.(2018b)Granot, Gill, Guetta, &
  De Colle]Granot+18a
Granot, J., Gill, R., Guetta, D., & De Colle, F. 2018b,
  , 481, 1597

[Granot et al.(2017)Granot, Guetta, & Gill]Granot+17
Granot, J., Guetta, D., & Gill, R. 2017, , 850, L24

[Granot et al.(2001)Granot, Miller, Piran, Suen, &
  Hughes]Granot+01
Granot, J., Miller, M., Piran, T., Suen, W. M., & Hughes, P. A.
  2001, in Gamma-ray Bursts in the Afterglow Era, ed. E. Costa,
  F. Frontera, & J. Hjorth, 312

[Granot et al.(2002)Granot, Panaitescu, Kumar, &
  Woosley]Granot+02
Granot, J., Panaitescu, A., Kumar, P., & Woosley, S. E. 2002, ,
  570, L61

[Granot et al.(1999)Granot, Piran, & Sari]Granot+99
Granot, J., Piran, T., & Sari, R. 1999, , 513, 679

[Granot & Ramirez-Ruiz(2012)]Granot-Ramirez-Ruiz-12
Granot, J., & Ramirez-Ruiz, E. 2012, Jets and gamma-ray burst unification
  schemes

[Granot & Sari(2002)]Granot-Sari-02
Granot, J., & Sari, R. 2002, , 568, 820

[Haggard et al.(2018)Haggard, Nynka, & Ruan]Haggard+2018
Haggard, D., Nynka, M., & Ruan, J. J. 2018, GRB Coordinates Network,
  23137, 1

[Hajela et al.(2019)Hajela, Margutti, Fong, Alexander,
  Berger, Blanchard, Chornock, Coppejans, Gomez, &
  Hosseinzadeh]Hajela+2019
Hajela, A., Margutti, R., Fong, W., et al. 2019, GRB Coordinates
  Network, 24000, 1

[Hallinan et al.(2017)Hallinan, Corsi, Mooley, Hotokezaka,
  Nakar, Kasliwal, Kaplan, Frail, Myers, Murphy, De, Dobie,
  Allison, Bannister, Bhalerao, Chandra, Clarke, Giacintucci, Ho,
  Horesh, Kassim, Kulkarni, Lenc, Lockman, Lynch, Nichols,
  Nissanke, Palliyaguru, Peters, Piran, Rana, Sadler, &
  Singer]Hallinan+17
Hallinan, G., Corsi, A., Mooley, K. P., et al. 2017, Science, 358, 1579

[Lamb & Kobayashi(2018)]Lamb-Kobayashi-18
Lamb, G. P., & Kobayashi, S. 2018, , 478, 733

[Lazzati et al.(2018)Lazzati, Perna, Morsony,
  Lopez-Camara, Cantiello, Ciolfi, Giacomazzo, &
  Workman]Lazzati+18
Lazzati, D., Perna, R., Morsony, B. J., et al. 2018, Physical Review
  Letters, 120, 241103

[Lithwick & Sari(2001)]Lithwick-Sari-01
Lithwick, Y., & Sari, R. 2001, , 555, 540

[Margutti et al.(2018)Margutti, Alexander, Xie, Sironi,
  Metzger, Kathirgamaraju, Fong, Blanchard, Berger, MacFadyen,
  Giannios, Guidorzi, Hajela, Chornock, Cowperthwaite, Eftekhari,
  Nicholl, Villar, Williams, & Zrake]Margutti+18
Margutti, R., Alexander, K. D., Xie, X., et al. 2018, , 856, L18

[Mooley et al.(2018a)Mooley, Nakar, Hotokezaka,
  Hallinan, Corsi, Frail, Horesh, Murphy, Lenc, Kaplan, de,
  Dobie, Chandra, Deller, Gottlieb, Kasliwal, Kulkarni, Myers,
  Nissanke, Piran, Lynch, Bhalerao, Bourke, Bannister, &
  Singer]Mooley+18a
Mooley, K. P., Nakar, E., Hotokezaka, K., et al. 2018a,
  , 554, 207

[Mooley et al.(2018b)Mooley, Deller, Gottlieb,
  Nakar, Hallinan, Bourke, Frail, Horesh, Corsi, &
  Hotokezaka]Mooley+18b
Mooley, K. P., Deller, A. T., Gottlieb, O., et al. 2018b,
  , 561, 355

[Nakar & Piran(2018)]Nakar-Piran-18
Nakar, E., & Piran, T. 2018, , 478, 407

[Resmi et al.(2018)Resmi, Schulze, Ishwara-Chandra, Misra,
  Buchner, De Pasquale, Sánchez-Ramírez, Klose, Kim,
  Tanvir, & O'Brien]Resmi+18
Resmi, L., Schulze, S., Ishwara-Chandra, C. H., et al. 2018, , 867,
  57

[Salmonson(2003)]Salmonson-03
Salmonson, J. D. 2003, , 592, 1002

[Sari et al.(1998)Sari, Piran, & Narayan]Sari+98
Sari, R., Piran, T., & Narayan, R. 1998, , 497, L17

[Troja et al.(2017)Troja, Piro, van Eerten, Wollaeger,
  Im, Fox, Butler, Cenko, Sakamoto, Fryer, Ricci, Lien, Ryan,
  Korobkin, Lee, Burgess, Lee, Watson, Choi, Covino, D'Avanzo,
  Fontes, González, Khandrika, Kim, Kim, Lee, Lee, Kutyrev,
  Lim, Sánchez-Ramírez, Veilleux, Wieringa, &
  Yoon]Troja+17
Troja, E., Piro, L., van Eerten, H., et al. 2017, , 551, 71

[Troja et al.(2018)Troja, Piro, Ryan, van Eerten, Ricci,
  Wieringa, Lotti, Sakamoto, & Cenko]Troja+18
Troja, E., Piro, L., Ryan, G., et al. 2018, , 478, L18

[van Eerten et al.(2018)van Eerten, Ryan, Ricci, Burgess,
  Wieringa, Piro, Cenko, & Sakamoto]vanEerten+18
van Eerten, E. T. H., Ryan, G., Ricci, R., et al. 2018, arXiv e-prints,
  arXiv:1808.06617

[van Eerten & MacFadyen(2013)]vanEerten-MacFadyen-13
van Eerten, H., & MacFadyen, A. 2013, , 767, 141

[van Eerten et al.(2012)van Eerten, van der Horst, &
  MacFadyen]vanEerten+12
van Eerten, H., van der Horst, A., & MacFadyen, A. 2012, , 749, 44

[van Eerten & MacFadyen(2011)]vanEerten-MacFadyen-11
van Eerten, H. J., & MacFadyen, A. I. 2011, , 733, L37

[van Eerten & MacFadyen(2012)]vanEerten-MacFadyen-12
—. 2012, , 747, L30

[Xie et al.(2018)Xie, Zrake, & MacFadyen]Xie+18
Xie, X., Zrake, J., & MacFadyen, A. 2018, , 863, 58


















