# Ejecta$-$circumstellar medium interaction in high-density environment
contribution to kilonova emission: Application to GRB 191019A

Suo-Ning Wang11affiliation: Guangxi Key Laboratory for Relativistic
Astrophysics, School of Physical Science and Technology, Guangxi University,
Nanning 530004, China<EMAIL_ADDRESS>, Hou-Jun Lü11affiliation: Guangxi Key
Laboratory for Relativistic Astrophysics, School of Physical Science and
Technology, Guangxi University, Nanning 530004, China<EMAIL_ADDRESS>, Yong
Yuan22affiliation: School of Physics Science And Technology, Wuhan University,
No.299 Bayi Road, 430072, Wuhan, Hubei, China , Hao-Yu Yuan33affiliation:
School of Physics, Huazhong University of Science and Technology, Wuhan
430074, China , Jared Rice44affiliation: Department of Mathematics and
Physical Science, Southwestern Adventist University, Keene, TX 76059, USA ,
Meng-Hua Chen11affiliation: Guangxi Key Laboratory for Relativistic
Astrophysics, School of Physical Science and Technology, Guangxi University,
Nanning 530004, China<EMAIL_ADDRESS>, and En-Wei Liang11affiliation:
Guangxi Key Laboratory for Relativistic Astrophysics, School of Physical
Science and Technology, Guangxi University, Nanning 530004, China;
<EMAIL_ADDRESS>
###### Abstract

The nearby long-duration GRB 191019A recently detected by Swift lacks an
associated supernova and belongs to a host galaxy with little star formation
activity, suggesting that the origin of this burst is the result of a merger
of two compact objects with dynamical interactions in a high-density medium of
an active galactic nucleus. Given the potential motivation of this event, and
given that it occurs in such a high-density environment, the ejecta-
circumstellar medium (CSM) interaction cannot be ignored as possibly
contributing to the kilonova emission. Here, we theoretically calculate the
kilonova emission by considering the contribution of the ejecta-CSM
interaction in a high-density environment. We find that the contribution to
the kilonova emission from the ejecta-CSM interaction will dominate at a later
time, and a smaller ejecta mass will have a stronger kilonova emission from
the ejecta-CSM interaction. Moreover, we try to apply it to GRB 191019A, but
we find that it is difficult to identify the possible kilonova emission from
the observations, due to the contribution of the bright host galaxy. On the
other hand, less injected mass (less than $M_{\rm ej}=2\times
10^{-5}M_{\odot}$) will be required if one can detect the kilonova emission
associated with a GRB 191019A-like event in the future. The r-process-powered
and spin energy contributions from the magnetar are also discussed.

###### Subject headings:

Gamma-ray burst: general

##  1\. Introduction

Merger of two compact stars, such as neutron star$-$neutron star (NS-NS)
mergers (Paczynski, 1986; Eichler et al., 1989) or neutron star$-$black hole
(NS-BH) mergers (Paczynski, 1991), are thought to be potential sources of
gravitational-wave (GW) radiation, short-duration gamma-ray bursts (GRBs), as
well as optical/infrared transients (called kilonovae; Berger 2014; Zhang
2018). The first “smoking gun” evidence to support this hypothesis was the
direct detection of a GW event (GW170817) by Advanced LIGO and Virgo that was
associated with the short GRB 170817A and kilonova AT2017gfo (Abbott et al.,
2017; Covino et al., 2017; Evans et al., 2017; Goldstein et al., 2017; Kasen
et al., 2017; Savchenko et al., 2017; Zhang et al., 2018).

Phenomenally, GRBs are divided into those of long and short durations, with a
division line at the observed duration $T_{90}\sim$2 s (Kouveliotou et al.,
1993), and it has been suggested that they are likely related to compact star
merger and the deaths of massive stars, respectively (Zhang, 2018). However,
the duration of a GRB is energy- and instrument-dependent (Qin et al., 2013),
suggesting that it may not be directly related to the progenitors of GRBs (Lü
et al., 2010, 2014). It requires a multiple observational criteria to judge
the progenitors of GRBs (Zhang et al., 2009). A small fraction of short-
duration GRBs were reported to be associated with kilonova candidates before
the discovery of GW 170817/GRB 170817A/AT2017gfo (see Metzger 2019 for a
review)$-$for example, GRB 130603B (Berger et al., 2013; Tanvir et al., 2013),
GRBs 050709 and 070809 (Jin et al., 2016, 2020), GRB 080503 (Metzger & Piro,
2014; Gao et al., 2015), and GRB 160821B (Lü et al., 2017; Lamb et al., 2019;
Troja et al., 2019). On the other hand, excepting the above short-duration
GRBs, several nearby short-duration GRBs with extended emission (EE) lacking
an associated supernova but containing a possible kilonova signature were
claimed to be from compact star mergers$-$for example, GRB 060614 (Della Valle
et al., 2006; Fynbo et al., 2006; Gal-Yam et al., 2006; Gehrels et al., 2006;
Yang et al., 2015), GRB 211211A (Rastinejad et al., 2022; Troja et al., 2022;
Yang et al., 2022; Chang et al., 2023; Gompertz et al., 2023), and GRB 211227A
(Lü et al., 2022; Ferro et al., 2023).

Recently, a nearby peculiar long-duration GRB 191019A without EE emission that
triggered the Swift Burst Alert Telescope (BAT; Simpson et al. 2019) with
redshift $z=$0.248 (Levan et al., 2023) has generated excitement. More
interestingly, no associated supernova signature was detected for GRB 191019A
and the host galaxy has no significant star formation activity (Levan et al.,
2023). This suggests that the origin of GRB 191019A is unlikely to be the
death of a massive star (Levan et al., 2023), but that dynamical interactions
in the dense nucleus of the host via compact object mergers could naturally
explain the observations (Levan et al., 2023). For example, gas drag (Tagawa
et al., 2020) and the clustering of compact objects in migration traps promote
binary formation through dynamic interactions (Bellovary et al., 2016;
McKernan et al., 2020). Lazzati et al. (2023) proposed that the GRB 191019A
originated in a binary compact merger with an intrinsic prompt emission
duration of $\sim 1.1$ s, which is stretched in time by the interaction with a
high-density external medium $\sim 10^{7}-10^{8}~{}\rm cm^{-3}$ (Lazzati et
al., 2022). If this is the case, a kilonova emission associated with GRB
191019A should be powered after the merger of the compact stars, and the
contribution of an ejecta$-$circumstellar medium (CSM) interaction producing a
kilonova cannot be ignored in such a dense external medium (Qi et al., 2022;
Ren et al., 2022). In previous studies, the ejecta$-$CSM interaction has been
invoked to interpret the observations of some superluminous supernovae
(Chevalier & Fransson, 1994; Smith & McCray, 2007; Chevalier & Irwin, 2011;
Chatzopoulos et al., 2012, 2013; Nicholl et al., 2014; Wang et al., 2016; Liu
et al., 2018), but never has never been used to interpret any kilonova
emission associated with short GRBs.

