# Gamma-ray burst interaction with the circumburst medium: The CBM phase of
GRBs

Asaf Pe’er Bar-Ilan University, Ramat-Gan 5290002, Israel  Felix Ryde
Department of Physics, KTH Royal Institute of Technology and The Oskar Klein
Centre
SE-10691 Stockholm, Sweden

###### Abstract

Progenitor stars of long gamma-ray bursts (GRBs) could be surrounded by a
significant and complex nebula structure lying at a parsec scale distance.
After the initial release of energy from the GRB jet, the jet will interact
with this nebula environment. We show here that for a large, plausible
parameter space region, the interaction between the jet blastwave and the wind
termination (reverse) shock is expected to be weak, and may be associated with
a precursor emission. As the jet blast wave encounters the contact
discontinuity separating the shocked wind and the shocked interstellar medium,
we find that a bright flash of synchrotron emission from the newly-formed
reverse shock is produced. This flash is expected to be observed at around
$\sim 100$ s after the initial explosion and precursor. Such a delayed
emission thus constitutes a circumburst medium (CBM) phase in a GRB, having a
physically distinct origin from the preceding prompt phase and the succeeding
afterglow phase. The CBM phase emission may thus provide a natural explanation
to bursts observed to have a precursor followed by an intense, synchrotron-
dominated main episode that is found in a substantial minority, $\sim 10$ % of
GRBs. A correct identification of the emission phase is thus required to infer
the properties of the flow and of the immediate environment around GRB
progenitors.

ISM:bubbles — gamma rays: bursts — gamma rays: theory — radiation mechanism:
nonthermal — shock waves — stars:winds

##  1 Introduction

In recent years, it has become evident that long duration ($\geq 2$ s) gamma-
ray bursts (GRBs) are associated with the deaths of massive stars, presumably
originating from their core collapse (Woosley, 1993; Levinson & Eichler, 1993;
MacFadyen & Woosley, 1999; MacFadyen et al., 2001; Zhang et al., 2003; Yoon &
Langer, 2005). In this collapsar scenario, the progenitor of long GRBs is a
rapidly rotating, low-metalicity, massive star. Evidence for this scenario
include (i) an observed association between GRB and energetic core-collapse SN
(Galama et al., 1998; Bloom et al., 1999; Reeves et al., 2002; Hjorth et al.,
2003; Woosley & Bloom, 2006; Chornock et al., 2010; Starling et al., 2011;
Cano et al., 2017; Wang et al., 2017; Izzo et al., 2019; Kann et al., 2019;
Melandri et al., 2022; Fulton et al., 2023, for a very partial list), as well
as (ii) the association of GRBs with star-forming galaxies and star-forming
regions within galaxies (Paczyński, 1998; Wijers et al., 1998; Fruchter et
al., 1999; Trentham et al., 2002; Savaglio et al., 2009; Castro Cerón et al.,
2010); for recent reviews, see, e.g., Pe’er (2015); Kumar & Zhang (2015);
Levan et al. (2016). Possible candidates are Wolf-Rayet stars (Woosley &
Heger, 2006; Chevalier & Li, 2000; Langer et al., 2010), which are stars that
have lost their hydrogen envelopes, leaving a small, compact core that allows
the GRB jet to break out from the star. Wolf-Rayet stars have a rapid mass-
loss and, in many cases, a complex circumstellar environment (Eldridge et al.,
2006; Castro-Tirado et al., 2010). For instance, in the local universe, around
a third of Wolf-Rayet (WR) stars are observed to have a distinct ring nebulae
(Johnson & Hogg, 1965; Marston, 1997). In some cases, even multiple rings are
observed (Marston, 1995; Duronea et al., 2013; Lau et al., 2022). The ring
nebulae are thought to have been caused either by the massive winds sweeping
up the circumstellar medium, or by instabilities in the outer envelope, giving
rise to giant eruption events (Chu, 1981; Crowther, 2007). They lie at a
distances of a few parsec from the central star (Stock & Barlow, 2010), with
some lying as close as 0.7 pc (Cohen et al., 2005; Sirianni et al., 1998). In
addition, the wind-blown bubbles form a low-density cavity with densities as
low as $10^{-3}$ – $10^{-2}$ cm-3 (Toalá & Guerrero, 2013) and, in some cases,
the nebula itself is located inside a cavity in the interstellar medium
(Vamvatira-Nakou et al., 2016).

The GRB phenomenon is typically divided into two phases, the prompt phase and
the afterglow phase. The prompt phase is the initial, triggered, emission
which is predominantly observed in the gamma-rays, and consists of variable
light curves, often with distinct pulses. Its origin is assumed to be from
within the GRB jet, either from the photosphere or as a result of internal
shocks (e.g., Mészáros, 2006) or, alternatively, magnetic energy dissipation
(McKinney & Uzdensky, 2011). The light-curve of the afterglow, on the other
hand, is much smoother, dominating in the X-rays and at lower photon energies.
It is typically attributed to the self-similar evolution of the blastwave
interaction with the circumburst medium. This dichotomy with two GRB phases,
however, neglects the possible contribution of the interaction of the jet with
the immediate surroundings of the progenitor (e.g., Lazzati et al., 2002;
Mirabal et al., 2003; Chevalier et al., 2004; Eldridge et al., 2006; Castro-
Tirado et al., 2010). In particular, since massive stars are expected to form
complex and significant circumstellar environments, or nebulae, during their
final stages in their evolution, the interaction between the jet and this
circumburst medium (CBM) might form a distinct emission phase in GRBs, which
therefore could be denoted the ”CBM phase”. Such a phase would be distinct in
origin to both the typical prompt and the afterglow phases. The initial prompt
phase emission might therefore be followed by a CBM phase emission resulting
from the interaction between the jet and the ring nebula, with a delay that
depends on the size of the nebuale and the jet Lorentz factor. Since the rings
are at most mildly relativistic and the jet is highly relativistic, the
contrast in Lorentz factors will be large, leading to efficient kinetic energy
dissipation. This, in turn, will results in significant synchrotron emission
as the jet crosses the nebulae, and thus intense gamma-ray emission.

Indeed, many GRB light-curves have an initial precursor which is separated
from the main emission (e.g., Murakami et al., 1991; Koshut et al., 1995;
Vanderspek et al., 2004; Piro et al., 2005), with prominent and bright
examples given by GRB160625B (Zhang et al., 2018; Ravasio et al., 2018) and
GRB160821A (Sharma et al., 2019). It was shown by Lazzati (2005) and Zhu
(2015), that a small, but non-negligible minority of around $5\%-20\%$ of GRB
light-curves show such a precursor. These precursors are characterized by peak
flux that is smaller than a third of the main pulse, that typically occur
after a few 10’s of seconds from the trigger, but with some cases reaching up
to several 100’s of seconds. In many cases, the precursors and the main pulses
are separated by a distinct quiescent period. Similar figure, $9\%$ of bursts
in the GBM catalogue showing evidence for a precursor was reported by Coppin
et al. (2020). We, therefore, raise the possibility that the main emission in
these burst light-curves are due to such a CBM emission phase, and not due to
the traditional prompt emission phase.

The wind-blown bubbles have a complex density structure, basically composed of
four distinct regimes (Castor et al., 1975; Weaver et al., 1977): (a)
unshocked stellar wind; (b) shocked stellar wind; (c) shocked interstellar
medium (ISM) and (d) unshocked ISM. A forward propagating shock separates
regions (c) and (d) (the unshocked and shocked ISM), a reverse shock separates
regions (a) and (b), and a contact discontinuity (CD) separates regions (b) -
the shocked stellar wind from region (c) - the shocked ISM.

Assuming that the WR star is the progenitor of a GRB, this complex density
structure is expected to affect the dynamics of the propagating relativistic
blast wave. This scenario was studied by several authors (Pe’er & Wijers,
2006; Nakar & Granot, 2007; van Eerten et al., 2009; Mimica & Giannios, 2011),
focusing on the interaction between the GRB blast wave and the wind
termination (reverse) shock. These authors concluded that although some
observed signal is expected as a result of this interaction, it is not
expected to be significant. We point out though, that the size of the bubble
considered in these works, $\sim 10$ pc, implied that the predicted signal was
at late times; during the afterglow phase of GRBs. While this size is typical
for many systems, as pointed out above, it is much larger than what is
inferred from observations of some nearby WR stars (Sirianni et al., 1998;
Cohen et al., 2005). Thus, for $\lesssim$ pc scale nebulae, the resulting
signal may be different than predicted at earlier works, and occur at much
earlier times.

As we show here, although the interaction of the GRB blast wave and the wind
termination shock may not lead to a strong observed signal, such a signal is
expected as a result of the GRB blast wave interaction with the contact
discontinuity (CD) that separates the shocked wind and the shock ISM. The
resulting light-curves from such a scenario should therefore have three
different episodes: the triggering signal (resulting from the explosion that
leads to the ejection of a relativistic jet), a quiescent period, followed by
a bright, long flare of synchrotron origin that occurs when the blast wave
interacts with the CD.

In this paper, we explore such a wind bubble, or nebula, scenario in order to
explain light curves with a precursor which is followed by a strong
synchrotron emission episode. This paper is organized as follows. In §2 we
introduce our assumption and describe the general properties of the wind
bubble. In §3 we describe the interaction of the blast wave with the wind
bubble and, in particular, with the contact discontinuity in §4. We discuss
and conclude in §6.

