{'fraction_non_alphanumeric': 0.03164316169235815, 'fraction_numerical': 0.021174155460806823, 'mean_word_length': 4.34057311006796, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Hydrodynamical interaction of mildly relativistic ejecta with an ambient medium

Hydrodynamical interaction of spherical ejecta freely expanding at mildly relativistic speeds into an ambient cold medium is studied in semi-analytical and numerical ways to investigate how ejecta produced in energetic stellar explosions dissipate their kinetic energy through the interaction with the surrounding medium. We especially focus on the case in which the circumstellar medium is well represented by a steady wind at a constant mass-loss rate having been ejected from the stellar surface prior to the explosion. As a result of the hydrodynamical interaction, the ejecta and circumstellar medium are swept by the reverse and forward shocks, leading to the formation of a geometrically thin shell. We present a semi-analytical model describing the dynamical evolution of the shell and compare the results with numerical simulations. The shell can give rise to bright emission as it gradually becomes transparent to photons. while it is optically thick. We develop an emission model for the expected emission from the optically thick shell, in which photons in the shell gradually diffuse out to the interstellar space. Then, we investigate the possibility that radiation powered by the hydrodynamical interaction is the origin of an underluminous class of gamma-ray bursts.


INTRODUCTION
Collisions of two cold media and subsequent formation of shocks propagating into both sides of the contact surface provide an efficient way to convert the kinetic energy of the flows into the internal energy of the shocked media. This process is thought to be a plausible source of high-energy emission in various astrophysical situations. Stellar explosions are one such astrophysical site. At the final evolutionary stage of massive stars, the collapse of the iron core liberates its gravitational energy, leading to the violent explosion of the star. The stellar mantle ejected as a result of the explosion could give rise to bright emission, which is observed as a core-collapse supernova (CCSN). A small fraction of CCSNe is known to be accompanied by an intense burst of gamma-ray photons, which is called a long-duration gamma-ray burst (long GRB) (see , Piran 1999;Mészáros 2006;Woosley & Bloom 2006;Hjorth & Bloom 2012;Kumar & Zhang 2015, for reviews). A great deal of attention has been paid to the physical link between CCSNe and GRBs.
In these phenomena, the erupted materials eventually collide with the surrounding gas, i.e., the circumstellar medium (CSM). The hydrodynamical interaction of the ejecta and the CSM is of vital importance in understanding electromagnetic signals from some kinds of SNe. The shocked SN ejecta and CSM form a shell at the interface between these two media (Chevalier 1981). For a dilute CSM, the shell would be optically thin and thus could give rise to non-thermal radiation from highly energetic electrons, which are accelerated at the shock front, via synchrotron and/or inverse Compton processes. Nonthermal emission from SNe has been extensively investigated in many theoretical works (e.g., Chevalier , 1998Chevalier & Fransson 2006). Radio and X-ray observations of several SNe have been carried out and succeeded in constraining the CSM density by using those theoretical models (e.g., Weiler et al. 1989Weiler et al. , 1990van Dyk et al. 1994;Weiler et al. 2002;Pooley et al. 2002;Maeda 2012).
When the CSM is sufficiently dense, the shell would become optically thick and serve as a source of bright thermal emission in early stages of its dynamical evolution. In fact, bright emission found in a special class of SNe with prominent hydrogen narrow lines in their spectra, type IIn SNe (see, e.g., Filippenko 1997;Smith 2014, for a review), is explained by the hydrodynamical interaction. Moreover, there is increasing evidence that some events spectroscopically classified as normal SNe must have exploded in a dense CSM or with an extended envelope attached (Ofek et al. 2013;Gal-Yam et al. 2014; arXiv:1610.09824v1 [astro-ph.HE] 31 Oct 2016 Ofek et al. 2014), suggesting the important roles played by the ejecta-CSM interaction especially at the very beginning of the dynamical evolution of SN ejecta. It is also claimed that the first electromagnetic signal from an SN explosion, i.e., the shock breakout (Colgate 1974;Klein & Chevalier 1978;Falk 1978), can be significantly prolonged and become brighter in the presence of a dense CSM (e.g., Falk & Arnett 1973, 1977Chevalier & Irwin 2011). There are an increasing number of theoretical studies aiming at establishing appropriate light curve models of the early emission from SNe having exploded in a dense CSM (e.g., Balberg & Loeb 2011;Moriya et al. 2011;Ginzburg & Balberg 2012;Svirski et al. 2012;Ginzburg & Balberg 2014;Svirski & Nakar 2014;Moriya et al. 2015).
In the context of long GRBs, the CSM interaction might produce some underluminous events. A significant fraction of GRBs with spectroscopically identified SN components shows isotropic gamma-ray luminosities 3-5 orders of magnitude lower, L γ = 10 46−48 erg s −1 , than the typical luminosity of long GRBs, therefore making these events classified as low-luminosity GRBs (LL-GRBs). Well-known examples include GRB 980425/SN 1998bw (Kulkarni et al. 1998;Galama et al. 1998), GRB 060218/SN 2006aj (Campana et al. 2006;Pian et al. 2006;Mazzali et al. 2006), and GRB 100316D/SN 2010bh (Starling et al. 2011). Several theoretical models have been proposed to explain these nearby peculiar events. While normal GRBs at cosmological distances require an ultra-relativistic jet emanating from a massive star, a less-collimated outflow, a chocked jet, or even spherical ejecta moving at mildly relativistic speeds could account for the gamma-ray luminosities of LLGRBs (see, e.g., Li 2007;Toma et al. 2007;Wang et al. 2007;Waxman et al. 2007). Follow-up observations suggest that a mildly relativistic blast wave with shock Lorentz factors of a few is likely to produce their radio afterglows (Kulkarni et al. 1998;Soderberg et al. 2004, making the relativistic shock breakout model, in which a blast wave driven by relativistic ejecta emerges from the photosphere in a dense CSM, the most popular scenario (Kulkarni et al. 1998;Tan et al. 2001;Campana et al. 2006;Li 2007;Waxman et al. 2007;. How the relativistic ejecta responsible for the gammaray emission are produced and how much kinetic energy is distributed in different layers of the ejecta are still debated. Self-similar solutions for spherical flows have played important roles in determining the density profile and the kinetic energy distribution of the ejecta. Sakurai (1960) found a series of self-similar solutions describing a strong shock wave propagating in a stellar atmosphere with a power-law density profile. Matzner & McKee (1999) obtained the density structure of SN ejecta re-sulting from stellar mantle after the passage of a blast wave based on the Sakurai's self-similar solutions. Tan et al. (2001) extended the work to study the properties of trans-relativistic ejecta produced in highly energetic SNe. Nakayama & Shigeyama (2005) discovered the ultra-relativistic counterpart of the Sakurai's self-similar solutions and discussed the kinetic energy distribution of the ejecta.
The ejecta could also be produced as a result of aspherical energy deposition or penetration of a jet. Bromberg et al. (2011a,b) investigated the time required for a jet injected at the core of a massive star to penetrate the star. They found that jets with energy injection rates inferred from gamma-ray observations of LLGRBs could not penetrate the progenitor star and concluded that the mechanism to produce LLGRBs seems to be different from normal long GRBs. The failed jet hypothesis has been examined by Lazzati et al. (2012), who carried out 2D hydrodynamic simulations of the jet propagation in a massive star with several values of the energy injection rate. They confirmed that a failed jet can produce relativistic ejecta with steep kinetic energy distributions. Relativistic ejecta could also be realized as a cocoon component associated with successful penetration of a massive star by an ultra-relativistic jet (Ramirez-Ruiz et al. 2002;Lazzati & Begelman 2005). By carrying out 2D hydrodynamic simulations, Suzuki & Shigeyama (2013) demonstrated that the hydrodynamical interaction between the cocoon expanding at mildly relativistic speeds and a dense CSM could produce bright X-ray emission similar to GRB 060218. Nakar (2015) recently argued that LLGRBs were produced when an extremely dense stellar envelope surrounding the progenitor star could stop the propagation of an ultra-relativistic jet emanating from the core.
From an observational point of view, follow-up radio observations are a key to probing the kinetic energy distribution of SN ejecta at later epochs (e.g., Kulkarni et al. 1998;Soderberg et al. 2004Margutti et al. 2013Margutti et al. , 2014. These studies estimated the kinetic energy of the blast wave responsible for radio synchrotron emission, which can be combined with the kinetic energy of SN ejecta emitting optical photons to obtain the distribution of the kinetic energy in the velocity space. The kinetic energy of the radio emitting blast wave is much smaller than that of SN ejecta for normal striped-envelope SNe, making the kinetic energy distribution very steep. LL-GRBs exhibit shallower kinetic energy distributions than normal SNe, suggesting that the presence of some sort of central engine activity distinguishes them from normal SNe. However, their kinetic energy distributions clearly look different from almost flat distributions inferred for normal GRBs. The authors conclude that LLGRBs are driven by a distinct central engine from normal GRBs. Investigations of the dynamical evolution of freely expanding ejecta with a wide variety of the kinetic energy distribution colliding with an ambient medium are therefore of crucial importance in examining its potential to produce bright X-ray and gamma-ray emission as well as radio synchrotron emission. Self-similar solutions have been used in describing the shocks forming as a result of the hydrodynamical interaction between the ejecta and the ambient medium. Chevalier (1981) discovered a series of self-similar solutions describing the hydrodynamical interaction in the non-relativistic regime. The ultrarelativistic extension of this study was done by Nakamura & Shigeyama (2006). However, the intermediate regime, in which the ejecta and the shocks are moving at mildly relativistic speeds, has received little attention despite its recently increasing interest.
In this paper, we consider spherical ejecta freely expanding at mildly relativistic speeds and investigate the hydrodynamical interaction with an ambient medium in semi-analytical and numerical ways. In Section 2, the dynamical evolution of the gas is considered in a semianalytical way. Numerical simulations are performed and compared with the semi-analytical model. The results are presented in Section 3. We develop an analytical model of the emission powered by the interaction, and the calculated light curves are compared with the X-ray light curve of GRB 060218 in Section 4. Finally, we conclude the paper in Section 5. In the following, we use the unit c = 1, where c denotes the speed of light.

DYNAMICAL EVOLUTION OF EJECTA
We consider relativistic flows with spherical symmetry. The hydrodynamical variables, the velocity β(t, r), density ρ(t, r), and pressure p(t, r), are expressed as functions of time t and the radial coordinate r. The following equations describe the temporal evolution of these variables, and where the Lorentz factor Γ is defined as follows, In this work, the gas is treated as an ideal gas with an adiabatic index of γ = 4/3. Thus, the specific enthalpy h is given by

Initial Condition
The density profile of freely expanding ejecta can generally be expressed as a function of the 4-velocity Γβ. Specifically, we consider density profile described by a broken power-law function with a break at Γβ = Γ br β br . The low-velocity component of the ejecta obeys a flat distribution, ∝ (Γβ) 0 , while the high-velocity component obeys a power-law distribution with an exponent −n. Thus, the density profile is given by the following function, We note that the flat part is introduced so that the total kinetic energy of the ejecta does not diverge. Because we are interested in ejecta whose trans-relativistic part obeys a power-law function, we assume a non-relativistic break velocity and set to Γ br β br = 0.1. As we will see below, the reverse shock does not reach the layer traveling at this velocity even when the maximum ambient gas density and the minimum ejecta energy are assumed. Since the gas is assumed to be freely expanding, the velocity is given by the radius r divided by the elapsed time t, β(t, r) = r t .
Furthermore, the ejecta are assumed to be cold, i.e., the pressure is negligibly small and does not affect the dynamical evolution. Some parameters, Γ max , β max , and n, characterizing the density profile have been introduced. The ejecta start interacting with the surrounding gas at t = t 0 . The maximum Lorentz factor of the ejecta at the initial stage of the dynamical evolution is denoted by Γ max . The corresponding maximum velocity β max is given by The exponent n describes the distribution of the kinetic energy in the ejecta, i.e., ejecta with a larger value of n have less kinetic energy in the outermost layer. The normalization ρ 0 of the density profile is determined in the following way. We define the kinetic energy E rel of the relativistic component of the ejecta (Γβ ≥ 1). The characteristic density ρ 0 is proportional to the kinetic energy E rel . The following integration gives the relation between these two quantities, ρ 0 and E rel , for a given set of t 0 and Γ max , Here β min is set to 1/ √ 2, which gives the 4-velocity of unity, Γβ = 1. We denote the kinetic energy in units of 10 51 erg by E rel,51 . The total kinetic energy of the ejecta obtained by the following integral, highly depends on the exponent n. The mass of the trans-relativistic ejecta and the total mass of the ejecta can be calculated in similar ways, and These quantities, E tot , M rel , and M tot , are proportional to the kinetic energy E rel . As noted in the previous section, several earlier studies (Matzner & McKee 1999;Tan et al. 2001;Nakayama & Shigeyama 2005) investigated values of the exponent n describing ejecta realized as a result of shock propagation in a massive star in different regimes, i.e., non-relativistic, trans-relativistic, and ultra-relativistic regimes. These studies focus on the emergence of a strong shock wave from a stellar atmosphere with spherical symmetry or in plane-parallel geometry. Tan et al. (2001) showed that trans-relativistic and ultrarelativistic parts of the ejecta are characterized by a power-law function of the 4-velocity with an exponent −5.2 and −1.1. For the emergence of an ultra-relativistic shock wave from a stellar atmosphere, the self-similar solution obtained by Nakayama & Shigeyama (2005) shows the same dependence as Tan et al. (2001). On the other hand, quasi-spherical ejecta with different kinetic energy distributions could be produced as a result of the jet propagation or a failed jet in a massive star. Therefore, in this work, we consider ejecta with various values of the exponent, n = 1, 2, 3, 4, and 5 and the maximum Lorentz factor, Γ max = 10, 5 and 3, to examine how different sets of these parameters affect the kinetic energy dissipation of the ejecta due to the collision with the ambient medium. The quantities, E tot , M rel , and M tot for E rel,51 = 1 and different sets of the parameters are summarized in Table 1. The total mass of the ejecta can be very small especially for small values of n. This is because we focus on ejecta traveling at relatively high velocities, Γβ > 0.1 and normalize the distribution by using the relativistic component. The total masses in Table 1 do not necessarily reflect the total mass of the whole supernova ejecta. It is not our purpose to reproduce the density distribution of supernova ejecta precisely.
The ejecta collide with an ambient medium whose density profile is a power-law function of the radius with an In particular, we regard the ambient medium as a steady wind at a constant mass-loss rate and thus set the exponent k to k = 2 throughout this work. The semianalytical model introduced below can be applied as long as the forward shock decelerates in the ambient medium, i.e., k < 3. For k > 3, the forward shock is expected to accelerate and leave behind the interface between the ejecta and the ambient medium. The time dependence of physical quantities of the shocked gas can vary depending on the exponent k(< 3). However, the temporal behaviors would not be qualitatively different. For a given set of the mass-loss rateṀ and the wind velocity v w , the coefficient A is expressed as follows, whereṀ = 10 −5Ṁ −5 M yr −1 and v w = 10 3 v w,3 km s −1 . Hereafter, A stands for the parameter A in units of 5×10 11 g cm −1 , A = 5×10 11 A g cm −1 and we use A as the parameter describing the density of the ambient medium. The ambient medium is also assumed to be cold.
When the ejecta start colliding with the ambient medium at t = t 0 , the ejecta fill a region from r = 0 to r = β max t 0 and the outermost layer is adjacent to the ambient medium at r = β max t 0 .

Thin Shell Approximation
After the ejecta start expanding and interacting with the ambient medium, the hydrodynamical interaction of the two media leads to the formation of a couple of shock waves, forward and reverse shocks, when the pre-shocked pressure is sufficiently low at the interface between the two media as assumed in this study.
As we have mentioned in Section 1, self-similar solutions describing the dynamical evolution of the shocked gas have been found in non-relativistic and ultrarelativistic regimes. However, we cannot expect any analytical solution for the trans-relativistic case, because the shock jump conditions at the two shock fronts cannot be simplified into convenient forms. In other words, the characteristic variables of the shocked gas cannot be expressed as simple power-law functions of time t unlike the non-relativistic and ultra-relativistic cases. Despite the difficulty, the shocked gas can be regarded as a geometrically thin shell at early stages of the evolution as we will see below. Thus, we approximate the width of the shell to be sufficiently small (referred to as "thin shell approximation") compared with the radius and solve the equation of motion of the shell. We further assume that the rest-mass energy of the shell dominates over the internal energy, p/ρ 1. The validity of these approximations will be checked in Section 3, where approximate solutions are compared with results of numerical simulations.

Temporal Evolution of the Shell
The dynamical evolution of the shell is determined by the following competing effects, the deceleration by loading mass, the supply of momentum through the shocks, and the deceleration due to the difference in the postshock pressure, p fs and p rs , at the forward and reverse shocks. We denote the mass, the Lorentz factor, and the velocity of the shell by M s , Γ s , β s , while the positions and the velocities of the forward and reverse shocks are R fs , β fs , R rs , and β rs . We model the temporal evolution of the momentum S r of the shell along the radial direction as follows, The 1st and 2nd terms of the R.H.S. of Equation (15) represent the force exerted by the post-shock pressure at the reverse and forward shock fronts. The quantities −F fs and F rs in the L.H.S. of Equation (15) denote the momentum fluxes of gas flowing into the shocked region through the forward and the reverse shocks, which reflects the momentum conservation. Since the ambient medium is moving at a velocity much smaller than the ejecta, we neglect the contribution from the ambient medium to the momentum gain of the shell and thus set the corresponding flux to zero, F fs = 0. On the other hand, the ejecta predominantly supply the shell with the momentum through the reverse shock. The correspond-ing momentum flux F rs is described as follows, F rs = ρ ej,rs Γ 2 ej,rs β ej,rs (β ej,rs − β rs ), where ρ ej,rs , Γ ej,rs , and β ej,rs are the density, the Lorentz factor and the velocity of the pre-shocked ejecta at the reverse shock front. Next, the temporal evolution of the mass of the shell can be treated in a similar way to the momentum. The mass of the shocked gas continuously increases as the forward and reverse shocks sweep the ambient medium and the ejecta. The governing equation is expressed as follows, The mass fluxes −G fs and G rs flowing into the shocked region through the forward and reverse shocks are expressed as follows, G fs = ρ a,fs Γ a,fs (β a,fs − β fs ) = −ρ a,fs β fs , and G rs = ρ ej,rs Γ ej,rs (β ej,rs − β rs ).
Here, ρ a,fs , Γ a,fs , and β a,fs denote the density, the Lorentz factor, and the velocity of the pre-shocked ambient medium at the forward shock. Since the velocity of the ambient medium is negligibly small compared to the velocity of the shell, it is set to zero, β a,fs = 0, and then the R.H.S of Equation (18) is obtained. The momentum S r is expressed in terms of M s , Γ s , and β s as follows, which can be solved with respect to the Lorentz factor for a given set of the momentum and the mass, The radius of the shell evolves according to the following equation, The temporal evolution of the forward and reverse shock radii, R fs and R rs , are governed by similar equations, and These equations can be integrated in a straightforward way, once the velocities, β s , β fs , and β rs , are obtained.

Shock Jump Conditions
The shock velocities, β rs and β fs , and the hydrodynamical variables of the post-shock gas, ρ fs , p fs , ρ rs , and p rs , at the forward and reverse shocks appears in the governing equations introduced in the previous section. To integrate the governing equations, these quantities should be calculated for a given set of the shock radii, R fs and R rs and the velocity of the shell β s , or the corresponding Lorentz factor Γ s . The shock jump conditions give these quantities. The derivation of the shock jump condition is described in detail elsewhere (see, Appendix of the previous paper, Suzuki & Shigeyama (2014), some textbooks, or review papers, such as Landau & Lifshitz (1987); Martí & Müller (2003)) and we will not repeat the derivation in this paper.
The shock velocity β sh is generally expressed as a function of the velocity β u and the Lorentz factor Γ u of the gas in the upstream and those, β d and Γ d , in the downstream as follows, when the pressure in the upstream is negligible. Once the shock velocity β sh is obtained and the pre-shock density ρ u is known, the post-shock density ρ d and pressure p d are found from the following relations, and where Γ sh = (1 − β 2 sh ) −1/2 is the shock Lorentz factor.

Forward Shock
For the forward shock, the pre-shock velocity is equal to zero and the pre-shock density ρ a,fs is obtained by substituting the forward shock radius R fs into the density profile of the ambient medium, Equation (13), Thus, regarding the shell velocity β s as the post-shock velocity, the forward shock velocity β fs is obtained as follows, Using the shock velocity, the forward shock Lorentz factor Γ fs , the post-shock density ρ fs , and the post-shock pressure p fs can be calculated as follows, and p fs = ρ a,fs β s β fs 1 − β s β fs . (32)

Reverse shock
The reverse shock propagates in the freely expanding ejecta. Thus, the pre-shock values, β ej,rs and ρ ej,rs , of the velocity and the density are given by and The reverse shock velocity is determined in a similar way to the forward shock, Once the reverse shock velocity is obtained, the reverse shock Lorentz factor Γ rs , the post-shock density ρ rs , and the post-shock pressure p rs are evaluated as follows, and

Non-relativistic and Ultra-relativistic Limits
When the velocity of the shell is much smaller than the speed of light ("non-relativistic regime") or the Lorentz factor of the shell is much larger than unity ("ultrarelativistic regime"), self-similar solutions describing the flow are known Nakamura & Shigeyama 2006). In the following, we consider the relation between our model and the non-relativistic and ultra-relativistic cases by reproducing the temporal behavior of the shell in these two limits.

Non-relativistic Regime
The density profile in the non-relativistic limit is obtained by setting Γ = 1 in Equation (6), The dependence of the shell velocity β s on time t is same as the shell radius divided by time t, β s ∝ R s /t. Since the flow is self-similar, the forward and reverse shock velocities are proportional to that of the shell. Therefore, the pressure of the gas in the downstream of the reverse shock, Equation (38), should satisfy under the limit of β s , β rs , β ej,rs 1. On the other hand, Equation (32) gives the following relation for the gas pressure in the downstream of the forward shock, The time dependence of physical variables of the flow can be obtained by imposing the condition that the dependence of the post-shock pressure at the forward and reverse shock fronts on the time t should be identical, p fs /p rs ∝ t 0 . The condition p fs,NR /p rs,NR ∝ t 0 gives the time dependence of the velocity β s , Thus, the radius of the shell evolves as follows, which agrees with the dependence derived by .

Ultra-relativistic Regime
In the ultra-relativistic regime, Equations (32) and (38) and Therefore, one obtains the following time dependence of the Lorentz factor, by using the condition p fs,UR /p rs,UR ∝ t 0 . This is consistent with the time dependence of the Lorentz factor in the self-similar solution found by Nakamura & Shigeyama (2006).

Initial Velocity of the Shell
One has to evaluate the initial velocity of the shell to integrate Equations (15), (17), (22), (23), and (24). The outermost layer of the freely expanding ejecta is initially adjacent to the ambient medium at r = β max t 0 . At the very beginning of the hydrodynamical interaction, the forward and reverse shock radii are identical with the interface, r = β max t 0 , at which the following pressure balance is achieved in the shell, By evaluating the pre-shocked density and the velocity of the ejecta and the ambient medium at r = β max t 0 , the pressure p fs and p rs can be calculated for a given value of the shell velocity β s . Thus, the initial value of the shell velocity can be determined as the velocity satisfying the above pressure condition for a given set of the time t 0 , the maximum velocity β max , the parameter A , the exponent n, and the kinetic energy E rel . In fact, this procedure is identical with solving a shock tube problem of special relativistic hydrodynamics. Once the initial velocity is obtained, Equations (15), (17), (22), (23), and (24) can be integrated. For a given set of the variables M s (t), β s (t), and R s (t) at t, their values at the next time step t+∆t are explicitly obtained from the equations discretized in time. Then, Equation (21) is used to find the Lorentz factor of the shell.
Results of the integration for several sets of the free parameters are shown in the next section and compared with one-dimensional hydrodynamic simulations.

NUMERICAL SIMULATIONS
We perform simulations of the hydrodynamical interaction for several sets of the free parameters by numerically solving the equations of special relativistic hydrodynamics, Equations (1) -(5). Our method to integrate the equations is described in the previous paper (Suzuki & Shigeyama 2014).
The radial coordinate of the numerical domain ranges from r = 10 8 cm to r = 4 × 10 13 cm. An adaptive mesh refinement (AMR) technique is implemented in the code to efficiently capture discontinuities. The whole numerical domain is covered by 1024 cells ("base grid") with the AMR refinement level of l = 0. The size of a cell is halved when the cell needs a finer resolution. The maximum refinement level is set to l max = 12, which gives a resolution finer by a factor of 2 12 = 4096 than the base grid.

Initial and Boundary Conditions
The following initial conditions are imposed on the density, velocity, and pressure profiles. The ejecta and the ambient medium are initially separated at r = β max t 0 . The density and the velocity profiles at t = t 0 are given by and We assume the following pressure profile, so that the pressure does not affect the dynamical evolution of the ejecta. At the inner and outer boundaries, free boundary conditions are imposed.

Results
We carry out simulations with several sets of the free parameters. The initial time t 0 and the exponent n are fixed to be t 0 = 10.0 s and n = 4 in all calculations. Radial profiles of the AMR refinement level, the Lorentz factor, the density, and the pressure at t = 100, 200, 400, and 800 s. The parameters of the ejecta and the ambient medium are set to be t 0 = 10 s, n = 4, E rel,51 = 1.0, Γ max = 10, and A = 10.
In order to see the dependence of the evolution of the shell on the maximum Lorentz factor, we calculate models with different maximum Lorentz factors Γ max = 10, 5, and 3, while the kinetic energy and the ambient density are fixed, E rel,51 = 1.0 and A = 10. In addition, we calculate models with a larger ambient density A = 1000 and different kinetic energies E rel,51 = 1.0, 0.1, and 0.01. In the latter models, the shell effectively decelerates by sweeping the dense ambient medium and a transition from relativistic to non-relativistic speeds is realized. Figures 1 and 2 show results of the simulation with E rel,51 = 1.0, Γ max = 10, and A = 10. In Figure 1, the radial profiles of the Lorentz factor, the density, and the pressure at t = 10, 100, 200, 400, and 800 s are shown. The AMR refinement level is also plotted as a function of the radial coordinate in the top panel of Figure 1. Immediately after the simulation starts, a shell composed of the shocked ejecta and the shocked ambient medium forms around the interface between the two media. The width of the shell is much smaller than its radius, ensuring the validity of the thin shell approximation adopted in the previous section. The profiles of these variables around the shock fronts are presented in Figure 2. In addition to the quantities shown in Figure 1, the radial profiles of p/ρ, which is proportional to the specific internal energy, are also plotted. The two shock fronts and the contact discontinuity separating the shocked ejecta and the shocked ambient medium are clearly resolved thanks to the AMR technique.
The positions of the forward and reverse shock fronts, the 4-velocity of the shell, and the post-shock pressures at the forward and reverse shock fronts at time t are obtained by the semi-analytical model. In each panel of Figure 2, the positions of the forward and reverse shock fronts are presented as dashed and dotted vertical lines. The semi-analytical model predicts slightly smaller shock radii. However, the differences are not significant. In Figures 3 and 4, the temporal evolutions of these quantities are plotted. For the shock radii R fs and R rs , we plot the differences, t − R fs /c and t − R rs /c, between r = ct and the radii divided by the speed of light. The dashed line in the 4-velocity evolution shows the 4-velocity of the shell in the semi-analytical calculation and the dashed and dotted lines in the pressure evolution show the forward and reverse shock pressures. The solid line in each panel shows a good agreement with dashed and dotted lines, suggesting that the semi-analytical method developed in the previous section well describes the dynamical evolution of the shell resulting from the ejecta-ambient medium interaction.
In Figure 3, models with different maximum Lorentz factors Γ max = 10, 5, and 3 are compared. Although the initial 4-velocity of the shell can differ from each other, these models exhibit similar evolutions after the high Lorentz factor component has been swept and the 4-velocity reaches a few, Γβ 2. Thus, the maximum Lorentz factor of the shell does not influence the dynamical evolution at later epochs. In Figure 4, we show models in which the shell efficiently decelerates due to the small kinetic energy and the high ambient density. Even when the 4-velocity becomes smaller than unity, the semi-analytical model works well.

Comparison of Semi-analytical Model with
Numerical Results and Self-similar solutions The temporal evolution of the variables can also be compared with that of the self-similar solution in the ultra-relativistic regime. Setting the exponents in Equation (46) to k = 2 and n = 4, one finds that the Lorentz factor Γ s and the post-shock pressure of the shocks evolve as, in the ultra-relativistic regime. We fit power-law functions of time t to the Lorentz factor and the forward shock pressure of the semi-analytical model with Γ max = 10 and find that they evolve as The time dependence of the Lorentz factor deviates from the self-similar solution because the ejecta velocities are   mildly relativistic. The deviation is larger for models with smaller maximum Lorentz factors. In fact, the temporal evolution of the Lorentz factor realized in the models with Γ max = 5 and 3 shown in Figure 3 cannot be well fitted by a simple power-law function. This clearly demonstrates that the self-similar approach fails for mildly relativistic ejecta.

EMISSION FROM THE SHOCKED GAS
In the previous section, it has been confirmed that the semi-analytical model well agrees with numerical simulations. Then, in this section, we use the semi-analytical model to investigate the expected emission from the shocked gas. We assume that the ejecta are produced by an explosion of a star having lost its hydrogen and helium layers and the stellar atmosphere is mainly composed of oxygen. Thus, we set the mass number and the atomic number of ions to A i = 16 and Z i = 8.

Temporal Evolution of the Shell
The kinetic energy of the ejecta dissipated via the reverse shock could be a plausible source of high-energy emission from the shell. The rate of the dissipation is governed by the dynamical evolution of the shell. From the semi-analytical model, one can evaluate the internal energy of the shell at time t in the following way.
The internal energy E s (t) of the shell evolves according to the following equation, where the energy fluxes H fs and H rs through the froward and reverse shock fronts are given by, and Here, we have introduced the volume of the shell, The 2nd and 3rd terms in the L.H.S. of Equation (53) describe the rate of the change in the internal energy of the shell per unit time due to the shock passage, while the 1st and 2nd terms in the R.H.S. describe the energy loss per unit time due to adiabatic expansion and radiative diffusion. We evaluate the adiabatic loss term, which reflects the work done by the shell, as follows, As discussed in Appendix A, the expression of the radiative diffusion term, Equation (A14), can be obtained by considering diffusion of photons in a geometrically thin shell moving at a relativistic speed, We assume that the internal energy of the shell is dominated by radiation, i.e., the radiation energy density u ph in Equation (A14) is identical with the internal energy density u int of the gas in the shell, u ph = u int . We calculate the value by dividing the internal energy E s of the shell by the volume, We will check the consistency of this assumption below. Furthermore, under the thin shell approximation, the total optical depth τ of the shell for electron scattering is given by, where κ es = 0.2 cm 2 g −1 is the electron scattering opacity for hydrogen-free gas (e.g., Rybicki & Lightman 1979). These equations can easily be integrated along with Equations (15) and (17). Since the diffusion approximation used to derive the expression of (dE/dt) rad is no longer valid after the shell becomes transparent to photons, τ < 1, we stop the integration when the optical depth of the shell becomes unity at t = t tr . The temporal evolution of the internal energy E s , the average density ρ av , the average specific internal energy, and the optical depth τ of the shell for models with several values of the parameter A are shown in Figure 5. The average density of the shell is evaluated by dividing the mass M s by the volume V s and the Lorentz factor Γ s of the shell, ρ av = M s /(Γ s V s ). The average specific internal energy is calculated by dividing the internal energy E s by the mass M s and the Lorentz factor Γ s , E s /(M s Γ s ). As shown the radial profiles of p/ρ in Figure 2, the difference in the relative velocities of the forward and reverse shocks results in quite different values of the ratio p/ρ, which is proportional to the specific internal energy, of the shocked ambient gas and the shocked ejecta. Thus, it should be noted that the specific internal energy E s /(M s Γ s ) only gives an averaged value over the entire shocked region. In the models, the time t 0 , the kinetic energy E rel , the maximum Lorentz factor Γ max , and the exponent n are fixed to t 0 = 10 s, E rel,51 = 1, Γ max = 5, and n = 4, while the parameter A is set to A = 10, 100, and 1000. For larger values of the parameter A , the kinetic energy dissipation is more efficient and the time scale t tr becomes longer. In early stages of its temporal evolution, the internal energy of the shell continues to increase as it is supplied by the reverse shock. For models with larger A , the internal energy starts decreasing afterward, because the contribution of the radiative loss eventually becomes significant. For models with smaller A , the shell becomes transparent to photons before the internal energy starts decreasing. The average density of the shell continues to decline almost throughout its evolution due to the expansion of the shell. The optical depth of the shell increases at first and then exhibits its peak at around t 20 s, followed by a steady decline toward τ = 1.

Some Important Time Scales
We have assumed that the internal energy of the shell is dominated by radiation. This treatment implicitly assumes that the internal energy of the gas in the shell is efficiently converted to radiation. In the following, we check the consistency of the assumption.
Some authors have already estimated the time scales of the ion-electron thermal equilibrium, photon production, and the Compton cooling, especially for non-relativistic cases (e.g., Chevalier & Irwin 2012). We calculate these time scales in similar ways for our particular cases.

Condition of Ejecta at the Beginning of the Interaction
At first, we estimate the energy density of the radiation field around the interface between the ejecta and the ambient medium at the beginning. Although we do not assume any specific process to produce the ejecta, they are supposed to be the stellar atmosphere accelerated and ejected by the passage of a strong shock wave. Thus, as usually expected in the context of supernova shock breakout, gas at the outermost layer of the ejecta is heated by the shock passage. For a compact star with the radius ∼ 1R and the mass ∼ 10 M , the temperature of the gas is expected to be of the order of T br ∼ 10 7 K after being swept by the shock and produce thermal photons at a similar temperature (Matzner & McKee 1999). Therefore, we can expect a radiation energy density of u ph a r T 4 br ∼ 10 14 erg cm −3 , where a r is the radiation constant, around the shell at the beginning of its dynamical evolution.
We have assumed that the ejecta is cold when we formulate our semi-analytical model. The shocked gas actually has comparable amounts of the kinetic and internal energies after the passage of the shock wave. However, since the internal energy is soon lost by adiabatic expansion, the radiation pressure does not affect the dynamical evolution of the shocked gas so much. Thus, the assumption of the cold ejecta remains valid and our semi-analytical model still works well even when the initial temperature of T br ∼ 10 7 K is assumed.
The number density n ph of the photons at the outermost layer of the ejecta is estimated to be a r T 3 br /k B ∼ 5 × 10 22 cm −3 , where k B is the Boltzmann constant. On the other hand, the number densities, n i and n e , of ions and electrons, are of the order of ρ av /m u ∼ 10 17 cm −3 , where m u is the atomic mass unit, even when the density of the shell takes the maximum value of ρ av ∼ 10 −7 g cm −3 (see, Figure 5). Thus, the photon number density dominates over the ion and electron number densities in the ejecta. This leads to an important consequence that the energy density of photons also dominates over those of ions and electrons when these particles efficiently exchange their energies and the temperature of these components takes the same value T , n ph k B T n i k B T, n e k B T .

Ion-Electron Equilibrium Time Scale
Since the freely expanding ejecta primarily supply the shell with the energy and momentum through the reverse shock, we consider the shocked gas at the reverse shock front. Immediately after the passage of the shock front, ions and electrons are separately heated and eventually share the thermal energy. The ratio of the ion temperature T i to the electron temperature T e is at most T i /T e ∼ m i /m e , where m i and m e are the masses of a single ion and electron. Thus, the thermal energy of ions is expected to dominate the internal energy of the gas immediately behind the reverse shock front. The time scale required to achieve the ion-electron thermal equilibrium depends on the microscopic process responsible for the energy exchange between ions and electrons.
One of the well-known ways to establish the thermal equilibrium between ions and electrons is Coulomb collision. Ions heated by the shock passage repeatedly colliding with electrons to achieve the thermal balance. The time scale t ie required for ions with the mass number A i and the atomic number Z i to lose a considerable fraction of its thermal energy is given by, in cgs unit (e.g., Spitzer 1962), where e is the elementary charge. Here, ln Λ is the so-called Coulomb logarithm and set to ln Λ = 20. We calculate the time scale t ie in the rest frame of the shell by assuming that the internal energy of the gas in the downstream of the reverse shock is dominated by that of ions, T i T e , and using the following relation, to determine the ion temperature. Then, we obtain the corresponding time scale Γ s t ie in the frame where the center of the ejecta is at rest. The top panel of Figure  6 shows the calculated time scale Γt ie as a function of time t for the same models as Figure 5. As shown in Figure 6, the equilibrium time scales are much shorter than the dynamical time t. We have also confirmed that the equilibrium time scales for models with smaller and larger kinetic energies, E rel,51 = 0.01, 0.1, 1, and 10, are sufficiently short to achieve the ion-electron thermal equilibrium. Therefore, electrons in the downstream of the reverse shock are expected to possess a significant fraction of the internal energy of the shocked gas as well as ions.

Thermal Equilibrium Time Scale
Thermal equilibrium between gas and radiation is achieved when processes absorbing and creating photons are quickly balanced. Since the shocked gas is hot and dilute, the most important radiative process to create photons is expected to be free-free emission. Therefore, we estimate the time scale t eq required for free-free emission to produce radiation with an energy density u ph comparable to the internal energy u int . Adopting the following frequency-integrated energy generation rate per unit volume per unit time for free-free emission, ff = 5.5 × 10 20 ρ 2 T 1/2 Z 3 (e.g., Rybicki & Lightman 1979), where the gaunt factor is neglected for simplicity, the time scale t eq is estimated as follows, where u int is the internal energy density in the rest frame of the shell and is estimated by u int ∼ u int /Γ 2 s . The temperature of the gas is calculated by assuming ionelectron thermal equilibrium. The middle panel of Figure  6 shows the thermal equilibrium time scale Γ s t eq , which indicates that only models with significantly large ambient gas density A ( 1000) can maintain the balance between absorption and creation of photons and produce radiation with the energy density u int .

Compton Cooling Time Scale
Electrons in the shocked gas can lose their energies via repeated Compton scattering. In the following, we estimate the time scale for a single electron swept by the reverse shock to lose a considerable fraction of the energy by scattering off photons.
For the density and the internal energy density realized in this circumstance, the average energy of a single electron in the downstream of the reverse shock is much larger than the electron rest energy. In other words, the random motion of the electrons can be relativistic. This is a natural consequence because we can regard that ions and electrons are efficiently coupled and the shock is mildly relativistic. As seen in Figure 2, the ratio of the Lorentz factors of the pre-shocked and shocked ejecta is 1.1, which corresponds to a relative velocity of v rel 0.4. The kinetic energy per single ion of ∼ A i m u v 2 rel is dissipated at the reverse shock and a considerable fraction of this energy is shared by ions and electrons in the downstream. Thus, the average Lorentz factor of the random motion of electrons in the shocked gas can be estimated from the condition, γ e m e A i m u v 2 rel /(Z i + 1), which yields The Compton cooling time t cool of an electron with a Lorentz factor γ e in a radiation field with an energy density u ph is given by, When the initially expected radiation energy density u ph ∼ 10 14 erg cm −3 is assumed, the cooling time scale is much shorter than the dynamical time scale even for γ e = 1. Thus, we can expect that electrons in the shell rapidly transfer their internal energies into radiation. Once the internal energy density of the gas is dominated by radiation, u int u ph , at an early epoch, the cooling time scale at later epochs can be estimated by substituting u int , which is calculated by Equation (59), into u ph in Equation (66). As long as the condition Γ s t cool t is satisfied, the Compton cooling of electrons is efficient and thus the assumption u int u ph is valid. The temporal evolution of the cooling time scales for the same models as in Figure 5 are presented in the bottom panel of Figure  6, suggesting that Γ s t cool t is satisfied. Thus, we can assume that the energy exchange between electrons and photons is so efficient that u ph u int is maintained even when the equilibrium between absorption and emission of photons is not achieved.

Bolometric Light Curve
We consider the bolometric light curve of the emission from the shell seen by a distant observer. Figure 7 schematically represents the geometry considered here. The observer sees the shell expanding and emitting photons. We consider a photon emitted from a part of the shell traveling at an angle θ with respect to the line of sight at time t. The intensity at the emitting point is given as a function of time t and the angle θ specifying the direction of the photon ray with respect to the radial direction. Assuming the distance D from the center of the ejecta to the observer is much larger than the shell radius R s , the angle θ between the photon ray and the radial direction is approximately equal to θ, θ θ. We regard that the photons reaching the observer at an angle χ with respect to the line of sight at time t obs . The photon travels at a distance d given by before arriving at the observer, which leads to the following relation between the times, t and t obs , of the emission and detection of the photon, The angle χ is expressed in terms of θ, R s , and D, in the following way, which can be approximated as follows, The intensity of the emission seen by the observer at the angle χ and time t is identical with that at the emitting point at θ and t obs − d/c. Therefore, in the absence of an ambient medium, the flux at the observer is expressed as follows, When the ambient medium ahead of the shell is optically thick, the energy of radiation diffusing out from the shell is at first deposited into the medium. How the deposited energy is transferred in the ambient medium before being detected by the observer depends on the optical depth τ a of the ambient medium measured from the emitting point specified by the radius R s and the angle θ to the observer. Introducing a constant effective opacity κ eff , we calculate the optical depth τ a by integrating the density profile ρ a (r) along the path. For a distance D much larger than the shell radius R s , the photon travels almost parallel to the line of sight. Therefore, the optical depth can be approximated as follows, Electron scattering is again expected to be the dominant radiative process in the ambient medium, because the gas can be as hot as the outermost layer of the ejecta, whose temperature is expected to be T ∼ 10 7 K, once it is illuminated by the emission from the layer. However, it is difficult to analytically determine when and what fraction of the radiation energy having deposited into the ambient medium escapes through the photosphere, since the transfer of the energy in the ambient medium includes scattering processes. Therefore, we adopt the following way to roughly estimate the bolometric luminosity at observer time t obs and see how different values of κ eff affect the bolometric light curve. A fraction e −τa of photons is expected to escape the ambient medium without being scattered by electrons. Thus, we only account for these freely escaping photons and calculate the flux of the emission in the following way, The bolometric luminosity is given by When κ eff = κ es is adopted, the luminosity evaluated above gives the lower limit on the bolometric luminosity, since we do not treat scattered photons, whose energy is (1 − e −τa ) of the total amount. The scattered photons escape the ambient medium with a delay and make the emission brighter at later epochs. We also evaluate the bolometric luminosity with κ eff = 0 and 0.1 cm 2 g −1 .
Setting κ eff = 0 means that the deposited radiation energy directly seen by the observer and thus roughly gives the upper limit on the bolometric luminosity.
Here we consider the angular distribution of the intensity. The radiation field is anisotropic due to the relativistic beaming effect, which makes the visible region from the observer only a part of the entire surface area of the shell. In order to see how the relativistic beaming affects the bolometric light curve, we employ the following simplified form of the intensity. When the shell is traveling at a velocity β s , outgoing photons emitted by the shell are confined in a cone with the direction cosine larger than the velocity, cos θ ≥ β s . We simply assume that the intensity is uniform within the cone and otherwise vanishes, One can easily check that the flux multiplied by the surface area 4πR 2 s of the shell is identical with the radiative energy loss rate, Equation (58), In the calculation of bolometric light curves, we assume that the shell is at the origin, R s = 0, at t = 0. Then, the observer time corresponding to t = 0 leads to t obs = D/c from Equation (68). However, this does not mean that the observation starts at t obs = D/c. When this event is observed by some instrument, the trigger of the observation would be delayed from t obs = D/c. Thus, we denote the trigger time of the observation by t obs,0 and plot light curves for different trigger times including t obs,0 = D/c to see how different trigger times affect the light curves.
Finally, we should note that the shock curvature can effectively modify the bolometric light curve when the shock front is highly aspherical as suggested in the context of supernova shock breakout (Suzuki & Shigeyama 2010;Suzuki et al. 2016). Although we assume a spherical shell in this study, highly aspherical blast waves may arise in stellar explosions producing trans-relativistic ejecta.

Emission Timescale
At first, we consider the time scale of the emission. In the following consideration, we set t obs.0 = D/c. When we focus on a part of the shell traveling parallel to the line of sight, θ = 0, the observer time is given by Thus, a shell traveling at a velocity close to the speed of light results in an emission time scale smaller than the time scale of the dynamical evolution of the shell. Assuming that the shell radius R tr at the time t = t tr is roughly given by the product β tr t tr of the time and the velocity β tr at the time, the emission time scale in the observer frame is smaller than t tr by a factor of (1 − β tr ), Furthermore, for an ultra-relativistic speed, β tr = 1 − 1/(2Γ 2 tr ), the following familiar expression for relativistic flows can be obtained, The shock curvature also affects the emission time scale. When photons are emitted from different parts of the shell at the same time, the distance between the nearest and the furthest points from the observer along the line of sight results in a delay in the arrival times, which is given by the light traveling time of the distance. This light traveling time effect is most significant when the shell radius is the largest at t = t tr . Since we take into account the relativistic beaming effect, the visible area is restricted to a part of the surface of the shell with cos θ > β tr . Thus, the distance between the center and the edge of the visible area along the line of sight leads to R tr (1 − β tr ). The corresponding light traveling time is given by, where the last expression holds for ultra-relativistic velocities. Therefore, as long as the velocity β tr when the shell becomes transparent to photons is close to the speed of light (not necessarily ultra-relativistic), Equations (78) and (80) give emission time scales of the same order.

Effective Opacity
In Figure 8, we show the bolometric light curves calculated by our model with different values of κ eff = 0.2, 0.1, and 0.0 cm 2 g −1 and a fixed t obs,0 = D/c, which are compared with the X-ray light curve of GRB 060218 in 0.3-10 and 15-50 keV obtained by Swift XRT and BAT. We use the data compiled and provided by UK Swift Science Data Centre 1 . We note that our model only considers the bolometric luminosity of the emission and thus its spectrum may deviate from observations. The radiation energy emitted as X-ray photons is dominated by a small number of non-thermal photons, while thermal photons dominate the total photon number. We will further discuss the spectral features in Section 4.5.
The parameters of the model are set to E rel,51 = 0.2, t 0 = 10 s, Γ max = 5, A = 350, and n = 2. The emission is initially brighter for smaller values of the effective opacity κ eff as expected. Although the discrepancy of the luminosities of the different models is considerably large at earlier epochs, t obs < 100 s, it becomes smaller as the total optical depth of the ambient medium τ a becomes smaller. At later epochs t obs > 10 3 s, the difference in the bolometric luminosity is within a factor of 3. As a result, the overall duration and the average flux of the X-ray emission is well explained.

Trigger Time of Observations
The light curve models shown in Figure 8 exhibit a clear offset between the rise of the light curve and t obs = t obs,0 , depending on the adopted values of κ eff . This suggests that the trigger time t obs,0 of the observation significantly affects the light curve. In Figure 9, we plot the light curves of models with different trigger times t obs,0 and a fixed κ eff = 0.1 cm 2 g −1 . The trigger time is set to t obs,0 = D/c, D/c + 50 s, and D/c + 150 s. The results clearly demonstrate that the earlier part of the light curve is significantly affected by the different values of t obs,0 , while the later part remains unchanged. Especially, the light curve with t obs,0 = D/c + 150 s matches the observed one. Thus, when the emission is Comparison of the bolometric light curve calculated by our model (thick lines) and the X-ray light curves of GRB 060218 obtained by Swift BAT (15-50 keV, circles with error bars) and XRT (0.3 − 10 keV, thin gray line). Thick solid (red), dashed (blue), and dash-dotted (green) lines show the bolometric light curves with different values of the effective optical depth, κ eff = 0.2, 0.1, and 0.0 cm 2 g −1 and a fixed t obs,0 = D/c. The other free parameters of the model are set to E rel,51 = 0.2, t 0 = 10 s, Γ max = 5, A = 350, and n = 2. The distance to the source is assumed to be D = 143 Mpc. observed after its bolometric luminosity reaches around L bol 6 × 10 45 erg s −1 , the observed light curve can be well reproduced.

Termination of the Emission
In our semi-analytical model, the energy deposition from the shell via radiative diffusion is terminated when the optical depth of the shell τ becomes smaller than unity, τ < 1. This termination happens at t obs 3 × 10 3 s for the model shown in Figures 8 and 9. Interestingly, the X-ray light curve of GRB 060218 also exhibits a sharp drop in luminosity at a similar epoch. In our model, this sudden decline in the luminosity is interpreted as the transition of the shell from optically thick to thin, which leads to a significantly small number of photons coupled to electrons.

E rad -T 90 Diagram
Results shown in Figures 8 and 9 indicate that the bolometric luminosity at later epochs (t obs > 10 3 s) less suffers from the uncertainties mentioned above, the radiative transfer in the ambient medium and the trigger time. This suggests that the duration of the bright emission, the luminosity at later epochs, and the total radiated energy, which is roughly given by the duration and the late-time luminosity, are appropriate quantities for a fair comparison between our models and observations. Observations of individual GRBs provide the duration and isotropic gamma-ray energy. Thus, we define the following quantities, which can easily be calculated from our light curves, and compare them with duration and isotropic gamma-ray energy of several nearby GRBs.
Integrating the bolometric luminosity L bol with respect to the observer time t obs , we obtain the total radiated energy E rad , with t obs = 10 5 s. Furthermore, we define a time scale T 90 at which 90 % of the total radiation energy has been deposited 2 , We calculate these two quantities from models with various sets of the parameters (E rel , A , n), while the References-(1) Kaneko et al. (2007); (2)  maximum Lorentz factor is fixed Γ max = 5. In each panel of Figure 10, the relations between the radiated energy E rad and the time scale T 90 for various sets of the parameters are plotted. Solid lines represent the relations of these two quantities obtained by increasing the parameter A from A = 1 to A = 1000 for E rel,51 = 0.01, 0.1, 1, 10. On the other hands, thin dashed lines represent the relations obtained by increasing the kinetic energy E rel,51 from 0.01 to 10 for A = 1, 10, 100, and 1000.

Nearby Less-energetic GRBs
We compare the resultant quantities with the duration T 90,obs and the isotropic gamma-ray energy E γ,iso of nearby GRBs associated with SNe, some of which are less energetic than normal GRBs found at cosmological distances. The properties of the gamma-ray emission of the selected GRBs are summarized in Table 2. These quantities are plotted on the panels in Figure 10. Out of these samples, GRBs 980425, 060218, and 100316D are often classified as LLGRBs due to their small gammaray isotropic energies. Furthermore, GRB 060218 and 100316D exhibit quite similar X-ray light curves, characterized by 1000 sec-long duration and soft X-ray spectrum. On the other hand, GRB 030329 shows similar properties, such as the isotropic gamma-ray energy and the spectral peak energy, to normal GRBs rather than LLGRBs. A more recently detected GRB 120422A shows gamma-ray emission with a relatively short duration, T 90 = 5.35 ± 1.4 s, followed by rapidly fading X-ray emission. It has been suggested that it might constitute the intermediate class between normal GRBs and LLGRBs (Schulze et al. 2014).

Interaction-powered Emission
From the E rad -T 90 diagrams in Figure 10, LLGRBs 980425, 060218, and 100316D, are found to be well explained by the interaction-powered emission from spherical ejecta. GRBs 060218 and 100318D are best explained by interaction-powered emission from relativistic ejecta with a kinetic energy of E rel,51 = 0.1-1.0 and a CSM with A 300-400. The large value of the parameter A required to explain their long-lasting X-ray emission implies a mass-loss rate close to (3 − 4) × 10 −3 M yr −1 when a typical wind velocity of Wolf-Rayet stars, 10 3 km s −1 , is adopted. The implied large amount of CSM has also been pointed out by several authors since the discovery of GRB 060218 (e.g., Campana et al. 2006;Waxman et al. 2007). GRB 980425 is reproduced by models with moderate values of the parameter A and an even small kinetic energy, E rel,51 = 0.01-0.1, is sufficient to account for the isotropic gamma-ray energy of this relatively less energetic event. For larger values of the exponent n, a larger kinetic energy is required for GRB 980425, since a larger n means that a smaller fraction of the kinetic energy is distributed throughout the outer layers of the ejecta, resulting in emission with longer rise times.

Central Engine Driven Bursts
Several GRBs are located above the lines corresponding to models with the largest kinetic energy E rel,51 = 10 in all panels of Figure 10. In other words, they cannot be explained by the interaction-powered emission. Assuming ejecta with a kinetic energy larger than E rel,51 = 10 is less likely, because the value E rel,51 = 10 is already comparable to the kinetic energy of particularly energetic SNe, i.e., hypernovae, and a considerable fraction of the total kinetic energy of SN ejecta is usually distributed in slower non-relativistic ejecta rather than outer layers. Thus, it seems unfeasible to distribute even more kinetic energy throughout the faster part of the ejecta while the spherical symmetry is kept. These bursts require relativistic jets powered by central engines

Spectral Features
Our model predicts bolometric properties of the emission from the shocked gas and provides little information on the spectrum. Nevertheless, it is worth discussing the following points regarding the expected spectrum.
The discussion on the thermal equilibrium time scale implies that the balance between absorption and emission of photons via free-free process is achieved at early stages of the dynamical evolution of the shell, t 20 s and 10 3 s for A = 100 and 1000 (see Figure 6). In particular, for the model shown in Figures 8 and 9, the Diagrams showing the total radiated energy E rad and the duration T 90 of the interaction powered emission for various sets of the free parameters. Solid lines show relations of E rad and T 90 obtained by increasing the parameter A from A = 1 to A = 1000 for E rel,51 = 0.01 (red), 0.1 (blue), 1.0 (green), and 10 (black). Dashed lines show those obtained by increasing the energy E rel from E rel,51 = 0.1 to E rel,51 = 10 for A = 1, 10, 100, and 1000. The duration T 90,obs and isotropic energy E γ,iso of the selected GRBs, which are summarized in Table 2, are also plotted.
decoupling occurs at t 150 s. The reverse shock pressure at the time is p rs 10 11 erg cm −3 , leading to an equilibrium temperature of T eq 2.5×10 6 K. Thus, these photons are expected to show a temperature of a few 10 6 K or equivalently an average energy of 3k B T eq ∼ 0.6 keV at the decoupling and contribute to the emission as a thermal component. In fact, a thermal component has been found in the X-ray spectra of GRB 060218 (Campana et al. 2006) and 100318D (Starling et al. 2011). The presence of a thermal component with temperature of k B T BB ∼ 0.1 − 0.2 keV, relatively low spectral peak energy (E peak = 4.7 and 18 keV, respectively), and their peculiarly long X-ray emission may indicate that their emission originates from the interaction between a dense CSM and mildly relativistic ejecta. The contribution of the thermal component to the total X-ray flux is only ∼ 10 % and 2-4 % for GRB 060218 and 100318D. However, the low temperature, 0.1-0.2 keV, compared with the spectral peak energy means that thermal photons dominate the total photon number.
Our model suggests that thermal photons with a temperature of ∼ 0.1-0.2 keV predominantly exist until the decoupling, which reasonably agrees with the observations. Since the energy injection through the reverse shock continues even after the decoupling, the freshly injected energy would play a role in powering a small fraction of photons remaining in the shocked region and producing a non-thermal component. For the model shown in Figures 8 and 9, the internal energy of the shell at the decoupling t 150 s is E int,dec 10 49 erg, while the value at t = t tr is E int,tr 2.6 × 10 49 erg. Thus, an additional energy of the order of 10 49 erg can be used to further power the photons. Because of the freeze-out of the photon number, when this additional energy is simply used to increase the average energy of the whole remaining photons, the increase in the photon energy, which is given by E int,tr /E int,dec , is only a factor of a few. The increased average photon energy is ∼ 1 keV, which does not explain the spectral peak energies of LLGRBs. This is the reason why some mechanism decoupling a small fraction of photons from the thermal equilibrium should play a role. For example, when a few to 10 percent of the remaining photons could predominantly gain the additional energy, an energy larger than the average photon energy by a factor of 10-30, ∼ 6-10 keV, would be achieved. In fact, this simple consideration overestimates the contribution of the thermal photons to the total radiated energy, E int.dec /E int,tr ∼ 38%. Thus, a more sophisticated model taking into account the process producing non-thermal photons should be developed to explain observations of LLGRBs in a self-consistent way. However, revealing the mechanism responsible for producing the non-thermal component is beyond the reach of this study, where a simplified one-zone model is used to describe the shocked region.
There is also the possibility that the spherical shell is not responsible for producing non-thermal photons and the non-thermal component can instead arise from a weak jet rather than the shell (see, Irwin & Chevalier 2016, for a recent discussion). In other words, the combination of non-thermal emission from a jet and thermal emission from the associated quasi-spherical ejecta, such as a cocoon, accounts for the emission from LLGRBs. In this case, just up to ∼ 10 % of the total X-ray flux should be explained by the ejecta-ambient interaction and make the required kinetic energy of the ejecta smaller by an order of magnitude.

CONCLUSIONS AND DISCUSSIONS
In this study, we have developed a semi-analytical model for the hydrodynamical evolution of freely expanding trans-relativistic ejecta interacting with an ambient medium whose density is inversely proportional to the square of the radius. Our model successfully reproduces results of numerical simulations. Furthermore, we have presented an emission model in which photons are diffusing out from the geometrically thin and optically thick shell resulting from the hydrodynamical in-teraction. Then, we have examined the possibility that the CSM interaction contributes to X-ray and gammaray emission from GRBs associated with SNe, including several events classified as LLGRBs. Our results give a threshold on the E rad -T 90 plane, above which gamma-ray emission of any GRB cannot be explained by the interaction-powered emission from mildly relativistic, spherical ejecta. The CSM interaction cannot explain GRBs releasing a large amount of gamma-ray energy during short duration, such as GRB 030329, 031203, and 120422A, which suggests that they require a certain central engine activity to deposit a significant amount of energy into a small solid angle. This result agrees with Zhang et al. (2012), who claimed that the time-averaged luminosity of the gamma-ray emission could distinguish central-engine powered GRBs from LLGRBs.

Presence of Dense CSM
Our results suggest that the circum-burst environment would be a key to distinguishing GRBs characterized by long-lasting soft X-ray emission from normal GRBs. Recently, Margutti et al. (2015) studied X-ray emission from GRBs found in the nearby universe and found that some GRBs exhibit the following properties: (1) longlasting gamma-ray emission with T 90,obs > 1000 s, (2) a large absorption column density by neutral hydrogen, and (3) late-time super soft X-ray emission. They pointed out that these events were possibly explosions of stars surrounded by dense materials having been lost from the stellar surface as a stellar wind, although they could not exclude another possibility that these events originate from unusual progenitor systems.
It is found that a considerably dense CSM, mass-loss rates larger than 10 −3 M yr −1 for a wind velocity of 10 3 km s −1 , is required for GRB 060218 and 100316D. How such dense CSM is produced during the evolution toward the core-collapse is still unclear. However, spectroscopic observations of SNe at very early stages may shed light on the origin. Recent observations of type IIb SN 2013cu (Gal-Yam et al. 2014) at the very beginning of its evolution suggested that it was the explosion of a Wolf-Rayet star with an extremely dense CSM or stellar envelope attached. From the luminosity of the Hα line emission found in the early optical spectrum of SN 2013cu, they argued the presence of a strong stellar wind with a mass-loss rate of the order of 10 −2 M yr −1 and a wind velocity of the order of 10 3 km s −1 in the vicinity of the progenitor star. More detailed spectral modeling later found that the wind velocity appeared to be smaller than the value obtained by Gal-Yam et al. (2014), but the mass-loss rate was similar (Groh 2014;Gräfener & Vink 2016). Furthermore, recent spectroscopic observations of SNe found by the Palomar Transient Factory suggest that a non-negligible fraction of the SNe exhibits spectral signatures similar to SN 2013cu (Khazov et al. 2016) in their early optical spectra. If a highly energetic explosion producing relativistic ejecta occurs in a similar environment, the ejecta-CSM interaction would give rise to bright X-ray or gamma-ray emission like GRBs 060218 and 100316D.
On the other hand, radio observations and light curve modelings of GRBs associated with SNe imply relatively dilute circum-burst environments. For example, Margutti et al. (2013) carried out radio and X-ray observations of GRB 100316D and estimated the mass-loss rate of ∼ 10 −5 M yr −1 for a wind velocity of 10 3 km s −1 . This discrepancy could be resolved by introducing a non-steady mass losing process. In other words, radio observations would probe the CSM at more distant regions from the explosion site than the CSM predominantly dissipating the kinetic energy of the ejecta. The geometrically thin shell becoming transparent at t tr ∼ 10 3 s is located at a distance of ct tr ∼ 3 × 10 13 cm, where materials ejected a few days before the explosion should be present for a wind velocity of 10 3 km s −1 . On the other hand, radio observations are usually carried out 10-100 days after the discovery, when relativistic ejecta traveling at speeds close to the speed of light have reached at a distance of 3 × 10 16−17 cm. The corresponding traveling time scale of the wind at a velocity 10 3 km s −1 is 10-100 yrs. Thus, the drastic change in the mass-loss history of the progenitor, if it existed, must have occurred 10-100 yrs before the explosion.
Radio observations of LLGRBs also suggest that the radio-emitting ejecta still have sub-relativistic velocities, Γβ ∼ 1, and the kinetic energy of the ejecta is comparable to the isotropic energy of the gamma-ray emission (e.g., Margutti et al. 2013). If the shell resulting from the ejecta-CSM interaction continued to decelerate in a dense CSM, the shell velocity would be non-relativistic and most of the kinetic energy would be lost at later stages of the dynamical evolution. Thus, the termination of the dense CSM in a distant region from the explosion site is also required to explain the dynamics of radio emitting ejecta.

Kinetic Energy Distribution of Trans-relativistic Ejecta
The total radiated energy and the duration of the emission predicted by our emission model do not strongly depend on the gradient of the assumed kinetic energy distribution, which is characterized by the power-law exponent n, especially for ambient media with high densities. However, the temporal evolution of the spectrum of the emission must depend on n. Smaller values of n correspond to ejecta with larger kinetic energy at the outermost layer. Ejecta traveling at higher Lorentz factor are expected to emit harder photons due to the Lorentz boost. Therefore, when ejecta with a kinetic energy distribution with a smaller n are responsible for the X-ray and gamma-ray emission, the spectrum is dominated by hard photons, while a softer spectrum is expected for ejecta with a steep kinetic energy distribution. The difference in the hardness of observed spectra must be a key to investigating what kind of kinetic energy distribution is realized in LLGRBs.
How the assumed kinetic energy distribution is related to the hardness of the resultant emission should be quantitatively studied by performing hydrodynamic simulations with multi-frequency radiative transfer, which would also clarify whether a thermal component is really present in the spectrum of the emission and how repeated Compton scatterings shape the spectrum.
where t and r are the time and the radial coordinate and µ is the direction cosine. For simplicity, we assume isotropic scattering and κ gives the scattering opacity. In the diffusion approximation, we only consider the zeroth and first angular moments of the intensity. Thus, the intensity is expressed as follows, The zeroth and first angular moments of the transfer equation (A1) with Equation (A2) lead to  which also holds for the radiation energy densities, u ph and u ph , u ph = (1 − β 2 s )τ u ph (1 + β 2 s /3)τ + 2β s /3 .
Thus, the radiative energy loss rate can be expressed in terms of the radiation energy density in the laboratory frame as follows, dE dt rad = 4πR 2 u ph 1 − β 2 s (3 + β 2 s )τ + 2β s . (A14)

B. CONVERGENCE CHECK OF NUMERICAL SIMULATIONS
In this section, we provide results of the convergence study of our numerical simulations. In the simulations performed in Section 3, the whole numerical domain is covered by N r = 1024 at the lowest AMR level and the time step is set to ∆t = 0.0001. We carry out additional four simulations with the same parameter as the model in Figures 1 and  2 but with different spatial and temporal resolutions. The number of the numerical cells at the lowest AMR level and the time step are doubled and halved compared to the fiducial model, (N r , ∆t) = (2048, 0.0001), (512, 0.0001), (1024, 0.00005), and (1024, 0.0002). The evolution is followed up to t = 200 s. Figure 11 shows the results. The panels show the radial profiles of the density from r = 190 to r = 200 in units of 3 × 10 10 cm at t = 200 s. In each panel, the result of the simulation is plotted as a solid line and compared with the fiducial model (dashed line) with (N r , ∆t) = (1024, 0.0001). The different models show quite similar density profiles, proving the convergence of the simulation shown in this paper.