AMRVAC and Relativistic Hydrodynamic simulations for GRB ...fcasse/AMRVACSUB.pdf · AMRVAC and...

12
Mon. Not. R. Astron. Soc. 000, ???? (2007) Printed 15 January 2007 (MN L A T E X style file v2.2) AMRVAC and Relativistic Hydrodynamic simulations for GRB afterglow phases Zakaria Meliani 1,2 , Rony Keppens 1,3,4 , Fabien Casse 5 and Dimitrios Giannios 2 1 FOM-Institute for Plasma Physics Rijnhuizen P.O. Box 1207 3430 BE Nieuwegein, Netherlands 2 Max Planck Institute for Astrophysics, Box 1317, D-85741 Garching Germany 3 Centre for Plasma Astrophysics, K.U.Leuven, Belgium 4 Sterrenkundig Instituut, Utrecht, Netherlands 5 AstroParticule & Cosmologie (APC) UMR 7164 CNRS - Universit´ e Paris 7, 10 rue Alice Domon et L´ eonie Duquet 75025 Paris Cedex 13, France Accepted 2007 January 12. Received 2007 January 08; in original form 2006 November 28 ABSTRACT We apply a novel adaptive mesh refinement code, AMRVAC, to numerically investigate the various evolutionary phases in the interaction of a relativistic shell with its surrounding cold Interstellar Medium (ISM). We do this for both 1D isotropic as well as full 2D jetlike fire- ball models. This is relevant for Gamma Ray Bursts, and we demonstrate that, thanks to the AMR strategy, we resolve the internal structure of the shocked shell-ISM matter, which will leave its imprint on the GRB afterglow. We determine the deceleration from an initial Lorentz factor γ = 100 up to the almost Newtonian γ ∼O(2) phase of the flow. We present axisym- metric 2D shell evolutions, with the 2D extent characterized by their initial opening angle. In such jetlike GRB models, we discuss the dierences with the 1D isotropic GRB equivalents. These are mainly due to thermally induced sideways expansions of both the shocked shell and shocked ISM regions. We found that the propagating 2D ultrarelativistic shell does not accrete all the surrounding medium located within its initial opening angle. Part of this ISM matter gets pushed away laterally and forms a wide bow-shock configuration with swirling flow patterns trailing the thin shell. The resulting shell deceleration is quite dierent from that found in isotropic GRB models. As long as the lateral shell expansion is merely due to ballistic spreading of the shell, isotropic and 2D models agree perfectly. As thermally induced expansions eventually lead to significantly higher lateral speeds, the 2D shell interacts with comparably more ISM matter and decelerates earlier than its isotropic counterpart. Key words: Gamma Rays: Afterglow, Hydrodynamics, Theory – ISM: jets and outflows – Galaxies: jets, ISM – methods: numerical, relativity, AMR 1 INTRODUCTION Many high energy astrophysical phenomena involve relativistic flows and shocks. For example, relativistic flows are invoked to explain the observed properties of various compact astrophysical objects (Arons 2004; Ferrari 1998; Corbel 2004). Astrophysical relativistic flows can reach a Lorentz factor of 2 - 10 in associ- ation with jets from Seyfert and radio loud galaxies (Piner et al. 2003), or even go up to Lorentz factors 10 2 - 10 3 for Gamma Ray Burst (GRB) scenarios (Sari & Piran 1999; Soderberg & Ramirez- Ruiz 2001; M´ esz´ aros 2006). In the last decade, continued develop- ment of numerical algorithms and the increase in computer power have allowed to significantly progress in high-resolution, hydro- dynamic numerical simulations in both special and general rela- E-mail: [email protected] tivity (see Marti & M˜ uller 2003). The enormous time and length scale ranges associated with violent astrophysical phenomena in relativistic hydrodynamics (RHD), make Adaptive Mesh Refine- ment (AMR) an important algorithmic ingredient for computation- ally aordable simulations. RHD numerical simulations, particu- larly when combined with AMR capabilities, can investigate many details of relativistic flow regimes relevant for astrophysics. In this paper, we concentrate on relativistic dynamics in the fireball model for the afterglow phases of GRBs, in one and two dimensional simulations. Since the follow-up detection of GRBs in X-ray (Costa et al. 1997) and their afterglows at longer wave- lengths (Sahu et al. 1997; Van Paradijs et al. 1997; Galama et al. 1997; Frail et al. 1997; Piro et al. 1998), the cosmological origin of GRBs has been established (Metzger 1997; Wijers 1997). These detections confirmed the predictions from the fireball theoretical model (Rhoads 1993; Katz 1994; M´ esz´ aros & Rees 1997; Vietri c 2007 RAS

Transcript of AMRVAC and Relativistic Hydrodynamic simulations for GRB ...fcasse/AMRVACSUB.pdf · AMRVAC and...

  • Mon. Not. R. Astron. Soc. 000, ???? (2007) Printed 15 January 2007 (MN LATEX style file v2.2)

    AMRVAC and Relativistic Hydrodynamic simulations for GRBafterglow phases

    Zakaria Meliani1,2?, Rony Keppens1,3,4, Fabien Casse5 and Dimitrios Giannios21 FOM-Institute for Plasma Physics Rijnhuizen P.O. Box 1207 3430 BE Nieuwegein, Netherlands2 Max Planck Institute for Astrophysics, Box 1317, D-85741 Garching Germany3 Centre for Plasma Astrophysics, K.U.Leuven, Belgium4 Sterrenkundig Instituut, Utrecht, Netherlands5 AstroParticule & Cosmologie (APC)UMR 7164 CNRS - Universite Paris 7, 10 rue Alice Domon et Leonie Duquet 75025 Paris Cedex 13, France

    Accepted 2007 January 12. Received 2007 January 08; in original form 2006 November 28

    ABSTRACTWe apply a novel adaptive mesh refinement code, AMRVAC, to numerically investigate thevarious evolutionary phases in the interaction of a relativistic shell with its surrounding coldInterstellar Medium (ISM). We do this for both 1D isotropic as well as full 2D jetlike fire-ball models. This is relevant for Gamma Ray Bursts, and we demonstrate that, thanks to theAMR strategy, we resolve the internal structure of the shocked shell-ISM matter, which willleave its imprint on the GRB afterglow. We determine the deceleration from an initial Lorentzfactor = 100 up to the almost Newtonian O(2) phase of the flow. We present axisym-metric 2D shell evolutions, with the 2D extent characterized by their initial opening angle. Insuch jetlike GRB models, we discuss the differences with the 1D isotropic GRB equivalents.These are mainly due to thermally induced sideways expansions of both the shocked shelland shocked ISM regions. We found that the propagating 2D ultrarelativistic shell does notaccrete all the surrounding medium located within its initial opening angle. Part of this ISMmatter gets pushed away laterally and forms a wide bow-shock configuration with swirlingflow patterns trailing the thin shell. The resulting shell deceleration is quite different fromthat found in isotropic GRB models. As long as the lateral shell expansion is merely due toballistic spreading of the shell, isotropic and 2D models agree perfectly. As thermally inducedexpansions eventually lead to significantly higher lateral speeds, the 2D shell interacts withcomparably more ISM matter and decelerates earlier than its isotropic counterpart.

    Key words: Gamma Rays: Afterglow, Hydrodynamics, Theory ISM: jets and outflows Galaxies: jets, ISM methods: numerical, relativity, AMR

    1 INTRODUCTION

    Many high energy astrophysical phenomena involve relativisticflows and shocks. For example, relativistic flows are invoked toexplain the observed properties of various compact astrophysicalobjects (Arons 2004; Ferrari 1998; Corbel 2004). Astrophysicalrelativistic flows can reach a Lorentz factor of 2 10 in associ-ation with jets from Seyfert and radio loud galaxies (Piner et al.2003), or even go up to Lorentz factors 102 103 for Gamma RayBurst (GRB) scenarios (Sari & Piran 1999; Soderberg & Ramirez-Ruiz 2001; Meszaros 2006). In the last decade, continued develop-ment of numerical algorithms and the increase in computer powerhave allowed to significantly progress in high-resolution, hydro-dynamic numerical simulations in both special and general rela-

    ? E-mail: [email protected]

    tivity (see Marti & Muller 2003). The enormous time and lengthscale ranges associated with violent astrophysical phenomena inrelativistic hydrodynamics (RHD), make Adaptive Mesh Refine-ment (AMR) an important algorithmic ingredient for computation-ally affordable simulations. RHD numerical simulations, particu-larly when combined with AMR capabilities, can investigate manydetails of relativistic flow regimes relevant for astrophysics.

    In this paper, we concentrate on relativistic dynamics in thefireball model for the afterglow phases of GRBs, in one and twodimensional simulations. Since the follow-up detection of GRBsin X-ray (Costa et al. 1997) and their afterglows at longer wave-lengths (Sahu et al. 1997; Van Paradijs et al. 1997; Galama et al.1997; Frail et al. 1997; Piro et al. 1998), the cosmological originof GRBs has been established (Metzger 1997; Wijers 1997). Thesedetections confirmed the predictions from the fireball theoreticalmodel (Rhoads 1993; Katz 1994; Meszaros & Rees 1997; Vietri

    c 2007 RAS

  • 2 Z. Meliani, R. Keppens, F. Casse and D. Giannios

    1997). In this model, a compact source releases a large amount ofenergy in a very short timescale, producing a fireball expandingwith relativistic velocity. Its internal energy gets fully converted tokinetic energy, leading to a shell expanding with very high Lorentzfactor. This cold shell continues to expand and interact with the cir-cumburst medium, producing a relativistic shock-dominated evolu-tion. As the shell sweeps up the matter, it begins to decelerate. Here,we investigate the details of such propagating relativistic shellswith the relativistic hydrodynamics code AMRVAC (Bergmans etal. 2004). The AMRVAC code (Keppens et al. 2003) is here forthe first time applied to the numerically challenging regime of highLorentz factor, and we therefore include a variety of test problems,demonstrating the robustness as well as the limitations of our com-putational strategy.

    Up till recently, analysis of GRB flows have largely been doneanalytically (Shemi & Piran 1990; Sari & Piran 1995; Meszaros &Rees 1997; Chiang & Dermer 1999), combined with numerical ap-proaches usually employing a Lagrangian code. These latter worksmainly investigate spherically symmetric GRB scenarios for obvi-ous computational convenience (Panaitescu et al. 1997; Kobayashiet al. 1999; Kobayashi & Sari 2000). Recently, some analyticalworks started to investigate the multidimensional jet structure inGRBs (Rhoads 1997, 1999; Panaitescu & Meszaros 1999; Sari etal. 1999; Kumar & Panaitescu 2000; Panaitescu & Kumar 2003;Cheng et al. 2001; Oren et al. 2004; Kumar & Granot 2003), andsome numerical simulations emerged as well, but restricted to rel-atively low (order 25) Lorentz factor (Granot et al 2001; Cannizzoet al. 2004). Therefore, an important area of current investigationsin GRB context is to model the dynamics of narrow jets of rela-tivistically flowing ejecta. This is motivated by the need to reducethe total amount of energy released in GRBs, by assuming thesejets to point towards the observer, as compared to fully isotropicequivalents. This need is particularly clear for the exemplary casesof GRB 990123 (Kulkarni et al. 1999), GRB 050820A (Cenko etal. 2006), and GRB 050904 (Frail et al. 2006).

    The detection of polarization (Covino et al. 1999; Wijers etal. 1999; Greiner et al. 2003; Lazzati et al. 2004) gave furthersupport to the jetlike model. Evidence for narrow collimated out-flows in GRBs is sustained also by the achromatic breaks in theafterglow light curves which was predicted analytically (Rhoads(1997, 1999); Sari et al. (1999)) and then observed in a large num-ber of GRBs (Stanek et al. 1999; Sari et al. 1999; Berger et al.2000; Panaitescu 2005; 2006; Barthelmy et al. 2005). In Bloomet al. (2003), various GRBs were analysed and in 16 of them,the combination of these breaks in the spectrum and the jet-likemodel was used to deduce their effective energy, which was aboutE 1051ergs. The half opening angle of such jets in GRBs is in-ferred to be of order few degrees. As a result, the afterglow produc-ing shocked region is collimated too, with a similar initial open-ing angle (Frail et al 2001; Berger et al. 2003; Cenko et al. 2006;Panaitescu 2005; Dar & De Rujula 2004). In our 2D simulations,we will concentrate on the afterglow phases in the GRB evolutionstarting from collimated ejecta, and discuss those dynamical effectscausing opening angle changes in detail. Direct comparison withthe evolution of an equivalent 1D spherical shell is enlightening inthis respect.

    This paper is organised as follows. We start by reviewing therelativistic hydrodynamic equations. In Section 3, we include sev-eral tests to demonstrate the AMRVAC code potential for realisticRHD computations. In Section 4, we present our main astrophysi-cal application to GRB flows in 1D and 2D models.

    p/20

    /10

    v/c

    Figure 1. One-dimensional relativistic shock problem in planar geometryat t = 0.36. The solid lines are the analytical solution.

    2 RELATIVISTIC HYDRODYNAMIC EQUATIONS

    The special relativistic hydrodynamic evolution of a perfect fluidis governed by the conservation of the number of particles, andenergy-momentum conservation. These two conservation laws canbe written as

    ( u) = 0 , (T) = 0 . (1)

    where , ~u =(

    , ~v)

    , and T = h u u + p g define, respec-tively, the proper density, the four-velocity and the stress-energytensor of the perfect fluid. Their definition involves the Lorentzfactor , the fluid pressure p, and the relativistic specific enthalpyh = 1 + e + p/ where e is the specific internal energy. For the(inverse) metric g, we take the Minkowski metric. Units are takenwhere the light speed equals unity.

    These equations can be written in conservative form involv-ing the Cartesian coordinate axes and the time axis of a fixed labLorentzian reference frame as

    Ut+

    3

    j=1

    F j

    x j= 0 . (2)

    The conserved variables can be taken as

    U =[

    D = , ~S = 2 h~v, = 2 h p ]T, (3)

    and the fluxes are then given by

    F =[

    ~v, 2 h~v~v + p I, 2 h~v ~v]T, (4)

    where I is the 3 3 identity matrix. To close this system of equa-tions, we use the equation of state (EOS) for an ideal gas, which isthe polytropic equation with the polytropic index ,

    p = ( 1) e . (5)

    At each time step in the numerical integration, the primitivevariables (,~v, p) involved in flux expressions should be derivedfrom the conservative variables U resulting in a system of nonlinearequations. One can bring this system into a single equation for thepressure p,

    + D (p) D p + p((p)2 1)

    1 = 0 , (6)

    which, once solved for p yields ~v = ~S+p+D . This nonlinear equa-

    tion (6) is solved using a Newton-Raphson algorithm.

    c 2007 RAS, MNRAS 000, ????

  • AMRVAC and Relativistic Hydrodynamic simulations for GRB afterglow phases 3

    Table 1. L1 errors of the density for the 1D Riemann problem 1 with uni-form grid shown at t = 0.36

    Number of grid points L1

    200 1.15 101400 6.4 102800 3.2 102

    1600 1.9 1023200 1.06 102

    3 TESTING AMRVAC

    In view of the challenges in the numerical investigation of rela-tivistic fluids, we include here several substantial test results forcode validation. We performed a large series of tests, some of themshown in this section. An important subclass of test cases is formedby Riemann problems, whose numerical solution can be comparedto analytical solutions. Other, 2D tests shown here have no knownanalytical solution. Therefore, we compare the results of our sim-ulations with similar results previously obtained by other codes asdocumented in the astrophysical literature.

    3.1 One-dimensional test problems

    3.1.1 Riemann problems

    In 1D Riemann problems, we follow the evolution of an initial dis-continuity between two constant thermodynamical states. In 1DRHD, we then typically find the appearance of up to three non-linear waves. Generally, one finds a shock wave propagating intothe lower density/pressure medium, a rarefaction wave propagat-ing at sound speed into the denser medium, and between these twostates, there can be a contact discontinuity. In the tests that follow,calculations are done in Cartesian geometry on a spatial domain0 6 x 6 1. The exact solutions for Riemann problems in relativistichydrodynamics are discussed for vanishing tangential speed (i.e. yor/and z components for velocities) in Marti & Muller (1994) andfor arbitrary tangential flow velocity in Pons et al. (2000).

    In a first, mild test, we assume an ideal gas with polytropicindex 5/3 and initial constant states characterized by pL = 13.3,L = 10.0 (left) and pR = 0.66 106, R = 1.0 (right), separatedat the location x = 0.5. The results at t = 0.36 are shown in Fig. 1with a resolution of 100 cells on the base level and 4 levels, wherewe also overplot the exact solution. In the table 1, we present theL1 =

    (

    x j)

    | j(x j)| norm errors of the density , where (x j) isthe exact solution. The accuracy of our result is comparable to thatof Lucas-Serrano et al. (2004); Zhang & MacFadyen (2006).

    In a second test, we look particularly into effects due to non-vanishing tangential velocities, for two ideal gases with polytropicindex = 5/3. We separate two different constant states pL = 103,L = 1.0 (left) and pR = 102, R = 1.0 (right). For the trans-verse velocity we form nine combinations of the pair vy,L andvy,R. As in Pons et al. (2000); Mignone et al. (2005), we takevy,L = (0.0, 0.9, 0.99)c in combination with vy,R = (0.0, 0.9, 0.99)c.The spatial separation between the two states is initially at x = 0.5.The results at t = 0.4 are shown in Fig. 2, where we also overplotthe exact solution using the code in Marti & Muller (2003).

    The relativistic effects in these tests are mainly thermodynam-ical in the first mild test, and are due to coupling between the ther-modynamics (through specific enthalpy) and kinetic properties (bythe initial tangential velocities). For small tangential velocity cases,

    we use only a resolution of 200 cells on the base level and 4 levels.However, for a high tangential velocity case, we use high base res-olution 400 with 10 levels to resolve the contact discontinuity andthe tail of the rarefaction wave. In fact, for a high tangential veloc-ity at left (in the high pressure state), the effective inertia of the leftstate increases. This makes the occurring shock move slower anddecreases the distance between the tail of the rarefaction wave andthe contact discontinuity. As also found in Zhang & MacFadyen(2006), it remains a numerical challenge to capture the contact dis-continuity properly, which we only managed here by allowing avery high effective resolution.

    3.1.2 Shock Heating Test

    In another 1D test case, a cold fluid hits a wall and a shock frontpropagates back into the fluid, compressing and heating it as thekinetic energy is converted into internal energy. Behind the shock,the fluid becomes at rest. This test has an analytical solution inplanar symmetry as considered by Blandford & McKee (1976), andthe jump conditions are

    p2 = 1 (1 1) (1 + 1) ,

    2 = 11 + 1 1 ,

    vsh = ( 1)1v11 + 1

    . (7)

    These give the post shock pressure p2 and density 2 values in termsof the incoming density and Lorentz factor, together with the shockpropagation velocity vsh.

    In our test we take the same initial conditions as in the recentpaper by Zhang & MacFadyen (2006), where a cold fluid p = 104

    with a density = 1.0 has an impact velocity of v1 =(

    1.0 1010)

    .This corresponds to a Lorentz factor = 70710.675. The tem-perature after the shock becomes relativistic, and therefore wetake the polytropic index = 4/3. Hence the shock velocity isvsh = 0.33332862. The AMR simulation is done with 20 cells onthe base level and 4 levels on the spatial range 0 < x < 1. Theresult at t = 2, with the reflective wall at x = 1, is shown in Fig. 3.The exact solution is overplotted as well. In this test, because ofthe constant state behind the shock, the maximum impact Lorentzfactor that can be achieved numerically is limited only by the pre-cision of the Newton-Raphson subroutine. This test is important todemonstrate its accurate treatment, in view of the intended simula-tions aimed at afterglows in GRBs. Indeed, in the shell-frame, thecircumburst medium hits the dense shell with a high Lorentz factor.In a process similar to what is found in the above test, the kineticenergy of the impacting medium is converted to thermal energy ofthe external medium. Viewed in the lab frame, the swept up circum-burst medium will have similarly high Lorentz factor and will forma hot shocked layer ahead of the contact interface. Note also thatFig. 3 indicates that our discretization and wall treatment does notsuffer from the visible density errors seen in Zhang & MacFadyen(2006).

    3.2 Two-dimensional tests

    3.2.1 A relativistic 2D Riemann problem

    A two dimensional square region is divided into four equal areaswith a constant state each. We fix the polytropic index = 5/3 andassume free outflow boundary conditions. The relativistic versionof this test was proposed by Del Zanna & Bucciantini (2002) and

    c 2007 RAS, MNRAS 000, ????

  • 4 Z. Meliani, R. Keppens, F. Casse and D. Giannios

    p/1000

    /25

    v/c v/c

    /25

    p/1000/25

    v/c

    p/1000

    v/c

    /25

    p/1000

    v/c

    /25

    p/1000

    /25v/c

    P/1000

    /25v/c

    p/1000

    /25v/c

    p/1000

    /25v/c

    P/1000

    Figure 2. One-dimensional relativistic shock problems in planar geometry with tangential velocities vy. The results presented correspond to t = 0.4. The solidlines are the analytical solution (Pons et al. 2000); from left to right vy,R = (0, 0.9, 0.99)c, and from top to bottom vy,L = (0, 0.9, 0.99)c.

    /5

    P/8e9

    v/c

    e5

    Figure 3. One-dimensional shock heating problem in planar geometry,where a cold fluid hits a wall located at x = 1. The results presented corre-spond to t = 2. The computational grid consists of 20 zones with 4 levels ofrefinement. The solid lines are the analytical solution.

    subsequently reproduced by Lucas-Serrano et al. (2004); Zhang &MacFadyen (2006) and under slightly improved initial conditionsby Mignone et al. (2005). We repeat this simulation with the sameinitial configuration from Del Zanna & Bucciantini (2002), namely(

    , vx/c, vy/c, p)NE

    = (0.1, 0.0, 0.0, 0.01) ,(

    , vx/c, vy/c, p)NW

    = (0.1, 0.99, 0.0, 1.0) ,(

    , vx/c, vy/c, p)SW

    = (0.5, 0.0, 0.0, 1.0) ,(

    , vx/c, vy/c, p)SE

    = (0.1, 0.0, 0.99, 1.0) . (8)

    The simulation is done with 48 48 cells at the lowest gridlevel, and we allow for 4 levels. The result is shown in Fig. 4.

    Our result is in qualitative agreement with those results published,and shows the stationary contact discontinuities between SW-SEand SW-NW with a jump in the transverse velocity. These aresomewhat diffused by the employed TVDLF discretization (Toth &Odstrcil 2006). A simple and easily affordable remedy for improve-ment is to activate many more grid levels. Shocks feature acrossthe interfaces NW-NE and SE-NE, propagating diagonally to theNE region, and an elongated diagonal shock structure forms as theNE sector recedes into the RHS top corner. In the SW corner, anoblique jet-like structure forms with a bow shock.

    3.2.2 Relativistic jet in 2D cylindrical geometry

    Since it is relevant for our 2D GRB simulations, we also presenta two-dimensional simulation of an axisymmetric relativistic jetpropagating in a uniform medium. We simulate the C2 jet modelfrom Marti et al. (1997), but with an enlarged domain and at highereffective resolution. Our computational domain covers the region0 < r < 15 and 0 < z < 50 jet radii. Initially, the relativis-tic jet beam occupies the region r 6 1, z 6 1, with vjet = 0.99,jet = 0.01 and its classical Mach number M = 6. In this case, thejet is super-sonic but its temperature is still classical, so we can takethe polytropic index = 5/3. The density of the external mediumis ext = 1.0. We follow the evolution until t = 130, and this endresult is shown in Fig. 5. We performed the simulation with a reso-lution at the lowest level of the grid set to 90300, and allowed fora total of 5 levels of refinement eventually achieving an effectiveresolution of 1440 4800.

    In this simulation, the relativistic motion of the flow domi-nates, the thermal energy is weak compared to the kinetic energy.As a result the external medium influences only weakly the jet andthe Lorentz factor 7 flow produces a cocoon structure fromthe tip of the jet. One also finds a weak transverse expansion of the

    c 2007 RAS, MNRAS 000, ????

  • AMRVAC and Relativistic Hydrodynamic simulations for GRB afterglow phases 5

    Figure 4. Density distribution for the two dimensional shock tube problemat t = 0.4. With a polytropic index = 5/3, a base resolution of 4848 and4 AMR levels.

    outflow in accord with what is reported by Marti et al. (1997). Thistransverse expansion of the jet is induced by the pressure build-upinside the cocoon Begelman & Cioffi (1989). In our simulation, theaverage transverse expansion obtained is occurring at an estimatedspeed of vT = 0.11 c. Moreover, at the contact interface betweenshocked external medium and jet material, complex vortical struc-tures form. These originate from Kelvin-Helmoltz type instabili-ties, as a consequence of cold fast jet outflow meeting a more staticmedium. The average propagation speed of the jet head is found tobe 0.414 c, which is in agreement with the one-dimensional analyt-ical estimate of 0.42 c as given by Marti et al. (1997).

    3.2.3 Wind tunnel with step

    We reproduce here a standard test in the hydrodynamic literature,namely the forward facing step test from Emery (1968); Wood-ward & Colella (1984), but adjusted to the relativistic hydro regimeas in Lucas-Serrano et al. (2004); Zhang & MacFadyen (2006). Ahorizontal relativistic supersonic flow enters a tunnel with a flat for-ward facing step. The test was done with a resolution 50100 zoneswith 4 levels. The size of the tunnel is 0 6 x 6 3 and 0 6 y 6 1.The step is 0.2 in height and its position is at x = 0.6. It is treated asa reflecting boundary. The upper boundary and lower boundary forx < 0.6 are also both reflecting. However, the left boundary is fixedat the given inflow and the right one has free outflow. Initially, thewhole computational domain is filled with ideal gas with = 7/5with a density = 1.4 moving at vx = 0.999, i.e., with a Lorentzfactor = 22.37. The Newtonian Mach number is set to 3. Theresult of our simulation is shown in Fig. 6 at time t = 4.26. In thistest, the relativistic flow collides with the step, as a result a reverseshock propagates back against the flow direction and this shock re-flects from the upper boundary. A Mach stem forms and remainsstationary. The result of our simulation is comparable to what isreported in Lucas-Serrano et al. (2004).

    Figure 5. Density distribution for the axisymmetric relativistic jet at t =130. At left, we show the lab frame density, at right, we show the properdensity in a logarithmic scale. The computational base grid consists of 90300 zones with 5 levels of refinement and the domain size is 15 50.

    Figure 6. Density distribution, in logarithmic scale, for the forward facingstep problem, at t = 4.26.

    c 2007 RAS, MNRAS 000, ????

  • 6 Z. Meliani, R. Keppens, F. Casse and D. Giannios

    Con

    tact

    dis

    con

    tin

    uit

    yF

    orw

    ard

    sh

    ock

    (5) (4) (2) (1)

    Rev

    erse

    sh

    ock

    (3)

    Con

    tact

    dis

    con

    tin

    uit

    yF

    orw

    ard

    sh

    ock

    (5) (4) (3) (2) (1)

    Rev

    erse

    sh

    ock

    Con

    tact

    dis

    con

    tin

    uit

    y

    (5) (4) (2) (1)

    Forw

    ard

    sh

    ock

    Rev

    erse

    sh

    ock

    (3)

    Figure 7. The five regions characterizing the interaction of the relativistic shell with the ISM at t = 2.2 106s. Panel(a): Lorentz factor, (b): logarithm of thepressure, (c): logarithm of density.

    Con

    tact

    dis

    cont

    inui

    ty

    (2) (1)(5) (4)

    Forw

    ard

    shoc

    k

    Rev

    erse

    shoc

    k

    (3)

    Con

    tact

    dis

    cont

    inui

    ty

    (5) (4) (3) (2) (1)

    Rev

    erse

    shoc

    k

    Forw

    ard

    shoc

    k

    Figure 8. Ratio of thermal energy to mass energy, when the shell reaches distance: R ' 6.51016cm (t ' 2.2106s) (left), and R ' 4.31017cm (t ' 1.5107s)(right).

    4 GRBS AND MODELS FOR THEIR AFTERGLOWPHASE

    A popular model for GRB flows is known as the fireball model. Inthis model, GRBs are produced by a relativistic outflow followinga violent event near a compact object. A large amount of energyis promptly released by the compact source in a region with smallbaryon loading (for a review see Piran (2005)). Initially, most of theenergy of the flow is in the form of internal (thermal) energy. Theshell expands rapidly converting its internal energy to kinetic. Afterthe acceleration phase is complete, the shell is cold and moves withrelativistic speeds.

    This cold shell interacts with the circumburst medium, pro-ducing strong shocks. Our simulations will consider the dynamicsfrom this phase onwards. As the shell sweeps up mass from theexternal medium, the kinetic energy in the relativistic shell is grad-ually transferred to kinetic and internal energy in the shocked am-bient medium. Moreover, the shell itself gets traversed by a reverseshock, which in turn converts the kinetic energy of the shell to in-ternal energy.

    The observed afterglow emission that follows the prompt GRBemission is believed to come from synchrotron (with possible in-verse Compton contribution) emiting electrons that are acceleratedin the forward and reverse shocks (Sari et al. 1998; Galama et al.1998). In the initial phases of the shell-ISM interaction, the elec-trons can be in the fast cooling regime (i.e. their cooling timescaleis shorter than the expansion timescale) and, therefore, radiate effi-ciently most of the energy injected to them. Furthermore, if most ofthe energy dissipated in the shocks accelerates the electrons, then

    one has to consider radiative shocks. If either of the previous con-ditions does not hold, the radiative losses in the shocks are small.Here, we assume that the radiative losses are dynamically unimpor-tant, i,e., the shocks are adiabatic throughout these simulations.

    4.1 1D isotropic shell evolution

    In this simulation, we consider an ISM with uniform number den-sity nISM = 1 cm3. Many GRB afterglows (more than 25%) seemto be produced in such constant density medium (Chevalier & Li2000; Panaitescu & Kumar 2002; Chevalier et al. 2004). This con-stant density medium can be the resultant of a Wolf-Rayet star pro-genitor, with its surroundings shaped by a weak stellar wind (VanMarle et al. 2006). Initially we set a uniform relativistic shell atR0 = 1016cm from the central engine, since according to Woods& Loeb (1995) the interaction of the shell with the ISM becomesappreciable at this distance. The shell has an initial Lorentz factorof = 100 (a > 100 is in accord with a shell which is opticallythin to gamma-rays (Woods & Loeb 1995; Sari & Piran 1995)), andenergy

    E = 1054ergs = 42 R20 shellc2, (9)

    where stands for the lab-frame thickness of the shell set to5 1012cm is of the order of the expected value for a fireball max(ct,R0/2), where t is the duration of the GRB. TheISM and the shell are cold, and the initial pressure is set to pISM =103nISM mp c2 and pshell = 103nshell mp c2 respectively. Note thatthis implies a huge initial contrast in the density measured in thelab-frame between the shell and the ISM Dshell/DISM 109, and

    c 2007 RAS, MNRAS 000, ????

  • AMRVAC and Relativistic Hydrodynamic simulations for GRB afterglow phases 7

    Con

    tact

    dis

    con

    tin

    uit

    y

    Forw

    ard

    sh

    ock

    (5) (4) (3) (2) (1)

    Rev

    erse

    sh

    ock

    Con

    tact

    dis

    con

    tin

    uit

    y

    Rev

    erse

    sh

    ock

    (5) (4) (3) (2) (1)

    Forw

    ard

    sh

    ock

    Con

    tact

    dis

    con

    tin

    uit

    y

    Forw

    ard

    sh

    ock

    Rev

    erse

    sh

    ock

    (3) (1)(2)(4)(5)

    Figure 9. The five zones present when the relativistic shell interacts with the ISM at t ' 1.5 107s. (a) Lorentz factor, (b) log of pressure, (c) log of density.

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100

    110

    0 50 100 150 200 250 300

    R [1016 cm]

    1

    2

    4

    8

    16

    140 160 180 200 220 240 260 280

    ma

    x

    R [1016 cm]

    BM phase

    R-3/2Numerical simulation

    1

    2

    4

    8

    16

    290 300

    near Sedov phase

    -1 R-2

    Figure 10. The variation of the maximal Lorentz factor in the propa-gating shell-ISM structure with time a) when the shell propagates fromR0 = 1016cm to R = 300 R0 b) when the shell decelerates followingthe Blandford-McKee profile.

    this presents an extreme challenge from a computational point ofview. Initially, the energy of the shell is then mainly kinetic. We usea constant polytropic index = 4/3, as the interaction shell-ISMwill be dominated by the forward shock, where the temperature ofthe shocked ISM becomes relativistic.

    In this simulation we use an effective resolution of 1536000cells corresponding to the highest grid level 10 allowed. We use

    the full AMR capabilities in this simulation, since we simulate ona domain of size [0.3, 300] 1016cm, with 30000 grid points on thelowest level. At t = 0, the shell itself is then only resolved fromgrid level 6 onwards, when we use a refinement ratio of 2 betweenconsecutive levels. The initial shell is resolved by about 25 cells ingrid level 10 (later in the dynamical evolution this means that thereare many more grid points throughout the widening structure). Weuse this very high effective resolution to avoid any numerical diffu-sion which may cause an artificial spreading of the shell. We ensurethat throughout the entire simulation, grid level 10 is activated andconcentrates fine grids on both the forward shock and reverse shockregions. Both are very important to determine the precise timing ofthe deceleration.

    In Fig. 7, we show snapshots taken at lab-frame time t '2.2 106s corresponding to an early time in the entire simulation,and in Fig. 9, we show snapshots taken at time t ' 1.5 107s cor-responding to a time when the shock is fully developed, we willconcentrate our discussion mainly on this figure 9. These figuresdemonstrate that we resolve all four regions that characterise theinteraction between an outward moving relativistic shell and thecold ISM. From right to left, we recognize (Fig. 9) (1) the ISMat rest, (2) the shocked ISM that has passed through the forwardshock, with its Lorentz factor raised to (2) 30. This swept-upISM gets compressed at the front shock and its number densityreaches n(2) 75cm3

    (2)+11 (Sari & Piran 1995). These two

    values correspond to the analytical estimate given by eq. (7) for thefront shock propagation. Region (3) represents part of the initialshell material which is shocked by the reverse shock. The reverseshock propagates back into the cold shell, reducing its Lorentz fac-tor and converting its kinetic to thermal energy. Transfer of energyfrom the initial cold shell thus occurs both at the forward and the re-verse shock. Regions (2) and (3) are separated by a contact discon-tinuity (Meszaros & Rees 1992). At this spherical contact surface,the longitudinal velocity (Lorentz factor in 1D case) and pressureremain constant, but there is a jump in density. Furthermore, re-gion (4) is the unshocked cold material of the shell, moving witha Lorentz factor (4) = 100. The weak thermal energy of the shellinterior itself did induce a slight expansion in the thickness of thispart of the shell.

    The reverse shock separating region (3) and (4) prop-agates into the cold shell with a Lorentz factor RS =(3) (4)

    (

    1 v(3)v(4)/c2)

    2.5. This reverse shock is Newtonianinefficient in raising the thermal energy content as is shown inFig. 8 (left panel), where we draw the specific thermal energy

    c 2007 RAS, MNRAS 000, ????

  • 8 Z. Meliani, R. Keppens, F. Casse and D. Giannios

    in the shocked ISM and shell when the shell reaches a distanceR ' 6.5 1016cm. The reverse shock remains Newtonian until itreaches a distance from the GRB source of R 3.8 1017cm. Thenit becomes mildly relativistic until R 4.3 1017cm where thereverse shock becomes very efficient to convert the kinetic energyto thermal energy (see Fig.8 at right). Beyond this latter distance,the density of the unshocked shell part (4) has decreased in accordwith the spherical expansion of the shell, to (4) 2(4) ISM. As aresult, the reverse shock becomes relativistic. This behavior is char-acteristic for an initial thin cold relativistic shell decelerating in aconstant density external medium. In fact, until the outward prop-agating shell reaches R 3.8 1017cm, the shocked ISM matteris hot e(2) 30.0(2) (where (2) = 30 corresponds to the analyti-cal solution for the relativistic forward shock e(2) =

    (

    (2) 1)

    (2)),while the shocked shell material which has e(3) = e(2) is cold, sincee(3) 0.01(3). When the density in the non-shocked shell (i.e. (4))decreases enough due to spherical expansion, the Lorentz factor ofthe reverse shock increases and the last part of the shocked shellbecomes hot e(3) (3).

    There is another region (5) indicated in the figures behind theshell. The density and the pressure in the region (5) are very smallwith n(5),min < 106cm3 and p(5),min < 106mpc2. Therefore, theregion (5) is in the numerical point of view a vacuum. This region(5) is not of strong interest for the physics of the afterglow, but itis computationally challenging to resolve the interface between theregions (4) and (5) where the ratio of the lab frame density betweenthe two reaches D(4)/D(5) 1014.

    The near-total deceleration of the shell only takes place whenthe two shocks in the shell-ISM interaction manage to convert animportant fraction of the kinetic energy of the shell to thermalenergy (and the efficiency of this conversion depends on whetherthe reverse shock is relativistic or Newtonian, as discussed above),while the rest is transferred to the swept-up ISM in the form of ki-netic and thermal energy. In the first phase of the deceleration, themaximum Lorentz factor of the shell decreases gently from 100 at adistance of R 2.51017cm to 80 at a distance of R 4.31017cm.However, only at the latter distance of 4.3 1017cm, a sudden de-crease of the maximum Lorentz factor of the entire configurationfrom = 80 to = 30 takes place. This fast drop of the maxi-mum Lorentz factor as seen in Fig. 10 coincides with the momentat which the reverse shock reaches the back end of the cold shell,thereby converting its kinetic to thermal energy (Fig. 9). In fact,when plotting the maximal Lorentz factor as a function of distance,initially we always observe the Lorentz factor of the unshockedshell matter. As soon as the reverse shock has crossed the entireinitial shell, we start to follow the evolution of the Lorentz factorof the shocked ISM (at the forward shock) where the maximumLorentz factor is 30 at that particular moment.

    After this phase, the shell structure continues to decelerate bytransferring its kinetic energy to shocked ISM matter at the for-ward shock. However, as seen in Fig. 10, it still takes a certaintime before the variation of maximum Lorentz factor now charac-terizing the shocked ISM matter follows the self-similar analyticalsolution for blast-wave deceleration as put forward by Blandford& McKee (1976). From about a distance of 1.2 1018cm, our nu-merical solution starts to follow the analytical solution precisely. Infact, after the reverse shock traversed the entire initial shell, a for-ward traveling rarefaction wave propagates through the entire struc-ture thereby slowing it down while transferring most of the energyto shocked ISM regions. This structure does not follow the self-similar prescription and causes the initial difference. In the end, thedistance between the forward shock and the contact discontinuity

    increased sufficiently and the resulting radial thermodynamic pro-files in between become fully described by the Blandford-McKeeanalytical solution. The Lorentz factor predicted by the Blandford-McKee solution behind the forward shock (for an adiabatic shock)is BM = (E/ISMc2R3)1/2 R3/2. The prediction of the Blandford-McKee solution for the Lorentz factor of the flow is also plotted inFig. 10 and the agreement with the results of the simulation at theselater stages of the decelation is good.

    Eventually, we enter into the mildly relativistic regime for theblast wave evolution. The transition to the Sedov-Taylor phase oc-curs beyond the simulated distance R > 3001016cm, since we stillhave a Lorentz factor of about 3 at the end of the simulation. TheSedov-Taylor distance we find is close to the analytical estimategiven by l (3E/4ISM c2)1/3 5 1018cm.

    4.2 2D modeling of directed ejecta

    Precise analysis of the afterglow phases requires to evolve numer-ically confined ejecta in more than 1D, propagating in a jet-likefashion into the ISM. We now present axisymmetric, 2D simula-tions of a relativistic cold shell propagating in uniform ISM witha number density nISM = 1 cm3. In this work, we investigate theuniform model jet (Rhoads 1999). The shell density and energy isset constant throughout the shell, and we take it to correspond toan isotropic spherical shell containing an equivalent isotropic en-ergy Eiso = 1051ergs and a Lorentz factor = 100. To make the2D computation feasible, we now start the simulation with a shellthickness = 1014cm at a distance R0 = 1016cm from the cen-tral engine. In the initial setup the shell occupies an annular region,with half opening angle of the shell equal to = 1. This angle israther small with respect to those typically deduced from model-ing of the optical light-curve breaks but still in agreement with themost collimated GRB flows (Bloom et al. 2003; Panaitescu 2005).With the choice of a rather narrow jet, we expect the 2D effects toappear earlier and to be more pronounced with respect to a spher-ical shell with the same isotropic equivalent energy. Note that as aresult, this jet like outflow has a decreased effective energy in theshell Ejet = (2/2)Eiso .

    The AMR run uses 4 grid levels, taking 400 6000 at level 1,but with refinement ratios of 2, 4 and 2 between consecutive levelseventually achieving an effective resolution of 6400 96000. Thedomain is [0, 4] [0.3, 30] in R0 units, as we specifically intendto model in detail the most dramatic phase of deceleration priorto the Blanford-McKee evolution. Note that we initially have >1/, which appears to be the case for a GRB jet. Beaming effectsare invoked to explain the observed steepening in the decay lightcurve resultant from the transition > 1/ (indistinguishable froman isotropic explosion) to < 1/ (Panaitescu & Meszaros 1999;Panaitescu & Kumar 2002; Panaitescu 2005). With these setup wecan verify from our high resolution simulation whether up to timescorresponding to the transition 1/, only the isotropic energyEiso is relevant for the dynamics and the resulting emission (Piran2000; Granot 2005).

    The initial velocity of the shell is purely radial. Note that, com-pared to the 1D isotropic case presented in the previous section, the2D simulation starts with an initial condition containing less en-ergy. This is done for mere practical reasons: we wish to keep thecomputation feasible within two weeks execution time on a singleprocessor. Due to this lower energy content, the deceleration dis-tance will be smaller by about one order of magnitude since lessswept-up ISM mass is sufficient to decelerate the shell. This re-duces the need for resolving many decades of propagation distance

    c 2007 RAS, MNRAS 000, ????

  • AMRVAC and Relativistic Hydrodynamic simulations for GRB afterglow phases 9

    TV

    ()

    C

    Lo

    g

    sC

    s

    Figure 11. On the (top), the sound speed, logarithm of density (right), and Lorentz factor contours for the 2D simulation (left). On the (bottom), a zoomaround on the relativistic shell, the sound speed and the lateral velocity (left), the Lorentz factor (right), and the zoom on the shell, the density and Lorentzfactor (center) at t = 5 106s.

    c 2007 RAS, MNRAS 000, ????

  • 10 Z. Meliani, R. Keppens, F. Casse and D. Giannios

    as measured in units of the initial shell thickness. In fact the 1Dequivalent isotropic case with the same energy shows a sudden de-crease of the maximum Lorentz factor of the decelerating configu-ration that corresponds to the reverse shock crossing of the shell atR 91017cm. This happens well before the simulated 31017cm.

    Fig. 11 shows at the (top), the sound speed contour, and thedensity distribution in a logarithmic scale in the (left), and theLorentz factor in the (right). At the bottom, a zoom in the regionaround the shell is shown in the (left), the sound speed and thelateral velocity, in the (right) the Lorentz factor, and in the (cen-ter) a zoom only on the shell, the density and Lorentz factor. Asin the 1D case, at first the shell propagates with a constant maxi-mum Lorentz factor, and this is accompanied by a weak spread ofthe shell. Part of this radial shell widening in the bottom part ofthe shell is affected by the creation of a very low pressure and den-sity region below the shell (also occurring in the 1D scenario). Thisnear-vacuum state remains at the rear part as the shell moves awayat the specified Lorentz factor. In this 2D simulation, the unshockedshell also spreads laterally with an initial transverse (horizontal) ve-locity, since the shell is launched with a pure radial velocity. Thecorresponding maximum initial lateral velocity of the unshockedshell is vT = 0.0175 c. However, the shocked, swept up ISM matterspreads laterally much faster, due to its high thermal energy con-tent. Initially, that shocked ISM part spreads with a comoving ve-locity of vT,co 0.4c, which is less than the maximum sound speedallowed by the polytropic equation of state c/

    3. Due to this fast

    sideways expansion of shocked shell and ISM, the mass of the ISMhit by the shell grows faster than r2. Therefore, the deceleration ofthe shell starts earlier than in the isotropic case, see Fig 12. This re-sult implies that the transition from the phase where Eiso is relevant,to the phase where Ejet is relevant in the dynamics takes place whenthe shocked ISM and shell start to spread laterally much faster thanwhat corresponds to pure radial (ballistic) flow.

    In the last part of the shell-ISM deceleration phase, when thereverse shock has crossed the entire initial shell material, the lat-eral velocity of shocked shell material reaches a comoving speed ofvT,co 0.7c. This means that we do find that the lateral velocity canbe bigger than the sound speed in the medium which is in accordwith the analytical result of Sari et al. (1999). This is at odds withnumerical findings as those found in Cannizzo et al. (2004), whichemploy a much reduced resolution as compared to our AMR results(at low resolution, we do obtain a reduced lateral spreading veloc-ity). As a result of this fast lateral spread of the shocked material,distinct differences occur in the deceleration stages as compared tothe isotropic case. This result is very important, as it shows thatthe lateral spreading of the shell is not related only to the Lorentzfactor of the shell but to the type of the reverse shock. In our com-putation, in an early phase the reverse shock is Newtonian and theexpansion of the shocked shell part is modest. However, in a laterphase the reverse shock becomes relativistic and this leads to fasterlateral spreads. However, as the forward shock is always relativis-tic, already in an early stage the shocked ISM spreads with high ve-locity. The overall spreading of the shocked ISM and shocked shellconfiguration can, thus, be quite complex and rather more evolvedthan the one that semi-analytical models (Rhoads 1999; Panaitescu& Meszaros 1999; Sari et al. 1999; Piran 2000) predict.

    Only that part of the ISM found within the solid angle of theexpanding shell is swept up, and this opening angle changes dueto the spreading effects just discussed. In our 2D simulation, wefound in analogy with the 1D (higher energy) case from above, thatthe reverse shock is initially Newtonian, so the thermal energy inthe shocked part of the shell does not increase a lot and its lateral

    0

    10

    20

    30

    40

    50

    60

    70

    80

    90

    100

    110

    0 2 4 6 8 10 12 14 16

    ma

    x

    R [1016 cm]

    2Disotropic

    Figure 12. The variation of the maximum Lorentz factor evolution in 1Dand 2D scenarios compared.

    expansion remains weak for a while. Later on, its lateral expansionspeed goes up to the 0.7c mentioned above, as the reverse shockbecomes relativistic and the material through which the shockedshell expands laterally has already been brought to lower densitiesby the shocked ISM interaction.

    The variation of the maximum Lorentz factor is less sud-den than in the equivalent 1D spherical explosion, as quantified inFig. 12. The part of the shell most distant from the symmetry axisdecelerates before the more internal part. The shell sweeps up morematter than in the corresponding isotropic case in the external partsdue to the lateral spreading effects discussed. In fact, in this simu-lation we may draw the analogy between the shell interaction withthe ISM and simulations of relativistic AGN jet propagation intoan external medium. As in those cases, the energy is transferred tothe ISM through a bow shock structure. The changing 2D structureof this shock leads to differences in the shocked ISM mass loadedon to the shell. As stated earlier, only a fraction of the ISM withinthe opening angle of the shell is swept up, and an important part ofISM matter gets pushed away laterally as the thin radially confinedshell advances.

    The resulting behavior is clearly influenced by these 2D ef-fects, and is the reason why the maximum Lorentz factor of theconfiguration starts to decrease earlier than in the 1D scenario. Inan isotropic scenario all swept up mass of the ISM remains in frontof the initial shell where most of the energy of the shell is continu-ally transferred to shocked ISM. However, in the jet-like explosion,the shocked ISM and shell expand laterally leading to interactionwith more ISM material, but the main part of this ISM material getsdeflected about the shell. As seen in Fig 11, we find rather complexflow patterns trailing the thin shell. Hence, the mass accreted onto the shell in fact decreases as compared to the equivalent localisotropic scenario. Therefore, less energy is transferred continuallyto the shocked ISM.

    One interesting characteristic of the maximum Lorentz factorof the beamed shell at radii R > 7 1016cm is the bumps that itshows as function of radius. These modulations of max are a resultof rapid internal motions of the decelerating configuration causedby the complex shell-ISM interaction. In view to the very rich andunexpected early afterglow phenomenology revealed by the SWIFTsatellite (see, for example, Zhang et al. (2006)), it is interesting to

    c 2007 RAS, MNRAS 000, ????

  • AMRVAC and Relativistic Hydrodynamic simulations for GRB afterglow phases 11

    study whether these proper motions can cause a significant modu-lation in the emitted radiation expected from these flows.

    In this simulation, we find no real indication of a strongchange in lateral spreading of the shell when the Lorentz fac-tor drops down to c = 1/ 57 (Rhoads 1999; Panaitescu &Meszaros 1999). In fact, an important change is produced later,when the Lorentz factor of the shell becomes smaller than 30, whilethe lateral velocity of the shell reaches vT,co 0.7c. As pointed out,this coincides with the time when the reverse shock became rela-tivistic and almost crossed the initial shell entirely. After this phaseof rapid lateral spread, we find that the spread out shell deceleratesfaster, as it accumulates more matter (Fig. 11). More simulationswith different values for the shell opening angle and thickness areto investigate how these parameters affect the phase of the deceler-ation where the lateral spreading of the shell becomes important.

    5 CONCLUSIONS

    In this paper, we presented and applied the AMRVAC code in itsextension to relativistic hydrodynamics. The adaptive mesh refine-ment is particularly useful for simulating highly relativistic flow dy-namics. We always used the robust TVDLF sheme, and this shock-capturing method together with high effective resolution deliversnumerical results that can rival or even improve other high ordermethods. As is well-known, difficulties in special relativistic hy-drodynamic simulations result from the non linear coupling be-tween different components of the velocity by the Lorentz factorand also the coupling between inertial and thermodynamics. Wedemonstrated that Adaptive Mesh Refinement (AMR) is then veryuseful to resolve the associated very thin structures properly. Wetested the code ability with stringent recent test problems collectedfrom the astrophysical literature, including 1D and 2D shock tubeproblems, an ultrarelativistic flow reflecting of a wall, a relativisticvariant of a forward-faced reflecting step, and 2D astrophysical jetpropagation.

    We used the fireball model to investigate 1D and 2D after-glow phases in GRBs. In 1D, we examined the evolution of a coldrelativistic shell with a Lorentz factor of 100 in uniform medium.In this simulation we discussed details of the internal structure ofthe evolving shell-ISM ejecta and compare them with analyticalestimates. We followed the evolution of this isotropic explosion al-most all the way into the classical Sedov phase. At all times, weresolve the various regions that characterize this interaction. Wequantified and discussed the precise deceleration of the relativisticshell. When most of the initial energy of the shell is transferred toswept-up shocked ISM (this occurs at the forward shock), the de-celeration of shocked ISM is eventually well described by the rela-tivistic Blandford-McKee self-similar solution. Hence the Lorentzfactor of the forward shock decreases as R3/2.

    We investigate also the afterglow phase for a beamed 2D shell.In this model, we discussed analogies and important differenceswith the 1D model. The interaction of a confined relativistic shellwith the ISM is characterised by the appearance of a bow shock. Weshowed how ISM material is laterally pushed out, thus decreasingthe amount of accumulated matter in front of the shell near the axis.The part of the shell furthest away from the axis decelerates thenfaster than in a 1D spherical case. Although the deceleration of theshell starts early as compared to an equivalent isotropic case, thedeceleration of the inner part of the shell is slow due to the weakaccreted ISM matter in front of the shell. The thermal energy of theshocked ISM increases and induces a lateral spread of this shocked

    ISM. We have shown with a high resolution simulation of jet-likeGRB models in their afterglow phase that this lateral expansiongoes through various phases.

    First, the shell spreads only with its initial lateral velocity un-til it accretes enough ISM matter. In this phase, the shocked ISMspreads laterally with a velocity near the sound speed. However,the reverse shock propagates in a Newtonian fashion through theshell, thus having a small efficiency in the conversion of the kineticenergy of the shell to thermal energy, hence the expansion of theshocked shell is still weak. Only in a later phase when the reverseshock becomes relativistic, the lateral expansion of the shockedshell increases drastically and reaches a high velocity vT 0.7c.The transition from slow to fast lateral spreading of the shell isthus related to the transition from Newtonian to relativistic reverseshock propagation. However, as the forward shock is always rela-tivistic the shocked ISM spreads laterally faster.

    The 2D simulation has revealed rapid internal motions in thedecelerating configuration. It is possible that these motions result inmodulations in the afterglow emission. In future work, we intend touse these and similar simulation results to compute their predictionsfor the precise afterglow spectral evolution.

    ACKNOWLEDGEMENTS

    We acknowledge financial support from the Netherlands Organiza-tion for Scientific Research, NWO-E grant 614.000.421, and com-puting resources supported by NCF. Part of the computations madeuse of the VIC cluster at K.U.Leuven. Part of this research was sup-ported by European FP5 RTN Gamma Ray Burst: An Enigma anda Tool.

    REFERENCES

    Arons, J., 2004, Advances in Space Research, 33, 466Barthelmy S. D., et al.,2005, ApJ, 635, L133Begelman, M. C., Cioffi, D. F., 1989, ApJ, 345, L21Berger E., et al. 2000, ApJ, 545, 56Berger, E., Kulkarni, S. R., Frail, D. A., 2003, ApJ, 590, 379J. Bergmans, R. Keppens, D.E.A. van Odyck and A. Achterberg,

    Lecture Notes in Computer Science and Engineering, Proceed-ings of Chicago Workshop on Adaptive Mesh Refinement Meth-ods Sept. 3-5 2003

    Blandford, R. D., & McKee, D. G., 1976, Physics of Fluids,19,1130

    Bloom, J. S., Frail, D. A., Kulkarni, S. R., 2003, ApJ, 594, 674Cheng, K. S., Huang, Y. F., Lu. T., 2001, MNRAS, 325, 599Cannizzo, J. K., Gehrels N., Vishniac E. T., 2004, ApJ, 601, 380Cenko, S. B. et al., 2006, astro-ph/0608183Chevalier, R. A., Li Z.-Y, 2000, ApJ, 536, 195Chevalier, R. A., Li Z.-Y, Fransson, C., 2004, ApJ, 606, 369Chiang J., Dermer C. D., 1999, ApJ, 512, 699Corbel, X-ray Timing 2003: Rossi and Beyond. AIP Conference

    Proceedings, Vol. 714, held 3-5 November, 2003 in Cambridge,MA. Edited by Philip Kaaret, Frederick K. Lamb, and Jean H.Swank. Melville, NY: American Institute of Physics, 2004, 127

    Costa, E., et al., 1997, Nature, 387, 783Covino, S.et al. , 1999, A&A, 348, L1Dar, A., De Rujula, A. 2004, Physics Reports, 405, 203Del Zanna, L., Bucciantini, N., 2002, A&A, 390, 1177Donaghy, T. Q., 2006, ApJ, 645, 436

    c 2007 RAS, MNRAS 000, ????

  • 12 Z. Meliani, R. Keppens, F. Casse and D. Giannios

    Emery, A. E., 1968, J. Comput. Phys., 2, 306Ferrari, A., 1998, Annu. Rev. Astron. Astrophys., 36, 539Frail, D. A., Kulkarni, S. R., Nicastro, S. R., Feroci, M., Taylor,

    G. B., 1997, Nature, 389, 261Frail, D. A., et al., 2001, ApJ, 562, L55Frail, D. A. et al., 2006, ApJ, 646, L99Galama, T., et al. , 1997, Letters to Nature, 387, 479Galama, T. J., et al., 1998, ApJL, 500, L97Gorosabel, J. ,et al. , 2006 astr-ph/0603100Granot, J., Miller, M., Piran, T., Suen, W. M., Hughes, P. A.,

    2001, Gamma-Ray Bursts in the Afterglow Era: Proceedings ofthe International Workshop Held in Rome, Italy, 17-20 October2000, ESO ASTROPHYSICS SYMPOSIA. ISBN 3-540-42771-6. Edited by E. Costa, F. Frontera, and J. Hjorth. Springer-Verlag,2001, 312

    Granot, J, 2005, Triggering relativistic jets, RevMexAA,astro-ph/0610379

    Greiner, J. et al. 2003, Nature, 426, 157Katz, J. I., 1994, ApJ, 432, 107LKeppens, R., Nool, M., Toth, G., Goedbloed, J. P., 2003, 153, 317Kobayashi S., Piran, T., Sari, R., 1999, ApJ, 513, 669Kobayashi S., Sari, R., 2000, ApJ, 542, 819Kulkarni, S. R. et al., 1999, ApJ, 522, 97LKumar, P.,Panaitescu, A. 2000, ApJ, 541, L9Kumar, P., Granot , 2003, ApJ, 591, 1075Lazzati, D., et al. , 2004, A&A, 422, 121LLucas-Serrano, A., Font, J, A., Ibananez J. M, and Marti, J. M.,

    2004, A&A, 428, 703Marti, J. M., Muller E., 1994, J. Fluid Mech., 258, 317Marti, J. M., Muller E., Font J. A., Ibananez J. M, and Marquina

    A., 1997, APJ, 479, 151Marti, J. M., Muller E., 2003, Living Rev. Relativity, 6, 7Meszaros P., Rees M. J., 1992, MNRAS, 258, 41PMeszaros P., Rees M. J., 1997, ApJ, 476, 232Meszaros, P., Meszaros, P., 2006, Rep. Prog. Phys., 69, 2259Metzger, M. R., Djorgovski, S. G., Kulkarni, S. R., Steidel, C.

    C., Adelberger, K. L., Frail, D. A., Costa, E., Frontera, F., 1997,Nature, 387, 879

    Mignone, A., Plewa, T., Bodo, G., 2005, ApJS, 160, 199Oren, Y., Nakar, E., Piran, T., 2004, MNRAS, 353, L35Panaitescu, A., Wen, A., Laguna, P., Meszaros, P., 1997, ApJ, 482,

    942Panaitescu A., 2005, MNRAS, 363, 1409Panaitescu, A., Meszaros, P., 1999, ApJ, 526, 707Panaitescu, A., Kumar 2002, ApJ, 571, 779Panaitescu, A., Kumar 2003, ApJ, 592, 390Piner, B. G., Unwin, S. C., Wehrle, A. E., Zook, A. C., Urry, C.

    M., & Gilmore, D. M. 2003, ApJ, 588, 716Piran, T., 2000, Physics Reports, 333, 529Piran, T., 2005, Rev. Mod. Phys., 76, 1143Piro et al., 1998, A&A, 331, L41Pons J. A., Marti, J. M., Muller E., 2000, J. Fluid Mech., 422, 125Rhoads, J. E., 1993, ApJ, 591, 1097Rhoads, J. E., 1997, ApJ, 478, L1Rhoads, J. E., 1999, ApJ, 525, 737Sahu, K. C., Livio, M., Petro, L., Macchetto, F. D., van Paradijs,

    J., Kouveliotou, C., Fishman, G. J., Meegan, C. A., Groot, P. J.,Galama, T., 1997, Nature, 387, 476

    Sari R., Piran T., 1995, ApJL, 455, L143Sari, R., Piran, T, & Narayan, R., 1998, ApJL, 497, L17Sari R., Piran T., 1999, ApJL, 517, L109Sari R., Piran T., & Halpem, J. P., 1999, ApJ, 519, L17

    Shemi, A., Piran, T., 1990, ApJ, 365, L55Soderberg A. M., Ramirez-Ruiz E., 2001, AIP conf. Proc. 662:

    Gamma-Ray Burst and Afterglow Astronomy 2001, pp172-175Stanek, K. Z., Garnavich, P. M., Kaluzny, J., Pych, W., Thompson,

    I. , 1999, ApJ, 522, 39LG. Toth and D. Odstrcil, 1996, J. Comput. Phys. 128, 82.Van Marle A. J., N. Langer, A. Achterberg, G. Garcia-Segura,

    2006, astro-ph/0605698Van Paradijs, J., et al. , 1997, Nature, 386, 686Vietri, M. , 1997, ApJ, 478, L9Wijers, R. A. et al., 1999, ApJ, 523, L33Wijers, R., 1997, Nature, 393, 13Woodward, P., Colella, P., 1984, J. Comput. Phys., 54, 115Woods E., Loeb A., 1995, ApJ, 453, 583Zhang, B., et al., 2006, ApJ, 642, 354Zhang W., MacFadyen A. I. , 2006, ApJS, 164, 255

    c 2007 RAS, MNRAS 000, ????