##  2 The circumburst environment in the ”wind bubble” scenario

The structure of the ”wind bubble” depends on the evolutionary stages of the
progenitor star. Here we adopt the common assumption that prior to the
explosion that leads to a GRB, the progenitor star undergoes a Wolf-Rayet
stage (Garcia-Segura et al., 1996b, a). Indeed, wind bubbles are observed
causing distinct ring nebulae around massive stars in their Wolf-Rayet stage
(e.g., Johnson & Hogg, 1965; Marston, 1995, 1997; Duronea et al., 2013; Lau et
al., 2022).

Such wind-blown bubbles are composed of low-density gas
($<10^{-3}\mathrm{cm}^{-3}$) with temperatures exceeding $10^{7}$ K (Toalá &
Arthur, 2011, 2018). The low density and hot gas may not be directly detected
due its low X-ray emissivity. However, in the mixing zone between the hot
bubble and the cooler outer material the emission measure is expected to
increase to detectable levels. Such a scenario is consistent with observations
yielding upper limits to the density (e.g., Chu et al., 2003; Toalá &
Guerrero, 2013). Furthermore, we note that such tenious medium is consistent
with several observations of GRB afterglows, which indicate circumburst medium
which have very low densities (Piro et al., 2014; Ryde et al., 2022; Dereli-
Bégué et al., 2022), in some cases, even as low as $10^{-4}\,{\rm cm}^{-3}$
(Oganesyan et al., 2023). Finally, the size of the cavity inside the Wolf-
Rayet ring nebula depends on the metalicity of the environment into which the
wind emerges, with higher metalicity typically associated with a larger
nebulae (e.g., Ramirez-Ruiz et al., 2001). Therefore, one may consider the
sizes that are measured locally in our own galaxy to serve as upper limits of
the sizes that are expected in the GRB host galaxies.

We adopt here the following characteristics in describing the circumburst ring
nebula:

  * •

Size: $\lesssim$1 pc. (e.g., Stock & Barlow, 2010; Sirianni et al., 1998;
Cohen et al., 2005).

  * •

Characteristic density inside the cavity: $n\sim 10^{-2}~{}{\rm cm^{-3}}$
(e.g., Chu et al., 2003; Toalá & Guerrero, 2013).

  * •

Temperature $T\sim 10^{7}$ K (e.g., Chu et al., 2003; Toalá & Guerrero, 2013).

  * •

To these we add an observational time of the GRB flare at $\sim 100$ s from
the precursor, as well as typical flare duration of a few tens of s. (e.g.,
Zhang et al., 2018; Sharma et al., 2019).

The physical structure of the wind bubble was derived by Castor et al. (1975).
The entire structure depends on only four parameters: (i) The mass loss rate,
which we take as $\dot{M}=10^{-9}{\dot{M}}_{-9}~{}{\rm M_{\odot}/year}$. This
value is lower than the fiducial value often taken in the literature of
$10^{-5}~{}{\rm M_{\odot}/year}$, and is chosen here being consistent with the
observational data as given above and further discussed below, in particular
the cavity size of $\sim 1$ pc, as well as the flaring GRB time of $\sim 100$
s. Further, this value is consistent with the estimates of Piro et al. (2014).
(ii) The stellar wind velocity, which is taken as
$v_{w}=10^{8}~{}v_{w,8}~{}{\rm cm~{}s^{-1}}$. As we show below, this value
determines the temperature of the cavity, and therefore is fixed once this
temperature is measured. (iii) The time the star emits the wind, which is
taken as $t_{\star}=10^{4}~{}t_{\star,4}$ yr. This value mainly affects the
cavity size. This may be the most uncertain value, as the wind properties just
prior to the final stellar explosion are least constrained. Finally, (iv) The
ambient ISM density is taken as $n_{\rm ISM}=10~{}n_{0,1}~{}{\rm cm^{-3}}$.
The value of $n_{\rm ISM}$ is related to the density outside the ring nebula,
which itself can be part of a superbubble or an interstellar bubble (Chu,
2016; Vamvatira-Nakou et al., 2016). However, the value has relatively small
influence on the observed signal, as we show below.

The wind bubble consists of four distinct regions. (a) A hypersonic stellar
wind, characterized by a density decrease, $n(r)=\dot{M}/(4\pi
m_{p}r^{2}v_{w})\propto r^{-2}$ (for steady wind flowing at constant
velocity). (b) A hot, almost isobaric region consisting of shocked stellar
wind mixed with a small fraction of interstellar gas. (c) A thin, dense shell
containing most of the swept-up interstellar gas; and (d) the ambient
interstellar gas. In Figure 1, we present a cartoon showing these four
distinct regimes. In between regions (a) and (b) there is the wind reverse
shock, also referred to as the wind termination shock (RS); in between regions
(b) and (c) there is a contact discontinuity (CD); and in between regions (c)
and (d) there is the wind forward shock (FS).

Figure 1: Cartoon showing the density profile of a wind bubble as a function
of the distance, $R$, from the central star. The four distinct regimes, marked
(a)–(d) are separated by the forward and reverse shocks (F.S and R.S.), as
well as the contact discontinuity (C.D.).

Neglecting the width of region (c) compared to region (b) (see below), and
assuming that most of the energy in region (b) is in the form of thermal
energy, it was shown by Castor et al. (1975) that the forward shock (outer
termination shock) radius is given by

$R_{\rm FS,W}=\left({125\over
308\pi}\right)^{1/5}\left({\dot{M}v_{w}^{2}t_{\star}^{3}\over\rho_{ISM}}\right)^{1/5}=6.9\times
10^{17}~{}\dot{M}_{-9}^{1/5}v_{w,8}^{2/5}t_{\star,4}^{3/5}n_{0,1}^{-1/5}~{}{\rm
cm}.$ (1)

The density in region (c) is approximated as $\rho_{c}\simeq 4\rho_{ISM}$,
valid for a strong, adiabatic shock. Then the width in region (c) is
calculated by comparing the total ISM mass swept to radius $R_{\rm FS,W}$,
$M_{ISM}\simeq(4\pi/3)R_{\rm FS,W}^{3}\rho_{ISM}$ to the mass in region (c),
$\approx 4\pi R_{\rm FS,W}^{2}\Delta R_{c}\rho_{c}$ giving $\Delta
R_{c}=R_{\rm FS,W}/12$.

The pressure in regions (b) and (c) is $P_{b}=P_{c}=(2/3)u_{b}$ (assuming a
monoatomic gas), where $u_{b}$ is the energy density in region (b), giving

$P_{b}=P_{c}={7\over 25}\left({125\over
308\pi}\right)^{2/5}\rho_{ISM}\left({\dot{M}v_{w}^{2}\over
t_{\star}^{2}\rho_{ISM}}\right)^{2/5}=2.2\times
10^{-11}~{}\dot{M}_{-9}^{2/5}v_{w,8}^{4/5}t_{\star,4}^{-4/5}n_{0,1}^{3/5}~{}{\rm
dynes~{}cm^{-2}}.$ (2)

Using the strong reverse shock assumption, $P_{b}\gg P_{a}$, Weaver et al.
(1977) calculated the radius of the reverse shock, by equating the ram
pressure in the upstream region (a), $\rho_{a}(R_{\rm RS,W})v_{w}^{2}$ to the
pressure downstream, $P_{b}+\rho_{b}v_{b}^{2}$. This gives

$R_{\rm RS,W}=\left({3\over 4}{\dot{M}v_{w}\over 4\pi
P_{b}}\right)^{1/2}=1.3\times
10^{17}~{}\dot{M}_{-9}^{3/10}v_{w,8}^{1/10}t_{\star,4}^{2/5}n_{0,1}^{-3/10}~{}{\rm
cm}.$ (3)

The number density of particles in region (a) (the unshocked wind) at $R_{\rm
RS,W}$ is

$n_{a}(R_{\rm RS,W})={\dot{M}\over 4\pi m_{p}R_{\rm RS,W}^{2}v_{w}}=1.8\times
10^{-3}~{}\dot{M}_{-9}^{2/5}v_{w,8}^{-6/5}t_{\star,4}^{-4/5}n_{0,1}^{3/5}~{}{\rm
cm^{-3}}.$ (4)

The density in region (b) is assumed constant, and equal to $n_{b}\simeq
4n_{A}(R_{\rm RS,W})$. The temperature in region (b) is calculated using the
equation of state, $T_{b}=P_{b}/k_{B}n_{b}$,

$T_{b}=2.27\times 10^{7}~{}v_{w,8}^{2}~{}\deg.$ (5)

One therefore finds that the temperature in region (b), namely the shocked
wind regime, depends solely on the wind velocity. Thus, as stated above, a
measurement of an observed temperature of $\sim 10^{7}~{}\deg$, provides a
strong observational constraint, necessitating a wind velocity of the order of
$10^{8}~{}{\rm cm~{}s^{-1}}$. Furthermore, note the strong dependence of the
temperature on the wind velocity.

From Equation (1) it is deduced that an observable bubble size of $\lesssim$
pc, implies that the wind duration cannot be much longer than $10^{4}$ yr, due
to the very weak dependence of the cavity size on the mass loss rate,
$\dot{M}$ and the ambient density, $n_{0}$. As the wind veocity is set by the
cavity temperature, the only significant dependence of the cavity size is on
the wind duration.

