Anisotropic Energy Injection from Magnetar Central Engines in Short GRBs

A long-lived magnetar, potentially originating from a binary neutron star system, has been proposed to explain the extended emission observed in certain short-duration gamma-ray bursts (sGRBs), and is posited as a potential central engine to power the engine-fed kilonovae. Previously, the process by which energy is injected into the surrounding ejecta/jet was widely believed to be nearly isotropic. In this study, we employ special relativity magnetohydrodynamic (SRMHD) simulations to investigate the wind injection process from a magnetar central engine. We explore the dynamics and energy distribution within the system and found that the parameter $\alpha=u_{\rm A}/u_{\rm MWN}$ can be used to indicate the collimation of the magnetar wind energy injection, where $u_{\rm A}$ is the local Alfven four-speed and $u_{\rm MWN}$ is the four-speed of the magnetar wind nebular (MWN) formed from wind-ejecta collision. A significant portion of the injected energy from the magnetar spin-down wind will be channeled to the jet axis due to collimation within the MWN. Achieving isotropic energy injection requires a significantly small $\alpha$ that necessitates either an ultra-relativistic expanding MWN or an extremely low magnetization MWN, both of which are challenging to attain in sGRBs. Consequently, a considerably reduced energy budget (i.e. energy per solid angle reduced by a factor of up to 10 with respect to the value under isotropic assumption) is anticipated to be injected into the ejecta for engine-fed kilonovae. Engine-fed kilonovae would appear fainter than originally anticipated.