From a theoretical point of view, the kilonova emission from a merger of two
compact stars is generated by the ejected materials, powered by radioactive
decay from the $r$-process, and is nearly isotropic (Li & Paczyński, 1998;
Metzger et al., 2010; Berger, 2011; Rezzolla et al., 2011; Hotokezaka et al.,
2013; Rosswog et al., 2013; Jin et al., 2015). On the other hand, the magnetar
central engine can be formed as the remnant, depending on the mass of the
nascent NS, if the merger of the two compact stars is NS-NS or an NS and a
white dwarf (NS-WD) (Usov, 1992; Dai & Lu, 1998; Zhang & Mészáros, 2001; Dai
et al., 2006; Rowlinson et al., 2010). If this is the case, the spin energy of
the magnetar can be comparable to or even larger than the radioactive decay
energy and may power a brighter kilonova (called a “merger-nova”; Yu et al.
2013; Zhang 2013; Metzger & Piro 2014; Gao et al. 2017; Lü et al. 2017), such
as 160821B (Lü et al., 2017) and GRB 170817A (Yu et al., 2018). It is also
possible that the magnetic wind from the accretion disk of a newborn BH could
heat up the neutron-rich merger ejecta and provide additional energy to the
transients if the central engine is a BH for NS-BH or NS-NS mergers (Yang et
al., 2015; Ma et al., 2021; Yuan et al., 2021), such as GRB 160821B (Ma et
al., 2021; Yuan et al., 2021).

If the merger of two compact stars is indeed operating in GRB 191019A, then a
question arises: how bright is the kilonova emission associated with GRB
191019A when we simultaneously consider the different types of energy sources,
i.e. $r$-process-powered, spin energy from a magnetar, and the contribution
from an ejecta$-$CSM interaction? This paper aims to address this interesting
question through detailed calculations of the kilonova emission, which are
then compared with the calculated results for the kilonova from the
observational data of GRB 191019A. This paper is organized as follows. The
models of the kilonova energy sources we use are shown in Section 2, and
Section 3 presents the basic observations of GRB 191019A. In Section 4, we
show the results of the kilonova calculations to compare with the
observational data of GRB 191019A. Conclusions are drawn in Section 5 with
some additional discussions. Throughout the paper, we use the notation
$Q_{n}=Q/10^{n}$ in CGS units, which means that $Q_{n}$ is the unit of
$10^{n}$ (such as $E_{52}=E/(10^{52}~{}\rm erg)$). We adopt a concordance
cosmology with parameters $H_{\rm 0}=71~{}\rm km~{}s^{-1}~{}Mpc^{-1}$,
$\Omega_{\rm M}=0.30$, and $\Omega_{\Lambda}=0.70$.

##  2\. Basic model of kilonova energy sources

###  2.1. $\rm r$-process nucleosynthesis

The ejecta from NS-NS or NS-BH mergers carries a large amount of free
neutrons. The ejecta expands in space at a nearly constant speed and the
neutron capture time scale is shorter than the $\beta$-decay time scale in
such a dense neutron-rich environment. This allows the rapid neutron capture
process (called $r$-process) to quickly synthesize elements heavier than Fe.
The heavier elements are unstable and heat the ejecta through radioactive
decay. Photons are trapped in the ejecta, but are eventually released from the
photosphere to power the kilonova, which radiates in the ultraviolet, optical,
and infrared bands (Li & Paczyński, 1998; Metzger et al., 2010; Metzger,
2017).

The total energy of the ejecta can be written as
$E_{\mathrm{ej}}=(\Gamma-1)M_{\mathrm{ej}}c^{2}+\Gamma
E_{\mathrm{int}}^{\prime}$, where $E_{\mathrm{int}}^{\prime}$ is the internal
energy measured in the comoving frame, $M_{\mathrm{ej}}$ is the ejecta mass,
$c$ is the speed of light, and $\Gamma$ is the Lorentz factor. Based on energy
conservation, one has

$\displaystyle dE_{\mathrm{ej}}=(L_{\mathrm{inj}}-L_{\mathrm{e}})dt,$ (1)

where $L_{\rm e}$ and $L_{\mathrm{inj}}$ are the radiated bolometric
luminosity and the injection luminosity, respectively. Within the $r$-process
scenario, the injection luminosity is contributed to by radioactive power
($L_{\mathrm{ra}}$):

$\displaystyle L_{\text{inj}}=L_{\mathrm{ra}}.$ (2)

The radioactive power in the comoving frame can be defined as

$\displaystyle\begin{split}L_{\text{ra}}^{\prime}&=\frac{L_{\text{ra}}}{\mathcal{D}^{2}}\\\
&=4\times
10^{49}M_{\text{ej},-2}\times\left[\frac{1}{2}-\frac{1}{\pi}\arctan\left(\frac{t^{\prime}-t_{0}^{\prime}}{t_{\sigma}^{\prime}}\right)\right]^{1.3}\text{erg
s}^{-1},\end{split}$ (3)

where $t_{0}^{\prime}\sim$1.3 s and $t_{\sigma}^{\prime}\sim 0.11$ (Korobkin
et al., 2012), and $\mathcal{D}=1/[\Gamma(1-\beta)]$ is the Doppler factor
with $\beta=\sqrt{1-\Gamma^{-2}}$. The comoving time $dt^{\prime}$ can be
connected with the observer’s time via $dt^{\prime}={\cal D}dt$.

Together with the above considerations, the equation for the dynamic evolution
of the ejecta can be expressed as

$\displaystyle\frac{d\Gamma}{dt}=\frac{{L_{\mathrm{inj}}}-L_{\rm
e}-\Gamma\mathcal{D}(dE_{\mathrm{int}}^{\prime}/dt^{\prime})}{M_{\mathrm{ej}}c^{2}+E_{\mathrm{int}}^{\prime}}.$
(4)

The evolution of internal energy in the comoving frame can be written as
(Kasen & Bildsten, 2010; Yu et al., 2013)

$\displaystyle\frac{dE^{\prime}_{\mathrm{int}}}{dt^{\prime}}=L^{\prime}_{\mathrm{inj}}-L^{\prime}_{\mathrm{e}}-\mathcal{P^{\prime}}\frac{dV^{\prime}}{dt^{\prime}}.$
(5)

The pressure $\mathcal{P}^{\prime}=E_{\mathrm{int}}^{\prime}/3V^{\prime}$ is
dominated by radiation, and the evolution of the comoving volume can be
written as

$\displaystyle\frac{dV^{\prime}}{dt}=4\pi R^{2}\beta c,$ (6)

where $R$ is the radius of the ejecta and $\beta$ is the velocity of the
kilonova ejecta, which is equal to $v_{\rm KN}$. One has

$\displaystyle\frac{dR}{dt}=\frac{\beta c}{(1-\beta)}$ (7)

such that the radiated bolometric luminosity in the comoving frame can be
expressed as (Kasen & Bildsten, 2010; Kotera et al., 2013)

$\displaystyle
L_{\mathrm{e}}^{\prime}=\begin{cases}\frac{E_{\mathrm{int}}^{\prime}c}{\tau
R/\Gamma},&t\leqslant t_{\tau}\\\
\frac{E_{\mathrm{int}}^{\prime}c}{R/\Gamma},&t>t_{\tau}\end{cases},$ (8)

where $\tau=\kappa(M_{\mathrm{ej}}/V^{\prime})(R/\Gamma)$ is the optical depth
of the ejecta, $\kappa$ is the opacity, and $t_{\tau}$ is the time at
${\tau}=1$.

The radiation of the ejecta comes from the photosphere $R_{\rm ph}$ with a
blackbody radiation spectrum. The effective temperature can be defined as (Yu
et al., 2018)

$\displaystyle T_{\rm e}=\left(\frac{L_{\rm e}}{4\pi
R_{\text{ph}}^{2}\sigma_{\text{SB}}}\right)^{1/4},$ (9)

where $\sigma_{\text{SB}}$ is the Stephan$-$Boltzman constant. The observed
flux density at frequency ${\nu}$ can be calculated as

$\displaystyle F_{\nu}^{\rm ejcta}=\frac{2\pi
h\nu^{3}R^{2}}{D_{L}^{2}c^{2}}\frac{1}{\exp(h\nu/kT_{\rm e})-1},$ (10)

where $h$ is the Planck constant and $D_{L}$ is the luminosity distance of the
source.