##  3 The GRB blast wave as it crosses the wind bubble

At the end of its lifetime the progenitor star at the center of this wind
bubble explodes, producing, by assumption a GRB. This explosion leads to the
ejection of a blast wave (jet) that quickly becomes relativistic, being
accelerated either by photon (radiative) pressure or by magnetic energy
dissipation (magnetic reconnection). This relativistic blast wave then
propagates through the complex wind bubble environment. As we show here,
interaction of this expanding blast wave with the wind bubble environment can
lead to an observed signal. A broad-band brightening is expected to occur and
peak on an observed time scale of several tens of seconds following the
stellar explosion. The origin of this brightening is the encounter of the
blast wave with the contact discontinuity that separates regions (b) and (c).

Material ejected from the star is distributed in regions (a) and (b), while
regions (c) and (d) are composed of interstellar material. The total rest mass
energy in regions (a) + (b) is $E_{RM}=\dot{M}c^{2}t_{\star}=1.8\times
10^{49}~{}{\dot{M}_{-9}t_{\star,4}}$ erg. This is several orders of magnitude
lower than the isotropically equivalent energy released in a strong GRB
explosion, $E_{GRB}\approx 10^{53}$ erg. 111We point out, that this result is
different than the assumptions used in the work by Pe’er & Wijers (2006). In
that work, a larger mass loss rate and longer wind emission time than
considered here were assumed, resulting in the opposite conclusion. This
result implies that the blast wave will cross both regions (a) and (b) while
still relativistic.

Following the coasting phase, the blast wave will collect material from region
(a), and the flow will eventually become self-similar. As the shock wave
reaches the reverse shock, its Lorentz factor is given by

$\Gamma(r=R_{\rm RS,W})=\min\left\\{\Gamma_{0},\Gamma_{BM}(r=R_{\rm
RS,W})\right\\},$ (6)

where $\Gamma_{0}$ is the maximum Lorentz factor achieved from the explosion
(i.e., during the coasting phase of the blast wave evolution), and
$\Gamma_{BM}(r=R_{\rm RS,W})$ is the evolved Lorentz factor during the self-
similar decaying phase, which is given by (Blandford & McKee, 1976)

$\Gamma_{BM}(E,A;r=R_{\rm RS,W})=\left({9E\over 16\pi
Ac^{2}r}\right)^{1/2}=1740~{}E_{53}^{1/2}\dot{M}_{-9}^{-13/20}v_{w,8}^{9/20}t_{\star,4}^{-1/5}n_{0,1}^{3/20}.$
(7)

Here, $A\equiv(\dot{M}/4\pi v_{w})$.

The observed time at which the blast wave appears to reach the wind reverse
shock is

$t^{ob.}({\rm RS,W})\simeq(1+z){R_{RS,W}\over
2\Gamma^{2}(R_{RS,W})c}=1.4~{}\left({1+z\over
2}\right)~{}E_{53}^{-1}\dot{M}_{-9}^{8/5}v_{w,8}^{-4/5}t_{\star,4}^{4/5}n_{0,1}^{-3/5}~{}{\rm
s},$ (8)

namely, of the order of a second. In the calculation presented in Equation 8
we assume the value of the Lorentz factor as given by the self-similar blast
wave solution (Equation 7). As this value can be higher than $10^{3}$, It is
more likely that the coasting Lorentz factor may be lower than that, of an
order of $10^{2}-10^{3}$ s is referred to in many GRBs. In such a case, the
observed time scale for the blast wave to reach the reverse shock is longer
than calculated above. However, as long as the initial GRB blast wave’s
Lorentz factor is a few hundreds, this time will not exceed a few seconds.
This means that the emission associated with this interaction of the GRB blast
wave with the wind termination (reverse) shock may be associated with the
observed GRB precursor. Alternatively, such a short time scale may leave
little to no observed signal, as any signal, if exists, will overlap with the
prompt emission phase, and will be identified as part of it.

The total mass swept by the shock in region (a) is $M=\int 4\pi
r^{2}\rho(r)dr=\dot{M}R_{\rm RS,W}/v_{w}$. This is much smaller than the total
mass in regions (a) + (b) together, which is $\dot{M}t_{\star}$. The ratio of
the mass in region (a) to the total mass in regions (a)+(b) is therefore
$R_{\rm RS,W}/v_{w}t_{\star}=4.0\times
10^{-3}~{}\dot{M}_{-9}^{3/10}v_{w,8}^{-9/10}t_{\star,4}^{-3/5}n_{0,1}^{-3/10}$,
which is much smaller than unity. One may therefore neglect the amount of
swept up mass in region (a) relative to region (b). As a consequence, after a
short transition phase that will occur once the GRB shock wave crosses the
wind reverse shock, its motion will resume as being self similar.

As was shown by Pe’er & Wijers (2006), once the blast wave encounters the
reverse shock, it splits into two: a newly formed forward shock, whose initial
Lorentz factor is $\Gamma(r=R_{\rm RS,W}+)=0.725\Gamma(r=R_{\rm RS,W}-)$,
while the newly formed reverse shock moves at $0.43\Gamma(r=R_{\rm RS,W}-)$.
Here, $\Gamma(r=R_{\rm RS,W}-)$ is the Lorentz factor of the GRB blast wave
just before encountering the wind termination shock, and is given by Equation
6. This newly formed reverse shock completes crossing the plasma at radius
$1.06\times R_{\rm RS,W}$, after which it disappears. The crossing causes a
short re-brightening, on a short time scale of $0.06R_{\rm
RS,W}/(0.725\Gamma(r=R_{\rm RS,W}-)^{2}/c\simeq 0.2$ s (see Pe’er & Wijers
(2006) for details), after which only the forward shock will remain, and
continue to propagate into region (b) in a self-similar pattern. Such a short
re-brightening may be seen as an early pulse as part of the precursor phase.

Figure 2: Similar to Fig. 1, now showing the density profile after the blast
wave crosses the wind’s original reverse shock (R.S. in Fig.1). Behind the GRB
blast wave, is material that was shocked twice: first, by the wind termination
shock, and second by the GRB blast wave itself. Hence it is denoted in the
cartoon as ”shocked2 wind”.

Since the amount of material in region (a) is negligible relative to region
(b), it is safe to assuming that after crossing the wind termination shock,
the GRB blast wave continues to propagate in region (b) in a self-similar way,
neglecting the short transition period. A cartoon illustrating the blast wave
propagation at this epoch is shown in Figure 2. The blast wave Lorentz factor
is given by the Blandford & McKee (1976) solution, using the prescription
derived for an explosion into a medium having a constant density, as is
expected by the shocked wind medium in region (b). When reaching the radius of
the contact discontinuity, the blast wave Lorentz factor is equal to

$\Gamma(E,n;r=R_{CD})\equiv\Gamma_{4}=\left({17E\over 16\pi
n_{b}m_{p}c^{2}R_{\rm
CD}^{3}}\right)^{1/2}=110~{}E_{53}^{1/2}\dot{M}_{-9}^{-1/2}t_{\star,4}^{-1/2}$
(9)

Here, we used $R_{\rm CD}=(11/12)R_{\rm FS,W}$, as explained above. We denote
this Lorentz factor as ”$\Gamma_{4}$”, to simplify the discussion in the next
section. The observed time at which the blast wave reaches the contact
discontinuity is

$t^{ob.}=(1+z){R_{\rm CD}\over 4\Gamma^{2}(r)c}=825~{}\left({1+z\over
2}\right)~{}E_{53}^{-1}\dot{M}_{-9}^{6/5}v_{w,8}^{2/5}t_{\star,4}^{8/5}n_{0,1}^{-1/5}~{}{\rm
s}.$ (10)

##  4 Interaction of the GRB shock wave with the contact discontinuity

On the external side of the contact discontinuity, region (c), the density is
$n_{c}=4n_{0}=40~{}n_{0,1}~{}{{\mathrm{cm}}^{-3}}$ (to be compared with
$4\times 10^{-3}~{}{{\mathrm{cm}}^{-3}}$ in region (b), see below Equation
(4)). This means that the density jump is of factor $\sim 10^{4}$ for the
parameters chosen, while the pressures and energy densities are the same. This
can be understood, as the temperature in region (c) is colder by the same
factor than that of region (b).

Figure 3: Similar to Fig. 1, now showing the density profile after the blast
wave crosses the contact discontinuity (C.D.). Region (1) was not yet reached
by the newly formed forward shock, and is thus identical to previous region
(c). Region (2) is composed of material from region (c), shocked by the newly
formed forward shock. Region (3) is composed of wind material from the
progenitor, first shocked by the wind termination shock (region (b) above),
then by the GRB blast wave, and a third time by the newly formed reverse
shock, hence is denoted by ”shocked3 wind”. Region (4) is composed of the same
material, before being reached by the newly formed reverse shock.

Once the propagating GRB blast wave reaches the contact discontinuity, it is
split again into two: a forward shock that continues to propagate into region
(c), and a reverse shocks. Similar to the crossing of the wind termination
shock, the system becomes a 4-region system, composed at this stage of the
following regions. (1) region (1) is what was referred to earlier as region
(c), composed of the shocked ISM material that was not reached by the newly
formed forward shock. Region (2) is composed of material from region (c), that
was shocked by the newly formed forward shock. Region (3) is composed of
material from region (b), shocked once by the GRB blast wave, and then again
by the newly formed reverse shock. Note that since material in region (b) is
composed of material that was earlier shocked by the wind termination shock,
this material in fact was shocked three times (see cartoon in Figure 3).
Region (4) is composed of material from region (b) that was shocked once by
the GRB blast wave as it crossed it, but had not yet been reached by the newly
formed reverse shock. It is thus marked in figure 3) as ”Shocked2 wind”.
Figure 3 shows a cartoon of the four different regimes.

