Internal Shocks Hydrodynamics: the Collision of Two Cold Shells in Detail

Emission in many astrophysical transients originates from a shocked fluid. A central engine typically produces an outflow with varying speeds, leading to internal collisions within the outflow at finite distances from the source. Each such collision produces a pair of forward and reverse shocks with the two shocked regions separated by a contact discontinuity (CD). As a useful approximation, we consider the head-on collision between two cold and uniform shells (a slower leading shell and a faster trailing shell) of finite radial width, and study the dynamics of shock propagation in planar geometry. We find significant differences between the forward and reverse shocks, in terms of their strength, internal energy production efficiency, and the time it takes for the shocks to sweep through the respective shells. We consider the subsequent propagation of rarefaction waves in the shocked regions and explore the cases where these waves can catch up with the shock fronts and thereby limit the internal energy dissipation. We demonstrate the importance of energy transfer from the trailing to leading shell through $pdV$ work across the CD. We outline the parameter space regions relevant for models of different transients,e.g., Gamma-ray burst (GRB) internal shock model, fast radio burst (FRB) blastwave model, Giant flare due to magnetars, and superluminous supernovae (SLSN) ejecta. We find that the reverse shock likely dominates the internal energy production for many astrophysical transients.


INTRODUCTION
In many astrophysical scenarios involving different classes of objects, transient electromagnetic emission is thought to arise from internal shocks.In particular, internal shocks have been invoked in blazars (e.g.Rees 1978;Levinson 1998;Ghisellini 1999), GRBs (e.g.Rees & Meszaros 1994;Sari & Piran 1997;Daigne & Mochkovitch 1998), FRBs (e.g.Waxman 2017;Metzger et al. 2019;Margalit et al. 2020), superluminous supernova (e.g.Woosley et al. 2007;Benetti et al. 2014;Moriya et al. 2018;Lin et al. 2023;Khatami & Kasen 2023), magnetar giant flares (e.g.Granot et al. 2006;Fermi-LAT Collaboration et al. 2021), etc.In these cases, the central engine generates an outflow whose asymptotic speed varies with time at the ejection site and therefore with the distance from the source.Faster parts of the outflow overtake slower parts leading to collisions that give rise to shocks that are referred to as internal shocks (as they arise within the outflow, in contrast to external shocks that are caused by the outflow's interaction with the external medium).
It is useful to approximate the outflow as consisting of discrete, uniform shells of finite radial width.In particular, we model here in detail the collision between a pair of uniform, cold shells.Such a collision forms a pair of shock fronts -a forward shock that accelerates the leading shell and a reverse shock that decelerates the trailing shell, where the two shocked parts of these shells are separated by a contact discontinuity (CD).The reverse/forward shocks dissipate ★ E-mail: rahaman.minhajur93@gmail.com the initial kinetic energy of the shells into internal energy, part of which can be radiated by the particles accelerated in this process and produce the observed emission in different transient astrophysical sources.However, most works that studied the energy dissipation efficiency in internal shocks (e.g.Kobayashi et al. 1997, Daigne & Mochkovitch 1998) used a ballistic model featuring a completely inelastic (plastic) collision of two infinitely thin shells.Such an analysis does not account for the underlying shock physics and hence ignores much of the relevant dynamics.Few studies (e.g.Pe'er et al. 2017) that do account for the shock physics, do not study time evolution of the shock fronts for a generic parameter space.
Therefore, there is a need for a comprehensive work that selfconsistently studies the hydrodynamics of both shocks and the application of the shock dynamics to internal shocks models of various astrophysical objects.This is the aim of the present work.In particular, we study under which conditions the finite widths of the two shells can limit the energy dissipation in each shock, as well as the total internal energy production efficiency.
The paper is structured as follows.§ 2 introduces our basic model parameters and describes the setup for solving the jump conditions across both shocks and the CD, to solve for the system's hydrodynamics.§ 3 describes how the rarefaction waves, which form when a shock finishes crossing a shell, may limit the energy dissipation by the shock fronts.§ 4 describes the limitation of our approximations of cold pre-collision shells and a planar geometry.In § 5 we explore the internal shocks hydrodynamic parameter space relevant for different astrophysical transients.Our conclusions are discussed in § 6.The pre-collision structure -the leading and trailing shells are denoted by S1 and S4, respectively.The arrow size is proportional to the proper speed of the respective shell.Bottom: The post-collision structure of the two shells, which now divides into 4 regions (R1 to R4), where each shell develops a shocked region (the shaded regions), and the two shocked regions (R2 and R3) are separated by a CD.The structure is shown at a time when the reverse shock front has swept through 40% of shell S4.The radial width of the four regions is to scale.The arrow sizes scale as the proper speeds of the shells, the CD, and the two shock fronts.

THE SETUP AND JUMP CONDITIONS ACROSS THE TWO SHOCKS AND THE CONTACT DISCONTINUITY
In this section we describe the setup before and after the collision.We broadly have one global frame -that lab frame that is the rest frame of the central source (or engine), as well as a number of local frames, namely the rest frame of the fluid in each of the regions in the flow.All quantities measured in the lab frame are unprimed, while quantities measured in the local fluid rest frame are primed.

The description of the ejected shells pre-collision
In this subsection we describe the setup before the shells collide.Our initial setup is illustrated in the top panel of Figure 1.The central engine produces a cold leading shell (labeled S1) and a cold trailing shell (labeled S4) of initial kinetic energies ( k,1,0 ,  k,4,0 ) with radial widths (Δ 1,0 , Δ 4,0 ) and proper speeds ( 1 ,  4 ).Assuming both shells are initially cold, the available energy is entirely due to Table 1.List of seven basic parameters for two cold-shell collision.Here the subscript  = (1, 4) stands for the leading and the trailing shell respectively.

Symbol Definition
k,i,0 Available kinetic energy in shell  just before collision Δ i,0 The radial width of shell  just before collision  i The proper speed of shell   off Time between ejection of shells S1 and S4 Table 2. List of derived parameters to be used throughout the text.Note that  u > 1 is required to ensure the shells S1 and S4 collide.

Symbol Definition Expression
o Collision radius Radial width ratio of S1 to S4 Δ 1,0 Δ 4,0 u Proper speed ratio of S4 to S1

𝑓
Proper density ratio of S4 to S1 the initial kinetic energy of the outflow and is given as where ( 1,0 ,  4,0 ) are the rest masses of the shells.The rest mass energy has been subtracted from the initial total energy of the shells as it is unavailable for internal energy dissipation at the shocks that form in the collision.
As shown in Table 1 our setup has seven basic parameters viz., the time  off between the ejection of the two shells , and, the proper speeds ( 1 ,  4 ), the initial radial widths (Δ 1,0 , Δ 4,0 ) and the initial kinetic energies ( k,1,0 ,  k,4,0 ) of the shells.The number of free parameters can be reduced depending on the frame of reference and assuming particular conditions viz., equal mass and equal energy shells in the ultra-relativistic and newtonian limits.As shown in Table 2 there are four derived parameters required to describe shock hydrodynamics post-collision in the lab frame viz., the collision radii  o , the ratio of the initial radial width of shell S1 to S4 , the proper speed contrast  u and the proper density contrast  .Since we assume planar geometry,  off only decides the collision radii  o but does not decide the shock hydrodynamics (see §4 for discussion on the effects due to spherical geometry).Morever, if the shock hydrodynamics were to be studied not in the lab frame but in the rest frame of shell S1, only two quantities would suffice for the description of shocked fluid viz., the proper density ratio  and the relative proper speed  41 of shell S1 and S4 (see §2.2.1).In order to estimate the ratio of the time taken (in the lab frame) by the FS/RS to sweep to the front/rear edge of the respective shell one needs the ratio  the radial widths of the respective shells.Moreover, if the source power  of the central engine is constant during ejection of both shells at ultrarelativistic speeds  → 1, the ratio  =  on1  on4 .In this instance, only three free parameters are required to describe shock hydrodynamics.To illustrate this point, we consider the collision of two equal energy shells of equal radial width as our prototypical case for all of our illustrations.
In the next subsection we describe the hydrodynamics of shock propagation post collision.
Table 3. Symbols and definitions for quantities required to describe postcollision hydrodynamics.The comoving quantities in each region are primed and the regions are referred to by a subscript (Here  = (1, 2, 3, 4) refers to regions 1,2, 3, and 4 respectively).For cold shells the internal energy density in regions 1 and 4 are zero ( ′ int,1 ,  ′ int,4 ) = 0.
Symbol Definition  ′ j Proper particle number density in region   ′ int,j The comoving internal energy density in regions  Γ ij The relative LF of regions R and R The proper speed of the shocked fluid in regions R2 and R3  i The proper speed of the shock front  = (, )  i The shell crossing time by shock front  = (, ) Γ ij − 1 Internal energy per unit rest energy in region R  (  = 2, 3)  j,int Internal energy in R  (  = 2, 3) at shock crossing ( FS ,  RS )  j,k Kinetic energy in R  (  = 2, 3) at shock crossing ( FS ,  RS )  j,int (𝑡 ) Internal energy in R  (  = 2, 3) at time   j,k ( ) Kinetic energy in R  (  = 1, 2, 3, 4) at time

Hydrodynamics of the reverse and the forward shock fronts
In this subsection we describe the hydrodynamics of shock propagation after the shells collide.Post ejection of the shells the trailing shell S4 collides with the leading shell S1 at the lab frame  o and at a distance  o from the central engine.As seen in the bottom panel of Fig. 1, for  4 >  1 the shells S1 and S4 collide and the collision launches a pair of reverse (hereafter RS) and forward shock (hereafter FS) fronts.The two shocked regions are separated by a contact discontinuity (hereafter CD).The FS sweeps through shell S1 while the RS sweeps through shell S4.Post collision the two shells develop four regions (R1, R2, R3, R4).Region R1 (R4) is the portion of S1 (S4) that is not yet shocked by the FS (RS).Region R2 (R3) is the portion of S1 (S4) shocked by the FS (RS).Before collision the internal energy in both shells is zero, and this still holds for regions R1 and R4.Post collision, as both the forward and the reverse shock fronts dissipates energy in regions R2 and R3 respectively, there is nonzero internal energy in both of these regions.As a result, there is a non-zero pressure in both of these regions which leads to  work across CD (see discussion preceding equation ( 15)).In summary, post collision four regions exist: two unshocked regions (R1,R4) and two shocked regions that develop as a result of the collision (R2,R3).
To study shock hydrodynamics we assume a planar geometry wherein the number density in regions (1, 2, 3, 4) does not change with time (the volume of each fluid element in these regions remains constant, both in the comoving frame and in the lab frame).The quantities determined by shock hydrodynamics are summarized in Table 3. Subsequently, all physical quantities are homogeneous in all 4 regions at all times.In particular, the propagation velocities of the shock fronts remain constant.As a result, all changes in all 4 regions scale linearly with time (see Table 4).The limitation of this approach will be discussed in section 4.
Our objective is to estimate the proper speed  of the shocked fluid given the proper densities ( ′ 1 ,  ′ 4 ) and the lab frame proper speeds ( 1 ,  4 ) of the shells (S1,S4) just before collision.The hydrodynamical shock jump conditions for the collision of two cold shell collisions can be summarized (e.g., Blandford & McKee 1976) as (see Appendix A for the full derivation), where  p is the proton mass and the other physical quantities appearing in the equations are summarized in Table 3.The relative LFs are given as Equations ( 2a) and (2c) relate the internal energy per baryon to the shock strength (Γ 21 , Γ 34 ) −1.In other words, the efficiency of energy dissipation associated with forward/reverse shock front increases if the proper speed of the shocked fluid ( 2 ,  3 ) is significantly different from ( 1 ,  4 ).Thus, the internal energy per baryon is small for Newtonian shocks ,(Γ 21 , Γ 34 ) − 1 ≪ 1, and is significant for relativistic shocks (Γ 21 , Γ 34 ) ≫ 1. Equations ( 2b) and (2d) show that the proper densities of particles in shocked regions are higher than those of the unshocked regions by a shock compression ratio.
The velocities and the pressure across the CD are equal Using equations ( 4a)-(4b) in equations ( 2a)-(2d) gives corresponding to equal ram pressures across the CD in its rest frame.
It can be seen that for  < 1 the reverse shock strength ( 34 or Γ 34 ) is higher than the forward shock strength ( 21 or Γ 21 ) and vice versa.
In particular, the shock strengths are equal for  = 1.Equation ( 5) has the symmetry that under transformation  → 1/  the ratio undergoes the transformation  21  34 →  34  21 , which simply corresponds to switching the labels of the two shocked regions (R2 and R3) and the two unshocked regions (R1 and R4), as in the CD's rest frame it makes no difference which shell is leading and which shell is trailing in the lab frame.
It can also be instructive to analyse the shock hydrodynamics in the CD frame.In Appendix I, we analyse the  = 1 scenario in the CD frame and compare our results with those by Kino et al. (2004), who performed a numerical study in CD frame for a collision of ultrarelativistic shells.The principal difficulty in a CD frame approach is associated with estimating the thermal energy dissipated in the lab frame using quantities in the CD frame.Specifically, in the CD frame there is no  work across the CD from region R3 to R2, and as a result the thermal efficiency is underestimated when calculated using quantities in the CD frame.In §3 we circumvent this difficulty by estimating the thermal efficiencies in the lab frame (for an expanded discussion see the last paragraph in Appendix I).
In 2.2.1 we will solve for the proper speed of the shocked fluid in the rest frame of shell S1 (where one can explicitly see that the results depend only on the density and LF ratio between the shells) and then in 2.2.2 Lorentz transform the solution from rest frame of S1 to the lab frame (which adds an additional parameter, the absolute proper speed of S1 but which is useful for considering observed properties resulting from internal shocks).

Solution in the rest frame of shell S1
Equation ( 5) can be solved in the rest frame of region R1 to obtain the proper speed of the shocked fluid relative to frame 1 (see Appendix B for a full derivation) The solution in equation ( 6) is the general solution in the rest frame of region R1.It depends only on two parameters, namely the relative initial proper speed  41 and proper density contrast  of S4 and S1.
The upper and middle panels of Fig. 2 show the general solution of  21 and  43 , respectively, as a function of relative proper speed  41 and proper density contrast  .They correspond to each other upon reflection about the  = 1 line due to the symmetry mentioned above.The lower panel shows the ratio of the strengths of the reverse (Γ 34 − 1) and forward (Γ 21 − 1) shocks.It can be seen that the ratio is the mirror reflected about the  = 1 line, reflecting the symmetry of equation ( 5).For  = 1, the reverse and the forward shock strengths are equal and given by Besides, it can be seen that for  < 1 (e.g. as is the case in equal energy or mass collisions), the reverse shock is stronger than the forward shock strength.Additionally, it can be seen that for  41 ≪ 1, the shock strength ratio goes as  −1 and is independent of  41 .This can be understood as follows: for  41 ≪ 1, both shock fronts are Newtonian.Thus, one can use the approximation (Γ 21 , Γ 34 ) ∼ 1 in equation ( 5) to get,

Solution in the lab frame
In order to calculate the proper speed  of the shocked fluid in the lab frame, we need one more parameter -the proper speed  1 of S1 in the lab frame.The proper speed  of the shocked fluid in the lab frame can be obtained by the Lorentz transformation of equation ( 6) from the rest frame of shell 1 to the lab frame as Thus, while the general solution in the rest frame of region R1 depends only on ( 41 ,  ), the lab frame solution (which we refer to as the particular solution) depends on ( 41 ,  ,  1 ). Figure 3 shows particular solutions for a few illustrative cases.The shaded region in each panel shows the relevant parameter space for a few models of astrophysical transients that feature internal shocks.A detailed discussion of various internal shocks models for astrophysical transients is presented in § 5. From this point onwards all our analysis will be carried out in the lab frame.
The speed of the forward/reverse shock fronts are given by (see Appendix C for the full derivation) The time it takes the FS to reach the front edge of shell S1 ( FS ) and the RS to reach the rear edge of shell S4 ( RS ) are given by (see Appendix C , also see Sari & Piran 1995) The internal energy that is produced at the FS (RS), as it disipates the kinetic energy of the relative bulk motion of regions R1 and R2 (R4 and R3), resides in the shocked region R2 (R3) and over the shock crossing time  FS ( RS ) accumulates to (see Appendix D for the full derivation) The maximum bulk kinetic energy in region R2 (R3) at the shock crossing time  FS ( RS ) is given by (see Appendix D for a full derivation) The final radial width of region R2 (R3) at the shock crossing time  FS ( RS ) is given by (see Appendix E for full derivation) The FS and the RS produce internal energy in regions R2 and R3, respectively, resulting in non-zero pressures across the CD.As a result, region R3 performs a positive  work on region R2 across the CD.From equation (4b) (and from energy conservation) an equal amount of negative  amount of work is done by region R2 on Region R3.This  work leads to a transfer of energy from S4 to S1.In this setup, as viewed in the lab frame, the CD essentially acts as a piston which allows the pdV work done across it.The  work done by region R3 on region R2 by the RS shell crossing time  RS is given by (see Appendix F for the full derivation) The details of how the  work is re-distributed into the kinetic and the internal energy in region R2 are explored below.
Table 4 shows the time evolution of different quantities (in the lab frame).To illustrate the basic ideas we consider the collision of two shells of equal energy and radial width, moving with proper speeds ( 1 ,  4 ) in the lab frame.While there is a transfer of energy from shell S4 to S1, there is no mass transfer between them as no mass flows across the CD (equation (4a)).
To summarize, the collision produces two shock fronts (FS and RS), where the corresponding shocked parts of the shells (regions R2 and R3) are separated by a CD.The unshocked parts of leading and trailing shells are labeled 1 and 4, respectively.The shock fronts dissipate the available kinetic energy into internal energy and heat up the gas.For cold shells, the pressure (and internal energy) in regions R1 and R4 is zero, while the pressures in shocked regions R2 and R3 are non-zero.As is shown later, the non-zero equal pressure across the CD has very important consequences.We find that the  work done across the CD acts as an important mechanism of energy transfer from region R3 to R2.Note that all quantities involved vary linearly with time.This is a consequence of assuming a planar geometry.In § 5 we will discuss the limitation of our approach.

Shell S1 is at rest in the lab frame
When region R1 is at rest with respect to the central engine frame, the lab frame and the rest frame of region 1 are coincident and the proper speed of the shocked fluid is given by Equation ( 16) corresponds to the solution presented in Sari & Piran (1995) for an external shock scenario for semi-infinite shell S1 (  → ∞) and for ( 4 ,  ) ≫ 1.This scenario is an illustrative example of the possibility that the FS can dissipate internal energy higher than the initially available Table 4. Time evolution in lab frame of the various physical quantities of regions  = (1, 2, 3, 4).Here the quantities ( 2,int ,  3,int ) are defined in equations (12a) -(12b), ( k,2 ,  k,3 ) are defined in equations (13a)-(13b) and the quantities (Δ 2f , Δ 3f ) are defined in equations (14a)-(14b).The quantity  pdV,RS is defined in equation ( 15).In all these expressions we put the datum of zero at the time of collision  o = 0.
Here the leading shell is at rest.Thus, the initial available kinetic energy in shell S1 is zero,  k,1,0 = 0, and the entirety of the energy dissipated by the forward shock front in region R2 comes from the initially available kinetic energy in shell 4.This raises the important question what leads to this energy transfer from the trailing shell to the leading shell?The only possible source of energy transfer is the  work done by region R3 on R2 across the CD.The  work done goes towards increasing both the kinetic energy and the internal energy of region R2.Thus, the forward shock dissipates more energy than the initial available kinetic energy in the leading shell S1 and the internal energy dissipation occurs at the expense of energy transfer from S4 to S1 via  work across the CD (in particular from region R3 to R2).

Both shells are moving in the lab frame
In this case, the proper speed of the shocked fluid  is a function of three parameters ( 4 ,  1 ,  ), which is given by substituting equation (6) into equation ( 9).Here, we make use of the proper speed contrast  u where  4 =  u  1 , such that the proper speed of the shocked fluid is a function of the three parameters ( u ,  1 ,  ).In the next two subsections we present some key results for collision of shells moving at ultra-relativistic and Newtonian speeds, respectively.

Both shells move with ultra-relativistic speeds
For collision between ultra-relativistic shells ( 4 >  1 ≫ 1), the proper velocity of the shocked fluid is given by such that the shock strengths are given by while Let us consider the expression for the ratio of the initial kinetic energies of the two colliding shells Next we summarize certain key results at high proper speed contrast  u ≫ 1.The proper density contrast  for a collision between two equal energy or equal mass ultra-relativistic shells in the high proper speed contrast limit (  ≫ 1) given by The proper speed of the shocked fluid is ( u ≫ 1) The FS shock strength is given by ( u ≫ 1) The RS shock strength is given by ( u ≫ 1) The FS crossing timescale is given by ( u ≫ 1) The RS crossing timescale is given by ( u ≫ 1) The final radial width of region R2 post FS passage is given by The final radial width of region R2 post RS passage is fixed for relativistic reverse shock ( u ≫ 1) Fig. 4 shows the hydrodynamical shock parameter space for the collision of two ultra-relativistic shells of equal initial radial widths ( = 1).In all panels equal energy, equal mass, and equal proper density shells are shown by the black dot-dashed line, black dashed line, and a grey line, respectively.In the low proper speed contrast limit ( u − 1 ≪ 1), the  = 1 collision is the asymptotic limit for the equal energy, and equal mass shell collision.This is due to the fact that at low proper speed contrast the ratio of the Lorentz factor of both shells tends to unity.This can be seen directly from equation ( 19).In fact, the scaling in equation ( 20) is a reasonable approximation even for  u − 1 ≪ 1.
Next, let us consider the trend as we move from the equal energy collision towards  = 1 at the high proper speed contrast  u ≫ 1 limit.Equation ( 20) for  = 1 shows the proper density contrast  ≈  −2 u ≪ 1 for equal energy and  ≈  −1 u ≪ 1 for equal mass.The consequence is reflected in panel (a) of Fig. 4. It shows that the FS strength for the equal energy collision approaches a constant, almost Newtonian value of Γ 12 −1 = 2 −3/2 3−1 ≈ 0.0607 for  u ≫ 1, while for the equal mass case it gradually increases with   (asymptotically as for extremely high  u values), and is typically mildly relativistic.Panel (b) shows that the RS for both is typically relativistic, but the strength of the RS is stronger for equal energy collisions than equal mass collisions.Asymptotically, for   ≫ 1, we have Γ 34 −1 ≈ 2 −3/2  u for the equal energy case and Γ 34 −1 ≈ 1 2  3/4 u for the equal mass case.We note that panels (a) and (b) are exact mirror images of each other, symmetric to reflection about the  = 1 line (  → 1/  ).This arises for the following reason.Since  1 is fixed, the value of the relative proper speed between the two shells.Now, the strength of the two shocks depend only on  41 and on the proper density ratio of the two shells,  =  ′ 4 / ′ 1 .This problem is symmetric to relabeling of the shells (1 ↔ 4, RS ↔ FS and  ↔ 1/  ), such that for the same value of   (and therefore  41 ) Γ 34 − 1 for a given proper density contrast  must equal Γ 21 − 1 for a proper density contrast 1/  , and that is the origin of this mirror symmetry.
This induces mirror anti-symmetry in Panel (c), where the shock strength ratio, Γ 34 −1 Γ 21 −1 , switches to its inverse value (i.e. its log switches sign) upon reflection about the  = 1 line (  → 1/  ).Panel (c) also shows that this shock strength ratio is higher for equal energy collision (≈  u /(3 − 2 3/2 ) for  u ≫ 1) compared to equal mass collision (≈  1/2 u for  u ≫ 1).In §3.2 we present a detailed breakdown of the shock hydrodynamics associated with the three scenarios.
Panel (d) shows that for equal energy collisions the RS front reaches the rear edge of shell S4 somewhat before the FS front can reach the front edge of shell S1 ( RS <  FS ).However, this trend is reversed for equal mass collision, while for  = 1 and   ≫ 1 we have  RS ≫  FS .The ratio of the crossing times varies by orders of magnitude, particularly between the top right corner, (  ,  u ) ≫ 1, and the bottom left corner, (  ,  u − 1) ≪ 1.The consequence of different shock crossing times for the two shells will be explored in § 3. Lastly, panels (e) and (f) show that as we move towards the  = 1 line from the equal energy collision, both the initial kinetic energy and the mass is dominated by the trailing shell S4.
Figure 5 shows the breakdown of the physical quantities as a function of time elapsed post-collision for the collision of two equal energy shells with proper speeds ( 1 ,  4 ) = (100, 500), which is shown by the black-filled circle on the black dot-dashed line in Fig. 4. Panel (a) of Fig. 5 shows that the lab frame internal energy density in the reverse shocked region is higher than that in the forward shock region, while the kinetic energy density in the forward shocked region is much higher than the kinetic energy density in the reverse shocked region, both of these arise since the RS is significantly stronger than the FS, and the two shocked regions have the same velocity and pressure.Panel (b) shows that the total energy (kinetic and internal) of the two shells is conserved at all times and is equal to its initial pre-collision value.However, while the total energy of both shells remains constant, their individual energies change with time -the energy in the trailing shell S4 decreases while the energy in the leading shell S1 increases.This illustrates the energy transfer via  work across the CD from region R3 of shell S4 to region R2 of shell S1.Panel (c) of Fig. 5 shows the rest mass in each individual shell remains constant, as there is no bulk flow of particles across the CD (e.g.equation ( 4a)).Lastly, panel (d) shows that although the FS is weaker than the RS, the lab frame compression ratio is larger for the forward shocked region R2 than the reverse shocked region R3.All physical quantities change linearly with time (also see Table 4), which is a consequence of assuming a planar geometry.
Lastly, we summarize the following important results for relativistic RS (Γ 34 ≫ 1) for one complete sweep of shell S4, i.e. at  o +  RS when the RS reaches the rear edge of shell S4 (see Appendix G): (i) at  o +  RS the lab frame radial width of region R3 is half of that of the initial radial width of shell S4 (Δ 3f ≈ 1 2 Δ 4,0 ).(ii) as relativistic RS implies  ≪  4 , at  o +  RS the bulk energy of region R3 becomes  k,4,0 (Γ − 1)/(Γ 4 − 1) ≈  k,4,0 / 4 ≪  k,4,0 or ∼  k,4,0 / u for  u ≫ 1, i.e. it becomes negligible.(iii) at  o +  RS the maximum energy that is dissipated at the RS is 2 3  k,4,0 , independent of the FS strength.The deficit energy of 1 3  k,4,0 is channeled by the  work done by the CD to the combination of (kinetic+internal) energies of the region R2.If the FS is relativistic, the  work is mostly channeled into internal energy increase and if it is Newtonian the  work done is mostly channeled into increasing the bulk kinetic energy.(iv) for  u ≫ 1, we have u  .Thus, for  >  −2 u , the combined available initial kinetic energy of both shells is dominated by the kinetic energy of shell 4. In particular, for  = 1, almost all the available kinetic energy is in shell 4.
To summarize, for a collision of equal energy and equal mass ultrarelativistic shells, the reverse shock is relativistic.However, for equal initial radial width of both shells, if the shells have equal energy the reverse shock finishes crossing the trailing shell S4 before the forward shock can finish crossing the leading shell S1, while the trend is reversed for a collision of equal mass shells.
In the next subsection, we consider the collision of two Newtonian shells and then compare it to the results obtained in this subsection.

Both shells are moving with Newtonian velocities
For collision between shells moving with Newtonian velocities, i.e.  1 <  4 ≪ 1, the proper speed of the shocked fluid is given by such that and the shock strengths are given by This shows that both shocks are Newtonian and using equations (29a)-(29b) we infer the ratio of the shock strengths, In order to gain physical insight we consider the density contrast  for collision between two equal mass and equal energy shells moving at Newtonian speeds ( 1 <  4 ≪ 1), Thus, we can use the approximation (Γ 21 , Γ 34 ) ≈ 1 in equations ( 14a)-(14b), to obtain the shock crossing timescales ( FS ,  RS ), where  1 is the pre-collision speed of shell S1, leading to a ratio of shock crossing times (for  1 <  4 ≪ 1), where we have used equation ( 32) to eliminate the dependence on  in the second and the third line.As both shocks are Newtonian, the final radial width after shock passage can be obtained by substituting (Γ 21 , Γ 34 ) ≈ 1 in equations ( 14a)-(14b), Thus, both shells have the same lab frame shock compression ratio, which is the familiar Newtonian strong shock compression ratio of 4 (as the lab frame densities approach the comoving ones in the Newtonian limit).Fig. 6 shows the hydrodynamical parameter space for a collision of Newtonian shells with equal initial radial width ( = 1).In all panels the equal mass collision coincides with the  = 1 line at both low and high proper speed contrast.This is because for Newtonian velocities, the Lorentz factor is always very close to unity, such that the lab frame number density equals the comoving number density.Thus, shells of equal mass and radial width have not only equal lab frame density but also equal proper density (  = 1).Panels (a) and (b) show that both shocks are Newtonian (as seen, e.g., from equation ( 30)).Moreover, panels (a), (b) and (c) show the same mirror symmetry properties about the  = 1 line (  → 1/  ) as the corresponding panels in Fig. 4. Panel (c) shows that while both shocks are equally strong for equal mass collision (at both high and low proper speed contrast), for equal energy collision the reverse shock is stronger at high proper speed contrast, and the ratio of the shock strengths depends inversely on the proper density contrast  .Panel (d) shows that the shell crossing times are equal for the equal mass collision (see equation ( 34)).For the equal energy collision the RS finishes crossing before the FS ( RS <  FS ).Panel (e) shows that for equal mass collision the total initial kinetic energy is dominated by the kinetic energy in shell S4.Panel (f) shows that for equal kinetic energy collision the mass in shell S4 is much less than that in shell S1.
Before concluding this subsection, we want to emphasize the difference between collision of shells moving with Newtonian and ultrarelativistic speeds.As a particular illustrative example, we consider the collision of two equal mass shells and equal initial radial widths ( = 1).For Newtonian shells  = 1 implies  = 1 at both low and high proper speed contrast limit, since for Newtonian velocities the lab densities are equal to the comoving densities.It is to be noted that for ultra-relativistic speeds, the  = 1 is attained only in low proper speed contrast limit.
To summarize, for the collision of two shells moving with Newtonian velocities, both shock strengths are naturally Newtonian.However, for an equal energy collision the reverse shock is stronger than the forward shock and therefore reaches the rear edge of shell S4 before the the forward shock can reach the front edge of shell S1.The same is true for the collision of ultra-relativistic shells considered in the previous subsection.
Panels (d) of Fig. 4 and Fig. 6 show that the ratio of shock crossing times,  RS / FS , varies significantly over a wide parameter space.This begs the question as to what happens when one of the shock fronts reaches the edge of its respective shell before the other can.As we will see, this is an important consideration for the total energy dissipated at both shocks.Equations ( 12a)-(12b) provide the internal energy dissipated assuming both shocks manage to reach the edge of their respective shells.In the next section, we pursue this question of whether each shock can complete crossing its shell or whether some other process hinders it.

LIMITS ON KINETIC ENERGY DISSIPATION DUE TO RAREFACTION WAVES
In the next subsections, we motivate the need for the inclusion of rarefaction waves in our analysis and explore limits on the energy dissipation by the shock fronts.We provide in-depth analysis for equal proper density, equal kinetic energy, and equal mass collisions.

The need for a rarefaction wave
In the previous section, we saw that in general  RS ≠  FS .In order to derive physical insight, we consider an "external" shock scenario where shell S1 is at rest while its radial width is semi-infinite such that the reverse crossing timescale  RS is finite while the forward crossing time  FS is infinite.Now, consider the situation when the reverse shock reaches the edge of shell S4.If no additional process kicks in beyond this instant, the CD continues to perform  work indefinitely and as a consequence, the forward shock front will also continue to dissipate energy indefinitely.But clearly, this is unphysical as the  work done by CD comes at the expense of  kin,4,0 which is finite.So what happens physically is that once the RS reaches the edge of shell S4, it produces a high pressure at its matter-vacuum interface and a rarefaction (hereafter rf) wave is launched toward the CD.The head of the rarefaction wave moves at the local sound speed relative to the fluid into which it propagates.Once the head of the rf wave reaches the CD, it leads to a drop in pressure, and hence the  work done also decreases until the head of the rarefaction wave catches up with the forward shock front.At this point, the FS quickly weakens and its subsequent energy dissipation is severely suppressed.A rf wave is an inevitable consequence of the finite width and energy of the shell(s).
During the propagation of the rf wave from the edge to the CD, the  work continues to be done at the CD, but since it is done at the expense of the energy in the region R3, the latter decreases (by the rf wave).Thus, a fraction of the internal energy dissipated by the reverse shock is reprocessed into the (bulk+internal) energy of region R2.Table 5 summarizes the quantities required for analysis of rf wave propagation.Fig. 7 shows a particular case for collision of two equal energy shells of equal initial radial width ( = 1).As shown in § 2.4.1 for equal energy collision the RS reaches the rear edge of shell S4 before the FS reaches the front edge of shell S1.After the RS reaches the edge of S4, a rf wave is launched towards the FS.The case is reversed for equal mass collision where the FS reaches the front edge of S1 before the RS can reach the rear edge of S4 (see expanded discussion in § 3.2.Panel (d) in Figs. 4 and 6 show that in a wide parameter space the shell crossing timescales are significantly different.This points to the possibility that the rf wave can catch up with the shock front with the longer crossing timescale and halt the internal dissipation.Below we explore the parameter space where the rf wave can cross the CD and catch up with the shock front with the longer crossing timescale, before the latter reaches the edge of the corresponding shell leading to a halting of the energy dissipation by that shock.
In Table 6 we summarize 5 critical lines (L1-L5) in time.As shown in the Appendix H, the lines L1-L5 in time can be inverted to define five critical ratios of the initial radial width of shell S1 to shell S4 as  cX where  = (1, 2, 3, 4, 5) are summarized in Table 7.The five critical ratios  cX can be used to define six different cases: • Case I ( >  c1 ): shell S1 is partially shocked; the forward (+) rf wave catches up with the FS front before reaching the front edge of shell S1, and the shocked fraction of S1 is given by • Case II ( c1 <  <  c2 ): the FS front reaches the edge of S1 after the forward (+) rf wave reached the CD but before it reaches the front edge of S1 (i.e. when its head is propagating into region R2).
• Case III ( c2 <  <  c3 ): the FS front reaches the edge of S1 before the forward (+) rf wave reaches the CD (i.e. when its head is propagating into region R3).
• Case IV ( c4 <  <  c3 ): the RS front reaches the rear edge of shell S4 before the backward (−) rf wave reaches the CD (i.e. when its head is propagating into region R2).
• Case V ( c5 <  <  c4 ): the RS front reaches the rear edge of shell S4 after the backward (−) rf wave reaches the CD but before it reaches the back edge of S4 (i.e. when its head is going into R3).
• Case VI ( <  c5 ): the shell S4 is partially shocked; the backward (−) rf wave catches up with the RS front before it reaches the rear edge of shell S4, and the shocked fraction of S4 is given by The dissipation efficiency into internal (or thermal -subscript 'th') energy, of the FS and the RS, can be expressed as where the weighting factors ( 2 ,  3 ) characterize the fraction of the shells (S1,S4) shocked by the forward/reverse shock front respectively.As discussed before, the shells (S1, S4) are completely shocked ( 2 = 1,  3 = 1) by the (forward, reverse) shock fronts except for case I where S1 is partially shocked ( 2 < 1), and case VI where S4 is partially shocked ( 3 < 1).Thus, the energy dissipated by both shock fronts taken together is Note that equation ( 39) is an addition of  th2 and  th3 , which are estimated at two different times.Therefore, the internal energy dissipated by the RS can be reprocessed by the  transfer of work across CD from shell S4 to shell S1, where a part of it can be used by the FS front to dissipate internal energy in shell S1.As a result, the combined thermal efficiency as defined in equation ( 39) can also exceed unity (see discussion in subsection 3.5).However, this does not violate energy conservation as the internal energy dissipated by the two shocks are evaluated at different times.The usefulness of this definition is that if some fraction of the thermal energy can be converted to radiation, this efficiency will be a proxy for the radiated energy which is a measurable quantity.
Next, in order to gain physical insights we consider three scenarios of internal shocks and see how they map to the six cases, I-VI.The three scenarios correspond to the collision between (i) two equal energy shells ( k,1,0 =  k,4,0 ), (ii) two equal mass shells ( 1,0 =  4,0 ), and (iii) two equal proper density shells ( ′ 1 =  ′ 4 ⇔  = 1).For these scenarios, the ratio of the initial radial widths of the shells is taken to be unity,  = 1.
Fig. 8 shows the parameter space of ( 2 ,  3 ) (panel (a)) as well as  th2 ,  th3 and  th,tot =  th2 +  th3 (panels (b), (c) and (d)), for a collision of ultra-relativistic shells of equal initial radial width.The 5 critical lines (L1-L5) divide the proper density and proper speed contrast parameter space into six cases.It can be seen that equal energy collisions correspond to case III throughout, while equal mass collisions corresponds to case III at low proper speed contrast, but transition to case IV and V at moderate values of proper speed contrast and finally enter the case VI regime at very high values of proper speed contrast.The behaviour is similar for  = 1 collisions, except that they enter case VI already at more moderate values of proper speed contrast.

Collision between two ultra-relativistic shells at high proper speed contrast
In the following subsections we describe the physics of shock propagation for several cases of interest.The time taken by the rf wave (+) to reach CD from the back edge of shell S4  2rf+ The time taken by the rarefaction wave (+) to reach forward shock front starting from CD  3rf− The time taken by the rf wave (−) to reach RS starting from CD  2rf− The time taken by the rarefaction wave (−) to reach CD from front edge of shell S1

𝑊 pdV
The p dV work done by the CD against region 3 and on region 2  j,int The total internal energy dissipated in region   j,int,max The maximum energy that can be dissipated in region Table 7. Expression for the five critical initial radial width ratio that divides the  u −  parameter space into six cases

Critical lines
Expressions Figure 9 corresponds to this specific point in the phase space.
The proper speed of the shocked fluid reaches the asymptotic value  ≈ √ 2  1 .The strength of the RS is given by while the FS has shock strength Γ 21 − 1 ≈ 0.0607 ≪ 1.Thus, the RS is ultra-relativistic while the FS is Newtonian and independent of  u .Besides, the RS and the FS crossing timescales are given by and  FS ≈ 5 3 respectively.Thus, since Δ 1,0 = Δ 4,0 the RS reaches the rear edge of shell S4 before the FS reaches the front edge of shell S1.After the RS reaches the rear edge of shell S4, region R4 no longer exists.The final radial width of the region R3 is Δ 3f ≈ 1 2 Δ 4,0 (see Appendix G). .After the RS reaches the rear edge of shell S4, a forward propagating (+) rf wave is launched.Since the strength of the RS is ultra-relativistic, the co-moving sound speed in region R3 reaches the asymptotic value  ′ s3 → 1/ √ 3. The speed of the head of the rf wave in the lab frame is The time taken by the (+) rf wave to reach the CD is given by Since,  3rf+ + RS = 2.37 RS >  FS , the forward shock front reaches the front edge of shell S1 before the forward propagating (+) rf wave reaches the CD.This corresponds to case III (see §3.1).Thus, the weighting factors are ( 2 ,  3 ) = 1.The internal energy dissipated by the FS and the RS are given by The RS dissipates internal energy ∼ 4.7 times more efficiently than the FS.The thermal efficiencies of the FS and the RS front are given by  th,2 ≈ 0.071 ,  th,3 ≈ 0.33 .
Next, we can look at the kinetic energies of the shells after one complete sweep by the RS and the FS: Thus, after the RS sweeps through shell S4, the kinetic energy of region R3 is negligible compared to the initially available kinetic energy ( k,4,0 =  k,0 ) in S4.However, the kinetic energy of region R2 after one complete sweep of shell S1 by the FS is ∼ 1.41 times higher than the initially available kinetic energy ( k,1,0 =  0 ).Next, we can estimate the total energies in regions R2 and R3 after one complete sweep by the FS and the RS, respectively, as Thus, the passage of the FS increases the net energy of shell S1 by ∼ 0.55 0 , which ultimately comes from region R3 to region R2 via  work across the CD.It can be estimated explicitly as follows.The Besides, the final radial widths (Δ 3f , Δ 2f ) of the regions (R3, R2) after a full sweep of shells (S4, S1) by the (RS, FS) are Δ 3f ≈ Δ 0 2 and Δ 2f ≈ Δ 0 6 (see §2.4.1).Thus, the lab frame compression ratio for the FS is higher than for the RS by a factor of three.
Notice that the sum total energies of the shells after a complete sweep by both shock fronts (∼ 2.22 0 ) is more than the initially available kinetic energy of both shells (2 0 ).However, this does not violate energy conservation as the energies of the two shells are evaluated at different times, and part of the energy of region R3 at  o +  RS is transferred to region R2 by  o +  FS through the  work across the CD.
Fig. 9 shows that the internal energy in region R3 (in shaded red) remains larger than that in region R2 (in shaded blue) at any instant, even at  o +  FS when the FS has completely swept through shell S1.
To summarize, the collision of two ultra-relativistic shells of equal radial width launches a relativistic RS and a Newtonian FS.The RS reaches the rear edge of shell S4 before the FS reaches the front edge of shell S1.Thereafter, a forward (+) propagating rf wave is launched towards CD, but before it can reach the CD the FS reaches the front edge of shell S1.From the launch of the FS till it finishes crossing shell S1 around 55% of the initially available kinetic energy in shell S4 is transferred to shell S1 via  work from region R3 to region R2.The FS reprocesses the  work done into both accelerating and increasing the internal energy of the material in region R2.Since the FS is Newtonian, the  work done is used in primarily increasing the kinetic energy of region R2.The thermal efficiency of the FS and the RS is ∼7% and ∼33%, respectively, corresponding to a total thermal efficiency of ∼40%.Thus, the RS dissipates internal energy almost five times more efficiently than the FS.This is despite the  transfer of work from shell S4 to S1.The reason being the RS is ultra-relativistic and very strong compared to the FS.

Two equal mass and radial width ultra-relativistic shells
From subsection 2.4.1 for the collision of equal mass shells ( 1,0 =  4,0 ), equal radial widths ( = 1) and large proper speed contrast (  ≫ 1), the proper density contrast is given by  ≈ 1  u and the proper speed of the shocked fluid is given by  ≈  2 , which shows that the RS is relativistic while the FS can be mildly relativistic.
The forward and the reverse crossing timescales are given by which shows the FS reaches the edge of shell S1 before the RS can reach the edge of shell S4.Since  RS ∝  1/2 u , it is not surprising the RS is halted at higher values of proper speed contrast as it provides sufficient time for the (−) rf wave to catch-up with it.

Collision of two equal proper density ultra-relativistic shells
From subsection 2.4.1 for  = 1 the proper speed of the shocked fluid is given by ≈ √  u  1 and the shock strengths of both shock fronts are equal.For ultra-relativistic shells ( 4 >  1 ≫ 1) with very high proper speed contrast (  ≫ 1), or altogether  4 ≫  1 ≫ 1, both shocks are ultra-relativistic as well, The ratio of the initially available kinetic energies in both shells is showing that almost all the initial kinetic energy resides in shell S4.
The reverse crossing timescales are given by which shows that for Δ 1,0 = Δ 4,0 ( = 1), we have  RS = 1 2  u  FS .Thus, for equal initial radial widths, the FS reaches the front edge of shell S1 much earlier than the RS can reach the rear edge of shell S4.The final radial width of the region R2 at  o +  FS is This shows that for  u ≫ 1, the radial width of S1 is drastically reduced by the passage of the FS.Since the FS is ultra-relativistic the comoving sound speed in region R2 reaches the value  ′ s2 → 1/ √ 3. The speed of the backward (−) propagating rf wave is given by The time it takes the backward propagating rf wave to reach the CD is Thus, the (−) rf wave reaches the CD in ∼18% of the FS crossing timescale.This is due to the drastically compressed radial width of shell S1 post-FS passage.Since the strengths of both shocks are equal, so is the sound speed at regions R2 and R3, ( 3rf− =  2rf− ).
At the instant the (−) rf wave reaches CD, the separation between the CD and the RS is given by Δ 3 = Δ 3f ( FS +  2rf− )/ RS where Δ 3f ≈ 1 2 Δ 4,0 is the (hypothetical) width of region R3 upon complete crossing of S4 by the RS (which is prevented by the (−) rf).The time taken by the (−) rf propagating into region R3 to catch up with the RS is (52) Thus, the (−) rf wave propagating into region R3 catches up with the RS in around 68% of  FS .The fraction of mass in shell S4 swept by the RS before it is halted is given by which shows the RS is halted by the backward propagating rf wave very close to the CD.The shocked fraction  3 must be an invariant in all frames of reference (as shown in Eq.I20-21 of Appendix I where the analysis has been performed in the CD frame.) The internal energy generated at the FS and RS, with weighting factors  2 = 1 and  3 = 3.73/ u , respectively, are given by Thus, the thermal efficiency for the relativistic FS and RS ( u ≫ 1) for a collision of two equal proper density and radial width shells is given by To summarize, for  = 1 collision while both shock fronts are relativistic, the thermal efficiency for both shock fronts is much less than unity.The RS persists till timescales ∼ 1.87 times that of the FS crossing timescale.

Comparison of dissipated energy with plastic collision case
Out of convenience and simplicity, the collision of two shells is often approximated as a plastic collision of two infinitely thin shells (e.g.Kobayashi et al. 1997;Daigne & Mochkovitch 1998;Guetta et al. 2001;Kobayashi & Sari 2001;Tanihata et al. 2003;Barraud et al. 2005;Granot et al. 2006;Suzuki & Kawai 2006;Krimm et al. 2007;  10 where the combined efficiency of both shocks is equal to unity.Note the contour plot is linear in scale.Jamil et al. 2010).In this case, the merged shell's Lorentz factor is where Γ 41 = Γ 1 Γ 4 (1 −  1  4 ) and the total initial and final kinetic energies are the internal energy produced by the collision is dissipated, and the thermal efficiency is given by For ultra-relativistic shells ( 4 >  1 ≫ 1), the thermal efficiency is given by which for high proper speed contrast ( u ≫ 1) approaches 100% for equal masses, but only 1 − 1/ √ 2 ≈ 29.3% for equal energies.Fig. 12 compares the thermal efficiency estimated from plastic collision and that estimated from shock hydrodynamics.The top panel shows that for collisions of equal energy and equal mass ultrarelativistic shells at low to moderate values of proper speed contrast  u , the hydrodynamic efficiency is ∼ 1.3 times higher than the plastic collision efficiency.At higher  u , the trend continues for equal energy shells and the hydrodynamic efficiency saturates at ∼ 40%.For equal mass shells, however, the overall hydrodynamic thermal efficiency reaches a maximum of ∼ 50% and then starts decreasing monotonically at around  u ∼ 10.This is because at higher  u ≥ 10, the shell S4 which carries most of the initial available energy is only partially shocked due to (-)rf wave catching up with RS.The dotted green line shows the trend if rf propagation were not taken into account.Thus, we have a stark contrast for equal mass collision between the plastic approach which predicts ∼ 100% thermal efficiency at large values of Comparison of the overall thermal efficiency between the ballistic approach and the hydrodynamic approach for  = 1.The magenta, green and orange lines represent collision between equal energy, equal mass and equal proper density shells.Top: The collision of two ultra-relativistic shells with  1 = 10 2 .The dashed magenta and green lines represent the thermal efficiency from the plastic collision approach (equation ( 60)).The solid lines represent the overall hydrodynamic efficiency (after accounting for rf wave propagation) .The dotted lines represent the overall hydrodynamic efficiency if rf wave propagation are ignored.Bottom: The collision of two Newtonian shells with  1 = 10 −3 .The black dashed line represents the thermal efficiency (which is the same for equal energy and equal mass Newtonian shells) from the plastic collision approach (equation ( 61)) (see text for details).
u and the hydrodynamic approach which limits it at around ∼ 50%.Due to partial shocking of S4, for collision of equal proper density shells, the overall hydrodynamic efficiency is capped at ∼ 10% at very moderate  u ∼ 3.This is because for  = 1, almost the entire initial kinetic energy is in S4.
For plastic collision of two equal energy and equal mass shells moving with Newtonian velocities , the thermal efficiency is given by which shows that for both equal mass and equal energy plastic collision, the thermal efficiency cannot exceed 50%.The bottom panel of Fig. 12 represents collisions of Newtonian shells.For equal energy shells, there is partial shocking of shell S1 for  u ≥ 2 and the overall thermal efficiency is capped at ∼ 50% at high  u .The plastic approximation closely follows the overall thermal efficiency of equal energy shells and is ∼ 1.2 times higher than the overall hydrodynamic efficiency for equal mass shells.

The upper limit on thermal efficiency
The purpose of this subsection is to investigate whether the combined thermal efficiency of both shocks can significantly exceed unity for planar shocks.The best-case scenario for this to happen is for  = 1, for which the strength of both shock fronts are equal, and for ultrarelativistic shells ( 4 >  1 ≫ 1) of high proper speed contrast (  ≫ 1), they are both relativistic.However, despite this we saw in § 3.2 that the combined thermal efficiency is still negligible, because of two factors.Firstly, the FS crossing timescale is much shorter than that of the RS,  FS ≪  RS .The energy of region R2, which is mostly internal, comes primarily from  work by region R3 across the CD.In time  RS , about one-third of  k,4,0 could be transferred from S4 to S1.But since  FS ≪  RS for  = 1, a negligible fraction of this transfer actually takes place, leading to a negligible FS thermal efficiency.Secondly, the radial width of region R2 reduces drastically due to shock compression, allowing the backward propagating rf wave to very quickly catch up with the RS.As a consequence, much of the material in the shell S4 remains unshocked, leading to a very low RS thermal efficiency.
If we allow for the condition  ≥  3 (see §3.1), the thermal efficiency by the RS can attain the maximum value  th,3 =  th,max = 2 3 .Thus, next, we need to find the cases for which  th,2 can be maximized.Since for (  = 1,  u ≫ 1) we have which shows that the total initially available energy is entirely in shell S4  k,0 =  k,1,0 +  k,4,0 ≈  k,4,0 .For  c3 ≤  ≤  c1 , the weighting factor ( 2 ,  3 ) = 1 and we have and for  >  c1 we have the limiting value for the total thermal efficiency as where we have used the definition of  2 =  1 /.The initial ratios of the radial widths,  = (  c3 ,  c2 ,  c1 ), can be estimated by equating  FS to ( RS ,  RS +  3rf+ ,  RS +  3rf+ +  2rf+ ) where which gives (  c3 ,  c2 ,  c1 ) ≈ (0.50, 0.90, 1.25) u .These values when substituted in equation ( 63) give and  tot,th < 1.51 for  >  c1 To summarize, the combined thermal efficiency of both shock fronts can exceed unity for  = 1 only if the forward shock front persists longer than the RS front.The longer time allows a greater amount of the  work to be transferred from shell S4 to S1.However, the combined thermal efficiency saturates at a maximum value of 1.5.All our estimates are based on assuming a planar geometry.The limitation of our approach is discussed in the next section.

LIMITATIONS OF OUR ANALYSIS
The following assumptions have been made in the course of our analysis.Firstly, we have used the planar geometry approximation.Under this approximation, all physical quantities remain homogeneous and unchanged in regions (R1, R2, R3, R4).The planar approximation breaks when the radius reaches about twice its value at  o , i.e. at  ≳ 2 o .Beyond this, spherical geometrical effects need to be taken into account.In spherical geometry, the proper speed of the shocked fluid in regions R2 and R3, remains continuous across the CD but develops a radial profile in proper speed with a positive gradient in the radially outward direction.As an illustrative example, we consider the collision of equal energy ultra-relativistic shells of equal initial radial width.Since both shells are ultra-relativistic, the assumption of equal initial radial width is similar to assuming equal ejection timescale  on for both shells.The collision radius  o is given by such that the radius doubles in a lab-frame time From equations ( 25)-( 26) for collision of equal energy shells at  u ≫ 1, we have  FS = 5 3  RS = 5 3 (2Γ 2 1  on ).Requiring  2R =  FS gives  off ∼ 5 3  on , which if satisfied means the planar assumption is approximately valid till the time FS takes to reach the edge of shell S1.Secondly, we have assumed that there is no spread in the proper speed of the shells S1 and S4.For ultra-relativistic shells, if there is a spread in the Lorentz factor of the shells, their radial width Δ increases compared to its initial value Δ o as the shells move away from the central engine such that Δ ∼ Δ o + /Γ 2 for a spread ΔΓ ∼ Γ, and the shell increases its radial width significantly at a radius  Δ ∼ Δ o Γ 2 .For a small proper speed spread, ΔΓ/Γ ≪ 1, we have Δ ∼ Δ o + ΔΓ/Γ 3 and  Δ ∼ Δ o Γ 3 /ΔΓ.Besides, one could also consider a realistic situation where the source power and asymptotic LF smoothly varies with ejection time, leading to spontaneous formation of shocks whose strength varies with radius.This will be explored in a follow-up work.Thirdly, we have assumed no radiative losses in our analysis.We have assumed that total energy post-collision is the summation of kinetic and internal energy only.Lastly, we have assumed cold shells.Pe'er et al. 2017 pointed out that if the shells were to be hot, then no shocks would be generated if the proper speed contrast does not exceed a critical value.We note, however, that in spherical geometry the shells cool adiabatically on the radius doubling time, so they are expected to greatly cool before reaching  o , and also significantly cool between subsequent collisions.
In the next section, we explore a few representative astrophysical scenarios where our analysis can be applied to understand some generic features.

APPLICATION TO FEW REPRESENTATIVE CASES
In the following subsections, we explore the internal shocks parameter space for several astrophysical scenarios.In each subsection, we briefly introduce the model associated with the astrophysical transient and then make some general remarks.

GRB prompt emission internal shocks model
One of the leading models for producing the extremely bright, shortlived and highly time-variable prompt -ray emission in GRBs features internal shocks.The latter may naturally arise from timevariability in the central source's activity that leads to variations in the asymptotic Lorentz factor (that is reached at large distances from the source) of the ultra-relativistic outflow that it launches.Faster pasts of the outflow catch up with slower parts and collide with them, each collision creating a pair of shocks: FS and RS.
The typical inferred parameter values in such prompt GRB internal shocks models are: 10 2 ≲  1 ≲ 10 2.5 , 10 −1 ≲   − 1 ≲ 10, 10 −0.5 ≲  ≲ 10 0.5 .While the prompt GRB emission is highly variable, consisting of multiple sharp spikes, when averaging over these spikes there is no clear temporal trend, e.g. the fluences in the first and second halves of the prompt GRB emission episode appear to be similar.This suggests an approximately constant power of the outflow emanating from the central engine during its activity period.The time between pulses in the prompt GRB lightcurve is typically comparable to the pulse widths, suggesting that  off ∼  on (see Nakar & Piran 2002).This suggests that shells are ejected with roughly similar kinetic energy at very short intervals.
For the collision of equal energy and equal mass shells moving at ultra-relativistic speeds, the RS is relativistic and dominates the thermal efficiency.At very large proper speed contrast  u , for collision of equal energy shells, the overall efficiency of ∼ 40 % while RS (ultra-relativistic strength) dissipates internal energy ∼ 5 times more efficiently than the FS (mildly sub-relativistic strength).For equal mass collision, the overall efficiency reaches a maximum of ∼ 50% and actually decreases at very high proper speed contrast due to partial shocking of the trailing shell S4.For equal mass collision, the RS is ultra-relativistic and FS is mildly-relativistic.The inferred prompt -ray efficiencies in GRBs, of order ∼ 15% (Beniamini et al. 2015), are consistent with these values, considering that there is a further efficiency reduction between dissipated energy and observed -rays.Recently, Rahaman et al. (2024) has shown that the variability in the lightcurves and the spectrum of GRBs can be explained when contributions from both shocked regions are taken into account.

FRB blastwave model
One class of fast radio burst (FRB) models involves synchrotron maser emission from relativistic outflows.There are different variants of this model.We discuss below two of these, which involve different types of shocks.

Model 1 of fast radio bursts
Model 1: (internal collisions between magnetar giant flare outflows) 10 1.5 ≲  1 ≲ 10 2.5 ,   − 1 ∼ 1, equal energy, refer to § 5.1 This model involves the collision of two ultra-relativistic shells at moderate proper speed contrast.Here at moderate values of  u ∼ 2, the RS is still stronger than the FS while the overall efficiency is ∼ 10%.We note that this efficiency reduction comes in addition to the already tiny estimated efficiency in this model resulting from: (i) the efficiency of converting shock heated plasma to maser radiation, (ii) the efficiency loss due to the requirement that the optical depth for induced Compton close to the peak of the observed spectrum should not be too large, (iii) the efficiency loss due to the requirement that the bursts could reproduce the high observed level of temporal and spectral variability and (iv) the efficiency suppression in magnetar models due to the fact that escaping outflow should be moving along open field lines (Metzger et al. 2019;Beniamini & Kumar 2020, 2023).

Model 2 of Fast radio bursts
This model proposed by Metzger et al. (2019) requires the collision of an ultra-relativistic shell S4 with a mildly relativistic shell S1.It has The initial kinetic energy of ejecta S4 10 43 − 10 45 erg  Ratio of  to  s 10 −3 the following set-up.The central engine injects a mildly relativistic wind of proper speed  1,w with a mass loss rate of  1 for time  on1 .
The material injected is uniformly spread up to a radius  s =  w  on1 .
Shortly afterward, the central engine injects an ultra-relativistic shell over a timescale  on4 with Lorentz factor Γ 4,ej and kinetic energy  k,4,GF .The collision takes place at a distance  ≪  s from the central engine such that we have where  s =  1,w  on,1 =  1,w  on,1 .The typical values of the parameters for this model are summarized in Table 8.The lab frame density of the wind (shell S1) for  ≪ 1 is given by The proper number density of the wind shell S1 is given by The proper number density of the ejecta shell S4 is given by Using equations ( 70)-( 71) the proper density contrast  can be expressed as where  8 = /10 8 = ( on1 /10 5 s)( on4 /10 −3 s),  −3 = /10 −3 ,  ej,43 =  k,4,0 /10 43 erg,  w,46 =  k,1,0 /10 46 erg = ( /10 21 g/s)( on1 /10 5 s) 2 ,  w,−0.3 =  1,w /0.5 and Γ ej,2 = Γ 4,ej /100.This case corresponds to the external shock scenario wherein the forward shock is relativistic.Since the FS shock strength is ultrarelativistic almost all the initially available energy in shell S4 is reprocessed into the thermal energy of shell S1.However, the radiated energy can be much lower due an efficiency of converting only a fraction of the internal energy into energy of non-thermal electrons.This is in addition to the efficiency factors alluded to in the previous subsection.

Deceleration of ejecta from SLSN by collision with a pre-ejected massive shell
Superluminous Supernova(SLSNe) are the brightest among corecollapse supernova.In a matter of few months, the radiated energy is close to ∼ 10 50 − 10 51 ergs, comparable to the kinetic energy of associated with standard supernova explosion ∼ 10 51 ergs.This in turn requires that the kinetic energy of explosion be turned into radiation very early on and very efficiently.To achieve the same, interaction powered models (see Moriya et al. 2018) have been proposed involving the collision of two shells moving at Newtonian velocities.In this model, a massive progenitor star suffers two episodic instability events spaced a few years apart.In the first event it ejects a massive shell  4,0 ∼ few ×  ⊙ at speeds of ∼ 10 3.5 km/s.A few years later, in a second episodic event another less massive but faster shell is ejected.The second shell has comparable kinetic energy to the first shell.Typical values of the parameters of this model are summarized in Table 9.The proper density contrast  is given by In this case, while RS tends to be stronger, the thermal efficiencies associated with both shock fronts are comparable ∼ 25%.

Deceleration of magnetar Giant flare by bow-shock shell
This model involves the collision of a mildly-relativistic ( 4 ∼ 1; Gaensler et al. 2005;Gelfand et al. 2005;Granot et al. 2006)   The time taken for shell 4 to be ejected 10 −0.5 s The typical particle number density in ISM 1 cm −3  1,bS Number density in bow-shock shell 4 is as follows: In pulsars most of the spin-down power is carried by an ultra-relativistic MHD wind ( w ≈  sd ).The pulsar itself has a systemic velocity  NS ∼ 10 2.5 km/s relative to the ISM (Hobbs et al. 2005;Shternin et al. 2019;Long et al. 2022).The pulsar wind interacts with the ISM leading to the formation of a bow shock shell.
The lab frame is identified with the bow shock shell.In the lab frame, the steady state radius of the bow shock shell is determined by the balance of the ram pressure due to pulsar wind and the ram pressure due to ISM.During a flaring event, the magnetar gives rise to a giant flare, ejecting an outflow on timescales of ∼ 10 −0.5 s of (isotropic equivalent) kinetic energy  k,4,GF , which can then collide with the bow shock shell.The typical parameters for this model are summarized in Table 10.The radius of the (head of the) bow shock shell can be obtained by equating the ram pressure due to ISM ( 2 NS ) and the pulsar wind ( sd /4 2 bs ) as where  o = /(1 cm −3 ),  NS,2.5 =  NS /(10 2.5 km/s) and  sd,34.5 =  sd /(10 34.5 erg/s).
The initial radial width of the giant flare shell S4 is given by Δ 4,0 =  4  on4 .If this shell has a Lorentz factor spread ΔΓ 4 ∼ Γ 4 , then by the time it (S4) reaches the bow shock shell (S1), its radial width has expanded to where Ψ is a factor of order unity.
The lab frame density of Giant flare shell 4 can be estimated as The comoving density of Giant flare shell 4 can be estimated as For the comoving particle density in the bow shock we can use since  1,bs = 0 and the shock compression ensures that the particle density in the bow shocked region is four times the external density (for a Newtonian strong shock).Using equations ( 77)-( 78) the proper density contrast can be estimated as which for Γ 4 ≫ 1 approaches where  GF,46 =  k,4,GF /(10 46 erg) is the isotropic equivalent energy of the shell ejected during the giant flare, and generally.Equation ( 79) shows that for Γ 4 ≫ 1, the proper density contrast is roughly equal to the ratio of the kinetic energy in the giant flare to the rest mass energy of the ISM mass within a sphere of radius  bs , which is roughly the isotropic equivalent mass of the bow shock shell,  1 .
Figure 13 shows the hydrodynamic thermal efficiency of the collision for log 10 (  ∞ ) = −2.5, −1.5, −0.5, 0.5.It demonstrates that  ∞ ≪ 1 is required for high thermal efficiency ( th,tot ≳ 0.5) with a relativistic outflow ( 4 ≫ 1).For  ∞ ≪ 1, the thermal efficiency becomes limited by partial shocking of S1 at lower  4 and partial shocking of S4 at higher  4 .As  approaches unity, the thermal efficiency decreases drastically as the rf wave catches up with RS very close to the CD.It must be noted that in order to get the observed radiation the thermal efficiency must be multiplied by additional efficiency factors related to conversion of internal energy to observed radiation.The elaborate observation of the 2004 giant flare from the Galactic magnetar SGR 1806−20 imply  4 ∼ 1 and  ∼ 100 (Gaensler et al. 2005;Gelfand et al. 2005;Granot et al. 2006), implying a low thermal efficiency ( th,tot ∼ 10 −2 ), which is nonetheless consistent with the observations of this event.As observations imply  sd,34.5 ≈ 1 over the relevant timescale before the giant flare (Woods et al. 2007), the required  ∼ 100 suggests a fairly high systemic velocity for this source,  NS ∼ (1 − 1.5) × 10 3 km/s, which is again consistent with observations.

CONCLUSIONS
The objective of the present work was to provide a comprehensive self-consistent framework for characterizing the dynamics of shock propagation for collision between two cold shells.We find the reverse shock to be a leading candidate for internal energy dissipation for a generic parameter space for astrophysical transients.We find that the overall thermal efficiency at higher proper speed contrast is majorly affected by the rarefaction waves catching up the shock fronts and halting further dissipation of internal energy.This is not captured by the plastic collision approach which instead predicts unrealistically very high values of thermal efficiency at these limits.The analytical parameter space presented here will be useful for calibrating more computationally expensive hydrodynamical simulations.
which can be solved for  21 as

APPENDIX C: ESTIMATING SHELL CROSSING TIMESCALES
The velocity for the forward shock front in the lab frame can be estimated by equating the rate at which particles are being added to region R2 and are being lost from region R1.Let A be the planar area (which remains constant for our planar geometry).If  2 is the rate at which particles are added to region R2 and  1 is the rate at which particles are being lost from region R1, then we have The equation (C1) can be simplified using the BM76 shock condition  ′ 2 / ′ 1 = 4Γ 21 and noting (Γ 2 ,  2 ) = (Γ, ) to give Using equations ( C1)-(C2) the time it takes for the forward shock front to cross the radial width Δ 1,0 is given by Similarly, the velocity for the reverse shock front in the lab frame can be estimated by equating the rate at which particles are being added to region R3 and are being lost from region R4.If  3 is the rate at which particles are added to region R3 and  4 is the rate at which particles are being lost from region R4 , then we have The equation (C4) can be simplified using the BM76 shock condition  ′ 3 / ′ 4 = 4Γ 34 and noting (Γ 3 ,  3 ) = (Γ, ) to give Using equations (C4)-(C5) the time it takes for the reverse shock front to cross the radial width Δ 4,0 is given by

APPENDIX D: ESTIMATING THE MAXIMUM KINETIC ENERGY AND THE INTERNAL ENERGY ASSOCIATED WITH THE SHOCKED REGIONS
The energy-momentum tensor is given by where the enthalpy  and the pressure  in the comoving frame is given as Equating equations (E1) and (E2) gives Using similar arguments, we can estimate Δ 2f , radial width of region R2 after one complete sweep of the trailing shell by the reverse shock as

APPENDIX F: ESTIMATING THE TRANSFER OF 𝑝𝑑𝑉 WORK ACROSS THE CONTACT DISCONTINUITY
The rate of pdV transfer of work from shell S4 to shell S1 can be estimated as The internal energy density  ′ int,3 can be expressed as where in the last line we have used the relation  4,0 = AΔ 4,0 .
Using equation (F2) in equation (F1) we have Next we can evaluate the pdV work done in time  RS as

APPENDIX G: USEFUL RESULTS FOR COLLISION OF ULTRA-RELATIVISTIC SHELLS
For ultra-relativistic shells, we have (see Sari & Piran 1995) Using equation (G1) in equation (D14) gives, Using equation (G1) in equation (C6) the time taken for complete sweep of shell 4 by the relativistic reverse shock front is given by Using equation (G1) in equation (F4) the rate of pdV work done for relativistic reverse shock can be estimated as Multiplying equation (G3) and equation (G4) the pdV work transferred during one complete sweep by the relativistic reverse shock is given by Using equation (E4) the final width of shell 4 after one complete sweep by the relativistic reverse shock is given by Next we can evaluate the time taken by the + rarefaction wave to reach CD starting from the edge of shell S4 given by The quantity in the denominator of equation (G7) can be estimated as where in the last step we have used the sound speed in the comoving frame to be which is true for relativistic reverse shock.Using equation (G8) in equation (G7) we obtain The pdV work done from the launch of + rf till the head of rf wave reaches CD is given by Using equation (G5) and equation (G10) we can put a limit on the pdV workdone from the onset of collision till the + rf wave reaches CD as In order to estimate the speed of the ± rf wave in the lab frame, we use the TM equation of state (Mathews 1971) to get the expression for the sound speed  ′ sj in the comoving frame of the region  = (2, 3)(see Eq.14 of Ryu et al. (2006) and Eq. 17 of Mignone & McKinney (2007)) is given by where where the quantity Θ j is defined as The procedure to get the critical widths corresponding to the five lines defined in §3 is as follows.
We begin by estimating  RS ,  3rf+ ,  2rf+ considering a hypothetical scenario in which the width of shell 1 were infinite.Then, we ask if the radial width of shell 1 were to be finite, for what ratio  would we obtain the same values for the quantities?As an illustration, consider the L1 corresponding to  FS =  RS +  3rf+ +  2rf+ .Assuming the infinite radial width of shell S1, we first estimate Next assuming that shell S1 has finite radial width Δ 1,0 =  1 Δ 4,0 we have Equating equation (H4) and equation (H5) the critical width  c1 corresponding to L1 is given by where the second line is simplified using equation (E4).
If  >  1 , shell S1 is partially shocked.The fraction of the mass in shell S1 that is shocked is given by Similarly, the critical width ratio for line L2 is given by The critical width ratio for line L3 is given by The critical width ratio for L4 is given by The critical width ratio for L5 is given by For  <  c5 shell S4 is partially shocked.The fraction  3 of the mass shocked in shell S4 is given by For  <  c5 (H12)

APPENDIX I: SHOCK HYDRODYNAMICS IN CD FRAME: AN ILLUSTRATIVE EXAMPLE
The goal of the present appendix is to outline the similarities & differences between our approach and that of Kino et al. 2004 (hereafter KMY04).Table I1 summarizes the physical quantities in the CD frame (indicated by tilde).Comoving quantities are primed.The objective is to analyse shock (both rs and rf) propagation in the CD rest frame for a collision of two equal proper density shells (  = 1) of equal lab frame radial widths (Δ 1,0 = Δ 4,0 = Δ 0 ).The  = 1 case is chosen because of two reasons.Firstly, KMY04 assume the adiabatic constant to be equal in both the shocked regions.In our assumed equation of state, this is true only if the shock strengths are equal which is the case for  = 1.In order to be consistent with their assumption, we choose the  = 1 scenario to have equal adiabatic indices in both regions by construction.Secondly,  = 1 is a simple scenario because the shock strengths (Γ 21 = Γ 34 ), the speed of shock fronts (  FS =  RS ) and the sound speeds (  s3 =  s2 =  s ) in the two shocked regions R3 and R2 are all equal.In particular, we are interested in the ultra-relativistic case for which Γ 4 > Γ 1 ≫ 1.Like the rest of our analysis, we will assume a planar geometry where the planar area is A. The quantities (  1 ,  4 ,  RS ,  FS ) are the absolute speeds measured in the CD frame.As for the velocity directions, in the CD frame, both the front edge of shell S1 and the rear edge of shell S4 move towards the CD (the former to the left and the latter to the right).While both the shock fronts move away from the CD (The RS to the left and the FS to the right).In the rest of the analysis, it must be noted that that the vector difference of the velocities is the summation of the absolute speeds.Table I2 compares our notation with that by KMY04.
In what follows, we will first derive the general expression in the CD frame and then write the solutions for the particular scenario of  = 1 (indicated at the end of the equation).
The radial width of shells S1 and S4 in the CD frame is given by The time for the FS to propagate from the CD to the edge of S1 (CD frame)  RS The time for the RS to propagate from the CD to the edge of S4 (CD frame) Δ 2f The radial width of shell S1 just after the FS reaches its front edge (CD frame)

𝛽 s
The co-moving sound speed in the CD frame (equal in R2 and R3 for  = 1)  2rf− The time taken for the head of (-) rf wave to propagate from the front edge of S1 to the CD (CD frame)  3rf− The time taken for the head of (-) rf wave to propagate from the CD to the RS (CD frame)  FR−RS  FS +  2rf− +  3rf− Table I2.Comparing the notation in our work and that by KMY04.

KMY04
Our work which shows that while lab frame radial widths are equal, in the CD frame they are not equal.Note that Γ 1 = Γ 21 and Γ 4 = Γ 34 , while for  = 1 all four are equal.Next, we estimate the speed  FS of the FS in the CD frame by estimating the rate at which mass in region R2 changes.This gives where  ′ 1 and  ′ 2 are the proper density in regions R1 and R2 respectively.In the second equality we use the transformation  1 = Γ 21  ′ 1 = Γ 1  ′ 1 .In the third equality, we have used the BM76 condition for our adopted equation of state,  ′ 2 = 4Γ 21  ′ 1 = 4 Γ 1  ′ 1 .Similarly we have, From symmetry,  = 1 implies that  RS =  FS and  4 =  1 , In the CD frame, the time it takes for the FS to reach the front edge of S1 and the RS to reach the rear edge of S4 are ) where from Eq. ( I2)-(I3), we have  1 +  FS = 4 3  1 and  4 +  RS = 4 3  4 .In order to investigate the propagation of rf wave, one must estimate the ratio of the crossing times.Using eqn.(I5), the ratio of the crossing times can be written as ) which shows that for  = 1 for which  1 =  4 (  1 =  4 ), the ratio of the crossing times is Thus, for  = 1 at a high proper speed contrast  u ≫ 1, and for an observer in the CD frame, the FS reaches the front edge of S1 much before Table I3.Absolute difference and fractional difference (between our work RGB24 and that by KMY04) of the values of the various quantities for a proper speed contrast of  u = 6, as shown along the vertical dot dashed black line shown in Fig. I1.For the fractional difference, the value is calculated relative to that found in our analysis.The negative sign in the difference and the fractional difference indicates that the values in KMY04 for that quantity is higher than in our approach and vice versa.All times are normalized to the light crossing time of shell S1 in the CD frame Δ 1 /.comoving time.In our approach, we limit our analysis to the time when a particular shock front either crosses its shell or is caught by a rarefaction wave (whichever occurs earlier).This is because our main objective is to estimate the energy dissipated by the shock fronts.

Quantity
To summarize, we find that • The principal difference between our work and KMY04 is the method of estimation of thermal efficiency.We estimate thermal efficiency in the lab frame where we explicitly take into account the  work done across CD from region R3 to R2.In the KMY04 CD rest frame approach, the CD is at rest by construction and there is no notion of  work.There are two main limitations with a CD frame analysis: (i) if one needs the thermal energy dissipated over a spatial region in the lab frame at a given lab frame time, the spatial integration involves quantities in CD frame evaluated at different CD frame times (see discussion after eq. 26 of KMY04).The issue has to do with "simultaneity" in relativity.The times in CD frame are not simultaneous with times in the lab frame.(ii) when Lorentz transforming quantities from the CD rest frame to the lab frame, KMY04 miss out on the  work done and systematically underestimate the thermal efficiency.
Since we calculate the thermal efficiency in the lab frame, our expressions can be used more readily to infer radiation properties in the observer frame for a variety of astrophysical scenarios (albeit after being multiplied by additional efficiency factor(s)).
• The numerical analysis of KMY04 was restricted to moderately high proper speed contrasts  u ∼ 3 − 6 and ultra-relativistic colliding shells.Our analytical expressions are more general -applicable for arbitrary proper speed contrast  u and proper speeds of the colliding shells.
• In our approach, we use the Kumar & Granot (2003) representation of the Mathews equation of state (Mathews 1971) for a cold upstream.KMY04 use an ad hoc equation of state (EoS) where the adiabatic constant is taken to be 5/3 below Γ 34 < 2 and 4/3 for Γ 34 > 2. Thus, their EoS has a discontinuous change at Γ 34 = 2 (between the two asymptotic values).The authors further assume the adiabatic constant to be equal in both shocked regions.This is not true in our formalism as in general the shock strengths are different in two regions and so does the adiabatic constant which depends on the shock strength.In fact, one of the primary motivation of choosing to analyse the  = 1 collision is to compare a scenario consistent with their assumption of equal adiabatic indices in both shocked regions.
• We find the crossing times are similar.However, this similarity of crossing times comes with few caveats which we discuss further.Most of the differences (in our work) in the sound speed and the shock speed arises near Γ 34 = 2 (the point of discontinuity in the KMY04 equation of state).In KMY04, for Γ 34 < 2, the compression ratio is lower (indicating a wider radial width of the shocked region) while both the sound speed and the shock speeds are higher compared to our case (the trend reverses for Γ 34 > 2).These two opposing effects gives similar crossing timescales.The maximum difference in the crossing timescales is of the order of ∼ 14%.

Figure 1 .
Figure 1.The pre-collision and post-collision setup for the collision of two cold and uniform shells of equal kinetic energy and initial radial width, and initial proper speeds ( 1 ,  4 ) = (100, 200) at  =  o + 0.3 RS .Top: The pre-collision structure -the leading and trailing shells are denoted by S1 and S4, respectively.The arrow size is proportional to the proper speed of the respective shell.Bottom: The post-collision structure of the two shells, which now divides into 4 regions (R1 to R4), where each shell develops a shocked region (the shaded regions), and the two shocked regions (R2 and R3) are separated by a CD.The structure is shown at a time when the reverse shock front has swept through 40% of shell S4.The radial width of the four regions is to scale.The arrow sizes scale as the proper speeds of the shells, the CD, and the two shock fronts.

Figure 2 .
Figure 2. The general solution for the proper speed of the shocked fluid.Top: shows a logarithmic contour plot of the relative proper velocity of regions 2 and 1,  21 , as a function of the relative proper speed  41 and proper density ratio  =  ′ 4 / ′ 1 of the unshocked parts of the two shells (S4 and S1).Middle: the relative proper velocity of regions 3 and 4,  43 , as a function of  41 and  .Bottom: the shock strength ratio (Γ 34 − 1)/(Γ 21 − 1) as a function of  41 and  .The mirror symmetry of the ratio of the shock strength reflects the symmetry inherent in equation (5) under the transformation  → 1/  .

Figure 3 .
Figure 3. Parameter space for astrophysical transients.In the top and middle panels the equal proper density (  = 1), the equal mass ( 4,0 =  1,0 ), and equal kinetic energy ( k,4,0 =  k,1,0 ) are represented by a grey horizontal line, dashed black line and black dot-dashed line respectively.Top: shows the proper speed  of the shocked fluid, for ultra-relativistic shells with a fixed  1 = 10 2 and  = 1, as a function of the proper speed contrast  u − 1 and the proper density contrast  .The yellow and blue ellipses indicate the phase space for Gamma-ray bursts (GRBs) and blast wave models of Fast radio bursts (FRBs) (see subsections 5.1 and 5.2 ).Middle: shows the proper speed  of the shocked fluid, for Newtonian shells with a fixed  1 = 10 −3 and  = 1, as a function  u − 1 and  .The pink ellipse represents the phase space of superluminous supernovae (SLSNe) (see subsection 5.3).Bottom: shows a collision of shell S4 with shell S1 at rest in the lab frame as a function of the proper speed  4 ,  u − 1 and  .The blue ellipse represents the phase space of the magnetar giant flare interaction with a bow-shock shell (see subsection 5.4).

Figure 4 .
Figure 4. Hydrodynamic parameter space for the collision of two cold ultra-relativistic shells of equal initial radial width ( = 1) at a fixed proper speed  1 = 10 2 for shell S1.In all panels the equal proper density (  = 1), the equal mass ( 4,0 =  1,0 ), and equal kinetic energy ( k,4,0 =  k,1,0 ) are represented by a grey horizontal line, dashed black line and dot-dashed black line, respectively.In all panels, the black-filled circle on the dot-dashed line represents the collision of two equal kinetic energy shells with proper speeds ( 1 ,  4 ) = (100, 500), which is used in all illustrations in Fig. 5. Top: Panels (a) and (b) show the forward shock strength Γ 21 − 1 and the reverse shock strength Γ 34 − 1 as a function of the proper speed contrast  u and the proper density contrast  .Middle: Panels (c) and (d) show the ratio of the shock strength (Γ 34 − 1)/(Γ 21 − 1) and ratio of the shock crossing timescale  RS / FS and as a function of  u and  .Bottom: Panels (e) and (f) show the ratio of the initial kinetic energy  k,4,0 / k,1,0 and the ratio of the masses  4,0 / 1,0 as a function of  u and  .For a detailed explanation see the text.

Figure 5 .
Figure 5.The distribution of the (internal + kinetic) energy, rest mass and radial width, as measured in the lab frame, for different regions post-collision of two cold equal kinetic energy shells with equal initial radial width with proper speeds ( 1 ,  4 ) = (100, 500).(a) a snapshot of the lab frame energy density at time  =  o + 3 4  RS .(b) temporal evolution of the total energy in different regions.(c) temporal evolution of the rest mass in different regions.(d) temporal evolution of the radial width of regions R1, R2, R3, R4.

Figure 6 .
Figure 6.The figure corresponds to collision of two Newtonian shells of equal initial radial width ( = 1) for a fixed proper speed  1 = 10 −3 for shell S1.The panel description remains the same as Fig. 4.

Figure 7 .
Figure 7.The launch of a rarefaction wave chasing a shock front.This particular illustration corresponds to the collision of two equal energy shells with equal initial radial width  = 1 and ( 1 ,  4 ) = (100, 200) at  =  o + 1.2 RS ( since  RS <  FS ).After the reverse shock reaches the rear edge of shell S4, a rarefaction wave with proper speed  3rf+ is launched that chases after the forward shock front.The arrows show in scale the proper speed of the rarefaction wave, the CD and the forward shock front.

Figure 8 .
Figure 8.This figure depicts the collision of two ultra-relativistic shells of equal initial radial widths ( = 1) for a fixed proper speed of  1 = 100.Panel (a) shows the six cases corresponding to Table 7. Logarithmic contours for (  2 ,  3 ) < 1 as a function of the proper speed contrast  u − 1 and the density contrast  are shown for cases (I) and (VI), respectively.Note that (  2 ,  3 ) = 1 for all other cases (II)-(V).Panels (b) and (c) show the fraction of the initial total kinetic energy dissipated into internal energy by the FS ( th2 ) and by the RS ( th3 ), respectively.Panel (d) shows the fraction of the combined initial kinetic energy dissipated by both shock fronts,  th,tot =  th2 +  th3 .All contours use a logarithmic scale.The thick lines are as described in Fig. 4. Like all previous figures the black filled circle in all panels corresponds to the collision of equal energy shells with proper speeds ( 1 ,  4 ) = (100, 500).Figure 9 corresponds to this specific point in the phase space.

Figure 9 .
Figure 9.The breakdown of total (kinetic + internal ) energy between regions (R1,R2,R3,R4) as a function of time for collision of two equal energy ultrarelativistic shells with equal initial radial width.Top: shows the breakdown of total energy in different regions as a function of time.Bottom: shows the breakdown of energy in regions R2 and R3 as a function of time.

u
1 such that the FS and the RS strengths are given by Γ 21 ≈

Fig. 10
Fig. 10 shows the parameter space of ( 2 ,  3 ) (Panel (a)), as well as  th2 ,  th3 and  th,tot =  th2 +  th3 (panels (b), (c) and (d)), for collision of two Newtonian shells ( 1 <  4 ≪ 1) of equal initial radial width ( = 1).The 5 critical lines divide the  -  parameter space of proper density contrast  and proper speed contrast   into six cases.It can be seen that the equal mass collision corresponds to the  = 1 case and lies on top of the L3 line defined by  RS =  FS (i.e.dividing between cases III and IV).The equal energy collision corresponds to case III at low  u values, transitions to case II at moderate  u values and finally at intermediate to high  u values it enters the case I regime.Fig. 11 shows a zoomed in version of the parameter space presented in panel (d) of Fig. 10, where the total thermal efficiency of both shocks equals and marginally exceeds unity (see §3.5).

Figure 10 .
Figure 10.The figure corresponds to collision of Newtonian shells of equal initial radial widths ( = 1) for a fixed proper speed of  1 = 10 −3 .The orange rectangle at the bottom right corner in panel (d) is zoomed in Fig. 11.

Figure 11 .
Figure 11.A part of panel (d) from Fig. 10 where the combined efficiency of both shocks is equal to unity.Note the contour plot is linear in scale.

Figure
Figure12.Comparison of the overall thermal efficiency between the ballistic approach and the hydrodynamic approach for  = 1.The magenta, green and orange lines represent collision between equal energy, equal mass and equal proper density shells.Top: The collision of two ultra-relativistic shells with  1 = 10 2 .The dashed magenta and green lines represent the thermal efficiency from the plastic collision approach (equation (60)).The solid lines represent the overall hydrodynamic efficiency (after accounting for rf wave propagation) .The dotted lines represent the overall hydrodynamic efficiency if rf wave propagation are ignored.Bottom: The collision of two Newtonian shells with  1 = 10 −3 .The black dashed line represents the thermal efficiency (which is the same for equal energy and equal mass Newtonian shells) from the plastic collision approach (equation (61)) (see text for details).

Table 9 .Figure 13 .
Figure 13.Hydrodynamic thermal efficiency for collision of magnetar giant flare shell S4 of isotropic equivalent kinetic energy  GF,46 with a newtonian bow-shock shell S1 with proper number density 4 o .Radial widths of both shells are taken to be equal  = 1.The dotted lines show efficiencies without consideration of rf waves.The magenta, orange, cyan and green lines correspond to log 10 (  ∞ ) = −2.5, −1.5, −0.5, 0.5 (see text for more details).

Table 5 .
Symbols and their definitions to be used for the analysis of the limitation of the internal energy dissipation by either of the shock fronts due to rarefaction waves.The symbols + and − in quantities refer to a rarefaction wave propagating towards the forward and the reverse fronts respectively.The primed superscript refers to a comoving frame of the relevant fluid numbered by a subscript.The subscript  = (2, 3) stands for regions R2 and R3 shocked by forward and reverse shock respectively.

Table 6 .
List of the various scenarios of the rf waves chasing either the FS or the RS.The propagation of (±) rf waves is not tracked beyond the time at which the forward/reverse reaches the edge of the corresponding shell.The five critical initial radial widths which satisfy the lines in time (L1-L5) are summarized in Table7.

Table 8 .
Parameters for model 2 of the FRB blast wave model up to an ultra-relativistic shell ( 4 ∼ 100; Fermi-LAT Collaboration et al. 2021) S4, with a stationary shell S1.The setup of the model

Table 10 .
Parameter space for interaction of magnetar giant flare with bowshock shell

Table H1 .
Expressions for the various timescales used to evaluate the five critical widths

Table I1 .
Symbols and definitions of quantities in the CD frame (comoving frame associated with shocked fluid).The (-) rf wave refers to a backward propagating rf wave.The radial width of shell S1 in the CD frame Δ 4The radial width of shell S4 in the CD frame  FS The speed of the FS in the CD frame RSThe speed of the RS in the CD frame  1 density of region R1 as seen from the CD frame  4 density of region R4 as seen from the CD frame  FS