###  2.2. Spindown energy

For a stable NS with an initial spin period $P_{\rm i}$, the total rotational
energy is $E_{\mathrm{rot}}\sim 2\times
10^{52}I_{45}M_{1.4}R_{6}^{2}P_{\mathrm{i.-3}}^{-2}~{}\rm erg$, where $M$,
$R$, and $I$ are the mass, radius, and moment of inertia of the NS,
respectively. The spindown luminosity of a stable NS as a function of time can
be expressed by the magnetic dipole radiation formula equation (Zhang &
Mészáros, 2001; Lü et al., 2018):

$\displaystyle L_{\mathrm{sd}}=L_{0}\bigg{(}1+\frac{t}{t_{\rm
sd}}\bigg{)}^{\alpha}$ (11)

where $L_{0}\simeq 1.0\times
10^{47}~{}\operatorname{erg~{}s}^{-1}(B_{p,14}^{2}P_{i,-3}^{-4}R_{6}^{6})$,
and $t_{\rm sd}\simeq 2\times
10^{5}~{}\mathrm{s}(I_{45}B_{p,14}^{-2}P_{0,-3}^{2}R_{6}^{-6})$ are the
characteristic spindown luminosity and timescale, respectively. $t$ is the
time in the observed frame and $\alpha$ is equal to $-1$ and $-2$ when the
energy loss is dominated by GW radiation (Lasky & Glampedakis, 2016; Lü et
al., 2020) and magnetic dipole radiation (Zhang & Mészáros, 2001),
respectively. Sometimes, $\alpha$ may be less than $-2$, which corresponds to
the situation of a supermassive NS central engine collapsing into a BH
(Rowlinson et al., 2010; Yuan et al., 2021).

If the central engine of a short GRB is a stable NS, the main power source of
the kilonova should no longer be limited to the $r$-process and the spin
energy of the NS may be comparable to or even larger than the radioactive
decay energy. In this case, the ejection luminosity should have contributions
from both the spindown luminosity ($L_{\mathrm{sd}}$) and radioactive power
($L_{\mathrm{ra}}$):

$\displaystyle L_{\text{inj}}={\xi}L_{\mathrm{sd}}+L_{\mathrm{ra}},$ (12)

where ${\xi}$ corresponds to the converted efficiencies (fixed to 0.3) from
spindown luminosity to radiation (Zhang & Yan, 2011). The subsequent
operations are the same as in the previous part.

###  2.3. Ejecta$-$CSM interaction

If the external medium of a short GRB is dense enough, we have to consider the
contribution of an ejecta$-$CSM interaction to the kilonova emission. The
ejecta$-$CSM interaction model involving multiple shells/winds has been
invoked to interpret supernova light curves with multiple peaks (Wang et al.,
2016; Liu et al., 2018). Following the same method of ejecta$-$CSM interaction
that has been used in supernova explosions, we invoke the ejecta$-$CSM
interaction model involving one shell to calculate the kilonova emission. In
this section, we will present the details of this ejecta$-$CSM interaction
model.

The ejecta interacting with the pre-existing CSM can result in two shocks: a
forward shock (FS) that propagates through the CSM and a reverse shock (RS)
that sweeps up the kilonova ejecta. Based on numerical simulations of
supernova explosions, the density of the supernova ejecta is a power-law
distribution (Chevalier, 1982; Chevalier & Fransson, 1994; Liu et al., 2018).
We assume that the density distribution of the kilonova ejecta also obeys a
power-law distribution (Matzner & McKee, 1999). Thus, the density profile of
the outer part of the kilonova ejecta is written as

$\displaystyle\rho_{\mathrm{out}}=g_{\rm n}t^{n-3}r^{-n},$ (13)

where $n$ is the power-law index of the outer part of the ejecta that depends
on the kilonova progenitor star. $g_{\rm n}$ is the scaling parameter of the
density profile, and it is given by (Chevalier & Fransson, 1994; Chatzopoulos
et al., 2012)

$\displaystyle g_{\rm
n}=\frac{1}{4\pi(n-\delta)}\frac{[2(5-\delta)(n-5)E_{\mathrm{KN}}]^{(n-3)/2}}{[(3-\delta)(n-3)M_{\mathrm{ej}}]^{(n-5)/2}},$
(14)

where $\delta$ is the power-law index of the inner density profile and
$E_{\mathrm{KN}}$ is the total kilonova energy. The density of a circumstellar
shell is written as

$\displaystyle\rho_{\mathrm{CSM}}=qr^{-s},$ (15)

where $q$ is a scaling constant and $s$ is the power-law index for a CSM
density profile. $s=0$ represents a uniform-density shell. Here, we adopt a
uniform-density shell ($s=0$) to do the calculations and obtain the density of
the ambient material $\rho_{\mathrm{CSM}}=q$. Moreover, in order to test how
sensitive the kilonova emission is for $n$, we calculate the kilonova emission
that is contributed from the ejecta$-$CSM interaction with varying $n$. We
find that a smaller- quality $n$ is corresponding to a longer time and
brighter emission from the CSM interaction. The kilonova emission from the
ejecta$-$CSM interaction with $n=7$ is comparable with observations, so we
adopt $n=7$ to do the calculations.

A contact discontinuity separates the shocked CSM and the shocked ejecta. Its
radius ($R_{\rm cd}$) can be described by the self-similar solution
(Chevalier, 1982)

$\displaystyle R_{\mathrm{cd}}=\left(\frac{Ag_{\rm
n}}{q}\right)^{\frac{1}{n-s}}t^{\frac{(n-3)}{(n-s)}},$ (16)

where $A$ is a constant. The radii of the FS and RS are written as

$\displaystyle
R_{\mathrm{FS}}(t)=R_{\mathrm{in}}+\beta_{\mathrm{FS}}R_{\mathrm{cd}}$ (17)

and

$\displaystyle
R_{\mathrm{RS}}(t)=R_{\mathrm{in}}+\beta_{\mathrm{RS}}R_{\mathrm{cd}},$ (18)

where $R_{\rm in}$ is the initial radius of the interaction.
$\beta_{\mathrm{FS}}$ and $\beta_{\mathrm{RS}}$ are constants representing the
ratio of the shock radius to the contact discontinuity radius, respectively.
The values of $\beta_{\mathrm{FS}}$ and $\beta_{\mathrm{RS}}$ are shown in
Table 1 of Chevalier (1982). The self-similar solutions for the structure of
the interaction region require to $n>5$. Based on the result in Liu et al.
(2018), we adopt $n=7$, which is used in the outer part of type I supernovae.
Given $n=7$ and $s=0$, one has $\beta_{\mathrm{FS}}=1.181$,
$\beta_{\mathrm{RS}}=0.935$, and $A=1.2$. The ejecta$-$CSM interaction will
convert the kinetic energy to radiation. The input luminosity function of the
FS is (Chatzopoulos et al., 2012)

$\displaystyle\begin{split}L_{\mathrm{FS}}(t)=\frac{2\pi}{(n-s)^{3}}g_{\rm
n}^{\frac{5-s}{n-s}}q^{\frac{n-5}{n-s}}(n-3)^{2}(n-5)\\\
\beta_{\mathrm{FS}}^{5-s}A^{\frac{n-5}{n-s}}\times(t+t_{\mathrm{int}})^{\alpha_{i}}\theta(t_{\mathrm{FS},\mathrm{BO}}-t),\end{split}$
(19)

and for the RS it is (Wang et al., 2016)