In recent years, the detection of gravitational waves (GWs) from BNS mergers by terrestrial interferometers (Abbott et al. 2017) has furnished persuasive evidence linking sGRBs to these cosmic ★ yihan.wang@unlv.educollisions.Concurrent detection of electromagnetic counterparts, including the optical/IR counterpart known as a kilonova or macronova (Li & Paczyński 1998;Metzger et al. 2010;Chomiuk et al. 2021), further solidified the association between BNS mergers and sGRBs.It is generally anticipated that emission from a kilonova arises from -process and radioactive decay of heavy elements synthesized in the merger ejecta.
Electromagnetic signatures of the sGRB heavily depend on the characteristics of the residual remnant from the mergers.Numerous numerical and theoretical studies (Ruffert & Janka 1999;Uryū et al. 2000;Rosswog et al. 2000;Rosswog & Liebendörfer 2003;Oechslin & Janka 2006;Chawla et al. 2010;Rezzolla et al. 2011;Hotokezaka et al. 2011;Kumar & Zhang 2015;Gao et al. 2016;Lasky & Glampedakis 2016) indicate that the merger product is initially a hypermassive NS (HMNS), maintaining a meta-stable state due to the balance between gravitational collapse and support from differential rotations (Baumgarte et al. 2000;Morrison et al. 2004;Baiotti et al. 2008;O'Connor & Ott 2011;Lehner et al. 2012;Paschalidis et al. 2012;Kaplan et al. 2014).Depending on the equation of state (EoS) of the NS, this HMNS can subsequently collapse to form a black hole or persist as an NS.A softer EoS increases the likelihood of the hypermassive NS collapsing to form a black hole, surrounded by an accretion disk and a relatively thick torus of mass ∼ 10 −2  ⊙ , the accretion process of which powers the relativistic jet responsible for the GRB (Narayan et al. 1992;Rezzolla et al. 2011).Conversely, if the EoS is stiffer, a long-lived supramassive NS (SMNS) or a stable NS may form (Dai et al. 2006;Shibata & Taniguchi 2006;Zhang 2013;Giacomazzo & Perna 2013;Ciolfi et al. 2017;Radice et al. 2018).The recent discovery of a 2 ⊙ NS (Demorest et al. 2010;Antoniadis et al. 2013) supports the possibility of a stiff EoS, suggesting that the formation of a massive NS is plausible (Özel et al. 2010;Bucciantini et al. 2012;Giacomazzo & Perna 2013;Kiziltan et al. 2013).
Once a stable NS is formed, the large angular momentum of the progenitor BNS would cause the newly formed NS to rotate rapidly, necessitating a period approximating one millisecond.Concurrently, the NS would acquire a robust magnetic field as large as approximately ∼ (10 14 − 10 15 ) G due to the shear instability at the merger interface (Price & Rosswog 2006;Zrake & MacFadyen 2013), an  − Ω dynamo (Duncan & Thompson 1992) or the magnetorotational instability (Akiyama et al. 2003;Thompson et al. 2005).This high-spin NS with an extraordinarily strong magnetic field (magnetar) incites characteristic spindown through the emission of magnetic dipole radiation and gravitational radiation (Shapiro & Teukolsky 1983;Zhang & Mészáros 2001).The spin-down process, absent in the event of prompt BH formation, liberates a significant quantity of energy, proposed as a potential engine for the observed extended emission succeeding the prompt emission of some sGRBs (Zhang & Mészáros 2001;Zhang et al. 2006;Metzger et al. 2008;Perley et al. 2009;Troja et al. 2008;Lyons et al. 2010;Rowlinson et al. 2010;Lü & Zhang 2014;Lü et al. 2015;Piro et al. 2019;Xue et al. 2019).This extended emission can persist for hours, exceeding the timescale predicted by the standard afterglow (Gompertz et al. 2013;Rowlinson et al. 2013).While alternative mechanisms like 'fall back' accretion may also power the late emission (Rosswog 2007;Lee et al. 2009;Cannizzo et al. 2011;Kisaka & Ioka 2015;Gibson et al. 2017;Lu & Quataert 2023), whether these proposed models can account for the rich sGRB extended emission and internal plateau phenomenology remains unclear.
Assuming a long-lived, strongly magnetized NS can form post a BNS merger, the outflow from the magnetar wind collides with the expanding ejecta, producing a hot proto-magnetar nebula (Dai 2004;Metzger et al. 2008;Zhang 2013;Yu et al. 2013;Metzger & Piro 2014).As the toroidal magnetic field accumulates in the nebula, the magnetic forces redirect the equatorial outflow towards the pole (Bucciantini et al. 2012).At the initial stage, the Poynting flux launched by magnetar spin-down or differential rotation has a high luminosity, and the collimated outflow could eventually break out of the ejecta, forming a relativistic bipolar jet.Later, a steady Poynting flux continuously injects into the ejecta, heating the ejecta and the nebula behind it (Gao et al. 2013;Yu et al. 2013;Metzger & Piro 2014).If the ejecta expands sufficiently for photons to diffuse outward on the expansion timescale, the emission from the nebula could escape to the observer.Coupled with the emission powered by the radioactive decay of heavy nuclei synthesized in the ejecta, a more luminous 'kilonovae' could be observed (Yu et al. 2013;Metzger & Piro 2014;Yu et al. 2018;Li et al. 2018;Ai et al. 2022), which could be possible promising evidence for a long-lived magnetar remnant.However, previous studies on such kind of engine-fed kilonovae, which assumed an almost isotropic magnetar wind injection to ejecta with a sufficiently large heating efficiency, ignored the potential wind collimation and detailed heating process (Yu et al. 2013;Metzger & Piro 2014;Wollaeger et al. 2019;Wang et al. 2023).Ai et al. (2022) found that the injection-induced heating is efficient only during the shock crossing phase, which occurs right after the magnetar wind collides with the ejecta.After the ejecta has been shocked, there is a significant drop in heating efficiency.Given that the shock crossing timescale is relatively short compared to the magnetar spin-down timescale, a low overall heating efficiency is expected.Whether enough energy could be employed to heat the ejecta remains questionable.
Although there remain challenges numerically for sGRBs powered by a magnetar central engine (but see Most & Quataert 2023;Most 2023 for recent encouraging development), recent X-ray observations of GRB 230307A by LEIA provide a strong indication of the existence of such a magnetar central engine (Sun et al. 2023).Understanding the efficiency of energy injection from the magnetar wind into the surrounding ejecta/jet is still lacking, specifically concerning the angular distribution of the injected energy from magnetar spin-down and its dependence on various factors.To address these knowledge gaps, we undertake a comprehensive study of the wind injection process from a magnetar in sGRBs through detailed numerical simulations based on the framework of special relativistic magnetohydrodynamics (SRMHD).we aim to clarify the efficiency and angular dependency of energy injection into the surrounding medium, thereby shedding light on the mechanisms driving the extended emission and kilonova emission in sGRBs.
Section 2 of this paper details the physical models, numerical methods, and initial conditions used in our simulations, including the boundary conditions necessary for accurately capturing the complex interactions between the magnetar wind and its surroundings.Section 3 provides an analysis of the simulation results, focusing on the efficiency of energy injection and its angular distribution.We explore the physical processes leading to the preferential deposition of energy into specific regions of the outflow, such as the poles.The implications of our findings are discussed in Section 4, where we compare our results with observational data and previous theoretical studies.We evaluate the implications of the angular dependency of energy injection for the observed features and variability of extended emission in sGRBs.Furthermore, we discuss our findings' implications for understanding magnetar wind dynamics and their connection to the overall energetics and temporal behavior of sGRB emissions.

METHODS
In our numerical simulations, we first model the injection of an artificial top hat jet into the dynamical ejecta resulting from a BNS merger.This is followed by the simulation of magnetar wind injection, which emanates from the spin-down of a magnetar formed after the merger.The wind injection process commences only after the cessation of the jet's power from the central engine.All the simulations in this paper use the relativistic MHD code Athena++ with HLLD Riemann solver (Stone et al. 2020).The relativistic MHD equations are written as M E where , v, M, S, E and B are the density, velocity, momentum density, stress tensor, total energy density and magnetic field strength in the lab frame, respectively.  ,  and Γ are gas pressure, density, and adiabatic index in the co-moving frame.The density, momentum density and strees tensor can be expressed as Viscosity and non-ideal MHD effects that depend on the ionization, reconnection, and collision rate are not considered in our simulations.The computational domain is constructed in 2D with spherical polar coordinates with 512 cells logarithmically in the radial direction ranging from  in = 4.7 × 10 8 cm to  out = 9.6 × 10 11 cm and 512 cells uniformly in the polar angle direction ranging from 0 to  2 .The reflective boundary conditions are set on the polar axis and equatorial axis.Outflow boundary conditions are set on the outer boundary of the radial direction.The inner boundary conditions of the radial direction are time-dependent.If there is no injection, the boundary conditions are set to be reflective to guarantee zero energy injection.If there are energy/matter injections, e.g.jet or wind, the boundary conditions are set accordingly based on the jet/wind models that will be discussed as follows.A gamma-law EoS is adopted for all the simulations with Γ = 4/3.

Ejecta models
Our simulations start at ∼ 0.5 s after the BNS merge.Therefore, an ejecta profile is initially set up in the computational domain.The typical velocity of the ejecta is  ej =0.25 c (Kasliwal et al. 2017), after 0.5 s of the BNS merger, the ejecta has propagated to a typical radius  ej ∼ 3.75 × 10 9 cm.We assume the ejecta expand adiabatically after the BNS merger, thus homogenous density and velocity profiles can be used for the initial conditions in our simulations, where u is the four-velocity and  ej is the corresponding four-velocity of  ej1 .The ejecta density is integrated to be the total mass of the ejecta (, ) =  ej .GRMHD simulations indicate that the ejected mass from BNS mergers ranges from 10 −4  ⊙ to 10 −2  ⊙ (Hotokezaka et al. 2013;Shibata et al. 2017).However, higher ejecta mass is also allowed.To cover the most of parameter space that we are interested in, we adopt three total ejecta masses 10 −1  ⊙ , 10 −2  ⊙ and 10 −3  ⊙ .The ejecta is assumed to be initially cold with   2 = 10 −5 .To test the effects of the ejecta profile in the  direction on wind propagation, we use two different density profiles, an experimental uniform profile, where ejected materials from BNS mergers are isotropically distributed in space, and a more practical structure profile where matters are ejected more in the equatorial direction than the polar direction, the density in the equatorial plane is 5 times larger than the density in the pole.

Jet model
The jet launching mechanism is still under debate for BNS mergers, although several theories have been proposed.Accretion onto BH/NS and differential rotation of an NS are the two main ways of launching a jet from a magnetar.Erratic magnetic bubble injection during an HMNS phase supported by differential rotation is another possibility.Regardless of the central engine and detailed launching mechanism, we inject a top-hat jet during the first 1 second of the simulation near the pole within an openning angle of   = 10 • .The acceleration of the short GRB jet can be driven by two mechanisms: thermal acceleration driven by neutrino heating from the accretion disk or proto-neutron star (Meszaros & Rees 1993;Piran 1999) or magnetic acceleration driven by the Poynting-flux launched from the central BH or neutron star (Granot et al. 2011).Realistically, the GRB jet composition is likely "hybrid" that includes both components (Gao & Zhang 2015).The former is relevant for a hot fireball that accelerates the jet rapidly while the latter is relevant for a Poynting-flux dominated outflow that accelerates the jet rapidly to fast magnetosonic speed ( ∼ (1 +  j,0 ) 1/3 , where  j,0 is the magnetization of the jet in the inner boundary defined below in Equation 18) and then keeps slowly accelerating the jet to the terminal Lorentz factor at the coasting radius due to significant magnetic dissipation or impulsive acceleration due to a magnetic pressure gradient within the pulse.In order to include both mechanisms, the jet in our simulations is assumed to be hot and Poynting-flux dominated with isotropic luminosity  j = 5 × 10 51 erg/s, terminal Lorentz factor  ∞ = 300 and initial magnetization  j,0 = 5 2 .The boundary conditions3 for the jet injection ( <   ) are (Geng et al. 2019) where  0 is the initial Lorentz factor,  = ( j  2 + Γ−1 Γ  j )/( j  2 ) is the specific thermal enthalpy, and 0 is the specific total enthalpy.

Wind models
If the total mass of the binary NS is low or the equation of state of the NS is stiff enough, the BNS merger remnant could be a rapidly spinning SMNS or a stable NS rather than a black hole.Due to the rapid spin, it is plausible that the proto-NS will develop a strong magnetic field by -Ω dynamo (Duncan & Thompson 1992) or by shear/magnetorotational instability (Price & Rosswog 2006;Akiyama et al. 2003;Thompson et al. 2005).The proto-NS initially loses mass through a neutrino-driven wind.This wind has high baryon loading and therefore is dirty (non-relativistic).The flow becomes clean after the NS cools down when the neutrino luminosity drops (Qian & Woosley 1996;Metzger et al. 2011).Once the metastable proto-NS becomes stable by losing sufficient mass from the outflow, a long-lived millisecond magnetar can be formed.The newly formed magnetar can serve as the engine of the extended emission of the sGRB or engine-fed kilonova with its spin-down radiation.For an orthogonal rotating magnetar with a dipole magnetic field, the spin-down luminosity is erg/s , (20) associated with a corresponding spin-down timescale where  ★ ,  ★ , and  are the surface magnetic field strength, radius, and period of the star, respectively.
Simulating the magnetar wind injection with ∼ 10 5 s is impractical.This requires an extremely large computing domain extending to 10 15 − 10 16 cm.To reduce the cost of the simulations so that we can explore more regions of the parameter space, we use an experimental monopole-like magnetic field.The spin-down luminosity of the monopole field is much higher than the dipole field, which scales as Unlike the dipole magnetic field, the () ∝ 1/ 3 within the light cylinder, the monopole-like magnetic field scales with 1/ 2 within the light cylinder.Therefore, in the monopole-like model, the winding magnetic field (toroidal) that is built by a rotating poloidal field is much stronger than the dipole field model.This allows us to use a reasonable computing domain to carry out the simulations.We use the fiducial parameters  ★ = 1.2 × 10 6 cm,  ★ = 10 15 G and  =5 ms.
Before the wind collides with the ejecta, if the magnetic acceleration is efficient due to strong magnetic dissipation, the wind can be accelerated to a super-magnetosonic speed, meanwhile, the magnetization drops slowly towards zero.As a result, the wind becomes matter-dominated with an extreme Lorentz factor.If the magnetic acceleration is not efficient, the wind can only be accelerated to the magnetosonic speed.The magnetization parameter will remain high in this case.Thus, the wind will be still Poynting-flux dominated.We consider both cases in our simulations by giving different input wind Lorentz factors  w,eq and wind magnetizations  w,eq at the equator.Then the wind toroidal magnetic field  w,  and wind density   at the boundary where  in = 4.7 × 10 8 cm can be calulated For a super-magnetosonic matter-dominated wind, we use  w =  w,eq = 30, and  w,eq = 0.1.For a magnetosonic Poynting-fluxdominated wind, we use  w () ∼   / = √︁ 1 +  w () and  w,eq = 9, where   is the four velocity of magnetosonic speed.The magnetic field strength at the surface of the neutron star  ★ is fixed to be 10 15 G and the neutron star radius  ★ is set to be 10 6 cm.We have adopted magnetar spinning period  = 5 ms4 in our simulations.
Figure 1 shows the angular distribution of the wind luminosity for  = 5 ms.As indicated, the wind is essentially isotropic for a matter-dominated wind.For a Poynting-flux-dominated wind, on the other hand, the injection luminosity is much higher near the equator.

Boundary conditions and initial conditions for test cases
To investigate the isotropy of magnetar wind injection, we conducted experimental simulations of isotropic wind injection into an ideal static isotropic medium with varying medium densities and wind properties, including different magnetizations and Lorentz factors.
The medium is configured to be fully isotropic throughout the computational domain, with zero magnetization and uniform density ( amb = 10 −1 , 10 −3 , and 10 −5 in code unit).Additionally, the medium is assumed to be cold, characterized by a pressure-to-density ratio of The wind is injected at the inner radial boundary, exhibiting isotropic density and a uniform toroidal magnetic field in the  direction.This wind maintains a constant total luminosity, adapting to various magnetizations denoted by   = 0.01, 0.1, 1, and 10.The outer radial boundary is set as an outflow boundary, while the two polar boundaries are configured to be reflective.
Table 1 summarizes all the models simulated in this paper.

Collimation of magnetar wind
To understand the isotropy of the wind injection under different conditions, we conducted several simulations of wind injection into a uniform ambient medium using the initial and boundary conditions described in Section 2.2, where the wind at the inner boundary is set to be isotropic with a pure toroidal magnetic field and a constant total luminosity.Figure 2 indicates the energy density profiles 4 seconds after the wind injection.As indicated in the first row, for wind injection into a low-density medium, the wind is isotropic if the magnetization is low  w = 0.01.As the  w becomes higher and higher, plasma in the MWN starts to focus toward the pole, forming a collimated outflow.As indicated by each column, the collimation also becomes stronger if the density of the medium becomes higher.
Indeed, as the magnetar wind collides with the medium, both the forward and reverse shocks are formed at the contact discontinuity.The reverse shock rapidly propagates inwards and disappears until it reaches the wind accelerating zone (Ai et al. 2022).The reverse shock slows down and heats the magnetar wind, leading to the formation of an MWN.If the medium cannot efficiently slow down the magnetar wind, allowing the wind to propagate nearly freely at relativistic speeds, the hoop stress from the dominant toroidal magnetic field will be effectively balanced by the electric force in the wind, resulting in an asymptotic force-free solution.In this scenario, wind injection is nearly isotropic.However, if the medium can considerably decelerate the magnetar wind, the plasma within the MWN transitions to a nonrelativistic state.The electric force that counterbalances the hoop stress, attempting to constrict the magnetized outflow from the strong toroidal magnetic field, becomes weak.In this scenario, if the MWN is highly magnetized, the substantial hoop stress within the MWN begins to focus the magnetar wind towards the polar region, resulting periods were adopted to compensate for this.This adjustment helps maintain a reasonable spin-down luminosity given the total spin energy. in a collimated outflow.On the other hand, if the MWN is matterdominated with low magnetization, the MWN will expand more isotropically.Plots illustrating the Coulomb force and Lorentz force under various conditions are included in the Appendix.
To quantify the strength of the collimation and investigate how the strength of the collimation correlates with the magnetization and Lorentz factor of the MWN, we define a parameter to quantify the strength of the MWN outflow collimation, where  w is the injection luminosity of the magnetar wind and  iso () is the observed isotropic luminosity with viewing angle  and  is the total injected energy from the wind.The larger  is, the stronger the collimation will be. = 1 represents that the wind is isotropic as it was before the injection.
We also define a energy weighted parameter ⟨ MWN ⟩ E to describe the property of the MWN, where  A and  MWN are the local Alfven four-speed and four-velocity of the MWN, respectively.
Figure 3 shows the relationship between  and ⟨ MWN ⟩ E .It is shown that the magnetar wind injection stays isotropic if ⟨ MWN ⟩ E is below ∼ 1 and the collimation starts to appear if ⟨ MWN ⟩ E is high enough.In general, a higher ⟨ MWN ⟩ E would indicate a stronger collimation.Therefore, ⟨ MWN ⟩ E of the MWN can be used as an indicator for the magnetar wind injection anisotropy.

Jet injection
Before the formation of a long-lived magnetar, the differential rotation of the proto-magnetar or the accretion process shortly after the BNS merger may initiate the launch of a jet.If a jet can be produced before the magnetar wind is launched, it can create a funnel within the ejected material.This funnel significantly affects the injection of the wind.Therefore, before initiating the wind launch, we need to investigate the jet injection process.Figure 4 displays density snapshots of different ejecta models at  = 1 s (indicating completion of jet injection if applicable).The upper panels show the ejecta model with a total mass of  ej = 10 −1  ⊙ , while the bottom panels show the ejecta model with a smaller total mass of  ej = 10 −3  ⊙ .In the last row of this figure, it is evident that if the ejecta mass is sufficiently large (resulting in higher pressure to confine the injected jet), a narrow funnel can be formed.Conversely, if the total mass of the ejecta is small (leading to lower pressure within the ejecta), a very wide funnel will be formed.

Matter-dominated wind injection
Figure 5 displays density snapshots at  = 5 s, which includes 1 s of jet working time, 3 s of waiting time, and 1 s of wind injection time, for matter-dominated (  = 0.1) wind injections into different types of ejecta.The upper panels represent cases with a total ejecta mass  of 10 −1  ⊙ , while the lower panels correspond to cases with a total ejecta mass of 10 −3  ⊙ .In both cases, the reverse shock that arose from the wind-ejecta collision can significantly reduce the speed of the magnetar wind, thus ⟨ MWN ⟩ E becomes large enough for the collimation to appear.
In the case where the ejecta profile is non-isotropic as described in Section 2.1.1,with a lower density/pressure at the poles, the pressure gradient of the ejecta provides a weak additional collimation effect on the magnetar wind, as shown in the middle columns of this figure.If a pre-existing funnel exists within the ejecta, the wind propagation is significantly altered.At the moment of the magnetar wind colliding with the ejecta, if the plasma in the funnel remains sufficiently hot (the 3-second waiting time is insufficient for efficient cooling), the total pressure within the funnel can still exceed the pressure within the ejecta.This high pressure impedes the flow of the magnetar wind through the funnel, resulting in the concentration of more energy around the funnel boundary.However, as the plasma in the funnel cools down, the pressure within the funnel decreases below the pressure of the expanding ejecta, allowing the magnetar wind to pass freely through the funnel.Consequently, a highly collimated outflow breaks out through the funnel.
The bottom panels of Figure 5 illustrate cases with a smaller total ejecta mass of 10 −3  ⊙ .Due to the lower mass of the ejecta, the MWN expands faster than the cases with an ejecta mass of 10 −1  ⊙ .Since the MWN expands faster, ⟨ MWN ⟩ E becomes smaller.As a result, the collimation is weaker in these cases exhibiting a larger outflow opening angle.
Figure 6 shows the corresponding energy density of Figure 5. Comparing the middle panels and the left panels, we can clearly see the extra collimation from the pressure/density of the ejecta.The right panels show the energy flow in the funnel.

Poynting-flux dominated wind injection
Similar to the findings discussed in Section 3.2.2, Figure 7 and Figure 8 provide snapshots of the density and energy density profiles at  = 5 s for the Poynting-flux-dominated wind (  = 9).As discussed in Section 3.1, if the magnetar wind is Poynting-fluxdominated before it collides with the ejecta, the resulting MWN will exhibit significant magnetization, resulting in a larger ⟨ MWN ⟩ E .The pinch effect from the hoop stress is stronger in comparison to the matter-dominated NWM, assuming that the NWM expands at the same speed.Consequently, this leads to the formation of more highly collimated outflows.
Upon comparing the left and middle panels of the figures, we can see that the additional collimation provided by the anisotropic ejecta has a negligible impact on the inherently high collimation of the wind.This holds true whether the ejecta is characterized by high density or low density.The primary source of collimation for the magnetar wind is the inherent MWN collimation mechanism.

Injection energy distribution per solid angle
We calculated the injection energy per solid angle for different wind and ejecta models by subtracting the total energy per solid angle at the end of the simulation ( = 15 s) and the total energy per solid angle at the time when the wind starts to inject ( = 3 s).
Figure 9 presents the injection energy per solid angle for both matter-dominated wind (solid lines) and Poynting-flux-dominated wind (dashed lines).In the upper panels, where the wind's spindown luminosity is approximately 10 49 erg/s, and the lower panels, where it is roughly one order of magnitude lower, we observe distinct characteristics.
As discussed in Sections 2.1.3and 3.2.2, for matter-dominated wind, collimation occurs through the interaction between the wind and the ejecta.In the upper panels of Figure 9, where no pre-existing funnel is present, the wind injection appears to be insensitive to the ejecta profile.The green and blue lines are nearly indistinguishable.However, when a pre-existing funnel exists in the ejecta (red lines), we observe more concentration of energy at the pole due to the unobstructed path provided by the funnel.
In the case of Poynting-flux-dominated wind shown as dashed lines, the hoop stress in the non-relativistic magnetized MWN is exceptionally stronger, rendering the impact of the ejecta profile negligible in that region.Hence, the dashed lines appear identical near the pole, regardless of the ejecta profile being interacted with.
In the case of low-density ejecta with a funnel shown in the bottom panel of Figure 9, we can see that for both a matter-dominated and a Poynting-flux-dominated wind, the collimation becomes more insensitive to the ejecta profiles.The existence of the funnel adds a very weak extra collimation only to the matter-dominated wind.
It is evident that for both matter-dominated wind and Poyntingflux-dominated wind, the majority of the injected energy is collimated toward the pole rather than the equator for real sGRBs.As the magnetar's spin-down continues, with the spin-down luminosity decreasing as  sd ∼  −2 , there is a possibility that at very late stages, the wind will become trapped within the ejecta and heat it up.However, during the early stage, regardless of the wind model or ejecta model, the collimated wind can break out of the ejecta (depending on the total rotational energy budget and ejecta mass) and carve out a funnel.Therefore, even in the later stages of low-luminosity magnetar winds, they can still flow out through the funnel, making it unlikely for the wind to become trapped behind the ejecta.

Wind injection efficiency
The energy injection efficiency, particularly the heating efficiency, is crucial for engine-fed kilonovae since it determines the brightness of the resulting kilonova that can be observed directly.Previous studies have examined the energy injection efficiency in a 1D injection model.In this study, we calculate the energy injection efficiency for the 2D case.The energy injection efficiencies are calculated using the following equation: where  sd,iso is the isotropic spin-down luminosity.For kinetic energy density and thermal energy density, the expressions are as follows:  respectively.The total injection efficiency is  tot =  kin +  therm .
Figure 10 illustrates the matter-dominated isotropic wind injection efficiency for various ejecta profiles.The upper three panels correspond to a total ejecta mass of 10 −1  ⊙ , while the bottom three panels represent 10 −3  ⊙ .
In the case of high-density ejecta, the total energy injection efficiency ranges from approximately 20% to 30% at the equator and reaches values as high as roughly 10 4 % near the pole.The majority of the injected energy is converted into kinetic energy, as indicated by the green lines.For collimated outflow near the pole, the dominance of kinetic energy over thermal energy suggests that the outflow is accelerated to high speeds.The magnetic energy does not peak at the pole due to the sin 2  scaling of the injected magnetic field.In this scenario, the collimation is not strong enough to focus an adequate amount of magnetic energy toward the pole.For ejecta profiles featuring a pre-existing funnel, the energy injection efficiency near  the pole can be as high as 1000, owing to the narrowness of the pre-existing funnel.
In the case of low-density ejecta ( ej = 10 −3  ⊙ ), the wind injection is more isotropic.The total energy injection efficiency is approximately 60% to 100% near the equator and around 10 3 % near the pole.Similar to the high-density ejecta case, most of the energy is converted into kinetic energy.If no pre-existing funnel is present, the kinetic energy exhibits a nearly isotropic behavior.Due to the weak confinement in this situation, thermal acceleration is inefficient.Consequently, at the pole, the outflow is predominantly thermally dominated.
Figure 11 depicts the wind injection efficiency for Poynting-flux dominated scenarios.Due to strong collimations, the total energy injection efficiency near the equator is significantly lower compared to matter-dominated winds.The injection efficiency near the equator is below 10%, while it reaches values as high as 10 4 % near the pole for  ej = 10 −1  ⊙ .Similar to matter-dominated winds, most of the injected energy is converted into kinetic energy within the ejecta.However, for the outflow near the pole, the plasma is dominated by magnetic energy.This is attributed to persistent energy injection and strong magnetic collimation.Consequently, even though thermal/magnetic acceleration is involved, magnetic energy remains dominant in this region.
It is worth noting that the thermal energy injection efficiency is negative for  > 20 − 30 • , which may not be clearly visible on a logarithmic scale.This negative thermal efficiency arises due to the inclusion of ejecta expansion in our efficiency calculation.The heat flow from the equator to the pole within the ejecta contributes to the negative thermal efficiency near the equator.For low-density ejecta ( ej = 10 −3  ⊙ ), the wind is less efficient than in the high-density ejecta case for accelerating the ejecta, and the heat flow from the equator to the pole is also weaker.Ai et al. (2022) investigated the 1-D wind injection case.In their work, they assumed an isotropic Poynting-flux dominant wind (  = 10 4 ,   = 10 3 ) with spin-down luminosity  ranges from 10 45 -10 49 erg/s.In their calculations, they found that a significant fraction of magnetic energy can be converted to kinetic energy by windinduced ejecta accelerations.For 10 −3  ⊙ ejecta, 70% of the injected energy will be stored as magnetic energy and kinetic energy, and less than 30% injected energy can be converted to internal energy via reverse shock heating.To compare with their result, we calculate the total injection efficiency as well.For Poynting-flux dominated wind ( = 9,  sd ∼ 10 49 erg/s) with 10 3  ⊙ in our simulations, we also find that roughly 70% of the injected energy is stored as magnetic energy and kinetic energy.To be more specific, roughly 35% of the energy is stored as magnetic energy while roughly 35% of the injected energy is converted into kinetic energy, regardless of the preinjection ejecta profiles.As the spin-down luminosity drops to 10 48 erg/s, the kinetic energy conversion efficiency drops to 30%, while the total fraction of magnetic energy and kinetic energy maintains around 70%.All those findings are consistent with the results in (Ai et al. 2022).The heating efficiencies of different models are summarized in Table 1 .

Conclusions
This paper presents investigations of the wind injection process from a magnetar in sGRBs using numerical simulations based on special relativistic magnetohydrodynamics (SRMHD).The study aims to understand the criteria for collimated outflow to appear, efficiency and angular distribution of energy injection into the surrounding medium.Our conclusions are summarized below.
• Most of the magnetar wind injection is non-isotropic.The asymmetry of the wind injected is determined by the magnetization and velocity of the expanding magnetar wind nebula that formed from wind ejection collision.High magnetization and low expanding speed result in the collimated outflow.The criteria  A / MWN ≫ 1 is a good indicator for wind collimation.
• Isotropic magnetar wind injection is hard to achieve.This requires either a very low magnetization in the MWN or an ultrarelativistic moving MWN.The low magnetization of MWN needs the magnetar wind to be accelerated efficiently in the wind acceleration region with strong magnetic dissipation, such that the magnetization of the wind can be decreased far below 1.The ultra-relativistically moving MNW requires the total injected energy from the magnetar wind to be much higher than the ejecta rest mass.
• For the collimated injection process, the anisotropy of the wind injection is insensitive to the ejecta profiles.However, a pre-existing funnel created by the GRB jet helps with the matter-dominated wind blowing out from the pole.
• If magnetars are proposed as the engine for an engine-fed kilonova, the energy injection efficiency to the ejecta might be lower than what we expected before, due to the wind collimation.The typical energy injected, which is generally estimated from the total spin-down energy of a magnetar per solid angle will be smaller by a factor of up to 10 with respect to the value of the isotropic case due to wind collimation.

Discussion
Our results have implications for understanding the sGRB phenomenology.There are three possible criteria to diagnose the existence of a magnetar engine in sGRBs.The first criterion is the extended emission or internal X-ray plateau as observed in a good fraction of sGRBs (e.g.Rowlinson et al. 2013;Lü et al. 2015).The typical energy emitted in the X-ray plateau phase is usually much smaller than the total spin energy of a millisecond magnetar.This has been attributed to a possible low X-ray emission efficiency and possible energy loss due to secular gravitational wave emission of the post-merger magnetar (e.g.Fan et al. 2013;Gao et al. 2016;Xiao & Dai 2019).Our results suggest that the injected energy estimated from the total spin-down energy of the magnetar into the polar region that powers the X-ray plateau emission may be even larger, which demands an even lower radiation efficiency or an even larger gravitational wave loss.
The second criterion is the brightness of the sGRB associated kilonova.Some recent studies (e.g.Wang et al. 2023) have used the non-detection of bright kilonovae (but see Gao et al. 2017) to argue that long-lived magnetar engine in binary neutron star mergers are rather rare.They have assumed an isotropic energy injection and a relatively large heating efficiency to reach the conclusion.Our results suggest that energy injection to kilonova is smaller by a factor of up to 10 than previously assumed for the same magnetar parameters.This result, together with the finding that the heating efficiency is quite low (Ai et al. 2022), suggest that the current result could be consistent with the hypothesis that a significant fraction of binary neutron star mergers leaves behind a magnetar engine.The emergence of a magnetar engine from the recently detected longduration merger-type (Typpe I) GRB 230307A, which has a not-toobright kilonova (Levan et al. 2023;Yang et al. 2023), suggest that it is entirely possible to have a magnetar-fed kilonvoa that appears as a regular kilonova detected in many sources.
The final criterion to test a magnetar engine is via the late-time radio afterglow energy of sGRBs (Metzger & Bower 2014;Fong et al. 2016;Horesh et al. 2016) or the he radio afterglow of the nonrelativistic kilonova ejecta (Nakar & Piran 2011;Gao et al. 2013;Hotokezaka & Piran 2015).At late time when the jet becomes nonrelativistic, the total injected energy from the magnetar spin-down to essentially all the directions will be probed.Since our results only re-distribute the energy in different angles, it would not modify the late-time afterglow radio flux significantly.By properly accounting for late-time dynamics, Liu et al. (2020) showed that the magnetar engine is allowed for most sGRBs in a large parameter space.If one focuses on the kilonova ejecta emission only, then the predicted flux should be weaker than previously predicted assuming isotropic energy injection.

Figure 1 .
Figure1.Luminosity profile for matter-dominated wind (blue line) and Poynting-flux-dominated wind (orange line) at the injection boundary.A significantly higher monopole-like spin-down luminosity ∼ 10 49 erg/s than the dipole spin-down luminosity ∼ 10 47 erg/s of a magnetar is adopted in our simulations.

Figure 2 .
Figure 2. Snapshots of energy density profile on magnetar wind injection to a static isotropic medium with different injected wind magnetization  w and medium densities.The collimation of the magnetar wind is determined by the magnetization and Lorentz factor of the magnetar wind nebula formed from the wind-medium collision.Thick dashed lines indicate the contact discontinuities and thick solid lines represent the position of the reverse shocks.

Figure 3 .
Figure 3. Collimation strength as a function of the energy weighted  in the magnetar wind nebula. =  A / MWN is a dimensionless parameter that represents the ratio between the Alfven four-speed and the four-velocity of the magnetar wind nebula.

Figure 6 .
Figure 6.Similar to Figure 5, but for energy density snapshots.

Figure 8 .
Figure 8. Similar to Figure 6, but for a Poynting-flux-dominated wind at the injection boundary.

Figure 9 .
Figure 9. Injected energy per solid angle for a magnetar wind.The winding magnetic field is assumed to be monopole-like.The solid lines are for a matter-dominated wind with  = 0.1 and the dashed lines are for a Poyntingflux-dominated wind with  = 9.

Figure A1 .
Figure A1.Fluid element acceleration calculated by using Eq A4.Blue vectors represent the Coulomb acceleration corresponding to the last two terms in Eq A4; green vectors denote the Lorentz acceleration from the second term; and orange vectors illustrate the acceleration due to the gas pressure gradient.The lengths of these vectors are displayed on a logarithmic scale.

Table 1 .
A table summarizing the parameters of the jet, ejecta, and wind in our models.