Region (4) contains of material that cannot be considered cold, since it was
already shocked by the GRB blast wave. region (1) on the other hand can be
considered cold, since the shocked ISM in region (c) is still cold. This
system was studied by Pe’er et al. (2017) and we adopt here the results
derived by their equations 7-10, which are valid in the relativistic case.

The enthalpy in each of the four regions is denoted by
$\omega_{i}=e_{i}+p_{i}$. Here, $e_{i}=u_{i}+n_{i}m_{p}c^{2}$ is the energy
density (including rest mass), $u_{i}$ is the thermal energy density (without
the rest mass), and $p_{i}=(\hat{\gamma}-1)(e_{i}-n_{i})$ is the pressure in
region $i$, having density $n_{i}$. The adiabatic index is denoted by
$\hat{\gamma}_{i}$, that assumes value $\hat{\gamma}_{i}=4/3$ valid in the
relativistic case.

The observed signal is expected from particles heated by the newly formed
forward and reverse shocks, namely in regions (2) and (3). In order to
calculate the plasma properties in these regions, one must use the properties
of the surrounding plasma, i.e., in regions (1) [previously, (c) - the shocked
ISM] and (4), which is the shocked wind, that was shocked again by the GRB
blast wave.

Region (1) is cold, namely $u_{i}\ll n_{i}m_{p}c^{2}$. This can be seen by
using Equation 2, which give $u_{1}=(3/2)P_{c}=3.3\times 10^{-11}~{}{\rm
erg~{}cm^{-3}}$, while $n_{1}m_{p}c^{2}=n_{c}m_{p}c^{2}=0.06~{}n_{0,1}~{}{\rm
erg~{}cm^{-3}}$, namely many orders of magnitude higher. Thus, the enthalpy in
this region is

$\omega_{1}\approx n_{1}m_{p}c^{2}=0.06~{}n_{0,1}~{}{\rm erg~{}cm^{-3}}.$ (11)

Region (4) is composed of material from region (b), shocked by the GRB blast
wave. The shock jump conditions in region (b) imply (for relativistic shock)
that $u_{4}=4\Gamma^{2}n_{b}m_{p}c^{2}$, which is the dominant term in the
enthalpy calculation, assuming that the GRB blast wave Lorentz factor is
$\Gamma\gg 1$. Using Equations 9 and 4, this gives (initially after the
formation of the reverse shock)

$\omega_{4}=0.54E_{53}\dot{M}_{-9}^{-3/5}v_{w,8}^{-6/5}t_{\star,4}^{-9/5}n_{0,1}^{3/5}.$
(12)

The Lorentz factor of the newly formed shocked regions (2) and (3) is obtained
using Equation (8) of Pe’er et al. (2017),

$\Gamma_{2}=\Gamma_{3}\simeq\sqrt{\Gamma_{4}\over
2}\left(\omega_{4}\over\omega_{1}\right)^{1/4}=\Gamma_{4}\left(n_{b}\over
n_{c}\right)^{1/4}=13E_{53}^{1/2}\dot{M}_{-9}^{-2/5}v_{w,8}^{-3/10}t_{\star,4}^{-7/10}n_{0,1}^{-1/10}.$
(13)

In between regions (1) and (2) is the forward shock, whose Lorentz factor is
$\Gamma_{FS}\simeq\sqrt{2}\Gamma_{2}$; and in between regions (3) and (4) is
the reverse shock, whose Lorentz factor is
$\Gamma_{RS}\simeq\Gamma_{3}/\sqrt{2}$.

###  4.1 Radiation from the shocked regions

Being far from the central engine, it is safe to assume that the emission is
in the optically thin region. One may therefore safely consider synchrotron
emission as the main source of radiation. Using the standard assumptions that
the shock waves accelerate electrons to a power law distribution with index
$p$, the characteristic spectral breaks depend on only three ingredients: the
bulk Lorentz factor, $\Gamma_{2}=\Gamma_{3}$ as calculated in Equation 13
above; the characteristic electrons Lorentz factor, $\gamma_{m}$ (as measured
in the comoving frame); and the magnetic field, $B$. I order to determine
$\gamma_{m}$ and $B$, one first need to evaluate the plasma conditions in the
emitting regions (2) and (3).

The energy density in the newly shocked regions is given by Equation 9 of
Pe’er et al. (2017),

$\begin{array}[]{lcl}e_{2}=e_{3}&=&2\Gamma_{4}\sqrt{\omega_{1}\omega_{4}}=4\Gamma_{4}^{2}\sqrt{n_{b}n_{c}}m_{p}c^{2}\\\
&=&41E_{53}\dot{M}_{-9}^{-4/5}v_{w,8}^{-3/5}t_{\star,4}^{-7/5}n_{0,1}^{4/5}~{}{\rm
erg~{}cm^{-3}}.\end{array}$ (14)

which is of course equal in both regions. The energy per particle, in region
(2) is:

${e_{2}\over n_{2}}=\sqrt{\Gamma_{4}\over
2}{\omega_{1}^{3/4}\omega_{4}^{1/4}\over n_{1}}=1.95\times
10^{-2}E_{53}^{1/4}\dot{M}_{-8}^{-2/5}v_{w,8}^{-3/10}t_{\star,4}^{-7/10}n_{0,2}^{-1/10}~{}{\rm
erg}$ (15)

and in region (3):

${e_{3}\over n_{3}}=\sqrt{\Gamma_{4}\over
2}{\omega_{1}^{1/4}\omega_{4}^{3/4}\over
n_{4}}=0.73E_{53}^{-1/4}\dot{M}_{-9}^{-3/5}v_{w,8}^{3/10}t_{\star,4}^{-3/10}n_{0,1}^{1/10}~{}{\rm
erg}$ (16)

where we used $n_{4}=4\Gamma_{4}n_{b}=16\Gamma_{4}n_{a}(R_{\rm RS,W})$.

The energy density and energy per particle enables one to calculate the key
ingredients of the synchrotron emission. Here we use the standard procedure,
namely assume that uncertain fraction of the post-shock thermal energy,
denoted by microphysical parameters, $\epsilon_{B}$ and $\epsilon_{e}$, is
converted to magnetic field and used in heating the electrons to a power law
distribution.

Using this prescription, the magnetic field in both regions (2) and (3) is
given by $B^{2}/8\pi=\epsilon_{B}e_{2}$, resulting in

$B=3.2~{}E_{53}^{1/2}\dot{M}_{-9}^{-2/5}v_{w,8}^{-3/10}t_{\star,4}^{-7/10}n_{0,1}^{2/5}\epsilon_{B,-2}^{1/2}~{}{\rm
G}$ (17)

where we assumed $\epsilon_{B}=0.01$ though this value is highly uncertain.
The characteristic electron Lorentz factor is given by
$\gamma_{el}m_{e}c^{2}=\epsilon_{e}(e/n)$. Thus, in region (2) one finds

$\gamma_{m}(2)=2.4\times
10^{3}~{}E_{53}^{1/4}\dot{M}_{-9}^{-2/5}v_{w,8}^{-3/10}t_{\star,4}^{-7/10}n_{0,1}^{-1/10}\epsilon_{e,-1},$
(18)

while in region (3),

$\gamma_{m}(3)=9.0\times
10^{4}~{}E_{53}^{1/4}\dot{M}_{-9}^{-3/5}v_{w,8}^{3/10}t_{\star,4}^{-3/10}n_{0,1}^{1/10}\epsilon_{e,-1}.$
(19)

###  4.2 Characteristic synchrotron frequencies

Synchrotron emission is characterized by the well-known broken power law
spectrum, with two important spectral breaks: one at the peak of the emission,
$\nu_{m}$ and one at the cooling, $\nu_{c}$ (we neglect synchrotron self
absorption, which occur at frequencies well below those observed). Given the
calculations of $\Gamma_{2}$, $B$ and $\gamma_{m}$ above evaluating these
frequencies is straight forward.

The observed peak frequency is $\nu_{m}^{ob.}=4.2\times
10^{6}B\gamma_{m}^{2}\Gamma$ Hz, and is thus

$\nu_{m}^{ob.}(2)=9.9\times 10^{11}~{}{\rm
Hz}=4.1~{}E_{53}^{3/2}\dot{M}_{-9}^{-8/5}v_{w,8}^{-6/5}t_{\star,4}^{-14/5}n_{0,1}^{1/10}\epsilon_{e,-1}^{2}\epsilon_{B,-2}^{1/2}~{}{\rm
eV},$ (20)

for emission from region (2). Emission from the shocked region (3), peaks at