$\displaystyle\begin{split}L_{\mathrm{RS}}(t)=2\pi\left(\frac{Ag_{\rm
n}}{q}\right)^{\frac{5-n}{n-s}}\beta_{\mathrm{RS}}^{\mathrm{5-n}}g_{\rm
n}\left(\frac{n-5}{n-3}\right)\\\
\times\left(\frac{3-s}{n-s}\right)^{3}(t+t_{\mathrm{int}})^{\alpha_{i}}\theta(t_{\mathrm{RS},\star}-t),\end{split}$
(20)

where $\theta(t_{\mathrm{RS},*}-t)$ and
$\theta(t_{\mathrm{FS},\mathrm{BO}}-t)$ represent the Heaviside step function
controlling the end times of the FS and RS, respectively.
$t_{\mathrm{int}}\approx R_{\mathrm{in}}/v_{\mathrm{SN}}$ is the time when the
ejecta just touches the CSM, representing the beginning of the ejecta$-$CSM
interaction. The temporal index is $\alpha_{i}=(2n+6s-ns-15)/(n-s)$. Here, we
fix $n=7$ and $s=0$, such that one has $\alpha_{i}=-0.143$.

The RS termination timescale $t_{\mathrm{RS},\star}$ is defined as the time
for the RS to sweep up all of the effective ejecta (Chatzopoulos et al., 2012,
2013):

$\displaystyle
t_{\mathrm{RS,}\ast}=\left[\frac{v_{\mathrm{KN}}}{\beta_{\mathrm{RS}}(Ag_{n}/q)^{\frac{1}{n-s}}}\left(1-\frac{(3-n)M_{\mathrm{ej}}}{4\pi
v_{\mathrm{KN}}^{3-n}g_{n}}\right)^{\frac{1}{3-n}}\right]^{\frac{n-s}{s-3}}.$
(21)

where $v_{\mathrm{KN}}$ is the velocity of the kilonova ejecta. This depends
on both the ejecta mass and the energy of the kilonova. Initially, we set
$v_{\mathrm{KN}}$ as in the range of $0.1c$ to $0.9c$, and find that the
apparent magnitude of the kilonova is affected a little bit by altering
$v_{\mathrm{KN}}$. So, we fixed vKN as $0.1c$. The termination timescale of
the FS is approximately equal to the time of the FS breakout
$t_{\mathrm{FS,BO}}$ when the optically thin111Here, the “optically thin”
means that the optical depth is in the range of $2/3<\tau_{\rm CSM}<1$. part
of the CSM is swept up, and is given as (Chatzopoulos et al., 2012, 2013)

$\displaystyle\begin{aligned}
t_{\mathrm{FS,BO}}=\\{\frac{(3-s)q^{(3-n)/(n-s)}[Ag_{\rm
n}]^{(s-3)/(n-s)}}{4\pi\beta_{\mathrm{FS}}^{3-s}}\\}^{\frac{n-s}{(n-3)(3-s)}}\times
M_{\text{CSM},\text{th}}^{\frac{n-s}{(n-3)(3-s)}},\end{aligned}$ (22)

where $M_{\text{CSM},\text{th}}$ is the mass of the optically thin CSM:

$\displaystyle
M_{\mathrm{CSM},\mathrm{th}}=\int_{R_{\mathrm{in}}}^{R_{\mathrm{ph}}}4\pi{r}^{2}\rho_{\mathrm{CSM}}dr.$
(23)

Here, we fix $R_{\mathrm{in}}=10^{15}~{}\rm cm$. $R_{\mathrm{ph}}$ represents
the photosphere radius of the CSM shell. Under the Eddington approximation, it
is located at an optical depth $\tau_{\rm CSM}=2/3$ (Liu et al., 2018).
$R_{\mathrm{ph}}$ is given by solving

$\displaystyle\begin{aligned} \tau_{\rm
CSM}=\int_{R_{\mathrm{ph}}}^{R_{\mathrm{out}}}\kappa_{\rm
CSM}\rho_{\mathrm{CSM}}dr=2/3,\end{aligned}$ (24)

where $\kappa_{\mathrm{CSM}}$ is the optical opacity of the CSM and
$R_{\operatorname{out}}$ is the radius of the outer boundary of the CSM. The
opacities of the CSM shells and winds $\kappa_{\mathrm{CSM}}$ are related to
their composition and temperatures. For hydrogen-poor matter, the dominant
source of opacity is electron scattering,
$\kappa_{\mathrm{CSM}}=0.06-0.2~{}\rm cm^{2}~{}g^{-1}$ (see the references
listed in Wang et al. 2016). For hydrogen-rich matter,
$\kappa_{\mathrm{CSM}}=0.33~{}\rm cm^{2}~{}g^{-1}$, which is the Thomson
electron scattering opacity for fully ionized material with the solar
metallicity (Chatzopoulos et al., 2012). It is given by solving

$\displaystyle M_{\mathrm{CSM}}=\int_{R_{\mathrm{in}}}^{R_{\mathrm{out}}}4\pi
r^{2}\rho_{\mathrm{CSM}}dr.$ (25)

The total optical depth of the CSM depends on the opacity
$\kappa_{\mathrm{CSM}}$ instead of $M_{\mathrm{CSM}}$. For a given
$M_{\mathrm{CSM}}=10M_{\odot}$ and hydrogen-rich matter
$\kappa_{\mathrm{CSM}}=0.33~{}\rm cm^{2}~{}g^{-1}$, the total optical depth of
the $\tau_{\mathrm{CSM}}$ is always larger than 1. If this is the case, one
can only observe the kilonova that is contributed from both the RS and FS of
the ejecta$-$CSM interaction. The interacting material could be heated by both
the FS and RS, and contribute to the input total luminosity. One has

$\displaystyle
L_{\mathrm{inp,CSM}}(t)=\epsilon[L_{\mathrm{FS}}(t)+L_{\mathrm{RS}}(t)],$ (26)

where $\epsilon$ is the conversion efficiency from kinetic energy to radiation
and is fixed at $\epsilon=0.9$ to do the calculations, due to poor
understanding. On the other hand, the optical depth is very important for the
kilonova emission. If $\tau_{\rm CSM}<2/3$, one can observe the kilonova
emission that is contributed from the $r$-process, spindown, as well as the RS
of the CSM, but not the contribution from the FS of the CSM. If $2/3<\tau_{\rm
CSM}<1$, one can observe the kilonova emission that is contributed from
$r$-process, spindown, as well as both the RS and FS of the ejecta$-$CSM
interaction. If $\tau_{\rm CSM}>1$, one can always observe the kilonova
emission that is only contributed from the RS and FS of the CSM, but one
cannot observe the contributions from $r$-process and spindown. In order to
observe the kilonova emission that is contributed from $r$-process, spindown,
as well as both the RS and FS of the CSM, we set the total optical depth of
the CSM $\tau_{\textup{CSM}}$ in the range of $2/3<\tau_{\textup{CSM}}<1$ for
$\kappa_{\mathrm{CSM}}=0.2~{}\rm cm^{2}~{}g^{-1}$. So that
$M_{\textup{CSM,th}}$ represents the mass of the optical depth larger than
2/3. If this is the case, the output luminosity can be written as

$\displaystyle L(t)=\frac{1}{t_{\rm diff}}\exp\left[-\frac{t}{t_{\rm
diff}}\right]\int_{0}^{t}\exp\left[\frac{t^{\prime}}{t_{\rm
diff}}\right]L_{\mathrm{inp,CSM}}(t^{\prime})dt^{\prime},$ (27)

where $t_{\rm diff}$ is the diffusion timescale. The interaction diffusion
timescale can be written as

$\displaystyle t_{\mathrm{diff}}=\frac{\kappa_{\rm
CSM}M_{\mathrm{CSM},\mathrm{th}}}{\phi cR_{\mathrm{ph}}},$ (28)

