The collapsar model was proposed to explain the long-duration gamma ray bursts (GRBs), while the short GRBs are associated with the mergers of compact objects. In the first case, mainly the energetics of the events is consistent with the proposed progenitor models, while the duration, time variability, as well as the afterglow emission may shed some light on the detailed properties of the collapsing massive stars. In the latter case, the recent discovery of the binary neutron star (NS-NS) merger in the gravitational wave observation made by LIGO (GW170817) and the detection of associated electromagnetic counterparts, for the first time, gave a direct proof of the NS-NS merger being a progenitor of a short GRB. In general, all GRBs are believed to be powered by accretion through a rotationally supported torus, or by fast rotation of a compact object. For long ones, the rotation of the progenitor star is a key property in order to support accretion over relatively long activity periods and also to sustain the rotation of the black hole itself. The latter is responsible for ejection of the relativistic jets, which are powered due to the extraction of the BH rotational energy, mitigated by the accretion torus, and magnetic fields. The jets must break through the stellar envelope though, which poses a question on the efficiency of this process. Similar mechanisms of powering the jet ejection may act in short GRBs, which in this case may freely propagate through the interstellar medium. The power of the jets launched from the rotating black hole is at first associated mostly with the magnetic Poynting flux, and then, at large distances it is transferred to the kinetic and finally radiative energy of the expanding shells. Beyond the radiative processes expected to take place in the jet propagation phase after the stellar envelope crossing, the significant fraction of the jet acceleration is expected to take place inside the stellar envelope and just right after it in the case of a significant decrease of the exterior pressure support. The implications of the hot cocoon formed during the penetration of the stellar body and the interaction of the outflow with the surrounding material are crucial not only for the outflow collimation but also provide specific observational imprints with most notorious observed panchromatic break in the afterglow lightcurves. Thus a significant number of models have been developed for both matter and Poynting dominated otuflows. In this chapter, we discuss these processes from the theoretical point of view and we highlight the mechanisms responsible for the ultimate production of electromagnetic transients called GRBs. We also speculate on the possible GRB-GW associacion scenarios. Finally, in the context of the recently discovered short GRB and its extended multiwalength emission, we present a model that connects the neutron-rich ejecta launched from the accreting torus in the GRB engine with the production of the unstable heavy isotopes produced in the so-called r-process. The radioactive decay of these isotopes is the source of additional emission observed in optical/infrared wavelengths and was confirmed to be found in a number of sources.
- gamma ray burst: general
- black hole physics
- accretion disks
- gravitational waves
- nuclear reactions
Gamma ray bursts are single, transient, short-lasting events (from a fraction of a second up to around a thousand seconds), and detected on the gamma ray sky. They are typically in the range between 10 keV and 20 MeV and are isotropically distributed on the celestial sphere, while they can occur at random directions, even a few times per day . They are also often accompanied by an optical counterpart, late time X-ray signal, and the afterglow, which lasts for many days after the prompt phase and are detected in lower energies, down to the radio band.
The observed properties and energetics of gamma ray bursts has proven that at their hearts there is a cosmic explosion of an enormous power, which is definitely connected with the birth of compact stars. The newly born black hole is swallowing an extremely large amount of matter in a very short time. The accompanying process of ejection of rarefied and fast streams of plasma, which expand in the interstellar medium with a velocity close to the speed of light, is responsible for the gamma ray emission.
1.1. History of GRBs observations
Gamma ray bursts have been first detected in the 1960s. The original measurement was by chance made by the US military service that operated the satellite Vela. The discovery was published in the Astrophysical Journal much later . The authors of this work refer to the old hypothesis  that the supernova explosions should be accompanied by the gamma and X-ray emission. Nevertheless, for the confirmation of the supernova-GRB connection, astronomers had to wait more than 30 years more. Since 1970s, it was already known that GRBs are cosmic events, so that they have been studied by research satellites. The main break through was made in 1990s, when the BATSE satellite confirmed the isotropic distribution of GRBs on the sky. This was a strong argument for their extragalactic origin, and thus GRBs being one of the brightest sources of radiation in the universe. Another achievement of the BATSE mission was to establish two classes of bursts, which statistically cluster around the long (s) and short (s) events . Here, the time measures the 90% of counts detected by the counter.
Until 1997, there were no GRB counterparts found in the lower energy bands. For the first time, the Italian-Dutch satellite BeppoSAX detected the position of a GRB precisely enough, so that the localisation of an optical afterglow was possible for GRB970228 . Here, the name of the GRB identifies the date of its observation, in the format rrmmdd. In May 1997, the first redshift of a GRB was estimated. The GRB970508, with , confirmed that the events are observed from cosmological distances. Typically, the optical afterglow of a GRB is of magnitude and can be observed from a couple weeks up to months after the burst. Its luminosity decrease with time has a power-law dependence. In addition, the X-ray afterglows can be observed, a few hours after the prompt phase. In some GRBs (like GRB991216), the emission lines have been reported in the Chandra, XMM-Newton, ASCA, and BeppoSAX data. Moreover, about half of the localized GRBs exhibits also the radio afterglows, seen about 1 day after the burst.
The host galaxies of GRBs have been identified based on their precise localisations, thanks to Hubble Space Telescope (GRB970228, Sahu et al. ). For a long time, this was possible only in the case of long GRBs. It was found that their hosts are statistically bluer and more actively starforming and are also only moderately metal-rich, or even metal-poor [8, 9]. The redshifts measured for a sample of GRBs were clustered around , and the redshift distribution was fitted well by the star formation rate dependence proposed by Porciani and Madau . The local density of the GRBs derived from the luminosity function was about 0.44 . In the case of short GRBs, their space distribution was found to be more ‘local’ than for the long ones, with , and 0.28, respectively, while the local density was found about 1.7 bursts per per year . These were just rough estimates, taking into account the fact that the short GRBs were missing the redshift data at that time. The number density of bursts should also be corrected by a beaming factor.
The important discovery which confirmed the origin of GRBs was the detection of emission lines, characteristic for supernova explosion, in the optical afterglows spectra (e.g., GRB030329). Hence, a very strong support was found for the idea of massive star’s explosions being the progenitors of these events [12, 13]. The supernova connection was proposed earlier, since in some of the optical afterglow lightcurves the characteristic red bumps were detected, a few weeks after the GRB . A new era in the GRB studies was opened with the launch of the Swift satellite in 2004. It found, for the first time, the afterglows of short GRBs. It occured, that contrary to long bursts, the short GRBs do not originate from the starburst galaxies neither the supernova explosions. A good candidate for their progenitor is a merger event, during which two compact objects collide, such as a binary neutron star meger. The Swift satellite detected GRBs at higher redshifts, e.g., GRB090423 at . It occurred that a simple star formation law does not fit to the GRB distribution [16, 17]. It was found possible that the bursts are concentrating in the regions of specific value of metallicity.
In 2008, another high-energy mission was launched, Fermi. The detector GBM (gamma ray burst monitor) was placed onboard to detect gamma rays from cosmic transients. The burst GRB130427 was the most energetic event found to date and the energy of photons exceeded 90 GeV. The most recent achievements of the Fermi mission were connected with searching for high-energy electromagnetic counterparts to the gravitational wave events, discovered by LIGO interferometer.
1.2. Models of GRBs origin
The gamma ray emission originates at rather large distances from the base of the jet. Therefore, the central engine driving the jets and forming its base are hidden from the observer and any studies of its structure must be grounded on the indirect analysis. The signal which would be emitted from the engine could be produced either in gravitational waves or in the neutrinos of MeV energies. Such neutrinos are rather impossible to be detected from cosmological distances. Much more promissing are neutrinos produced in the GRB jets which have energies in the order of GeV [18, 19, 20].
The constraints which are based on the observed isotropic equivalent energy of the bursts suggested that the total energy released during the explosion is in the order of the binding energy of a compact object with a stellar mass:
The burst durations are, however, much longer than the dynamical time, over which the matter can free fall onto such a star. The extended duration of the event must therefore be driven by a viscous process. The most plausible is the disk accretion process, which in addition provides a required collimation of the burst stream along the disk rotation axis. The appearance of a large amount of matter in the vicinity of a black hole, to be accreted with a few tens-hundreds of a second, implies an extremely violent process, most probably a birth of a new black hole.
The scenario of a compact object merger  was able to explain the energies required for a detection of the event from a cosmological distance . It was thought first that this scenario could be universal for all the types of GRBs; however, the observations of the GRB host galaxies, their active star formation rates in some cases, and the discoveries of GRB-supernova connection led to a different scenario for the long bursts. The currently accepted scenario for the long GRB progenitor is the collapsar, or hypernova model [23, 24]. In this model, the massive iron core of a rapidly rotating, evolved massive star (typically, the Wolf-Rayet type of star) quickly collapses to form a black hole. Most of the stellar envelope is expelled, but the remaining part is slowed down by the backward shocks and fall back. The material which posseses large angular momentum is concentrating in the equatorial plane of the star and forms an accretion disk. The non-rotating matter is falling radially along the axis of rotation into the black hole and the empty funnel forms there, to help collimate the subsequenltly launched jets . They have to break out the stellar envelope, and accelerate up to ultrarelativistic velocities, with Lorentz factors in the order of .
The hypernovae connected with long GRBs are a subgroup of the supernovae type I b/c (which do not exhibit neither hydrogen nor helium lines in their spectra) and constitute about 10% of this class . Statistically, this should agree with the estimated rate of GRBs. Their occurrence rate is about of the supernova rate per galaxy per year . The reason why not all the supernovae type I b/c (the core collapse supernovae) produce GRBs is most probably connected with the extremely low metallicities and rotation of the pre-SN star .
Among the models proposed to explain the short GRB population, the compact object merger model is most favored. Here, the duration of the event is limited by a much smaller size of the accretion disk, which forms after the remnant matter is left from the disrupted neutron star. The short bursts occur mostly in old, elliptical galaxies and within the regions of low star formation rate . The most probable progenitor configuration is the NS-NS binary; the BH-NS was also studied, see. e.g., Narayan et al. . Alternatively, also the magnetars, being extremely magnetized neutron stars when rotational energy is dissipated on the scale of seconds, may be able to produce Poynting dominated jets and power the GRBs .
2. Accretion onto a black hole as a driving engine of a GRB
The accretion tori surrounding black holes are ubiquitous in the universe. They occupy centers of galaxies, or reside in binary systems composed of stellar mass black holes and main sequence stars, being a source of power for their ultraviolet or X-ray emission. In these kinds of objects, frequently the black hole accretion is accompanied with the ejection of jets, launched along the accretion disk axis. Such sources are then observed as the radio-loud quasars, driven by the action of supermassive black holes, or the ‘microquasars’, which are driven by the stellar mass black holes. The jets of plasma are accelerated up to the relativistic speeds, and emit the high-energy radiation, measured over the entire energy spectrum.
Similarly, in the case of ultrarelativistic jets that are sources of gamma rays in GRBs, the driving engine is supposedly the stellar mass black hole surrounded by an accretion disk. However, since the GRB events are transients that last only up to several hundred seconds, and not for thousands, or millions of years, the accretion process should not be persistent and last not too long. The limiting time of the GRB engine activity is governed by the amount of matter available for accretion, and by the rate of this process (Figure 1).
From the computational point of view, the numerical model of any black hole accretion disk is based on standard equations of hydrodynamics (or MHD, if the magnetic fields are taken into account). The global parameters that enter the equations and act as scaling factors are the black hole mass, , its angular momentum (called spin, ), and accretion rate, .
2.1. Chemical composition of the accretion disk in GRB engine and the equation of state
The temperature and density in the accretion disk feeding the gamma ray busts are governed by a huge accretion rate. The physical conditions make the disk undergo onset of nuclear reactions, since and . The disk is composed from the free protons, electrons and neutrons, and its electron fraction, defined as the ratio of protons to baryons, which is typically less than . This is because of the neutronisation reactions, which are established by the condition of -equilibrium, and greatly reduce the number density of free protons (balanced by electrons to satisfy the charge neutrality), in the cost of increasing the neutron number density.
Because the plasma may contain a certain number of positrons, which are also a product of the weak processes, the net value of the electron fraction must account for them, and is defined as:
2.2. Neutrino cooling
The neutrino cooling in the GRB central engine is the most efficient mechanism of reducing the thermal energy of the plasma. The radiative processes involving photons are negligibly inefficient due to extremely large optical depths, such that the photons are completely trapped in the plasma.
The neutrino emission results from the following nuclear reactions:
and in certain large parts of the disk these processes lead to a fairly large neutrino emissivities. The equation of state is based on the equilibrium of nuclear reactions, which leads to establishing the balance between the rates of forward and backward processes, and on the ratio of number densities of protons to neutrons .
The species in general are relativistic and may have an arbitrary degeneracy level (given by their chemical potential). They are therefore subject to the Fermi-Dirac statistics, as follows from the kinetic theory of gas, and hence the relations between pressure, density, temperature, and entropy in the gas will not obey the ideal gas equation of state. Typically, these quantities are computed numerically and stored in the EOS tables (Figure 2).
2.3. Accretion physics in general relativistic MHD framework
The initial conditions for the structure of accretion disk should be specified in the fixed grid and the background metric most appropriate for the GRB problem is the Kerr spacetime. This is because the black hole is rapidly spinning. The initial condition evolves according to the continuity equation and the energy-momentum conservation equation:
If the magnetic fields are taken into account, the energy tensor contains matter parts and electromagnetic parts:
where equation of state of gas in the adiabatic form, , does not hold for the dense and hot plasma in the GRB flows. The EOS has to be therefore substituted with the Fermi gas.
2.4. Nucleosynthesis of heavy isotopes in GRB engines
The subsequent isotopes after Helium are created in the outer layers of the accretion disk body, as well as in its ejecta. Synthesis of heavy isotopes can be computed by means of the thermonuclear reaction network simulations . The code and reaction data (
The analysis of the integrated mass fraction distribution allows establishing the role of global parameters of the accretion flow model, such as the black hole mass and its spin, in forming the disk composition. We show here the resulting distribution of certain chosen isotopes synthesized in the nearest vicinity of the accreting black hole (up to ). The computations were performed via postprocessing of the results of the accretion disk structure, as computed for the spinning stellar mass black hole in the collapsar center . As was also shown by Banerjee & Mukhopadhyay , many new isotopes of titanium, copper, zinc, etc., are present in the outflows. Emission lines of many of these heavy elements have been observed in the X-ray afterglows of several GRBs by Chandra, BeppoSAX, XMM-Newton; however Swift seems to have not yet detected these lines. In principle, the evolution of the isotope distribution can be traced along the trajectories of the winds ejected from the disk surface to large distances. Such situation is more appropriate for ejecta launched from disks feeding short GRBS, which forms in addition to the dynamical ejecta from the NS-NS merger . If the accretion disk wind is expanding faster than the preceeding ejecta, the signatures of heavy elements might be observable via their radioactive decay and subsequent optical and infrared emission  called a ‘kilonova’ (see review by Tanaka ). Theoretically, this problem was studied in the first computations by Janiuk  and also by Siegel and Metzger .
3. Numerical simulations
The modeling of the emerging outflows in both types of GRBs is in general a very difficult task. Beyond the challenges of the various microphysical process participating and the general relativistic frameworks, it involves a wide range of spatial scales. For example, a simulation aimed to describe the whole extent of a jet originating from compact binaries needs a fine resolution of points for a typical 10 km of NS radius, or even an order of magnitude shorter, in order to properly resolve hydromagnetic phenomena like turbulence, Kelvin-Helmholtz instability (see Zrake & MacFadyen ; Kiuchi et al. ), and the magnetorotational instability (see Hawley et al.  and references therein). However, it must be able to reach radial distances up to the where the terminating Lorentz factor might be achieved (e.g., Tchekhovskoy et al. ). An even more extended scale regime occurs in the long GRBs counterpart since the spatial scales involve the stellar envelope penetration phase and the propagation to the surrounding space (1010–1013 cm). It is thus apparent that building a global simulation describing the whole outflow evolution is much beyond the present calculating capabilities and every specific effort is able to describe accurately a particular phase of the evolution, more or less extended depending on the use of adaptive mesh refinement techniques or a clever mesh selection.
3.1. Full GRMHD scheme
The merging phase of the compact object binaries has to be performed by fully relativistic schema, that is, ones that beyond capturing the essential of the hydro- and magneto-hydrodynamic aspects of the accretion evolves also the space-time. At present, the ambiguity for the precise nature of the members consisting the binary has not been clarified and the dominant research effort is oriented toward the BH-NS, NS-NS candidates. As a result, a number of codes were developed to solve the underlying equations for both types of progenitors, every of which presenting its own approximations and limitations (see Paschalidis  for a list on the codes and a more detailed review on the full GR findings).
Assuming the driving object of the burst is a black hole—torus system simulations must accomplish two challenges: create a viable disk that feeds the system for the burst duration and launch a jet which able to reach the Lorentz factor that satifies the fireball model requirements. None of these tasks are trivial to be obtained. Back of the envelope estimates for the accretion rate is , where is the efficiency of converting the disk accretion to the observed -photons luminosity, for the typical values of the sGRB medium value duration  and energy of erg result to a disk of . Foucart  examined a number of unmagnetized BHNS simulation and proposed the fit:
which is applicable on , while a similar relationship has been proposed for the NS-NS and in the framework of the hydro simulations , but contrary to the one above the estimation is now EOS-dependent. Inspection of the above expression for a fixed value of and assumed value of the compaction provides the remnant disk mass as a function of the BH spin. The results of Foucart  and Lovelace et al.  point toward high initial values of the BH spin, if a massive disk is to be created.
Although the launch of jets was naturally obtained in the fixed space time simulations long before, that task proved to be non-trivial for the full GR ones. The NS-NS simulations by Rezzolla et al.  were until recently the only ones that demonstrated the emerging of a jet, while most of the simulations did not show a collimated outflow. For example, the BHNS of Kiuchi et al. , a wind was found, but for the NS-NS model of the pressure of the fall back material was so strong preventing even the launching of the wind.
All the above indicates that the magnetic field topology close to the vicinity of the black hole is of crucial importance and no matter of what process (Blandford and Payne ) is the one that drives the outflow acceleration and the resulting jet, a large scale poloidal component is crucial to drive the energy outflow outwards. But in the simulations, the field remaining outside the black hole is wounded to a toroidal configuration, while the poloidal component had an alternating orientation. Finally, the launching of the jets in the BHNS framework was achieved once a more realistic bipolar initial configuration was adopted . The realization of such a configuration is a difficult task mostly because of the low density of the exterior medium. By adopting a specific set of initial condition to overcome code limitations on this regime, the authors managed to produce a configuration of enhanced magnetic field over the BH poles because of the magnetic winding. The field strength increased from to G, which is a crucial value for the BZ process (see below), resulted in the launch of a 100 ms jet, a relatively short duration. A similar evolution was also obtained for the NS-NS framework, where once again the importance of the exterior magnetic field seems to be of crucial importance . As a result, previous GRMHD results of Rezzolla et al.  have been confirmed, while in consistency with Kiuchi et al. , the jet was launched only after the density of the fall back material above the BH has decreased.
4. Ejection and acceleration of jets in gamma ray bursts
In both frameworks of the bursts, the plausible central engine refers to hyperaccreting solar mass black holes surrounded by a massive disk , while the energy released and the prompt phase duration points to high accretion rates of order . The high-energy non-thermal photons received by the observers point for an ultrarelativistic outflow , most likely in jet geometry, that in turn implies baryon-clean outflow. Building a launching mechanism for such a jet is not trivial and beyond the Blandford Znajek proccess . Therefore, an another type of mechanism namely the neutrino pair annihilation was proposed.
But beyond the enormous energetic constrains, our mechanism has to face another major challenge, namely, the great variability of the prompt emission lightcurves. Although long debated, two of the most widely accepted models for the origin of the -radiation, the internal shocks and the photospheric emission link the rapid variability directly with the properties of the central engine (see, however, Morsony et al.  and Zhang & Yan  for a source of additional variability due to the propagation inside the star and the effects of amplified local turbulence). As a consequence, the determination of the minimum time variability by the observational data is of primary importance, but that proves to be challenging since the corresponding time scales have power densities very close to the data noise. Nevertheless, some typical values can be obtained and MacLachlan et al.  using a method based on wavelets proved that both types of bursts present variability in the order of a few to few tenths of milliseconds, with the long GRBs exhibiting a longer time variability than the short bursts.
4.1. Jet launching
The high density and temperature of the accreting flow result in a photon optically thick disk that cannot cool by radiation efficiently. On the other hand, the high temperature and density result in the intense neutrino emission from the inner parts of the disk, called NDAF (neutrino dominated accretion flow). The effects of neutrino outflow, if it is capable to produce a highly relativistic jet and what implications it imposes when it is combined with the Blandford-Znajek process, is a matter of intense debate, presently inconclusive. There exist two critical values of the accretion rate, and , that determine the efficient neutrino cooling. If the accretion rate is lower, the temperature is not high enough to initiate the neutrino emission. If the accretion rate is higher, the disk becomes optically thick to neutrinos. Assuming an -viscosity in the disk , the values of the critical rates depend on both and the spin of black hole . For example, the calculation by Chen and Beloborodov  provided the fit:
where depend on the black hole’s spin. For , , , while for , .
The total energy ejected in neutrinos was calculated by Zalamea and Beloborodov  and in principle can reproduce the GRB energies, but for the higher accretion rates [62, 63], making the association with the longest duration bursts is problematic . Recent hydrodynamic simulations of Just et al.  assuming a black hole and torus accretion system gave negative conclusion for the neutrino annihilation applicability on the merger type progenitors. Specifically, the NS-NS merger tends to create heavier baryon loaded environments. Moreover, the efficiency of the mechanism is crucially depend on the fastly rotating central object which might be difficult to obtain in the case of the NS-NS mergers. The situation is more improved for the BH-NS progenitor, providing , in a half cone opening around the axis which is only an order of magnitude lower than the medium of the observed GRBs . Thus, the neutrino annihilation process can be applicable to the less energetic GRBS, but we still can exclude the case of its partial contribution to the rest class of short bursts (see, however, Levinson and Globus ).
The other mechanism that accounts for the launch of a low baryon loaded jet is the Blandford-Znajek process that might be resembled with a Penrose proccess of an ideally conducting plasma in the force free limit. According to it, the plasma is pushed via accretion to the ergospheric negative energy orbits, while the magnetic twist results in an outward propagating electromagnetic jet (see Komissarov  for an excellent explanation).
In general, the rotational energy of a black hole is
where for a maximally rotating BH (). The rotational energy of the BH can be extracted through the lines threading the horizon forming a Poynting dominated jet of power
In the simulations under the fixed Kerr spacetime [71, 73], the central object is fed with a relatively large magnetic flux, that is, more than what the accreting plasma can push inside the horizon. The excessing part of the magnetic flow remains outside the horizon and forms a magnetic barrier [74, 75], saturating accretion and forming a baryon-clean funnel around the axis of rotation (MAD, magnetically-arrested disk). Moreover in some specific initial configuration assumed, the time averaged power of the jet outflow efficiency exceeded the accretion one , demonstrating the extraction of the rotational energy of the central object. As a conclusion, the high values of the emitted energy combined with the low baryon load currently set the BZ as the favorable mechanism applying on the GRB. Nevertheless, as mentioned before the whole picture is still incomplete and it will probably remain so, as long as the neutrino effects will not be taken into account in a self-consistent manner.
4.2. Collimation mechanisms
The effects of the surrounding to the jet material are crucial for the dynamic evolution of the jet affecting both its acceleration and collimation. The build up of a large scale toroidal component in a magnetic dominated jet results to hoop stress that contributes to the jet collimation . Nevertheless, this contribution proves to be less efficient in the relativistic regime and turns to be insufficient even for the cases where a very fast rotation is induced [77, 78, 79]. As a result, the contribution of the exterior environment pressure plays a fundamental role in the GRB outflow evolution for the merging binaries and core-collapsing bursts.
In the long GRB framework, the outflow penetrates the stellar envelope, most likely a Wolf-Rayet star, and continues its propagation to the interstellar space. The propagation of the jet’s head in the dense environment results to sideway motion of the stellar material and to the formation of a hot cocoon surrounding the jet. The accurate description of such a system is cyclic and both jet and stellar material must be described self consistently. The jet velocity depends crucially on the jet cross section, while it determines the amount of energy injected in the cocoon that in its turn defines the supporting exterior pressure of the jet. As a result, there exists a number of numerical simulations investigating the evolution of this phase both of hydrodynamic (e.g., Mizuta and Aloy ; Lazzati et al. ) as also of magnetic dominated outflows . In addition, theoretical and semi-analytical models have also been developed to interpret the underlying processes (e.g., Bromberg et al. ; Globus & Levinson ).
The initial propagation, close to the launching point, is similar to the two extreme case of a hydro or Poynting dominated jet since the outflows internal pressure much exceeds the cocoon’s one. The outflow’s freely expansion is up to the collimation point defined by the equality of the above quantities, while after it the outflow evolution differs accordingly to its magnetic context (see Granot et al.  for a review). The Poynting dominated outflows result in a faster drilling breakout time in an order of magnitude 0.1 to ~10 s. Bromberg et al.  proposed a criterion to identify so that the burst duration is directly correlated with the central engine activity. As a result, there expected a plateau at the long GRB duration distribution for times lower than the break out one. Surprisingly, the analysis of the observational data from the three most dedicated satellites (BATSE, Swift, and Fermi) provided values that are in favor of the hydrodynamic propagation scenario. If the hydrodynamic launching mechanism is to be excluded for the above reasons, a process that dissipates the outflow energy inside the star has to be found. Lately, the progress has been made by the investigation of the ‘kink instability’ . As a result, a typical Poynting dominated collapsar jet is able to achieve the equipartition between thermal and magnetic energy at the so-called recollimation point (in the specific simulations) without being disrupted by the instability. Such a jet propagates more or less as a hydrodynamic jet .
5. Radiative processes in jets: emission of gamma rays
Although rich in models, the dynamics of the phase after the jet break out, that is, at the place where the prompt radiation is being produced, is still not well understood. Among the two models assuming matter or Poynting flux dominance, the hot fireball [22, 87] is the older and more widely used one. The matter dominated fireball is mainly constituted by baryons and radiation, with the latter being significantly larger by at least two orders of magnitude. The adiabatic expansion of the fireball accelerates the baryons to high Lorentz factor, while a fraction of this thermal energy is being radiated when the flow becomes transparent to the electron-positron pair creation, providing the so-called photospheric emission. In even higher distances, the outflow inhomogeneities endure mutual collisions leading to the formation of internal shocks that accelerate electrons and produce the non-thermal part of the observed radiation.
The location of the photospheric radius , when we assume that acceleration has effectively completed (saturation radius) before the flow becomes transparent, was calculated by the number of models. Following, for example, Hascoët et al.  and references therein,
where is the magnetization parameter at the saturation radius. The corresponding observed temperature and luminosity are:
where is the redshift and is the temperature at the initial radius . The emerging radiation is called a modified black body  with the lower energy Raleigh-Jeans tail having a photon index of instead of in the usual black body lower energy limit, because of relativistic geometric effects. It is worth to mention here that if some sub-photospheric dissipation occurs before the photospheric radius then the above scaling does not hold and the low energy part of the spectrum will be modified (see, for example, Thompson  and Giannios and Spruit  for the reconnection implications).
Beyond the photospheric emission, the interpretation of the non-thermal prompt emission is much more challenging. Up to day, there is no definite answer for the precise place that the -radiation emerge, but the most popular model is the internal shock model . This model provides a natural way to dissipate the bulk kinetic of the outflow by assuming the mutual collision of inhomogeneities existing at the main body of the outflow. One of the great advantage of this model is its simplicity, while back of the envelope calculations exhibits the beauty and the essentials of the process.
Lets assume two cells with Lorentz factors and masses , respectively, emitted with a time difference . As long as the latter is propagating faster, their mutual collision will occur at a distance
where is the average Lorentz factor of the outflow. Using the conservation of the 4-momentum, we can model a plastic collision that will provide a single cell propagating
where is the Lorentz factor of the relative motion; in reality the collision results in a pair of shocks that propagate at the slower and faster cell, respectively.
where the first term of the right hand is because of the injection time difference and the second because of the shock propagation. We notice that the variability of lightcurves traces in general the central engine activity, and as a result, the high variability of the prompt emission can be ascribed to the intrinsic variability of the source (BH-torus for short bursts, BH-torus plus the propagation inside the star for the long ones).
The biggest problem for the internal shock model is the efficiency of the collisions. The efficiency of the thermal energy production is easily obtained
and is maximized for a given when the two cells are of equal mass , e.g., if , . Detailed analysis by the number of authors increases this limit up to for thermally dominated outflows, but most of the times the corresponding efficiency is in the range , contrary to the observations that suggest efficiencies exceeding (see Kumar and Zhang  and references therein).
Despite the great progress in the interpretation of the prompt GRB radiation, crucial issues still remain open and especially on how the mildly relativistic shocks accelerate particles. As a result, today no model that describes self consistently the whole process exists and most of the approach still uses the fractions , of the internal energy that is dissipated on an enhanced magnetic field of the shocked gas and on some fraction of electrons accelerated to a non-thermal energetic distribution. Sequentially to the approximation of the shocked regime, the radiation models can be applied and used to examine all the intervening radiative and kinetic processes. An interesting point to notice is that the cell high magnetization, , leads to inefficient collisions preventing the dissipation of the energy [94, 95]. In such a case, the acceleration of the electron can be obtained through the reconnection process. Such a process can occur before or after the photospheric radius [96, 97, 98] and despite the extensive outgoing study of the process there are still even bigger ambiguities than the other two just mentioned . For a review on the issue, the reader can refer Kagan et al. .
6. Multimessanger discoveries of electromagnetic and gravitational wave counterparts
The assembly of black hole binaries detected in gravitational waves by the LIGO interferometer was established since the discovery of GW150914 . These systems contain very massive black holes, whose origin poses a puzzle for the stellar evolution models . One of the possible scenarios for the formation of such a black hole is a process of direct collapse of massive stars. Here, no spectacular hypernova explosion is proposed, and hence no gamma ray burst should have occured during the formation of a very massive black hole neither for the first nor for the second component in the binary. An additional issue is the feedback from a rotationally supported innermost parts of the star during the collapse. It is rather natural that the star at its final stages of evolution should posses some non-negligible angular momentum in the envelope. This angular momentum may, however, help unbind the outer layers and halt accretion (Ramirez-Ruiz 2017, private communication). This will have a consequence for both the ultimate mass of the black hole, and its resultant spin, to be independently verified by the values obtained for these parameters from gravitational waveform constraints.
One of the possibilities when the gravitational wave signal would be found in relation to the rotating massive star collapse, and coincident with a gamma ray burst, was proposed by Janiuk et al. . In this scenatio, the collapse of a massive rotating star in a close binary system with a companion black hole. The primary BH which forms during the core collapse is first being spun up and increases its mass during the fall back of the stellar envelope. As the companion BH enters the outer envelope, it provides an additional angular momentum to the gas. After the infall and spiral-in toward the primary, the two BHs merge inside the circumbinary disk. The second episode of mass accretion and high final spin of the postmerger BH feeds the gamma ray burst.
In the above framework, it is in principle possible that the observed events have two distinct peaks in the electromagnetic signal, separated by the gravitational wave emission. The reorientation of spin vector of the black holes and gravitational recoil of the burst engine is, however, possible. Therefore, the probability of observing two electromagnetic counterparts of the gravitational wave source would be extremely low.
The electromagnetic signal is in general not expected from a BH-BH merger. However, the weak transient detected by Fermi GBM detector 0.4 s after GW 150914 has been generating much speculation [104, 105]. Despite the fact that other gamma ray missions claimed non-detection of the signal, several theoretical scenarios aimed to account for such a coincidence, whether detected, or to be found in the future events [106, 107, 108, 109, 110].
Finally, the binary neutron star merger GW170817, detected in gravitational waves, was connected with the gamma ray emission observed as a weak short burst . Its peculiar properties pose constraints for the progenitor model ). Moreover, at lower frequencies, the follow-up surveys have shown the presence of a kilonova emission from the merger’s dynamical ejecta. These ejecta masses are broadly consistent with the estimated r-process production rates, required before to explain the Milky Way isotopes abundances. It is possible that the magnetically driven winds launched due to the accretion in the GRB engine may also contribute to the kilonova emission from NS-NS merger.
Gamma ray bursts are known since almost 50 years now and are still an exciting field of research for both observers and theoretitians. Their energetic requirements proved the fundamental role of the stellar mass black hole formation and mass accretion in the production of ultrarelativistic jets.
The details of this process are, however, far from being fully understood. In short GRBs, the process of black hole birth after the neutron star merger may proceed through different channels, with the possible presence of a transient hypermassive neutron star, depending on the EOS and rotation of the progenitors. In long GRBs, the properties of progenitor star, its envelope rotation, metallicity, etc., as well as the binarity of the whole system, may affect the core collapse in an even greater way. The question of binarity is of a great interest in the context of the fate of high mass X-ray binaries, such as Cygnus X-3, which in addition to the pre-hypernova star contains a companion which is most probably a black hole.
Such fundamental questions are now being attacked with the modern tools of numerical astrophysics, which involve relativistic magnetohydrodynamics and nuclear physics. With the discovery of gravitational waves, a new window has also opened from the observational point of view, especially since the gamma ray signal has been identified in connection with the compact object merger. The identification of the additional electromagnetic signal from the radioactive decay of the GRB ejecta provided a completely new way to probe the whole process and hopefully build a comprehensive picture in the near future.
We acknowledge the financial support from the Polish National Science Center through the Grant Sonata-Bis No DEC-2012/05/E/ST9/03914. We also thank the Interdisciplinary Center for Mathematical and Computational Modeling of the Warsaw University for the access to their supercomputing resources, under the grant GB 70-4. Finally, AJ would like to thank the Kavli Summer Program in Astrophysics 2017, and the Center for Transient Astrophysics at the Niels Bohr Institute, for great hospitality and inspiring environment.