The GRB Afterglows Flowchart †

: In this paper, we present a ﬂowchart of the Gamma Ray Burst (GRB) afterglows, aiming to create a numerical FORTRAN code. Considering several proposed models, the hydrodynamic evolution describing the external shock of the jet with the environment surrounding the GRB source or the Interstellar medium is discussed. A comparison of the results and data, considering the synchrotron emission as a basic mechanism for the radiation part, was also carried out.


Introduction
"Gamma-Ray Bursts observations of a cosmic origin" is the title of the first article on this subject, published in 1973 [1], in which it was announced that this is the brightest event in the universe after the Bing Bang. Since then, many satellite missions and terrestrial projects have been carried out to solve this enigma. One of these satellites, called Beppo-SAX, definitively confirmed the cosmological origin of these bursts by detecting the first remnant emission (afterglow) of the GRB970228 with a Redshift = 0.835 [2], defined as the external shock of the jet with the environmental medium of the source of the gamma rays burst [3]. Most theorists focused their studies on the fireball model [4][5][6], which can describe the external shock. Accordingly, three hydrodynamic models were proposed in the literature to describe the evolution of the Lorentz factor: those of Chiang   [7], Huang et al. (1999) [8] and Feng et al. (2002) [9]. A flowchart of these models will be presented in the following.

Hydrodynamic Models
The bulk kinetic energy of the GRB fireball is expressed by [10]: where Γ is the bulk Lorentz factor of the deceleration, m the mass of the surrounding medium that is swept up by the fireball. The radiated differential energy is given by [11]: and where ε is the fraction of internal energy radiated by the fireball [12,13], t syn , t ex are the synchrotron cooling and expansion times in the co-moving frame, respectively, and U is the internal energy, which has has many proposed definitions, as shown in Table 1. Finally, the global conservation of energy is dE k = −dE rad , where the evolution of the Lorentz factor Γ can describe the hydrodynamic evolution of the GRBs afterglows, as shown in Table 1.

The Flowchart of the Hydrodynamic Evolution
The basic aim of this work is to draw a flowchart of the hydrodynamic evolution for the GRB afterglows, then choose the most compatible model using the observational data (see Section 3.2). All steps for the first part are shown in Figure 1: • Start with the initial parameters for all necessary physical quantities, such as those of the fireball and the external environment. • Use the substitution x = log 10 (R/cm) (logarithmic scale), which is suitable for large scales, dealing with large distances and long periods of time, such as the distance traveled. • Specify the state of the fireball, such as whether it is radiated, constant or variable (depending on the effectiveness of the radiation). We will also choose a model with a minimum Lorentz factor. • Choose the hydrodynamic model, then use the finite differences method as a numerical tool to obtain approximate solutions of the Lorentz factor differential equations as a function of the mass m of the surrounding medium that is swept up by the fireball. This method appears to be the simplest one. Furthermore, using this method in our code provides results that converge to the Sedov solution [14], and to the analytical solutions in case of an expanded and constant radiation.

Synchrotron Radiation and Self-Absorption
The synchrotron radiation power (OTS) at frequency ν from all the accelerated electrons in the commoving frame is given by [15]: where F(x) is the symchrotron function [16], ν L is the Larmor frequency and N e represents the electrons accelerated by the shock in the absence of radiation losses, written as a bower low distribution [13]: where Γ max (resp. Γ min ) is defined in [17,18] (resp. [19]). Due to the cosmological nature of the GRBs, we must use the relativistic transformations: [15,20]: to obtain the general expression of the instantaneous intensity in the Jansky of synchrotron emission as a function of the luminosity distance D L (z), where z is the redshift: The synchrotron self-absorption (SSA) at low frequencies plays an important role; when α ν , the optical depth is [21]: so the instantaneous intensity for the SSA will be [22]:

The Flowchart of the Radiation Emission
In the second part (Figure 2), we produce the light curves represented by the intensity as a function of time Equation (9). Similarly for the afterglow spectra, the same quantity is used as a function of the frequency.
Finally, the numerical curve presenting the frequency of the maximum emission is presented in terms of νF(ν).

•
To observe the nature of the energy emitted by the afterglows as a function of time with the light curves, we introduce the frequency in the observations, then create a DO loop for various time values to calculate the spectral intensity F ν (t). In this loop, we call the subroutines of the relativistic transformation for each distance R.
• For the spectra, the opposite is carried out; that is, we set the time then open a DO loop to evolve the frequency, and call the subroutine of the relativistic transformation at every distance R. • For the third calculations, we make changes to the time and frequency with two DO loops and use the condition IF to save the frequency that gives the maximum of νF(ν). To recognize this part, we use the F(x) synchrotron function to determine the spectral power, by calculate the distribution of the radiating electrions, and consider the numbers of the electrons that radiate or do not radiate (adiabatic electrons, for which the characteristic time of emission is very small compared to the time scales). We identify all the relativistic transformations representing the physical quantities in the host galaxy (ν , dΩ) due to the cosmological distance, which is used as the luminosity distance D L (z). Finally, we calculate the absorption coefficient α ν Equation (10) to obtain the instantaneous intensity for the SSA Equation (11) and present our results.

Numerical Results and Discussion
We used a fireball with an initial mass outflow, M 0 = 2 × 10 −6 M , Lorentz factor Γ 0 = 65 and a half-opening angle of the jet θ jet = 10 • , a deceleration within the ISM with a constant density n = 1 cm 3 and k = 0 (n, k are parameters depending on the medium), z = 3.645, lateral expansion g = 0, numerical and spectral parameters a = 4 and p = 2.3, respectively. We also used ε e = 0.1, ε B = 0.9 as the electronic and magnetic efficiencies, with ε e + ε B = 1. The main goal of this code is to study and understand this phenomenon. In fact, using this flowchart, we highlighted the most important results: • Figure 3 shows that, in the adiabatic expansion case, the deceleration of the Lorentz factor is slower compared to that of a radiative regime that generates a faster deceleration due to radiation. Moreover, we can observe three sections of the deceleration, corresponding to: 1.
The ultra-relativistic phase.
• Figure 4 displays the evolution of the radiative efficiency of the fireball as a function of the distance R, showing that the radiation in Haung's models is more effective than that of Feng. • Figure 5 shows the ratio between the absorption coefficient α ν for a radio frequency ν obs = 3 · 10 8 Hz and an UV one λ −1 obs = 500 cm −1 . Note that this is more important at low frequencies. This result is confirmed in Figure 6, where the spectra of GRB afterglow consist of an increased absorption at low frequencies compared to higher frequencies.
• Figure 7 shows that the majority of the radiation during the GRB-afterglow emissions starts by the hard gamma to the radio bands. Therefore, the detection of the prompt emission of GRBs overlaps with the early afterglows • Figure 8 shows a good concordance between the GRB170202 data supporting the proposed model.

Conclusions
In the presented work, we studied the evolving hydrodynamics of the afterglow and its emission. We show that the Feng's model is the most interesting [23,24]. From the perspective of efficiency, the changes made later in the evolution of the fireball make it more realistic to describe the internal energy. It is worth mentioning that the Feng models are consistent with the Sedov solution, both the non-relativistic phase and adiabatic regime. We then studied the basic radiation of the GRB afterglow using the synchrotron emissions, which are not negligible. The self synchrotron absorption is an effect that plays an important role in the low-frequency range, providing a fairly good approximation of the real data, as in our case, where the profile of the GRB 170202 afterglow was detected by Swift/XRT.