where $\phi=4\pi^{3}/9\simeq 13.8$ (Arnett, 1982).

Based on the Equation(11) together with Equation(12), one has

$\displaystyle T_{\rm CSM}=\left(\frac{L(t)}{4\pi
R_{\text{ph}}^{2}\sigma_{\text{SB}}}\right)^{1/4}$ (29)

and

$\displaystyle F_{\nu}^{\rm CSM}=\frac{2\pi h\nu^{3}R_{\rm ph}^{2}}{D_{\rm
L}^{2}c^{2}}\frac{1}{\exp(h\nu/kT_{\rm CSM})-1}.$ (30)

The observed kilonova emission flux consists of $F_{\nu}^{\text{ejcta}}$ which
contains contributions from the $r$-process nucleosynthesis, spindown energy,
and $F_{\nu}^{\text{CSM}}$ from the ejecta$-$CSM interaction:

$\displaystyle
F_{\nu}^{\text{tot}}=F_{\nu}^{\text{ejcta}}+F_{\nu}^{\text{CSM}}.$ (31)

One may then determine the monochromatic apparent magnitude of the kilonova
emission (Yu et al., 2018):

$\displaystyle M_{\nu}=-2.5\log_{10}\frac{F_{\nu}^{\rm tot}}{3631}\text{Jy}.$
(32)

Figure 1 shows a numerical calculation of the kilonova emission in the $r$
band by considering the sum of the $r$-process-powered (marked $L_{\rm ra}$),
the spin energy from a magnetar (marked $L_{\rm sd}$), and the ejecta$-$CSM
interaction (marked CSM). We find that the most significant contribution to
the kilonova emission from the ejecta$-$CSM interaction is at late times.

##  3\. Observations of GRB 191019A

GRB 191019A triggered the BAT at 15:12:33 UT on 2019 October 19 (Simpson et
al., 2019). The light curve shows a complex structure with many overlapping
pulses (Figure 2) with duration $T_{\rm 90}=64\pm 4$ s in the energy range
$15-350$ keV (Krimm et al., 2019), and thus GRB 191019A is classified as a
typical long-duration GRB. The X-ray Telescope (XRT) began observing the field
3900 $s$ after the BAT trigger (D’Ai et al., 2019). Several optical telescopes
made follow-up observations of the field, such as the Ultraviolet and Optical
Telescope, the Nordic Optical Telescope (NOT), Gemini-South, and the Hubble
Space Telescope (Levan et al., 2023). Spectroscopy obtained with the NOT and
Gemini-South found a redshift $z=0.248$ within an old galaxy based on several
absorption lines, and its location was pinpointed within 100 pc projected from
the nucleus of its host galaxy (Levan et al., 2023).

The lack of an associated supernova and the evidence of no star formation in
the host galaxy suggest that a massive star collapse origin of the progenitor
of GRB 191019A is disfavored, and that the progenitor is likely to have arisen
either from the merger of compact objects in dynamically dense stellar
clusters or in a gaseous disk around a supermassive BH (Levan et al., 2023).
Lazzati et al. 2023 proposed that GRB 191019A originated from a compact binary
merger, with a prompt emission intrinsic duration of $\sim 1.1$ s, which is
stretched in time by the interaction with a high-density $\sim
10^{7}-10^{8}~{}\rm cm^{-3}$ external medium.

##  4\. Possible kilonova emission associated with GRB 191019A

If the merger of two compact stars is indeed taking place in GRB 191019A in
the disk of an active galactic nucleus (AGN), the contribution to the kilonova
emission from the ejecta$-$CSM interaction cannot be ignored in such a dense
external medium. In this section, we calculate the emission of the GRB 191019A
kilonova by considering both the $r$-process-powered energy and the
ejecta$-$CSM interaction ($L_{\rm ra}+$CSM), or the sum of the $r$-process-
powered energy, the spin energy from a magnetar, and the ejecta$-$CSM
interaction ($L_{\rm ra}+L_{\rm sd}+$CSM).

Lazzati et al. (2023) showed that the number density of the external medium
can be as high as $10^{7}-10^{8}~{}\rm cm^{3}$. By assuming that the external
medium is filled with protons, the volume density is $\rho=1.7\times
10^{-16}\rm g~{}cm^{-3}$. We calculate the kilonova emission given the ejecta
masses of $M_{\rm ej}=10^{-2}$, $10^{-3}$, $10^{-4}$, $10^{-5}$, and
$10^{-6}M_{\odot}$ by considering both $L_{\rm ra}+$CSM (the left panel in
Figure 3) and $L_{\rm ra}+L_{\rm sd}+$CSM (the right panel in Figure 3). We
find that a larger ejecta mass has a stronger $L_{\rm ra}$ radiation, but a
smaller ejecta mass corresponds to a brighter kilonova emission contribution
from the ejecta$-$CSM interaction at later time. Moreover, we also show that
how the sensitivity of the kilonova emission is for different values of ejecta
velocity and CSM mass (Figure 4). We find that the CSM interaction
contribution of the kilonova emission is not sensitive to the ejecta velocity,
but depends a little bit on the CSM mass. Here, a large mass of CSM is
possible due to external environmental influence (such as gas drag or
migration traps).

One basic question is whether or not we can find evidence for a kilonova
emission from an ejecta$-$CSM interaction from the observations. We collect
all the optical data that was observed by telescopes in Levan et al. (2023) in
the $r$, $g$, $z$, $U$, and $B$ bands. We find that the host galaxy of GRB
191019A is brighter than any afterglow or kilonova emission, except in the $U$
band at early times. Therefore, it would be difficult to detect any kilonova
emission from GRB 191019A. If this is the case, one interesting question is:
what is the parameter distribution for a nondetection of a kilonova emission
from GRB 191019A? Figure 5 shows the possible kilonova emission, which is
dimmer than the host galaxy and cannot be detected within the $L_{\rm
ra}+L_{\rm sd}+$CSM scenario. A nondetection requires that the injected mass
is larger than $M_{\rm ej}=2\times 10^{-4}M_{\odot}$ and the injected
luminosity and magnetar timescale are less than $L_{0}=10^{48}~{}{\rm
erg~{}s^{-1}}$ and $t_{\rm sd}=10^{3}$ s, respectively.

The other case is that if the host galaxy is not bright enough or the kilonova
emission of GRB 191019A is brighter than the host galaxy. Figure 6 shows a
possible kilonova emission which is brighter than the host galaxy and can be
detected within the $L_{\rm ra}+L_{\rm sd}+$CSM scenario. It requires that the
injected mass is less than $M_{\rm ej}=2\times 10^{-5}M_{\odot}$ and the
injected luminosity and magnetar timescale to be larger than
$L_{0}=10^{48}~{}{\rm erg~{}s^{-1}}$ and $t_{\rm sd}=10^{3}$ s, respectively.
If this is the case, the component of the kilonova emission from the
ejecta$-$CSM interaction can be embodied at the later time.

##  5\. Conclusion and discussion

The prompt emission light curve of GRB 191019A shows a complex structure with
a duration of $T_{\rm 90}=64\pm 4$ s in the energy range $15-350$ keV (Krimm
et al., 2019), and the GRB is classified as a typical long-duration GRB. It is
quite different from that of typical short GRBs and short GRBs with EE (e.g.
GRBs 060614 and 211211A). However, the lack of an associated supernova at low
redshift $z=0.248$ and the evidence that it lives in a host galaxy with no
star formation suggest that a massive star collapse origin of the progenitor
of GRB 191019A is disfavored, and it likely originated in a compact object
merger (Levan et al., 2023). Lazzati et al. (2023) proposed that it may form
dynamically in dense stellar clusters or originate in a gaseous disk around
the supermassive BH. If this is the case, the prompt emission of GRB 191019A
can be easily interpreted as having a short intrinsic duration that was
stretched in time by the interaction with a dense external medium and seen as
moderately off-axis (Lazzati et al., 2022, 2023).