$\nu_{m}^{ob.}(3)=1.4\times 10^{18}~{}{\rm
Hz}=5.8E_{53}^{3/2}\dot{M}_{-9}^{-2}t_{\star,4}^{-2}n_{0,1}^{1/2}\epsilon_{e,-1}^{2}\epsilon_{B,-2}^{1/2}~{}{\rm
keV}.$ (21)

This means that if the parameter space regime is not too far from the one
considered here, most of the emission in the keV-MeV band is expected from
material shocked by the reverse shock. Material shocked by the newly formed
forward shock is expected to contribute mainly in the optical band.

The second important spectral break is at the cooling frequency. Following the
GRB blast wave interaction with the contact discontinuity, the underlying
assumption is that the newly formed reverse and forward shock waves accelerate
particles. These particles than radiatively cool, resulting in a
characteristic spectral break. The available time for cooling is the
(comoving) dynamical time $\Delta t^{\prime}=\Delta R/\Gamma c$. Here, $\Delta
R$ is a characteristic length scale crossed by the shock. This comoving time
is related to the observed time using $\Delta t^{ob.}=\Delta
t^{\prime}/\Gamma$. One thus finds

$\begin{array}[]{lcl}\nu_{c}^{ob.}&=&2.26\times 10^{45}{\Gamma^{3}\over
B^{3}\Delta r^{2}}~{}{\rm Hz}={2.26\times 10^{45}\over c^{2}\Gamma
B^{3}}{1\over{\Delta t^{ob.}}^{2}}\\\ &=&{24\over{\Delta
t^{ob.}}^{2}}~{}E_{53}^{-2}\dot{M}_{-9}^{8/5}v_{w,8}^{6/5}t_{\star,4}^{28/10}n_{0,1}^{-11/10}\epsilon_{B,-2}^{-3/2}~{}{\rm
MeV}\end{array}$ (22)

where $\Delta t^{ob.}$ is the time (in the observer’s frame) measured from the
blast wave interaction with the contact discontinuity, i.e., with the re-
brightening of the signal caused by the formation of the forward and reverse
shock waves.

###  4.3 Relative contribution of forward and reverse shock emission

The total number of radiating particles shocked by the reverse shock is

$N_{3}\sim\dot{M}t_{\star}/m_{p}=1.2\times 10^{52}~{}\dot{M}_{-9}t_{\star,4}.$
(23)

The total number of particles available to radiate from the forward shock is

$N_{2}={4\pi\over 3}R_{FS,W}^{3}n_{ISM}=1.4\times
10^{55}~{}\dot{M}_{-9}^{3/5}v_{w,8}^{6/5}t_{\star,4}^{9/5}n_{0,1}^{2/5}.$ (24)

These results imply that the total number of particles radiating from the
forward shock is three orders of magnitude greater than that from the reverse
shock. If all the particles are radiating, the ratio of fluxes from regions
(3) [material shocked by the revere shock] and (2) [material shocked by the
forward shock] is

${P_{syn,3}\over P_{sin,2}}={N_{3}B_{3}^{2}\gamma_{m}(3)^{2}\over
N_{2}B_{2}^{2}\gamma_{m}(2)^{2}}=1.24$ (25)

where we used $B_{3}=B_{2}$ as well as the characteristic Lorentz factors
calculated in equations 18 and 19. Note that all the parametric dependence
disappeared, and therefore this ratio is universal. Furthermore, note that
this ratio is calculated in the comoving frame, and an observer will see a
different ratio - see below.

###  4.4 Observed pulse duration

The observed pulse duration is set by the time it takes the forward and
reverse shock waves to cross the plasma. As we show here, the reverse shock
crosses the plasma at a much shorter time scale than the forward shock.

The reverse shock propagates into region (4), composed of the shocked stellar
wind that was shocked again by the GRB blast wave. As the reverse chock starts
its propagation, this region now becomes the upstream region of the reverse
shock. Following the argument derived in Pe’er & Wijers (2006), the width of
this region is the original width of the shocked wind region (b), divided by
$8\xi\Gamma$. Here, $\xi$ is a factor of the order unity, that takes into
consideration geometrical effects. The original width of region (b) is
$R_{CD}-R_{RS}\approx R_{CD}$, and the Lorentz factor $\Gamma$ can be
approximated as the Lorentz factor of the propagating GRB blast wave prior to
its interaction with the contact discontinuity, which is given in Equation 9.

The velocity of the reverse shock was calculated in Pe’er & Wijers (2006)
(their equation 6). The calculation is straight forward, using conservation of
particle flux across the reverse shock,
$n_{4}\Gamma_{4}^{\prime}\beta_{4}^{\prime}=n_{3}\Gamma_{3}^{\prime}\beta_{3}^{\prime}$.
Here, velocities are measured in the reverse shock frame, and densities are in
the comoving frame (of each individual region). Lorentz transform to the lab
frame, in which the reverse shock moves at velocity $\beta_{RS}$, gives
$\Gamma_{4}^{\prime}\beta_{4}^{\prime}=\Gamma_{4}\Gamma_{RS}(\beta_{4}-\beta_{RS})$
from which one readily derives

$\beta_{RS}={n_{4}\Gamma_{4}\beta_{4}-n_{3}\Gamma_{3}\beta_{3}\over
n_{4}\Gamma_{4}-n_{3}\Gamma_{3}}$ (26)

The density in the upstream region (4) is that of the shocked wind, shocked
again by the GRB blast wave. It is thus given by $n_{4}\simeq
4\Gamma_{4}n_{b}$ and similarly $n_{3}=4\bar{\Gamma}_{3}n_{4}$. Here,
$\bar{\Gamma}_{3}$ is the Lorentz factor of region (3) as measured in the
frame of region (4). For an adiabatic index $\hat{\gamma}=4/3$, the density
ratio is $n_{3}/n_{4}=4\bar{\Gamma}_{3}$, and
$\bar{\Gamma}_{3}\Gamma_{3}=\Gamma_{4}/2$ (e.g., Pe’er et al., 2017, their
equations 7 and 8). These give a particularly simple result for the reverse
shock velocity,

$\beta_{RS}={\Gamma_{4}\beta_{4}-2\Gamma_{4}\beta_{3}\over\Gamma_{4}-2\Gamma_{4}}=2\beta_{3}-\beta_{4}.$
(27)

Note that this is the velocity as measured by an external observer.

The time it takes the reverse shock to cross the plasma is calculated as
follows. Once the GRB blast wave reaches the contact discontinuity, the region
behind it (compressed original region (c), which is now region (4)) has width
$\Delta R_{4}=R_{CD}/(8\xi\Gamma_{4})$. The time it takes the reverse shock to
complete crossing the shocked plasma region $ct_{1}=\Delta
R_{4}/(\beta_{4}-\beta_{RS})$. However, an observer at infinity will measure
time $\Delta t^{ob.}(RS)=(1-\beta_{4})t_{1}\simeq\Delta
R_{4}/2(\beta_{4}-\beta_{RS})c\Gamma_{4}^{2}$. Using Equation 27, one can
approximate

$2(\beta_{4}-\beta_{RS})\Gamma_{4}^{2}=4\Gamma_{4}^{2}(\beta_{4}-\beta_{3})\simeq
2\Gamma_{4}^{2}\left({1\over\Gamma_{3}^{2}}-{1\over\Gamma_{4}^{2}}\right)=2\left[{\Gamma_{4}^{2}\over\Gamma_{3}^{2}}-1\right]\approx
2{\Gamma_{4}^{2}\over\Gamma_{3}^{2}}.$ (28)

Overall, one finds that the observed time for the reverse shock to cross the
expanding plasma is

$\Delta t^{ob.}(RS)=(1+z){R_{CD}\Gamma_{3}^{2}\over
8\xi\Gamma_{4}2c\Gamma_{4}^{2}}=(1+z)\left({11\over
12}\right){R_{FS}\Gamma_{3}^{2}\over 16\xi
c\Gamma_{4}^{3}}=310\xi^{-1}\left({1+z\over
2}\right)~{}E_{53}^{-1/2}\dot{M}_{-9}^{9/10}v_{w,8}^{-1/5}t_{\star,4}^{7/10}n_{0,1}^{-2/5}~{}s.$
(29)

As opposed to that, the observed time during which the forward shock crosses
the shocked ISM region (region (1)) is much longer. The forward shock reaches
the edge of the wind bubble, which is a distance $\Delta
R_{1}=R_{FS,W}-R_{CD}=R_{FS,W}/12$ away, at time $t_{1}=\Delta
R_{1}/\beta_{FS}c$. However, the observed time is the time difference between
the detection of a photon emitted at the contact discontinuity at $t=0$ and a
photon emitted at $\Delta R_{1}$ at time $t_{1}$, which is $\Delta
t^{ob.}=(1-\beta_{FS})t_{1}\simeq{t_{1}/(2\Gamma_{FS}^{2})}$. Using
$\Gamma_{FS}^{2}=2\Gamma_{2}^{2}$, this gives the well-known result,

$\Delta t^{ob.}(FS)=(1+z)\left({1\over 12}\right){R_{FS,W}\over
2\beta_{FS}c\Gamma_{FS}^{2}}=5650\left({1+z\over
2}\right)~{}E_{53}^{-1}\dot{M}_{-9}v_{w,8}t_{\star,4}^{2}~{}s$ (30)

