In-plane Tidal Disruption of Stars in Disks of Active Galactic Nuclei

Stars embedded in active galactic nucleus (AGN) disks or captured by them may scatter onto the supermassive black hole (SMBH), leading to a tidal disruption event (TDE). Using the moving-mesh hydrodynamics simulations with {\small AREPO}, we investigate the dependence of debris properties in in-plane TDEs in AGN disks on the disk density and the orientation of stellar orbits relative to the disk gas (pro- and retro-grade). Key findings are: 1) Debris experiences continuous perturbations from the disk gas, which can result in significant and continuous changes in debris energy and angular momentum compared to `naked' TDEs. 2) Above a critical density of a disk around a SMBH with mass $M_{\bullet}$ ($\rho_{\rm crit} \sim 10^{-8}{\rm g~cm^{-3}}(M_{\bullet}/10^{6}{\rm M}_{\odot})^{-2.5}$) for retrograde stars, both bound and unbound debris is fully mixed into the disk. The density threshold for no bound debris return, inhibiting the accretion component of TDEs, is $\rho_{\rm crit,bound} \sim 10^{-9}{\rm g~cm^{-3}}(M_{\bullet}/10^{6}{\rm M}_{\odot})^{-2.5}$. 3) Observationally, AGN-TDEs transition from resembling naked TDEs in the limit of $\rho_{\rm disk}\lesssim 10^{-2}\rho_{\rm crit,bound}$ to fully muffled TDEs with associated inner disk state changes at $\rho_{\rm disk}\gtrsim\rho_{\rm crit,bound}$, with a superposition of AGN+TDE in between. Stellar or remnant passages themselves can significantly perturb the inner disk. This can lead to an immediate X-ray signature and optically detectable inner disk state changes, potentially contributing to the changing-look AGN phenomenon. 4) Debris mixing can enriches the average disk metallicity over time if the star's metallicity exceeds that of the disk gas.


INTRODUCTION
Active galactic nuclei (AGN) are powered by the accretion of gas disks onto supermassive black holes (SMBH).The accreting SMBH is often also orbited by a nuclear star cluster (Neumayer et al. 2020), which must interact with the gas disk.Depending on the radial size of the gas disk, gas density ( disk ), and how long the disk lasts, some fraction of the nuclear star cluster orbiting the SMBH will be captured by the AGN disk (e.g.Artymowicz et al. 1993;Fabj et al. 2020;Nasim et al. 2023;Generozov & Perets 2023;Wang et al. 2023).Star formation within the AGN disk (e.g.Goodman & Tan 2004;Levin 2007) can also add to the embedded stellar population.Thus, we expect a dynamic population of embedded objects (stars and stellar remnants) to live within AGN disks.The initial population of objects within the AGN disk soon after it forms should consist of both prograde and retrograde orbiters, leading to the possibility of dynamically complex and high-speed encounters and scatterings ★ E-mail: tryu@mpa-garching.mpg.de(e.g.Leigh et al. 2018;Wang et al. 2021).Captured orbiters may include stars on retrograde orbits and high eccentricities at small semi-major axes (Wang et al. 2023).In-plane tidal disruption events in AGN (or simply AGN-TDEs hereafter) can result from either inplane scatterings of stars onto the SMBH, or eccentricity pumping of stars on retrograde orbits (e.g.Secunda et al. 2021;McKernan et al. 2022).Note that this is a new source of TDEs in addition to standard loss-cone filling scattering yielding TDEs at roughly the same rate (∼ 10 −4 yr −1 ) as in any other (quiescent) galactic nucleus (e.g., Stone et al. 2020).The loss-cone TDEs (e.g., Hills 1988;Rees 1988) will very likely intersect the AGN disk at an angle and yield a TDE that looks different from a TDE in a vacuum (Chan et al. 2019(Chan et al. , 2020(Chan et al. , 2021)).
In-plane AGN TDEs should look more different still.In McKernan et al. (2022) we speculated that AGN-TDEs could look quite different from 'naked' or gas-free TDEs, with observable differences between TDEs that are retrograde or prograde compared to the flow of disk gas.Here we investigate the hydrodynamics of prograde and retrograde AGN-TDEs using a simple disk model, with a view to qualitatively describing key features of AGN-TDEs and potential observables.Throughout we highlight the point that in-plane AGN TDEs test the dynamics of the disk as well as its embedded population.While stars on prograde orbits embedded in AGN disks may experience runaway mass growth (Cantiello et al. 2021;Jermyn et al. 2022), we only consider TDEs of normal main-sequence stars.
The paper is organized as follows: we provide descriptions of our numerical methods in detail in §2.We present results of our simulations in §3 and discuss astrophysical implications in §4 and caveats in §5.Finally, we conclude with a summary in §6.

Numerical methods
We perform 3D hydrodynamic simulations of a tidal disruption event of a main-sequence (MS) star on an in-plane parabolic orbit 1 around an AGN disk surrounding a SMBH, using the massively parallel gravity and magnetohydrodynamic moving-mesh code AREPO (Springel 2010;Pakmor et al. 2016;Weinberger et al. 2020).It employs a second-order finite-volume scheme to solve the hydrodynamic equations on a moving Voronoi mesh, and a tree-particle-mesh method for gravity calculations.By adopting this innovative approach to grid construction and solving hydrodynamics equations, the code inherits advantages of both commonly used hydrodynamics schemes, Eulerian grid-based methods and Lagrangian smoothed particle methods.The advantages include improved shock capturing without introducing an artificial viscosity, and adaptive adjustment of spatial resolution.
We use the ideal gas equation  = ( − 1) with  = 5/3, where  is the pressure and  is the gas internal energy density.

Creation of a star in an AGN disk
To make proper initial conditions for the simulations, we follow several steps, 1) creating a disk ( §2.2.1), 2) creating a 3D MS star ( §2.2.2), and 3) placing the star in the disk with a different mid-plane density on a parabolic orbit around a SMBH ( §2.2.3). .

AGN disk around a supermassive black hole
We model the central SMBH using a non-rotating sink particle, which interacts solely through gravitational forces with the gas.We allow the particle to grow in mass via accretion following the same procedure described in Ryu et al. (2023).However, it's worth noting that the total mass accreted remains significantly smaller than the mass of the SMBH throughout the simulation.Consequently, the change in the gravitational potential due to the mass growth of the SMBH would not significantly impact the results presented in this paper.
For the sake of completeness, we will briefly summarize the adopted accretion prescription.At every time step, the accretion rate is estimated as an inward radial mass flux towards the BH averaged over cells with weights within 10 g (denoted by "accretion 1 For naked TDEs, it is a good approximation that a star that is tidally disrupted initially had approached on a parabolic orbit.Even in AGNs, if a star approaches the SMBH from a large distance near the influence radius of the SMBH, the stellar orbit can be approximated as a parabolic orbit.The disk gas would exert a drag force on the star, affecting the orbit.But, in this work, we simply assume a parabolic orbit for simplicity.radius"), and multiplied by the integration area.Here,  g =   • / 2 represents the gravitational radius, which is approximately 2 R ⊙ for a SMBH mass of  • = 10 6 M ⊙ .The weights are given using an inverse-distance weighted spline Kernel (Monaghan & Lattanzio 1985) (Equation 4in Springel 2005).If there are only a few cells within the accretion radius, the accretion rate estimate may be affected by Poisson noise.To ensure a sufficient number of cells in proximity to the black hole, we dynamically adjust cell refinement and derefinement within a region slightly larger than the accretion radius, aiming to maintain more than approximately 100 cells within this radius.Specifically, the code refines cells with a density greater than 10 −14 g/cm 3 and a mass exceeding 6 × 10 22 g, provided that the ratio of the cell size to the distance from the black hole is greater than Δ/ = 0.03.Conversely, the code derefines cells if their mass falls below 1.5 × 10 22 g or if Δ/ < 0.01.
The thermodynamic profiles of an AGN disk surrounding the SMBH are described by the solution for a gas-pressure dominated disk in Nelson et al. (2013).The mid-plane density and temperature follow a power-law in , where  c and  c are the mid-plane density and temperature near the inner edge of the disk, respectively, and  cusp = 10 3  g .In this work, we consider a disk surrounding a 10 6 M ⊙ SMBH with the mid-plane density  c = 10 −7 − 10 −12 g cm −3 at the inner disk edge  inner = 100 g (see Table 2).To match the disk solution by Sirko & Goodman (2003), we adopt the values of , and  = −3/4.The vertical structure, i.e., the density and angular frequency Ω,  1), (fourth) maximum temperature in the mid-plane  c (see Equation 2), and (fifth) aspect ratio at  =  inner .
Model number of the disk is described by the following equations, where Ω K = √︁   • / 3 is the Keplerian angular frequency and ℎ/ the aspect ratio.Note that the temperature has no dependence on the vertical distance orthogonal to the mid-plane , meaning the temperature (so the sound speed) is constant along each vertical column at given .
The disk is fully described if  c ,  c and ℎ/ at  inner are determined.For a given  c we estimate the two other disk parameters using the following equations from Sirko & Goodman (2003), where and  is the accretion rate.Assuming  = 0.5  Edd ,  ′ ≃ 0.4  Edd at  inner = 100 g .Here,  Edd = 10 Edd /2 where  Edd is the Eddington luminosity and an radiation efficiency of  = 0.1 is assumed.And  = 0.01 is the viscosity parameter.Combining Equations 6, 7, and 8, we find an expression for ℎ/, ℎ Once ℎ/ is estimated, Equation 8 determines  c from the assumed ideal equation of state.
Using the disk solution, we construct a disk extending out to ≃ 10 4  g for  • = 10 6 M ⊙ , corresponding to 2 × 10 4 R ⊙ , using ≃ 10 7 cells.The disk parameters for our models are summarized in Table 1.

Stellar model
The initial state of the star in our hydrodynamics simulations was taken from stellar models evolved using the stellar evolution code MESA (version r22.05.1) (Paxton et al. 2011(Paxton et al. , 2013(Paxton et al. , 2015(Paxton et al. , 2019;;Jermyn et al. 2023).We consider MS stars with three different masses,  ★ = 1 M ⊙ , 3 M ⊙ , and 10 M ⊙ , when the core H mass fraction is 0.3.The stellar radii of those stars are  ★ = 0.95 R ⊙ , 2.5 R ⊙ , and 4.7 R ⊙ , respectively.Stars can grow in mass via accretion in the AGN disks (Cantiello et al. 2021).The rate of accretion significantly influences the internal structure and chemical compositions of stars embedded in the disk.However, for those stars which approach the SMBH on a parabolic orbit from the effective radius of the nuclear cluster, ≃ 0.5 pc ≃ 10 7  g for  • = 10 6 M ⊙ (Neumayer et al. 2020), and are disrupted at the first pericenter passage, the accretion onto the star would not be significant.Assuming a Bondi-Hoyle accretion (Bondi & Hoyle 1944;Bondi 1952) 2 onto a 1 M ⊙ star on a parabolic orbit in our disk with  c = 10 −8 g cm −3 , the accretion rate can be estimated as  ≃ 10 −15 M ⊙ yr −1 (/10 7  g ) −3/2 .The total accreted mass until the star reaches the SMBH is ≃ 10 −10 M ⊙ .Going one step further, because the dynamical friction is ∝  (Lee & Stahler 2011, 2014) where  is the speed of the star, the total momentum of disk gas interacting with the star is many orders of magnitude smaller than the angular momentum of the stellar orbit.We first map the 1D MESA model into a 3D AREPO grid with  ≃ 10 6 cells using the mapping routine by Ohlmann et al. (2017).Then we fully relax the 3D single star, which usually takes up to five stellar dynamical times

√︃
3 ★ /  ★ .Figure 3 depicts the radial density profile of the fully relaxed stars in comparison with the MESA models.The internal profile of the 3D star matches the MESA model within less than a few % except near the surface, corresponding to only a few % of the total mass, where the error is greater than 10%.

Initial conditions for star + disk model
The relaxed stars are initially placed at 8 t on a parabolic orbit with a pericenter distance  p ≃ 0.3 t where  t is the tidal disruption radius, defined as  t ≡ ( • /  ★ ) 1/3  ★ .The pericenter distance was chosen to ensure a complete disruption of the star in our fiducial model while keeping the events from becoming too relativistic.We consider both prograde and retrograde orbits of the star relative to the orbit of the disk.Our fiducial models assume  c = 10 −8 g cm −3 .In addition, we consider  c = 10 −7 g cm −3 , 10 −9 g cm −3 , 10 −11 g cm −3 , and 10 −12 g cm −3 .For reference, we perform the simulation of a TDE in an extremely low-density medium with  ≃ 10 −20 g cm −3 , representing a vacuum, sharing the same encounter parameters of our fiducial model.To examine the stellar-mass dependence, we examine the post-disruption properties of the disk and debris for stars with  ★ = 3 M ⊙ and 10 M ⊙ .For these cases, we only consider  c = 10 −8 g cm −3 .
We performed convergence tests for the retrograde version of our fiducial models with different resolutions for the star ( ★ =125000, 250000, 500000, 10 6 cells) and disk ( disk = 6 × 10 6 and 1.2 × 10 7 ).By comparing several key quantities (e.g., debris mass as a function of radius from the black hole, the average radial mass infall rate towards the black hole), we confirmed that the results have already converged very well with  ★ = 250000 and  disk = 6 × 10 6 .To ensure the convergence, we chose  ★ = 10 6 .
We summarize the model parameters in Table 1.

Overview
We first provide a qualitative overview of the results of our simulations.More quantitative descriptions will be given in the following sections.
Figure 4 shows successive moments in a full disruption of the 1 M ⊙ star in our fiducial models ( c = 10 −8 g cm −3 ) with a prograde (left) and retrograde (right) orbit.For comparison, we show in the middle column the same moments in a naked TDE sharing the same encounter parameters.The pre-disruption orbit and the internal structure of the star are not significantly affected by the disk provided a negligible amount of disk mass is interacting with the star until it reaches pericenter (1 st panels).Upon disruption, the debris starts to expand in size.The increasingly larger cross-sections makes the debris more subject to interacting with the disk (2 nd − 3 rd panels).Depending on whether the orbit is prograde or retrograde, the evolution of the debris can be qualitatively different, meaning potentially different observational signatures.
In the prograde case, the outer edges of the debris are gradually mixed into the disk via the Rayleigh-Taylor instability (Taylor 1950;Rayleigh 1882).Due to the coherent motion between the debris and Continuous interactions between the debris and the disk gas result in a significant perturbation of the debris's orbit and, therefore, its structure.The impact of the disk interaction is greater for the retrograde orbit than the prograde orbit.At later times, the debris is completely disintegrated and mixed into the disk.disk, as illustrated in the left panel of Figure 5, the interaction with the disk acts to add angular momentum to the debris.On the other hand, the evolution of debris in the retrograde case is more dramatic due to the significant cancellation of angular momentum.In the retrograde case, like the prograde case, the debris is continuously lost to the disk.But the mixing is more violent, which is shown in the 3 rd right panel of Figure 5.As a result, the initially coherent motion of the debris is significantly perturbed even before any of the bound matter starts to return to the SMBH.Because of increasingly irregular perturbations caused by the Rayleigh-Taylor instability, the energy distribution and the resulting fallback curve of the debris tend to be bumpier than that for the prograde case.In the case of a sufficiently high mid-plane The white arrows show the direction of motion of the gas.In the prograde case, the disk interactions act to increase the angular momentum of the debris whereas, in the retrograde case, the disk interactions cancel out the angular momentum of the debris.
density (e.g.,  c = 10 −8 g cm −3 ), the entire debris can be mixed with the disk in less time than the peak fallback time of debris in a naked TDE with the same disruption parameters.

Debris mass loss -semi-analytic approach
To quantify the mass loss of debris to the disk, we distinguish the debris from the disk gas using a passive scalar.The passive scalar is an artificial scalar quantity initially assigned to each cell.The scalar then evolves via advection.The initial value of the passive scalar for the cells that belong to the stars is one, and for the disk cells, it is zero.Depending on the mass exchange (and thus momentum exchange) between the cells, the passive scalar varies between zero (for disk cells) and one (for cells originally in the stars).Identifying a specific region of gas with a passive scalar has been used in the literature to investigate mixing of gas in various contexts (e.g., McCourt et al. 2015;Gronke & Oh 2018;Dutta & Sharma 2019;Kanjilal et al. 2021;Farber et al. 2022;Farber & Gronke 2022).Our close investigation of the distribution of the scalar suggests that the scalar quantity for the debris in a coherent motion is generally larger than 0.99, meaning it mixes with the disk material by roughly less than 1% in mass.
Figure 6 illustrates the fractional mass of debris relative to the initial stellar mass as a function of the distance of the center of mass of debris from the SMBH.The left (right) panel compares the debris mass between models with different mid-plane disk densities (stellar masses).The most noticeable difference is between the prograde and retrograde cases.For the case with the retrograde orbit relative to the disk with the highest density ( c = 10 −7 g cm −3 , red solid line in the left panel), the entire debris gets mixed to the disk near the density cusp at  ≃ 10 3  g .On the other hand, for the prograde case with the same disk, the mass loss is less severe: ≃ 30% of the debris survives until it reaches 7000 g .As the disk mid-plane density decreases or the stellar mass increases, a larger fraction of debris can reach farther out.
The impact of the debris mass loss on the disk structure would be insignificant because the enclosed mass of the disk (dotted diagonal lines in Figure 6) is many orders of magnitude greater than the stellar mass by the time the entire debris is dissociated and mixed into the disk.
We can understand the trends of debris mass loss to the disk by comparing how much disk mass interacts to remove the momentum of the debris along the way out.To this end, we build a semi-analytic model for the mass of debris that is mixed to the disk in the retrograde case, which allows us to estimate the maximum distance that the debris can travel through a disk.For the prograde case, the momentum of the disk is added to the debris (see Figure 7), so this semi-analytic model won't apply to the prograde case.
We assume that the disruption of the coherent motion of the debris is primarily governed by the amount of mass of the disk flow hitting the debris.In other words, the remaining debris mass  debris that continues to follow the orbit that the debris would have assuming a ballistic orbit is simply the initial debris mass or stellar mass  ★ minus the mass of disk flow  d continuously interacting with the debris, When the self-gravity is not important, the slow-down of the debris would naturally lead to mixing into the disk.However, when the self-gravity is strong, the entire debris would slow down instead of mixing into the disk.The former is more relevant for AGN-TDEs.
We may be able to estimate  d () as, where  disk () is the density at distance  from the SMBH,  disk () ≃ √︁   • / the flow speed at , and  debris the cross-section of the debris whose normal is parallel to the disk flow.Although each part of the debris moves at a different speed, we simply assume that the entire debris continues to follow the original orbit of the star, i.e., parabolic orbit, so that  () since disruption is expressed, and the radial velocity is, With Equations 12 and 13,  disk () and  disk () are now a function of time.To calculate  debris (), we assume that by the time the debris arrives at  ≃  t since disruption, the debris extends to  debris ≃   ★ with a width  ≃  ★ , where  ≃ 20 − 22 from our simulations (see Figure 4).We further assume that the debris expands in size such that  ∝  4/3 and  debris ∝  1/3 before the most bound debris starts to return (Coughlin et al. 2016;Bonnerot & Stone 2021).These assumptions allow us to write an expression for  debris and  debris , and where  ( =  t ) is estimated using Equation 12.Note that the average density of debris ρdebris ∝  ★ /[ debris ℎ 2 debris ] ∝  −2 , which we have confirmed from our simulations.It follows that the cross-section  debris is, Because the disk density profile has two regions, i.e., flat for  <  cusp = 10 3  g and power-law for  >  cusp , we will calculate the mass loss due to disk-debris interaction for the two regions separately.
(i) Flat region ( disk =  c ): the time required for the debris to reach the cusp is roughly estimated using Equation 12, So for  <  cusp , the mass loss is, As shown in the equation, the fractional mass loss • ), but rather strongly depends on  c .For example, roughly half the debris mass would be mixed to the disk at  ≃  cusp (or  ≃ 0.85 days) when  c ≃ 10 −7 g cm −3 , which is illustrated in the left panel (red solid line) of Figure 6.
(ii) Power-law region ( disk ∝   with  = −3): the mass loss at The mass loss predicted from the semi-analytic model is in good agreement with the simulation results for the retrograde cases (solid lines), which are depicted in Figure 6 using dot-dashed lines.Our semi-analytic model suggests that in our fiducial model with  c = 10 −8 g cm −3 , roughly 50% (80%) of the debris mass would be mixed into the disk in 15 days (30 days ≃  0 ) while the debris is moving away from the SMBH.Among the rest of the remaining debris (20%), the bound part would have to plow through the disk inwards while it was returning to the SMBH, such that it is very likely that at least the remaining bound debris would be completely mixed into the disk on the way in.In fact, we do not observe any coherent return of debris to the SMBH in our simulations.This means, no TDE-like flare would be generated.

Energy and angular momentum distribution of debris
In this section, we seek to investigate the energy and energy distribution of debris in AGN disks.Figure 7 presents the distribution  2 /  of specific orbital energy  relative to the SMBH and specific angular momentum  of debris for our fiducial models (i.e.,  ★ = 1 M ⊙ and  c = 10 −8 g cm −3 ).Debris produced in AGN disks undergoes continuous changes in the debris structure, potentially leading to a dramatic modification of the  −  distribution on a relatively short time scale (e.g., before any of the bound material returns to the SMBH).This continuous evolution of the distribution is one of the main differences between TDEs in AGN disks and those in a vacuum ("naked TDEs").Not long after the disruption (left panel,  = 0.2 days), the  −  distribution appears almost identical between the prograde and retrograde cases.However, as the debris travels away from the SMBH, the distribution continuously evolves differently over time, depending on the relative orientation of the orbit.For the prograde case (top panels), one of the most noticeable trends is that the angular momentum increases over time.On the other hand, the angular momentum decreases for the retrograde case (bottom panels).This trend is expected based on how the motion of the debris is aligned or anti-aligned with the disk flow (see Figure 5).Additionally, the distribution for the retrograde case is substantially more perturbed by the disk.At around 10 days, most of the debris in the retrograde case is mixed into the disk, and its angular momentum becomes less than 80% of the initial angular momentum.Compared to changes in angular momentum within the debris ( ≲ 5%) for naked TDEs (Cheng & Bogdanović 2014;Ryu et al. 2020b), the subsequent change in the angular momentum due to continuous interactions with the disk is much more substantial.
Other cases with different disk mid-plane density and stellar masses reveal qualitatively the same trend.
We further present the distribution of  for  ★ = 1 M ⊙ , by integrating  2 /  over , in Figure 8.Because the energy distribution for the disk with  c ≲ 10 −11 g cm −3 is almost identical to our vacuum case, we only show the distribution for  c ≳ 10 −9 g cm −3 (also the same for the fallback rate in §9).For comparison, we depict the energy distribution of debris produced in a full disruption in a vacuum sharing the same encounter parameters (grey line in each panel), measured at 2 days after disruption.For both prograde (left panels) and retrograde (right panels) cases, the energy distribution at  = 0.2 days is almost identical to that for the naked TDE, except for the sharp cut-off at the far-end of the wing for the unbound debris, indicating that the most unbound debris has been already mixed to the disk.The subsequent interaction of the debris with the disk gas continuously perturbs the debris starting from its head and tails (where the density is the lowest), corresponding to the wings of the distribution.As a result, the distribution becomes narrower.Notice, however, that the rate at which each side of the distribution becomes narrower is different.At early times ( ≲ a few days), the unbound debris is lost to the disk at a faster rate than the bound debris.However, the "mixing" or "slowing-down" rate of the unbound debris becomes slower than that of the bound debris at later times.In all cases except for the retrograde case with  c = 10 −7 g cm −3 , the distribution for the unbound debris does not change at  ≳ 5 days, while that for the bound debris continues to shrink.This behavior can be understood based on when and how long the debris moves in a denser region of the disk.Upon disruption, the unbound debris advances further out, meaning that it interacts with the disk more at a given time.At later times, once the unbound debris moves beyond the density cusp, because the disk density continues to decrease, the perturbation of the unbound debris due to the disk material becomes increasingly weaker.However, the bound debris stays for a longer time in denser parts of the disk as it slows down before returning to the SMBH, meaning more interactions with the disk.
It is worth noting that the distribution becomes bumpy when irregular debris structure develops due to the Rayleigh-Taylor instability, which is more pronounced for the retrograde case with higher disk densities (see the right panel of Figure 5).
The features mentioned above are also found in the cases with different stellar masses.Given the qualitative similarities, we present the distribution for  ★ = 3 M ⊙ and 10 M ⊙ in the upper panels of Figure A1 and Figure A2, respectively.Note that at this pericenter distance, the 3 M ⊙ star is only partially disrupted and a remnant survives, which correponds to the peak at  ≃ 0 in the energy distribution.

Fallback rate
Using the energy distribution and assuming a ballistic orbit of the debris, we estimate the mass fallback rate, which is illustrated in Figure 9 for  ★ = 1 M ⊙ .For completeness, we present the fallback rate for  ★ = 3 M ⊙ in Figure A1 and for  ★ = 10 M ⊙ in Figure A2.
The continuous shrinkage of the energy distribution for the bound debris leads to the decrease in the peak fallback rate and increase in the peak fallback time.For  c = 10 −8 g cm −3 with the prograde orbit (middle-left panels), the peak mass return rate decreases from 100  Edd to 20  Edd in 24 days.Here,  Edd =  Edd / 2 where  Edd is the Eddington luminosity with a radiative efficiency  = 0.1.The debris with a bumpy energy distribution in some of the cases (see Figure 8 reveals irregular patterns in the rate on top of the trend of the peak fallback rate and time.For example, for  c = 10 −8 g cm −3 (top panels), the rate curves gradually shift towards the right-bottom corner of the figure while the curves become increasingly bumpy.
The bumpiness and the change in the peak fallback rate and time are greater for higher  c and for a retrograde orbital configuration.
One observationally relevant finding is that the rate at which the bound debris is mixed into the disk is faster than the rate at which the debris returns in all cases shown in Figure 9 ( c ≳ 10 −9 g cm −3 ).In other words, the bound debris is continuously mixed into the disk before it returns to the SMBH in a coherent fashion like it does in a naked TDE.This suggests that the resulting light curves of AGN TDEs in sufficiently dense gas disks would not simply be TDE-like lightcurves on top of AGN lightcurves (see §4.2).

Passage of star around the SMBH
A close passage of a star can significantly perturb the inner part of the disk, which possibly enhances the accretion rate until the perturbed disk settles again over a time scale comparable to the cooling timescale.To zeroth order, whether a stellar passage can significantly affect the structure of the inner disk can be measured by comparing the swept-up mass of the star during the pericenter passage,  swept−up ≃  disk  2 ★  p , to the disk mass within the pericenter distance,  disk ( <  p ) ≃  disk (ℎ/) 3 p , This ratio of order unity suggests that a passage of a main-sequence star, in particular a massive one, can significantly affect the inner disk over a very short time scale comparable to the dynamical time at pericenter.Qualitatively, this may cause a state-change in the inner disk, much like those observed in changing-look AGN exhibiting an increase in luminosity (Graham et al. 2020).The temperature at the innermost stable circular orbit can be parameterized as (McKernan et al. 2022) , where  ISCO is the location of the innermost stable circular orbit and  is a numerical factor.By contrast, the temperature of the shock due to the close pass of the star ( shock ∼  shock /4 2 shock ) can be parameterized as (McKernan et al. 2022) where we assume  shock ∼  ★ and clearly the passage of the star must heat the innermost disk substantially.At such temperatures, prompt X-ray flaring and fast outflows are likely (e.g.Kosec et al. 2023).If the heating of passage translates into a fiducial local aspect ratio increase then the puffed-up inner disk is accreted on a shorter viscous timescale   .Since   can be parameterized as (e.g.Stern et al. 2018) we can see that e.g. a doubling of average disk aspect ratio ℎ/ due to local heating leads to a significantly shorter (1/4) accretion timescale and so there is a temporary enhancement in accretion (and therefore   2 luminosity) while the local disk accretes and cools over the approximate thermal timescale (Stern et al. 2018) Thus, if debris from the TDE can make it back to the SMBH on these timescales ( th ), the initial impulse heating is continued and added to, in a single episode.If debris from the TDE takes longer than  th to return to the inner disk, then the lightcurve will consist of two separate episodes, the initial perturbation, followed by the debris fallback and accretion.But as explained in the following section, the TDE-like lightcurves from the debris fallback and accretion can only be created when the disk density is sufficiently small.

Full tidal disruption event
The subsequent source of a flare is the stellar debris produced in the tidal disruption.The biggest difference between in-plane AGN TDEs and 'naked' or standard TDEs is the continuous interaction between debris and disk gas, resulting in the time evolution of the debris orbits and debris structure.In naked TDEs, because the debris' orbit is almost ballistic, the post-disruption debris orbit does not change significantly over time until debris returns to the SMBH.This feature allows us to make a prediction for the fallback rate curve (Hills 1988;Rees 1988) with the energy distribution of debris upon disruption.However, in the case of AGN-TDEs, because the debris continuously interacts with surrounding disk gas, the shape of the fallback rate curve, such as the peak fallback rate and the slope of the decaying part of the fallback rate curve, depends strongly on the disk density ( disk ).If  disk is sufficiently high, greater than some critical value ( crit ), the debris is completely mixed with the disk before it ever returns.In this case, no debris returns to the SMBH in a coherent and eccentric fashion as predicted for naked TDEs.
Using the semi-analytic model developed in § 3.2 we estimate  crit for a complete dissociation of the debris in a retrograde orbit on a time scale comparable to the peak mass return time (estimated assuming naked TDEs) as a function of  ★ and  • in the left panel of Figure 10.Although we assume  cusp = 10 3  g here,  crit can be easily calculated using our semi-analytic model (see § 3.2) with different values of  cusp .As shown in the left panel, the minimum  crit has a relatively weak dependence on  ★ while it mostly depends on  • .The reason that  crit is lower for higher  • is because each part of the debris travels a longer absolute distance for a given peak Here,  0 is estimated by including the correction factor for the stellar internal structure and relativistic effects (Ryu et al. 2020a,b,c,d).The white region near the corner indicates the region of parameter space where stars would be directly captured by the black hole.Similarly, the vertical dashed white line indicates the maximum black hole mass for direct captures.mass return time.We also present in the right panel the ratio of the time for a complete dissociation  dis =  ( d =  ★ ) of debris to the peak mass return time  0 for naked TDEs as a function of  crit and  • , suggesting that in the large parameter space relevant for AGN disks, debris is completely mixed with the disk before returning to the SMBH.Thus, for dense AGN disks, the resulting lightcurves cannot be described by a simple superposition of the luminosity of naked TDEs on top of that of AGN disks.Conveniently, we can parameterize  crit at  dis ≃  0 for the retrograde TDEs, as The value of  crit would be higher for prograde TDEs than that for retrograde TDEs.Even for those cases where the debris is partially disintegrated, because the mass fallback rate curve would be significantly different from that for naked TDEs, the resulting luminosity associated with the disruption of a star could be different.Nonetheless, the returned debris can perturb the inner disk, which would boost the luminosity temporarily.However, detailed modeling of the response of the disk near the SMBH is beyond the scope of this paper.
In some cases, disruptions end up adding some mass to the disk without generating a TDE-like flare.However the addition of the mass would have a minimal effect on the disk structure because the disk mass inside the radius at which the debris is completely disintegrated, namely  ≳ 10 3  g for  c ≲ 10 −7 g cm −3 , is much greater than the mass of the debris (see Figure 6).
Quantitatively, in the limit of low  disk ≪  c (more specifically  disk ≲  c /10 3 based on our simulations), AGN-TDEs should look increasingly like standard 'naked' TDEs.Thus, observations of a TDE-like lightcurve in an AGN should indicate a low density disk with  disk ≪  c .A low density disk at large radii might be responsible for late-time radio signatures years post-TDE (Cendes et al. 2022), as part of the debris that would otherwise escape interacts with the gas disk and returns later than the main apparently 'naked' TDE.Thus late-time responses to otherwise 'naked' TDEs could indicate either a weak AGN, or a more distant fuel reservoir, interacting with the debris, driving much later material return.

Partial tidal disruption event
The source of AGN-TDEs are embedded stars that have either been scattered via dynamical encounters into the AGN loss cone, or on highly eccentric orbits.In both cases, the probability of a partial tidal disruption event (where pericenter passage of the star is close, but not too close, to the SMBH) should be higher than an actual AGN-TDE.It is worth considering the observational implications of partial AGN-TDEs.
As we have seen above, AGN-TDE debris mixing can be significant, particularly in dense AGN disks.This can inhibit and, if the disk is dense enough ( disk >  crit ), completely prevent the return of TDE material to the SMBH.However, in the case of a partial disruption, some of the outer part of the star is stripped, but the core remains coherent.As long as the orbit is bound (e.g. if the orbit is highly eccentric), it should return to the SMBH on approximately the orbital period,  orb ∼ 5 day(/600 g ) 3/2 ( • /10 6 M ⊙ ) where  is the semimajor axis of the remnant's orbit.Repeated passage of a bound remnant will generate similar heating of the inner disk to the first pericenter passage.Such partial disruption perturbations could yield transients like quasi-periodic eruptions (QPEs) as observed in X-rays in some AGNs around low mass SMBHs (e.g.Wevers et al. 2022).The magnitude of any repeating flare depends on the remnant mass and the ratio of the local thermal timescale ( th ) to the returning timescale ( orb in this case).For example, if the remnant mass is smaller and  th >  orb , the heating flare will appear less prominent against a higher AGN continuum state.In order to explain observed QPE timescales of O(day), this would require highly eccentric retrograde stellar orbits at  ∼ few × 10 2   , around smaller mass SMBHs.Such orbits may occur early on in the AGN phase due to disk capture (Wang et al. 2023) or rapid retrograde orbital decay (McKernan et al. 2022).

Metallicity of AGN disks
AGNs are generally believed to have high metallicity.In particular the broad line region (BLR) metallicity in AGNs is observed to be substantially super-solar out to high redshift (Hamann & Ferland 1999;Juarez et al. 2009).Quasar host galaxies at  < 2 are surrounded by metal-enriched cool gas, believed to originate in AGN outflows (Prochaska et al. 2013).Of course some of this metallicity enrichment could come from supernovae embedded in AGN at a rate of  (10 −4 )yr −1 (Juarez et al. 2009), a rate which is very similar to the expected standard TDE rate.It is unclear how stars embedded in AGN disks evolve; but it is possible that they do not undergo supernovae but instead grow in mass and support themselves by inflow of fresh hydrogen from the AGN disk (Cantiello et al. 2021;Jermyn et al. 2023).If this occurs non-negligibly often, then supernovae would be more rare in AGNs than naively expected from standard stellar evolution, making TDEs a plausible means of enriching AGN metallicity.TDEs can also occur around stellar mass BH embedded in AGN disks, yielding micro-TDEs (Perets et al. 2016;Yang et al. 2022).Such micro-TDEs can also contribute to metallicity enhancement in the disk.
Assuming TDEs are the sole source of metallicity enhancement through the mixing of stellar debris with the disk, one can estimate, to an order of magnitude, the number of AGN-TDEs, by  TDE , of stars with metallicity  ★ >  1 required to elevate the metallicity of the AGN disk from  0 to  1 .The total enclosed mass of the disk within a distance at which a fractional mass  of the debris is mixed after  TDE TDEs is   TDE  ★ +  disk and the total mass of metals after TDEs  0  disk +  ★   TDE  ★ .Assuming the total enclosed mass of the disk is conserved,  TDE can be expressed as, where  disk is the enclosed mass of the disk into which debris with a mass of   ★ is mixed.As an example, to enhance the metallicity from However, it is important to note that many variables, namely  ★ ,  ★ ,  disk , and , are highly uncertain.To determine these quantities accurately, a more detailed modeling of the dynamics in stellar clusters around AGN disks would be necessary.

CAVEATS
Although our simulations treat hydrodynamical effects accurately, there are two main caveats.First, no relativistic effects are included.It has been recognized that relativistic effects would play a major role in determining the evolution of debris in TDEs by massive black holes (e.g., Bonnerot & Stone 2021).This would be applicable to in-plane TDEs in AGN disks with low disk densities.However, if the disk density is sufficiently high so that the debris is mixed before its return, relativistic effects on the long-term evolution of debris would be irrelevant.However, because debris would stay a longer time near pericenter, it is possible that the perturbation of the inner disk at the first pericenter passage would be stronger for more relativistic cases (e.g., extremely relativistic TDEs, Ryu et al. 2023).Second, we do not include radiation pressure in our simulations.The standard AGN disk model suggests that the inner part of the disk is radiation pressure-dominated (Shakura & Sunyaev 1973;Sirko & Goodman 2003).Because our disk is supported only by the gas pressure, the temperature is significantly higher than the case where the disk is supported both by the radiation and gas pressure.We will investigate the impact of radiation pressure on the disk temperature profile and how this in turn affects the time evolution of the debris in a follow-up project.

SUMMARY AND CONCLUSIONS
In this work, we investigated the evolution of debris in tidal disruption events of main-sequence stars by a 10 6 M ⊙ supermassive black hole, surrounded by a gaseous disk, using the moving-mesh hydrodynamics simulation code AREPO.We consider three stellar masses,  ★ = 1 M ⊙ , 3 M ⊙ , and 10 M ⊙ , and a range of mid-plane maximum disk densities  c = 10 −12 − 10 −7 g cm −3 .
The results of the simulations can be summarized as follows, (i) Stellar debris produced in an in-plane disruption in an AGN disk is continuously perturbed by the disk gas as it plows through the disk.As a result, the energy and angular momentum of the debris evolves differently over time relative to TDEs in a vacuum.For prograde TDEs (those of stars on a prograde orbit relative to the disk orbit), the debris' angular momentum increases whereas the debris' angular momentum decreases for retrograde TDEs.
(ii) For a sufficiently high disk density, a large fraction of the debris can be disintegrated and mixed into the disk via the interaction with the disk.The mixing is more significant for retrograde TDEs.This gradual mixing is a unique feature that is clearly distinguished from tidal disruption events in a vacuum.
(iii) For high density AGN disks it is likely that the debris produced in retrograde TDEs is fully mixed into the disk before any of the debris material returns in a coherent fashion as in naked TDEs.The critical density above which the retrograde debris is completely mixed into the disk on a timescale comparable to the peak mass return time for naked TDEs is  crit ∼ 10 −8 g cm −3 ( • /10 6 M ⊙ ) −2.5 .Note that this critical density is the minimum density of disintegration of the entire debris.The density above which no bound material returns to the SMBH would be lower,  crit,bound ∼ 10 −9 g cm −3 ( • /10 6 M ⊙ ) −2.5 .Even for prograde TDEs, no coherent fallback has been found when the maximum disk density is ≥ 10 −9 g cm −3 .
(iv) The mixing of the stellar material into the disk has several astrophysical implications.First, the light curves of in-plane TDEs in an AGN disk, whose density is high enough to cause the disintegration of the debris, could be significantly different from just the superposition of light curves of naked TDEs on top of those of AGN disks.A first burst should originate from the close passage of a star, perturbing and heating up the inner part of the disk, possibly resulting in an enhancement of the accretion rate until the perturbed disk settles on the local thermal timescale ( th ).Thus we expect an observable state-change in the AGN emission from a close passage, similar to that observed in changing-look AGN, with significant X-ray flaring around smaller mass SMBHs.At low-density ( disk ≲  crit,bound /10 2 ), the gas reservoir at moderately large distances from the SMBH (> 10 4  g ) might generate late-time debris return and account for recent very late-time signatures of (otherwise naked) TDEs (e.g.Cendes et al. 2022).At modest disk densities ( crit,bound /10 2 <  <  crit,bound ), AGN TDE debris is only partially mixed and the rest returns, generating a secondary, longer, inner disk flaring episode via both inner disk perturbation as well as accretion of debris.At high disk densities ( disk ≥  crit,bound ) no TDE-like light curves are created, past the initial state-change, but a mildly elevated accretion rate (and higher luminosity) should persist for years due to the complete mixing of debris.
(v) For partial disruptions, recurring passage of the stellar remnant will heat the inner disk, creating recurring flares.A population of highly eccentric retrograde orbiters around low mass SMBHs should produce quasi-periodic eruptions (QPEs) in X-rays from partial AGN TDEs.Whether each flare is separate or the disk response is blended depends on the orbital period of the embedded partially disrupted star as well as disk properties.Short-timescale QPEs are therefor a test of both the population of eccentric retrograde orbiters and the AGN disk.
(vi) The mixing of the stellar debris in AGN TDEs contributes to the enhancement of the disk metallicity.Supernovae of stars embedded in a disk could be another source of metallicity enhancement.But if stars grow in mass without undergoing supernovae, mixing from AGN TDEs (and micro-TDEs) could be an important mechanism to elevate disk metallicity.
Identifying such events in a large sample of AGN can provide a constraint on typical densities of AGN disks and the embedded stellar population while the disk exists which are otherwise are hard to probe.Going forward, it will be imperative to understand the shape of the lightcurves that account for the passage of the star and the evolution of debris as a function of disk density.It will also be important to track returning masses in the case of partial AGN TDEs, to test models of QPEs in AGN around low mass SMBHs.In order to investigate the contribution of AGN TDEs to the evolution of metallicity enhancements in AGN disks, detailed modeling of the dynamics between stellar-mass objects in nuclear star clusters surrounding AGN disks would be required over a cosmological time scale.MNRAS 000, 1-?? (2022)

Figure 1 .
Figure 1.Average mid-plane density and enclosed mass of our fiducial AGN disk model at four different times:  = 0 hours (grey dotted), 25 hours (blue solid), 50 hours (red solid), 100 hours (black solid).The upper −axis indicates the time which it takes for a star on a parabolic orbit to reach the given distance.

Figure 2 .
Figure 2. Mid-plane density (top) and enclosed mass (bottom) of fully relaxed disks with a different initial mid-plane density.The grey lines in the top panel showing the initial density profile are just sitting on top of the profile for the relaxed disks.On the other hand, the grey horizontal lines in the bottom panel indicate the masses of the stars considered.Like Figure 1, the upper −axis shows how long it takes for a star on a parabolic orbit to travel the given distance.

Figure 3 .
Figure 3. Radial density (top) of fully relaxed 3D stars with mass  ★ = 1 M ⊙ (red solid), 3 M ⊙ (blue solid), and 10 M ⊙ (orange solid), over-plotted with lines for the MESA models (grey dashed lines) and the relative errors (bottom) between the two density profiles.

Figure 4 .
Figure 4. Successive moments in a full disruption event in a prograde (left) and retrograde (right) disk with a mid-plane density of  c = 10 −8 g cm −3 .The middle column shows them in a naked disruption event at the same times.The spatial scale shown in the inset corresponds to roughly 1/20 of the size indicated below the bar on the left-bottom corner.Continuous interactions between the debris and the disk gas result in a significant perturbation of the debris's orbit and, therefore, its structure.The impact of the disk interaction is greater for the retrograde orbit than the prograde orbit.At later times, the debris is completely disintegrated and mixed into the disk.

Figure 5 .
Figure 5. Zoom-in near the head of the debris for the prograde (left) and retrograde (right) cases with  c = 10 −8 g cm −3 , measured at ∼ 4 days after disruption.The white arrows show the direction of motion of the gas.In the prograde case, the disk interactions act to increase the angular momentum of the debris whereas, in the retrograde case, the disk interactions cancel out the angular momentum of the debris.

Figure 6 .
Figure 6.Time evolution of the fractional remaining debris mass that has not been mixed into the disk as a function of the distance of the center of mass of the debris from the black hole for different models: (left) different disk densities and (right) different stellar masses.The solid (dotted) lines represent the prograde (retrograde) cases.The dot-dashed diagonal lines in both panels indicate the prediction from our semi-analytic model for the retrograde cases ( §3.2).The dotted diagonal lines show the enclosed mass of the disk: in the left panel, the colors of the lines for the disk enclosed mass match those for the debris mass while in the right panel, the disk mass is for  c = 10 −8 g cm −3 .

Figure 7 .
Figure 7. Distribution of specific energy  and specific angular momentum  for a full disruption of a 1 M ⊙ star on a prograde (top) and retrograde (bottom) orbit relative to that of a disk with  c = 10 −8 g cm −3 around a 10 6 M ⊙ SMBH at three different times.

Figure 8 .
Figure 8. Energy distribution of debris produced in a full disruption of a 1 M ⊙ star on a prograde (left) or a retrograde (right) orbit relative to an AGN disk with  c = 10 −7 g cm −3 (top), 10 −8 g cm −3 , and 10 −9 g cm −3 , around a 10 6 M ⊙ SMBH.The grey line in each panel shows TDEs of the same star in vacuum (naked TDEs), which is sitting behind the line for AGN-TDEs at  ≃ 0 days.The color bar indicates the time at which the distribution is measured since disruption.Notice different time scales in the color bars.

Figure 9 .
Figure 9. Same as Figure 8, but for the fallback rate.

Figure 10 .
Figure10.The minimum critical density  crit (left) above which the entire debris is completely mixed into the disk on the peak mass return time  0 estimated right after disruption in a  ★ −  • plane and the ratio of the complete dissociation time  dis to the peak mass return time in a  crit −  • plane.Here,  0 is estimated by including the correction factor for the stellar internal structure and relativistic effects(Ryu et al. 2020a,b,c,d).The white region near the corner indicates the region of parameter space where stars would be directly captured by the black hole.Similarly, the vertical dashed white line indicates the maximum black hole mass for direct captures.

Figure A1 .
Figure A1.Energy distribution (top) and fallback rate (top) for  ★ = 3 M ⊙ on a prograde (left) and retrograde (right) orbit.Note that the peak of the distribution at  ≃ 0 indicates that a remnant survives after disruption.

Table 1 .
Disk parameters: (first) black hole mass  • , (second) assumed mass accretion rate  relative to the Eddington mass accretion rate  Edd , (third) maximum density in the mid-plane  c (see Equation

Table 2 .
−3 ] Pro. or retro. p / t  p [ g ] Initial parameters: (left to right) model number, black hole mass  • [ M ⊙ ], stellar mass  ★ [ M ⊙ ], maximum mid-plane density  c , relative orientation (prograde vs retrograde), pericenter distance  p measured in units of the tidal radius  t ,  p measured in units of the gravitational radius  g , dynamical time  p at pericenter.