If GRB 191019A is indeed taking place in such high-density environment after a
compact binary merger (NS-NS or NS-BH) on the AGN’s disk, then the
contribution to the kilonova emission from an ejecta$-$CSM interaction cannot
be ignored. In this paper, we theoretically calculate the kilonova emission by
considering the contribution of the ejecta$-$CSM interaction in the high-
density environment, the $r$-process-powered energy, as well as the magnetar
spin energy. It is found that the significant contribution to the kilonova
emission from the ejecta$-$CSM interaction occurs at the later time. In this
case, a larger ejecta mass has a stronger $L_{\rm ra}$ radiation, but a
smaller ejecta mass corresponds to a brighter kilonova emission contribution
from the ejecta$-$CSM interaction at a later time. This work is distinct from
previous works that have not considered the contribution from the ejecta$-$CSM
interaction to the kilonova emission.

Moreover, we try to apply it to GRB 191019A, but we find that it is difficult
to identify the possible kilonova emission from the observations, due to the
contribution of the bright host galaxy. By assuming that the brightness of the
host galaxy is at the upper limit of the kilonova emission associated with GRB
191019A, the model requires that the injected mass is larger than $M_{\rm
ej}=2\times 10^{-4}M_{\odot}$ and the injected luminosity and magnetar
timescale are less than $L_{0}=10^{48}~{}{\rm erg~{}s^{-1}}$ and $t_{\rm
sd}=10^{3}$ s, respectively. On the other hand, a detected associated kilonova
emission to GRB 191019A would require the injected mass be less than $M_{\rm
ej}=2\times 10^{-5}M_{\odot}$ and the injected luminosity and magnetar
timescale to be larger than $L_{0}=10^{48}~{}{\rm erg~{}s^{-1}}$ and $t_{\rm
sd}=10^{3}$ s, respectively. Those values of the parameters fall into a
reasonable range (Fryer et al., 2015; Côté et al., 2017), and the component of
the kilonova emission due to the ejecta$-$CSM interaction can be embodied at
later times if the host galaxy is not bright enough.

Our calculations also pose a curious question: is the nondetection of an
associated kilonova emission to GRB 191019A due to a larger optical depth that
presents photons from escaping the system before the medium becomes
transparent at the photosphere radius? Based on the parameters we use in
Figure 5 and Figure 6, we calculate the optical depth of the ejecta$-$CSM
interaction and find that the optical depth is close to or even less than 1.
This implies that the nondetection of any associated kilonova emission from
GRB 191019A is not due to a large optical depth, but is either overwhelmed by
the bright contribution from the host galaxy or that the kilonova emission is
itself weak.

In the future, in order to investigate the kilonova emission contribution from
the ejecta$-$CSM interaction associated with a GRB 191019A$-$like event, a
brighter kilonova emission (at least brighter than that of the host galaxy) or
an even lower redshift will be required. There are event rate densities of NS-
NS ($R_{\rm NS-NS}\sim f_{\rm AGN}[0.2,400]\rm~{}Gpc^{-3}~{}yr^{-1}$) and NS-
BH ($R_{\rm NS-BH}\sim f_{\rm AGN}[10,300]\rm~{}Gpc^{-3}~{}yr^{-1}$) mergers
in the disks of AGNs (McKernan et al., 2020; Zhu et al., 2021). They also
suggested that only 10%-20% of NS-BH mergers in AGN disks can result in tidal
disruptions. If this is the case, the expected a detection rate is $R_{\rm
obs}\sim f_{\rm AGN}f_{\theta}[20,400]\rm~{}yr^{-1}$. Here, $f_{\theta}$ is
the fraction of mergers and $f_{\rm AGN}$ is the fraction of the observed NS-
NS or NS-BH mergers from an AGN disk. We therefore encourage optical follow-up
observations of GRB 191019A$-$like events, especially those that capture
electromagnetic signals at later times if the host galaxy is not bright
enough. If possible, an observed GRB 191019A-like event with an associated GW
signal would also provide a good probe for understanding the types of compact
star mergers (e.g., NS-NS or NS-BH).

The James Webb Space Telescope (JWST) has a near-infrared limit of 28. If the
contribution of the host galaxy is very small, current detectors would be able
to see such kilonova emission in the future.

We thank Bing Zhang and Ren Jia for helpful comments. This work is supported
by the Guangxi Science Foundation the National (grant Nos. 2023GXNSFDA026007),
the National Natural Science Foundation of China (grant No. 11922301 and
12133003), and the Program of Bagui Scholars Program (LHJ).