We thus find that the time it takes the reverse shock to cross the plasma is
$\gtrsim 15$ times shorter than the time it takes the forward shock to reach
the edge of the wind bubble. This means that the observed flux from the
reverse shock is $\gtrsim 15*1.24\approx 18$ times larger than the flux
emitted from the forward shock, since the forward shock accelerates only 1/15
of the plasma by the time the reverse shock is observed to complete its
crossing. One may therefore neglect emission from the forward shock when
considering the contribution to the x- and $\gamma$\- ray flux.

##  5 Comparison with observations

A non-negligible fraction, of $\sim 10-20\%$ of GRBs show evidence for a
distinct precursor in their x-ray lightcurve (Lazzati, 2005; Zhu, 2015; Coppin
et al., 2020). In these GRBs, the main emission episode, often identified as
the ”prompt” emission, is delayed relative to the precursor by a typical time
scale of a few tens of seconds, with some cases delayed up to $\gtrsim 100$ s.
The duration of the prompt phase is typically a few tens of seconds;
typically, the duration of the main emission episode is comparable to that of
the quiescence time between the precursor and the main peak, while the
precursor is about an order of magnitude shorter in time (Zhu, 2015). The
spectra shows a clear non-thermal behaviour, which can therefore be fitted
with a synchrotron emission (Zhu, 2015). These characteristics are in line
with the model proposed here, in which the main emission originates from the
reverse shock that follows the interaction of the GRB blast wave with the
contact discontinuity. In such a case, the main emission episode should not be
identified as the prompt phase, but rather the CBM phase, since its origin is
different.

As a specific example, we consider GRB160821A (Sharma et al., 2019), whose
lightcurve and spectra were well analyzed (Ryde et al., 2022). This was a
particularly bright burst, with energy flux of $2.86\times 10^{-6}~{}{\rm
erg~{}cm^{-2}~{}s^{-1}}$ in the 10-1000 keV band. This makes the burst the
third brightest GRB observed by the Fermi Gamma-ray Space Telescope (Atwood et
al., 2009) to date in terms of energy flux. This burst’s lightcurve showed a
short, weak precursor, followed by a quiescence period of 112 s, before the
main emission episode took place. Once started, this episode lasted for 43 s
(Sharma et al., 2019). Spectral analysis revealed that the main emission
episode is well fitted by a synchrotron model, with peak frequency at
$\nu_{m}^{ob.}\sim 5$ MeV anf a spectral cooling break at $\nu_{c}^{ob.}\simeq
100$ keV (Ryde et al., 2022).

As the redshift of this GRB is unknown, an exact value of the emitted energy
is uncertain. For $z=1$, it will be $7\times 10^{54}$ erg, while for $z=0.2$
the released energy is $8\times 10^{53}$ erg. We may choose here a
conservative value of $E=10^{54}$ erg. Then use of equations (10) and (29)
implies that the main emission episode is expected at $\sim 83$ s, and its
duration is $\sim 50$ s, governed by emission from the reverse shock (no
redshift added here). Furthermore, if one assumes an equipartition value of
the electrons’s energy, namely $\epsilon_{e}=0.33$, one finds, using equations
(21) and (22) a peak frequency at $\nu_{m}^{ob.}(3)\approx 2$ MeV and cooling
break at $\nu_{c}^{ob.}\approx 240/(\Delta t^{ob.})^{2}$ keV. These values are
surprisingly close to the values of these parameters inferred from
observations. An additional degree of freedom is the fraction of energy
carried by the magnetic field ($\epsilon_{B}$). Values smaller (or higher) by
the fiducial value of $10^{-2}$ taken here can be considered, resulting in
some flexibility in the cooling break (and, to a lesser extend, in the peak
energy).

##  6 Discussion and Conclusions

There is ample evidence that the progenitors of long gamma-ray bursts (GRBs)
are massive, Wolf-Rayet stars. These stars emit strong winds prior to their
terminal explosion, producing a density structure known as ”wind bubble”
Weaver et al. (1977), that is composed of four distinct regions: (i) the
stellar wind; (ii) the shocked stellar wind; (iii) the shocked interstellar
material (ISM) gas; and (iv) the unshocked ISM. Observations reveal that this
wind bubble has a typical size of $\sim$ pc (Cohen et al., 2005; Toalá &
Guerrero, 2013). When the star explodes producing a GRB, the GRB jet interacts
with this environment. Here, we consider a plausible scenario, in which the
wind bubble is of $\lesssim$ 1 pc size. We have shown above that in this
scenario, the blast wave will encounter the wind termination shock on a very
short time scale, of a few seconds or less (Eq. 8), and that the main energy
dissipation mechanism will take place when the blast wave will encounter the
contact discontinuity, separating the shocked stellar wind from the shocked
interstellar medium. As the blast wave encounters this contact discontinuity
separating, after about $\lesssim 100$ s observed quiescence period (Eq. 10),
the reverse shock can produce a bright flash, lasting a few tens of seconds
(Eq. 29). This setup may thus provide a natural explanation to the brightening
seen at this epoch in a substantial minority, $\sim 10$ % of GRBs (Lazzati,
2005; Zhu, 2015; Coppin et al., 2020).

This scenario thus provides a natural explanation to a significant sub-sample
of long GRBs. In fact, it helps solving one of the well known problems, that
of radiation efficiency (Pe’er, 2015; Zhang, 2018). The nature of the energy
dissipation that leads to the observed radiation. Kinetic models, such as the
GRB ”fireball” model considers internal shock waves within the expanding
plasma as a mechanism of kinetic energy dissipation. However, a well known
problem of this model is that of the low efficiency: typically, only a small
fraction, of the order of a few % of the kinetic energy is dissipated (Daigne
& Mochkovitch, 1998; Spada et al., 2000). This serves as a motivation to
search for alternatives, such as models involving reconnection of magnetic
field lines as a source of energy (Zhang & Yan, 2011; Sironi & Spitkovsky,
2014). The scenario here suggests an elegant solution to this problem. As the
GRB blast wave encounters the contact discontinuity, which is nearly static, a
significant fraction of its kinetic energy is dissipated, leading to a strong
signal.

The characteristic time scales, both of the quiescence time prior to the main
pulse, as well as the pulse duration itself, depends on the uncertain
properties of the wind bubble (mainly its size and internal density), as well
as the properties of the GRB blast wave. While there is a large uncertainty,
we rely on measurements of wind bubbles seen in our Galaxy to estimate the
size of the cavity. The values used for the mass loss rate as well as the
typical wind ejection time are lower by several orders of magnitude than those
typically found in the literature when considering Wolf-Rayet stars. However,
they do match the observed cavity sizes of $\lesssim$ 1 pc. Given the
uncertainty that exists in the properties of the GRB progenitor stars in the
last thousands to millions of years prior to their explosion, we believe that
the parameters considered are plausible ones.

