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.
Part of the book: Cosmic Rays