## References

  * Abbott et al. (2017) Abbott, B. P., Abbott, R., Abbott, T. D., et al. 2017, Phys. Rev. Lett., 119, 161101. doi:10.1103/PhysRevLett.119.161101
  * Arnett (1982) Arnett, W. D. 1982, ApJ, 253, 785. doi:10.1086/159681
  * Bellovary et al. (2016) Bellovary, J. M., Mac Low, M.-M., McKernan, B., et al. 2016, ApJ, 819, L17. doi:10.3847/2041-8205/819/2/L17
  * Berger (2011) Berger, E. 2011, NewAR, 55, 1. doi:10.1016/j.newar.2010.10.001
  * Berger et al. (2013) Berger, E., Fong, W., & Chornock, R. 2013, ApJ, 774, L23. doi:10.1088/2041-8205/774/2/L23
  * Berger (2014) Berger, E. 2014, ARA&A, 52, 43. doi:10.1146/annurev-astro-081913-035926
  * Chang et al. (2023) Chang, X.-Z., Lü, H.-J., Yang, X., et al. 2023, ApJ, 943, 146. doi:10.3847/1538-4357/aca969
  * Chatzopoulos et al. (2012) Chatzopoulos, E., Wheeler, J. C., & Vinko, J. 2012, ApJ, 746, 121. doi:10.1088/0004-637X/746/2/121
  * Chatzopoulos et al. (2013) Chatzopoulos, E., Wheeler, J. C., Vinko, J., et al. 2013, ApJ, 773, 76. doi:10.1088/0004-637X/773/1/76
  * Chatzopoulos et al. (2012) Chatzopoulos, E., Wheeler, J. C., & Vinko, J. 2012, ApJ, 746, 121. doi:10.1088/0004-637X/746/2/121
  * Chevalier & Fransson (1994) Chevalier, R. A. & Fransson, C. 1994, ApJ, 420, 268. doi:10.1086/173557
  * Chevalier & Irwin (2011) Chevalier, R. A. & Irwin, C. M. 2011, ApJ, 729, L6. doi:10.1088/2041-8205/729/1/L6
  * Chevalier (1982) Chevalier, R. A. 1982, ApJ, 258, 790. doi:10.1086/160126
  * Covino et al. (2017) Covino, S., Wiersema, K., Fan, Y. Z., et al. 2017, Nature Astronomy, 1, 791
  * Côté et al. (2017) Côté, B., Belczynski, K., Fryer, C. L., et al. 2017, ApJ, 836, 230. doi:10.3847/1538-4357/aa5c8d
  * Dai & Lu (1998) Dai, Z. G., & Lu, T. 1998, Physical Review Letters, 81, 4301
  * Dai et al. (2006) Dai, Z. G., Wang, X. Y., Wu, X. F., et al. 2006, Science, 311, 1127. doi:10.1126/science.1123606
  * D’Ai et al. (2019) D’Ai, A., Melandri, A., D’Avanzo, P., et al. 2019, GCN, 26045, 1
  * Della Valle et al. (2006) Della Valle, M., Chincarini, G., Panagia, N., et al. 2006, Nature, 444, 1050. doi:10.1038/nature05374
  * Eichler et al. (1989) Eichler, D., Livio, M., Piran, T., et al. 1989, Nature, 340, 126. doi:10.1038/340126a0
  * Evans et al. (2017) Evans, P. A., Cenko, S. B., Kennea, J. A., et al. 2017, Science, 358, 1565. doi:10.1126/science.aap9580
  * Ferro et al. (2023) Ferro, M., Brivio, R., D’Avanzo, P., et al. 2023, A&A, 678, A142. doi:10.1051/0004-6361/202347113
  * Fynbo et al. (2006) Fynbo, J. P. U., Watson, D., Thöne, C. C., et al. 2006, Nature, 444, 1047. doi:10.1038/nature05375
  * Fryer et al. (2015) Fryer, C. L., Belczynski, K., Ramirez-Ruiz, E., et al. 2015, ApJ, 812, 24. doi:10.1088/0004-637X/812/1/24
  * Gal-Yam et al. (2006) Gal-Yam, A., Fox, D. B., Price, P. A., et al. 2006, Nature, 444, 1053. doi:10.1038/nature05373
  * Gao et al. (2015) Gao, H., Ding, X., Wu, X.-F., et al. 2015, ApJ, 807, 163. doi:10.1088/0004-637X/807/2/163
  * Gao et al. (2017) Gao, H., Zhang, B., Lü, H.-J., et al. 2017, ApJ, 837, 50\. doi:10.3847/1538-4357/aa5be3
  * Gehrels et al. (2006) Gehrels, N., Norris, J. P., Barthelmy, S. D., et al. 2006, Nature, 444, 1044. doi:10.1038/nature05376
  * Goldstein et al. (2017) Goldstein, A., Veres, P., Burns, E., et al. 2017, ApJ, 848, L14
  * Gompertz et al. (2023) Gompertz, B. P., Ravasio, M. E., Nicholl, M., et al. 2023, Nature Astronomy, 7, 67. doi:10.1038/s41550-022-01819-4
  * Hotokezaka et al. (2013) Hotokezaka, K., Kiuchi, K., Kyutoku, K., et al. 2013, Phys. Rev. D, 87, 024001. doi:10.1103/PhysRevD.87.024001
  * Jin et al. (2015) Jin, Z.-P., Li, X., Cano, Z., et al. 2015, ApJ, 811, L22. doi:10.1088/2041-8205/811/2/L22
  * Jin et al. (2016) Jin, Z.-P., Hotokezaka, K., Li, X., et al. 2016, Nature Communications, 7, 12898. doi:10.1038/ncomms12898
  * Jin et al. (2020) Jin, Z.-P., Covino, S., Liao, N.-H., et al. 2020, Nature Astronomy, 4, 77. doi:10.1038/s41550-019-0892-y
  * Kasen & Bildsten (2010) Kasen, D. & Bildsten, L. 2010, ApJ, 717, 245. doi:10.1088/0004-637X/717/1/245
  * Kasen et al. (2017) Kasen, D., Metzger, B., Barnes, J., et al. 2017, Nature, 551, 80
  * Korobkin et al. (2012) Korobkin, O., Rosswog, S., Arcones, A., et al. 2012, MNRAS, 426, 1940. doi:10.1111/j.1365-2966.2012.21859.x
  * Kotera et al. (2013) Kotera, K., Phinney, E. S., & Olinto, A. V. 2013, MNRAS, 432, 3228. doi:10.1093/mnras/stt680
  * Kouveliotou et al. (1993) Kouveliotou, C., Meegan, C. A., Fishman, G. J., et al. 1993, ApJ, 413, L101. doi:10.1086/186969
  * Krimm et al. (2019) Krimm, H. A., Barthelmy, S. D., Cummings, J. R., et al. 2019, GCN, 26046, 1
  * Lü et al. (2010) Lü, H.-J., Liang, E.-W., Zhang, B.-B., et al. 2010, ApJ, 725, 1965. doi:10.1088/0004-637X/725/2/1965
  * Lü et al. (2014) Lü, H.-J., Zhang, B., Liang, E.-W., et al. 2014, MNRAS, 442, 1922. doi:10.1093/mnras/stu982
  * Lü et al. (2017) Lü, H.-J., Zhang, H.-M., Zhong, S.-Q., et al. 2017, ApJ, 835, 181. doi:10.3847/1538-4357/835/2/181
  * Lü et al. (2018) Lü, H.-J., Zou, L., Lan, L., et al. 2018, MNRAS, 480, 4402. doi:10.1093/mnras/sty2176
  * Lü et al. (2020) Lü, H.-J., Yuan, Y., Lan, L., et al. 2020, ApJ, 898, L6. doi:10.3847/2041-8213/aba1ed
  * Lü et al. (2022) Lü, H.-J., Yuan, H.-Y., Yi, T.-F., et al. 2022, ApJ, 931, L23. doi:10.3847/2041-8213/ac6e3a
  * Lamb et al. (2019) Lamb, G. P., Tanvir, N. R., Levan, A. J., et al. 2019, ApJ, 883, 48. doi:10.3847/1538-4357/ab38bb
  * Lasky & Glampedakis (2016) Lasky, P. D. & Glampedakis, K. 2016, MNRAS, 458, 1660. doi:10.1093/mnras/stw435
  * Lazzati et al. (2022) Lazzati, D., Soares, G., & Perna, R. 2022, ApJ, 938, L18. doi:10.3847/2041-8213/ac98ad
  * Lazzati et al. (2023) Lazzati, D., Perna, R., Gompertz, B. P., et al. 2023, ApJ, 950, L20. doi:10.3847/2041-8213/acd18c
  * Levan et al. (2023) Levan, A. J., Malesani, D. B., Gompertz, B. P., et al. 2023, Nature Astronomy, 7, 976. doi:10.1038/s41550-023-01998-8
  * Li & Paczyński (1998) Li, L.-X. & Paczyński, B. 1998, ApJ, 507, L59. doi:10.1086/311680
  * Liu et al. (2018) Liu, L.-D., Wang, L.-J., Wang, S.-Q., et al. 2018, ApJ, 856, 59. doi:10.3847/1538-4357/aab157
  * Ma et al. (2021) Ma, S.-B., Xie, W., Liao, B., et al. 2021, ApJ, 911, 97. doi:10.3847/1538-4357/abe71b
  * Matzner & McKee (1999) Matzner, C. D. & McKee, C. F. 1999, ApJ, 510, 379. doi:10.1086/306571
  * McKernan et al. (2020) McKernan, B., Ford, K. E. S., & O’Shaughnessy, R. 2020, MNRAS, 498, 4088. doi:10.1093/mnras/staa2681
  * Metzger & Piro (2014) Metzger, B. D. & Piro, A. L. 2014, MNRAS, 439, 3916. doi:10.1093/mnras/stu247
  * Metzger et al. (2010) Metzger, B. D., Martínez-Pinedo, G., Darbha, S., et al. 2010, MNRAS, 406, 2650. doi:10.1111/j.1365-2966.2010.16864.x
  * Metzger (2017) Metzger, B. D. 2017, Living Reviews in Relativity, 20, 3. doi:10.1007/s41114-017-0006-z
  * Metzger (2019) Metzger, B. D. 2019, Living Reviews in Relativity, 23, 1. doi:10.1007/s41114-019-0024-0
  * Nicholl et al. (2014) Nicholl, M., Smartt, S. J., Jerkstrand, A., et al. 2014, MNRAS, 444, 2096. doi:10.1093/mnras/stu1579
  * Paczynski (1986) Paczynski, B. 1986, ApJ, 308, L43. doi:10.1086/184740
  * Paczynski (1991) Paczynski, B. 1991, AcA, 41, 257
  * Qi et al. (2022) Qi, Y.-Q., Liu, T., Huang, B.-Q., et al. 2022, ApJ, 925, 43. doi:10.3847/1538-4357/ac3757
  * Qin et al. (2013) Qin, Y., Liang, E.-W., Liang, Y.-F., et al. 2013, ApJ, 763, 15. doi:10.1088/0004-637X/763/1/15
  * Rastinejad et al. (2022) Rastinejad, J. C., Gompertz, B. P., Levan, A. J., et al. 2022, Nature, 612, 223. doi:10.1038/s41586-022-05390-w
  * Ren et al. (2022) Ren, J., Chen, K., Wang, Y., et al. 2022, ApJ, 940, L44. doi:10.3847/2041-8213/aca025
  * Rezzolla et al. (2011) Rezzolla, L., Giacomazzo, B., Baiotti, L., et al. 2011, ApJ, 732, L6. doi:10.1088/2041-8205/732/1/L6
  * Rosswog et al. (2013) Rosswog, S., Piran, T., & Nakar, E. 2013, MNRAS, 430, 2585\. doi:10.1093/mnras/sts708
  * Rowlinson et al. (2010) Rowlinson, A., O’Brien, P. T., Tanvir, N. R., et al. 2010, MNRAS, 409, 531. doi:10.1111/j.1365-2966.2010.17354.x
  * Savchenko et al. (2017) Savchenko, V., Ferrigno, C., Kuulkers, E., et al. 2017, ApJ, 848, L15
  * Simpson et al. (2019) Simpson, K. K., Barthelmy, S. D., Gropp, J. D., et al. 2019, GCN, 26031, 1
  * Smith & McCray (2007) Smith, N. & McCray, R. 2007, ApJ, 671, L17. doi:10.1086/524681
  * Tagawa et al. (2020) Tagawa, H., Haiman, Z., & Kocsis, B. 2020, ApJ, 898, 25. doi:10.3847/1538-4357/ab9b8c
  * Tanvir et al. (2013) Tanvir, N. R., Levan, A. J., Fruchter, A. S., et al. 2013, Nature, 500, 547. doi:10.1038/nature12505
  * Troja et al. (2019) Troja, E., Castro-Tirado, A. J., Becerra González, J., et al. 2019, MNRAS, 489, 2104. doi:10.1093/mnras/stz2255 doi:10.1093/mnras/stz2184
  * Troja et al. (2022) Troja, E., Fryer, C. L., O’Connor, B., et al. 2022, Nature, 612, 228. doi:10.1038/s41586-022-05327-3
  * Usov (1992) Usov, V. V. 1992, Nature, 357, 472
  * Wang et al. (2016) Wang, S. Q., Liu, L. D., Dai, Z. G., et al. 2016, ApJ, 828, 87. doi:10.3847/0004-637X/828/2/87
  * Yang et al. (2015) Yang, B., Jin, Z.-P., Li, X., et al. 2015, Nature Communications, 6, 7323. doi:10.1038/ncomms8323
  * Yang et al. (2022) Yang, J., Ai, S., Zhang, B.-B., et al. 2022, Nature, 612, 232\. doi:10.1038/s41586-022-05403-8
  * Yu et al. (2013) Yu, Y.-W., Zhang, B., & Gao, H. 2013, ApJ, 776, L40. doi:10.1088/2041-8205/776/2/L40
  * Yu et al. (2018) Yu, Y.-W., Liu, L.-D., & Dai, Z.-G. 2018, ApJ, 861, 114. doi:10.3847/1538-4357/aac6e5
  * Yuan et al. (2021) Yuan, Y., Lü, H.-J., Yuan, H.-Y., et al. 2021, ApJ, 912, 14. doi:10.3847/1538-4357/abedb1
  * Zhang & Mészáros (2001) Zhang, B. & Mészáros, P. 2001, ApJ, 552, L35. doi:10.1086/320255
  * Zhang et al. (2009) Zhang, B., Zhang, B.-B., Virgili, F. J., et al. 2009, ApJ, 703, 1696. doi:10.1088/0004-637X/703/2/1696
  * 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., Sun, H., et al. 2018, Nature Communications, 9, 447. doi:10.1038/s41467-018-02847-3
  * Zhang (2013) Zhang, B. 2013, ApJ, 763, L22. doi:10.1088/2041-8205/763/1/L22
  * Zhang (2018) Zhang, B. 2018, The Physics of Gamma-Ray Bursts by Bing Zhang. ISBN: 978-1-139-22653-0. Cambridge Univeristy Press, 2018. doi:10.1017/9781139226530
  * Zhu et al. (2021) Zhu, J.-P., Zhang, B., Yu, Y.-W., et al. 2021, ApJ, 906, L11. doi:10.3847/2041-8213/abd412