Similarly, while the calculation itself is by large, one dimensional, when
calculating the expected observed times we do consider emission from off-axis
angles (known as the ”high latitude” emission). These are taken into account
by the pre-factors used in relating the observed time to the radius in which
the interaction takes place ($t^{ob.}\propto R/\Gamma^{2}$. Details of the
calculations appear in (Waxman, 1997), as well as in the appendix of (Pe’er &
Wijers, 2006). While these pre-factors are of the order of a few, they imply
that the expected ratio of the the delay time to the pulse duration can be of
that order (i.e., of a few), as is indeed observed: e.g., in GRB160821A, the
quiescence period between the precursor and the main pulse is 112 s, while the
main pulse duration is 43 s; namely a ratio of less than 3. Such a ratio can
well be explained by the different pre-factors. Since most precursor bursts
indeed have such modest ratios (e.g., Lazzati, 2005; Burlon et al., 2008; Hu
et al., 2014; Wang et al., 2020; Deng et al., 2024) the presented scenario, in
its simplest form, can easily accommodate the observed properties. However, in
a few cases the ratio is larger than a few, e.g. in GRBs 150330A and 160625B
(Deng et al., 2024). This might indicate that, in these cases, it is not the
same blast wave giving rise both to the precursor and to the main burst event,
with earlier central engine activity needed (e.g., Lazzati & Perna, 2007).

In some of the main pulses detected, light fluctuations (”spikes”), on a
shorter time scale, of a few seconds were observed Zhu (2015); Sharma et al.
(2019). Such spikes can be accomodated within the framework of the model
presented here, as the contact discontinuity is expected to be
hydrodynamically unstable, similar to the situation in supernovae remnants
(Chevalier et al., 1992). As a result, it will develop patches, which, when
encountered by the GRB blast wave, may lead to the observed fluctuations in
the lightcurve. Moreover, infrared observations of Wolf-Rayet stars reveal, in
many cases, clumpy structures of the nebula region (Vamvatira-Nakou et al.,
2016). This would further add to the possibility of fluctuations in the light
curve on shorter time scales.

In fact, within this scenario, the detailed morphological shape of the light
curve of the main emission will serve as a tomography of the immediate,
complex density environment surrounding the progenitor star. Clumpy structures
(Vamvatira-Nakou et al., 2016) and multiple rings within the nebula region
(Marston, 1995) will lead to a variable, emitted intensity. Interestingly, the
same density environment could also be probed by infrared spectroscopy by
identifying the complex absorption profiles in the infrared (see, e.g.,
Castro-Tirado et al., 2010).

The main pulse originates from the reverse shock that forms once the GRB blast
wave reaches the contact discontinuity. However, at the same time, the newly
formed forward shock continues to propagate towards the edge of the cavity.
The signal from this forward shock is expected to be much weaker than that
from the reverse shock. For the parameters chosen, the forward shock will
reach the edge of the cavity on a time scale of $\sim$ 1 hour (see Eq. 30,
after which is will propagate into the interstellar material. As the forward
shock generates the afterglow emission, a prediction of this model is a break
seen in the afterglow emission at this time scale, of roughly an hour. After
that period, the afterglow is expected to evolve according to the classical,
Blandford & McKee (1976) solution. In fact, detection of such a break, when
combined with the properties of the main peak, may serve as a new tool in
studying the properties of the wind bubble.

The expected spectra during the main pulse is expected to be dominated by
sycnhrotron emission, with characteristic breaks that are given in Equations
(21) and (22). The exact values of these breaks depend on the uncertain
microphysical parameters ($\epsilon_{e}$ and $\epsilon_{B}$) that determine
the post-shock thermal energy converted to electrons and magnetic field.
Despite this uncertainty, these are believed to be universal parameters, hence
their values are expected to be similar in the forward and reverse shock
waves. Thus, the ratio of the power radiated from the forward and reverse
shocks is expected to be universal.

To conclude, the wind bubble scenario presented here provides a natural
scenario that can explain a significant minority of GRBs that show a
precursor, followed by a quiescence period of several tens - hundreds of
seconds before the main peak, which lasts a similar, though somewhat shorter
duration of several tens of seconds. In addition to be a natural outcome, this
model has the advantage of high efficiency in the energy dissipation,
producing the synchrotron emission. This phase is thus distinct from both the
prompt and the afterglow phases, and should be better referred to as the CBM
phase. If correct, studies of the CBM phase lightcurves and spectra could be a
particularly useful tool in determining the shapes of wind bubbles, hence
constrain the properties of GRB progenitor stars, just prior to their terminal
explosion.

## Acknowledgements

We thank The Swedish Foundation for International Cooperation in Research and
Higher Education (STINT) for support through the Internationalisation grant
for scientific cooporation between Sweden and Israel (IB 2019-8160). We
further acknowledge support from the Swedish National Space Agency (2021‐00180
and 2022‐00205). AP acknowledge the support from the European Union (EU) via
ERC consolidator grant 773062 (O.M.J.).

## References

  * Atwood et al. (2009) Atwood, W. B., Abdo, A. A., Ackermann, M., et al. 2009, ApJ, 697, 1071, doi: 10.1088/0004-637X/697/2/1071
  * Blandford & McKee (1976) Blandford, R. D., & McKee, C. F. 1976, Physics of Fluids, 19, 1130, doi: 10.1063/1.861619
  * Bloom et al. (1999) Bloom, J. S., Kulkarni, S. R., Djorgovski, S. G., et al. 1999, Nature, 401, 453, doi: 10.1038/46744
  * Burlon et al. (2008) Burlon, D., Ghirlanda, G., Ghisellini, G., et al. 2008, ApJ, 685, L19, doi: 10.1086/592350
  * Cano et al. (2017) Cano, Z., Wang, S.-Q., Dai, Z.-G., & Wu, X.-F. 2017, Advances in Astronomy, 2017, 8929054, doi: 10.1155/2017/8929054
  * Castor et al. (1975) Castor, J., McCray, R., & Weaver, R. 1975, ApJ, 200, L107, doi: 10.1086/181908
  * Castro Cerón et al. (2010) Castro Cerón, J. M., Michałowski, M. J., Hjorth, J., et al. 2010, ApJ, 721, 1919, doi: 10.1088/0004-637X/721/2/1919
  * Castro-Tirado et al. (2010) Castro-Tirado, A. J., Møller, P., García-Segura, G., et al. 2010, A&A, 517, A61, doi: 10.1051/0004-6361/200913966
  * Chevalier et al. (1992) Chevalier, R. A., Blondin, J. M., & Emmering, R. T. 1992, ApJ, 392, 118, doi: 10.1086/171411
  * Chevalier & Li (2000) Chevalier, R. A., & Li, Z.-Y. 2000, ApJ, 536, 195, doi: 10.1086/308914
  * Chevalier et al. (2004) Chevalier, R. A., Li, Z.-Y., & Fransson, C. 2004, ApJ, 606, 369, doi: 10.1086/382867
  * Chornock et al. (2010) Chornock, R., Berger, E., Levesque, E. M., et al. 2010, arXiv e-prints, arXiv:1004.2262, doi: 10.48550/arXiv.1004.2262
  * Chu (1981) Chu, Y. H. 1981, ApJ, 249, 195, doi: 10.1086/159275
  * Chu (2016) Chu, Y.-H. 2016, in Journal of Physics Conference Series, Vol. 728, Journal of Physics Conference Series (IOP), 032007, doi: 10.1088/1742-6596/728/3/032007
  * Chu et al. (2003) Chu, Y.-H., Guerrero, M. A., Gruendl, R. A., García-Segura, G., & Wendker, H. J. 2003, ApJ, 599, 1189, doi: 10.1086/379607
  * Cohen et al. (2005) Cohen, M., Parker, Q. A., & Green, A. J. 2005, MNRAS, 360, 1439, doi: 10.1111/j.1365-2966.2005.09137.x
  * Coppin et al. (2020) Coppin, P., de Vries, K. D., & van Eijndhoven, N. 2020, Phys. Rev. D, 102, 103014, doi: 10.1103/PhysRevD.102.103014
  * Crowther (2007) Crowther, P. A. 2007, ARA&A, 45, 177, doi: 10.1146/annurev.astro.45.051806.110615
  * Daigne & Mochkovitch (1998) Daigne, F., & Mochkovitch, R. 1998, MNRAS, 296, 275, doi: 10.1046/j.1365-8711.1998.01305.x
  * Deng et al. (2024) Deng, H.-Y., Peng, Z.-Y., Chen, J.-M., Yin, Y., & Li, T. 2024, arXiv e-prints, arXiv:2405.14588, doi: 10.48550/arXiv.2405.14588
  * Dereli-Bégué et al. (2022) Dereli-Bégué, H., Pe’er, A., Ryde, F., et al. 2022, Nature Communications, 13, 5611, doi: 10.1038/s41467-022-32881-1
  * Duronea et al. (2013) Duronea, N. U., Arnal, E. M., & Bronfman, L. 2013, A&A, 551, A71, doi: 10.1051/0004-6361/201219816
  * Eldridge et al. (2006) Eldridge, J. J., Genet, F., Daigne, F., & Mochkovitch, R. 2006, MNRAS, 367, 186, doi: 10.1111/j.1365-2966.2005.09938.x
  * Fruchter et al. (1999) Fruchter, A. S., Thorsett, S. E., Metzger, M. R., et al. 1999, ApJ, 519, L13, doi: 10.1086/312094
  * Fulton et al. (2023) Fulton, M. D., Smartt, S. J., Rhodes, L., et al. 2023, ApJ, 946, L22, doi: 10.3847/2041-8213/acc101
  * Galama et al. (1998) Galama, T. J., Vreeswijk, P. M., van Paradijs, J., et al. 1998, Nature, 395, 670, doi: 10.1038/27150
  * Garcia-Segura et al. (1996a) Garcia-Segura, G., Langer, N., & Mac Low, M. M. 1996a, A&A, 316, 133
  * Garcia-Segura et al. (1996b) Garcia-Segura, G., Mac Low, M. M., & Langer, N. 1996b, A&A, 305, 229
  * Hjorth et al. (2003) Hjorth, J., Sollerman, J., Møller, P., et al. 2003, Nature, 423, 847, doi: 10.1038/nature01750
  * Hu et al. (2014) Hu, Y.-D., Liang, E.-W., Xi, S.-Q., et al. 2014, ApJ, 789, 145, doi: 10.1088/0004-637X/789/2/145
  * Izzo et al. (2019) Izzo, L., de Ugarte Postigo, A., Maeda, K., et al. 2019, Nature, 565, 324, doi: 10.1038/s41586-018-0826-3
  * Johnson & Hogg (1965) Johnson, H. M., & Hogg, D. E. 1965, ApJ, 142, 1033, doi: 10.1086/148373
  * Kann et al. (2019) Kann, D. A., Schady, P., Olivares E., F., et al. 2019, A&A, 624, A143, doi: 10.1051/0004-6361/201629162
  * Koshut et al. (1995) Koshut, T. M., Kouveliotou, C., Paciesas, W. S., et al. 1995, ApJ, 452, 145, doi: 10.1086/176286
  * Kumar & Zhang (2015) Kumar, P., & Zhang, B. 2015, Phys. Rep., 561, 1, doi: 10.1016/j.physrep.2014.09.008
  * Langer et al. (2010) Langer, N., van Marle, A. J., & Yoon, S. C. 2010, New A Rev., 54, 206, doi: 10.1016/j.newar.2010.09.012
  * Lau et al. (2022) Lau, R. M., Hankins, M. J., Han, Y., et al. 2022, Nature Astronomy, 6, 1308, doi: 10.1038/s41550-022-01812-x
  * Lazzati (2005) Lazzati, D. 2005, MNRAS, 357, 722, doi: 10.1111/j.1365-2966.2005.08687.x
  * Lazzati & Perna (2007) Lazzati, D., & Perna, R. 2007, MNRAS, 375, L46, doi: 10.1111/j.1745-3933.2006.00273.x
  * Lazzati et al. (2002) Lazzati, D., Rossi, E., Covino, S., Ghisellini, G., & Malesani, D. 2002, A&A, 396, L5, doi: 10.1051/0004-6361:20021618
  * Levan et al. (2016) Levan, A., Crowther, P., de Grijs, R., et al. 2016, Space Sci. Rev., 202, 33, doi: 10.1007/s11214-016-0312-x
  * Levinson & Eichler (1993) Levinson, A., & Eichler, D. 1993, ApJ, 418, 386, doi: 10.1086/173397
  * MacFadyen & Woosley (1999) MacFadyen, A. I., & Woosley, S. E. 1999, ApJ, 524, 262, doi: 10.1086/307790
  * MacFadyen et al. (2001) MacFadyen, A. I., Woosley, S. E., & Heger, A. 2001, ApJ, 550, 410, doi: 10.1086/319698
  * Marston (1995) Marston, A. P. 1995, AJ, 109, 1839, doi: 10.1086/117410
  * Marston (1997) —. 1997, ApJ, 475, 188, doi: 10.1086/303534
  * McKinney & Uzdensky (2011) McKinney, J. C., & Uzdensky, D. A. 2011, Monthly Notices of the Royal Astronomical Society, 419, 573, doi: 10.1111/j.1365-2966.2011.19721.x
  * Melandri et al. (2022) Melandri, A., Izzo, L., Pian, E., et al. 2022, A&A, 659, A39, doi: 10.1051/0004-6361/202141788
  * Mészáros (2006) Mészáros, P. 2006, Reports on Progress in Physics, 69, 2259, doi: 10.1088/0034-4885/69/8/R01
  * Mimica & Giannios (2011) Mimica, P., & Giannios, D. 2011, MNRAS, 418, 583, doi: 10.1111/j.1365-2966.2011.19507.x
  * Mirabal et al. (2003) Mirabal, N., Halpern, J. P., Chornock, R., et al. 2003, ApJ, 595, 935, doi: 10.1086/377471
  * Murakami et al. (1991) Murakami, T., Inoue, H., Nishimura, J., van Paradijs, J., & Fenimore, E. E. 1991, Nature, 350, 592, doi: 10.1038/350592a0
  * Nakar & Granot (2007) Nakar, E., & Granot, J. 2007, MNRAS, 380, 1744, doi: 10.1111/j.1365-2966.2007.12245.x
  * Oganesyan et al. (2023) Oganesyan, G., Karpov, S., Salafia, O. S., et al. 2023, Nature Astronomy, doi: 10.1038/s41550-023-01972-4
  * Paczyński (1998) Paczyński, B. 1998, ApJ, 494, L45, doi: 10.1086/311148
  * Pe’er (2015) Pe’er, A. 2015, Advances in Astronomy, 2015, 907321, doi: 10.1155/2015/907321
  * Pe’er et al. (2017) Pe’er, A., Long, K., & Casella, P. 2017, ApJ, 846, 54, doi: 10.3847/1538-4357/aa80df
  * Pe’er & Wijers (2006) Pe’er, A., & Wijers, R. A. M. J. 2006, ApJ, 643, 1036, doi: 10.1086/500969
  * Piro et al. (2005) Piro, L., De Pasquale, M., Soffitta, P., et al. 2005, ApJ, 623, 314, doi: 10.1086/428377
  * Piro et al. (2014) Piro, L., Troja, E., Gendre, B., et al. 2014, ApJ, 790, L15, doi: 10.1088/2041-8205/790/2/L15
  * Ramirez-Ruiz et al. (2001) Ramirez-Ruiz, E., Dray, L. M., Madau, P., & Tout, C. A. 2001, MNRAS, 327, 829, doi: 10.1046/j.1365-8711.2001.04762.x
  * Ravasio et al. (2018) Ravasio, M. E., Oganesyan, G., Ghirlanda, G., et al. 2018, A&A, 613, A16, doi: 10.1051/0004-6361/201732245
  * Reeves et al. (2002) Reeves, J. N., Watson, D., Osborne, J. P., et al. 2002, Nature, 416, 512, doi: 10.1038/416512a
  * Ryde et al. (2022) Ryde, F., Iyyani, S., Ahlgren, B., et al. 2022, ApJ, 932, L15, doi: 10.3847/2041-8213/ac73fe
  * Savaglio et al. (2009) Savaglio, S., Glazebrook, K., & Le Borgne, D. 2009, ApJ, 691, 182, doi: 10.1088/0004-637X/691/1/182
  * Sharma et al. (2019) Sharma, V., Iyyani, S., Bhattacharya, D., et al. 2019, ApJ, 882, L10, doi: 10.3847/2041-8213/ab3a48
  * Sirianni et al. (1998) Sirianni, M., Nota, A., Pasquali, A., & Clampin, M. 1998, A&A, 335, 1029
  * Sironi & Spitkovsky (2014) Sironi, L., & Spitkovsky, A. 2014, ApJ, 783, L21, doi: 10.1088/2041-8205/783/1/L21
  * Spada et al. (2000) Spada, M., Panaitescu, A., & Mészáros, P. 2000, ApJ, 537, 824, doi: 10.1086/309048
  * Starling et al. (2011) Starling, R. L. C., Wiersema, K., & Levan, A. 2011, arXiv e-prints, arXiv:1104.3087, doi: 10.48550/arXiv.1104.3087
  * Stock & Barlow (2010) Stock, D. J., & Barlow, M. J. 2010, MNRAS, 409, 1429, doi: 10.1111/j.1365-2966.2010.17124.x
  * Toalá & Arthur (2011) Toalá, J. A., & Arthur, S. J. 2011, ApJ, 737, 100, doi: 10.1088/0004-637X/737/2/100
  * Toalá & Arthur (2018) —. 2018, MNRAS, 478, 1218, doi: 10.1093/mnras/sty1127
  * Toalá & Guerrero (2013) Toalá, J. A., & Guerrero, M. A. 2013, A&A, 559, A52, doi: 10.1051/0004-6361/201322286
  * Trentham et al. (2002) Trentham, N., Ramirez-Ruiz, E., & Blain, A. W. 2002, MNRAS, 334, 983, doi: 10.1046/j.1365-8711.2002.05586.x
  * Vamvatira-Nakou et al. (2016) Vamvatira-Nakou, C., Hutsemékers, D., Royer, P., et al. 2016, A&A, 588, A92, doi: 10.1051/0004-6361/201527667
  * van Eerten et al. (2009) van Eerten, H. J., Meliani, Z., Wijers, R. A. M. J., & Keppens, R. 2009, MNRAS, 398, L63, doi: 10.1111/j.1745-3933.2009.00711.x
  * Vanderspek et al. (2004) Vanderspek, R., Sakamoto, T., Barraud, C., et al. 2004, ApJ, 617, 1251, doi: 10.1086/423923
  * Wang et al. (2020) Wang, J.-S., Peng, Z.-K., Zou, J.-H., Zhang, B.-B., & Zhang, B. 2020, ApJ, 902, L42, doi: 10.3847/2041-8213/abbfb8
  * Wang et al. (2017) Wang, S.-Q., Cano, Z., Wang, L.-J., et al. 2017, ApJ, 850, 148, doi: 10.3847/1538-4357/aa95c5
  * Waxman (1997) Waxman, E. 1997, ApJ, 491, L19, doi: 10.1086/311057
  * Weaver et al. (1977) Weaver, R., McCray, R., Castor, J., Shapiro, P., & Moore, R. 1977, ApJ, 218, 377, doi: 10.1086/155692
  * Wijers et al. (1998) Wijers, R. A. M. J., Bloom, J. S., Bagla, J. S., & Natarajan, P. 1998, MNRAS, 294, L13, doi: 10.1046/j.1365-8711.1998.01328.x10.1111/j.1365-8711.1998.01328.x
  * Woosley (1993) Woosley, S. E. 1993, ApJ, 405, 273, doi: 10.1086/172359
  * Woosley & Bloom (2006) Woosley, S. E., & Bloom, J. S. 2006, ARA&A, 44, 507, doi: 10.1146/annurev.astro.43.072103.150558
  * Woosley & Heger (2006) Woosley, S. E., & Heger, A. 2006, ApJ, 637, 914, doi: 10.1086/498500
  * Yoon & Langer (2005) Yoon, S. C., & Langer, N. 2005, A&A, 443, 643, doi: 10.1051/0004-6361:20054030
  * Zhang (2018) Zhang, B. 2018, The Physics of Gamma-Ray Bursts, doi: 10.1017/9781139226530
  * Zhang & Yan (2011) Zhang, B., & Yan, H. 2011, ApJ, 726, 90, doi: 10.1088/0004-637X/726/2/90
  * Zhang et al. (2018) Zhang, B. B., Zhang, B., Castro-Tirado, A. J., et al. 2018, Nature Astronomy, 2, 69, doi: 10.1038/s41550-017-0309-8
  * Zhang et al. (2003) Zhang, W., Woosley, S. E., & MacFadyen, A. I. 2003, ApJ, 586, 356, doi: 10.1086/367609
  * Zhu (2015) Zhu, S. J. 2015, PhD thesis, University of Maryland, College Park