Figure 1.— Kilonova $r$-band light curve considering the contributions from
the three energy sources, e.g., the radioactive decay of heavier elements (the
blue dashed line marked as $L_{\rm ra}$), the magnetar spindown energy (the
orange dashed line marked as $L_{\rm sd}$) with typical values $M_{\rm
ej}=10^{-4}M_{\odot}$, $\beta=v_{\rm KN}=0.1c$, $\kappa=1.0~{}\rm
cm^{2}~{}g^{-1}$, $\tau=10^{4}$ s, and $L_{0}=1.0\times 10^{47}~{}{\rm
erg~{}s^{-1}}$, and the ejecta$-$CSM interaction (the green dashed line marked
as CSM) with $E_{\rm KN}=10^{49}~{}{\rm erg}$, $\kappa_{\rm CSM}=0.33~{}\rm
cm^{2}~{}g^{-1}$, $z=0.248$, and $M_{\rm CSM}=10M_{\odot}$. The red solid line
is the sum of the three energy sources. Figure 2.— Swift/BAT light curves of
GRB 191019A in different energy bands with a 256 ms time bin.

Figure 3.— Kilonova $r$-band light curve with variations of $M_{\rm
ej}=10^{-2}M_{\odot}$ (purple line), $10^{-3}M_{\odot}$ (red line),
$10^{-4}M_{\odot}$ (green line), $10^{-5}M_{\odot}$ (orange line), and
$10^{-6}M_{\odot}$ (blue line). (a) Considering the source energy of $L_{\rm
ra}+$CSM. (b) Considering the source energy of $L_{\rm ra}+L_{\rm sd}+$CSM.
The other parameters are the same as in Figure 1.

Figure 4.— Kilonova $r$-band light curve with variations of ejecta velocity
(left) and CSM mass (right). The other parameters are the same as in Figure 1.

Figure 5.— Kilonova light curves in the $r$, $g$, $z$, $U$, and $B$ bands of
GRB 191019A, considering the three energy sources. A kilonova nondetection
requires $M_{\rm ej}=2\times 10^{-4}M_{\odot}$, $\tau=10^{3}$ s, and
$L_{0}=10^{48}~{}{\rm erg~{}s^{-1}}$, $\kappa_{\rm CSM}=0.2~{}\rm
cm^{2}~{}g^{-1}$, and $E_{\rm KN}=3.5\times 10^{49}~{}{\rm erg}$. The red
dashed line is the brightness of the host galaxy. The purple data points are
the observations of host$+$afterglow collected from Levan et al. (2023).

Figure 6.— Kilonova light curves that are similar to Figure 5, but with a
detected kilonova emission with the value of the parameter $M_{\rm ej}=2\times
10^{-5}M_{\odot}$.