Stellar Evolution in the Disks of Active Galactic Nuclei Produces Rapidly Rotating Massive Stars

Stars can either be formed in or captured by the accretion disks in Active Galactic Nuclei (AGN). These AGN stars are irradiated and subject to extreme levels of accretion, which can turn even low-mass stars into very massive ones ($M>100 {\rm M}_\odot$) whose evolution may result in the formation of massive compact objects ($M>10 {\rm M}_\odot$). Here we explore the spins of these AGN stars and the remnants they leave behind. We find that AGN stars rapidly spin up via accretion, eventually reaching near-critical rotation rates. They further maintain near-critical rotation even as they shed their envelopes, become compact, and undergo late stages of burning. This makes them good candidates to produce high-spin massive black holes, such as the ones seen by LIGO-Virgo in GW190521g, as well as long Gamma Ray Bursts (GRBs) and the associated chemical pollution of the AGN disk.


INTRODUCTION
Active Galactic Nuclei (AGN) are believed to be powered by massive accretion disks draining into supermassive black holes (SMBHs) (Lynden-Bell 1969). Because of their crucial role in AGN, these accretion disks have been extensively studied since the pioneering work on their structure by Shakura & Sunyaev (1973).
Recent years have seen a rekindled interest in AGN disks, particularly in light of gravitational wave detections by LIGO and Virgo. In particular, the observation of black holes (BHs) with masses above the maximum mass allowed by pair instability in massive stars , as well as in the lower mass gap , finds a natural explanation in the environments of AGN disks, where compact object mergers are enhanced, and neutron stars (NSs) and BHs grow by accretion due to the very high disk gas densities (e.g. McKernan et al. 2012;Yang et al. 2019;Tagawa et al. 2020).
The presence of stars and compact stellar remnants in AGN disks is not surprising. Stars can end up in the disks of AGNs via at least two mechanisms: in-situ formation when disks become self-gravitating and unstable to fragmentation (e.g. Kolykhalov & Syunyaev 1980;Goodman 2003;Dittmann & Miller 2020), and capture from the nuclear star cluster surrounding the AGN as a result of momentum and energy loss as the stars interact with the disk (e.g. Artymowicz et al. 1993;MacLeod & Lin 2020;Fabj et al. 2020). Once in an AGN disk, stars may evolve and thereby form compact objects such as black holes and neutron stars.
Stars in AGN disks (AGN stars) are believed to evolve quite differently from those in standard galactic environments. AGN disks are much hotter and denser than the interstellar medium, so AGN stars are subject to very different boundary conditions than normal stars. The evolution of these stars has been recently studied by Cantiello et al. (2020), who found that AGN stars can quickly become very massive (M > 100 M ) due to rapid accretion fueled by the large gas reservoir in the AGN disk, and that chemical mixing plays a critical role.

arXiv:2102.13114v1 [astro-ph.HE] 25 Feb 2021
The study of Cantiello et al. (2020) did not, however, investigate the role of rotation in these stars and how it is affected by the special environment of an AGN disk. Rotation plays a very important role in stellar evolution (e.g. Maeder 2009;Langer 2012) and in determining whether a massive star at the end if its life can produce a long gamma-ray burst (long GRB) during core collapse (MacFadyen & Woosley 1999). Understanding the rotation of these stars is also crucial to further constrain the origin of the LIGO/Virgo BHs via their inferred spins.
Here we investigate the spin evolution of stars embedded in AGN disks (AGN stars). In Section 2 we briefly describe our model of stellar evolution in AGN disks, including two key improvements introduced by Dittmann et al. (2021) to the treatment of accretion and mass loss from the approach of Cantiello et al. (2020). In Section 3 we present a model of the rotation rates of these stars, with a focus on the angular momentum changes associated with mass gain/loss and on the stochastic nature of accretion in a turbulent medium. We analytically explore the consequences of this model in Section 4, and find that at least during the accretion stage many AGN stars ought to spin up to near-critical rotation rates. These rapid rotators represent most of the parameter space we are able to explore in our models, and these results are confirmed by our numerical simulations of the coupled rotating stellar evolution of AGN stars in Section 5. We then discuss the implications of these rapid rotators for compact objects, gravitational wave observations, and long GRBs in Section 6. We conclude with a brief summary of our results in Section 7.

STELLAR MODELS
We model stellar evolution using revision 15140 of the Modules for Experiments in Stellar Astrophysics (MESA Paxton et al. 2011, 2013, 2018 software instrument. Details of the MESA microphysics and of other software tools used in our experiments are provided in Appendix A. Because the stars of interest are embedded in an AGN disk we implement modified surface boundary conditions, accretion, and mass loss following Cantiello et al. (2020).
As argued by Dittmann et al. (2021), the most important correction to the Bondi-Hoyle accretion rate used by Cantiello et al. (2020) comes from the gravitational influence of the supermassive black hole (SMBH). Near the SMBH tidal forces truncate the radius at which the stellar gravity dominates the gas dynamics, limiting the accretion rate. A similar situation occurs when giant planets accrete from a protoplanetary disk, and hydrodynamic simulations have shown that prescriptions truncating accretion to begin at the Hill Radius can ac-curately predict accretion rates in the viscosity regime relevant to AGN disks (Rosenthal et al. 2020;Li et al. 2021). Accordingly, we take into account tidal effects from the SMBH when calculating accretion onto AGN stars by truncating accretion to the Hill Radius.
Additionally, when computing mass loss rates we study the effects of reducing the Eddington luminosity L Edd by a factor of 1 − Ω 2 /Ω 2 c , where is the critical angular velocity for a rigidly-rotating sphere. This accounts for the fact that the centrifugal acceleration reduces the effective escape velocity of the star and so reduces the radiative acceleration needed to unbind material from the surface (Maeder 2009;Sanyal et al. 2015). We refer to models computed using the unmodified Eddington luminosity as Γ models and those computed using the rotationally-reduced Eddington luminosity as Γ−Ω models. We generally believe the Γ−Ω prescription is more physical, though we show models computed with both prescriptions for comparison. We initialized our runs with a non-rotating zero-age main sequence solar model. We then relaxed the boundary conditions and accretion rate over approximately 10 7 yr from solar-like to those described by Cantiello et al. (2020). Some models fail during this relaxation. We have endeavoured to minimize the number of such failures, but given the radical adjustment in conditions it is not surprising that some failed, especially at higher AGN densities.
After relaxation we evolved our models until either an age of 10 9 yr, a core temperature of 3×10 9 K, or failure to converge. We imposed the age limit because AGN disk lifetimes are believed to be of order 1−100 Myr (Khrykin et al. 2019;Martini & Weinberg 2001;Haiman & Hui 2001), and because AGN stars which do not complete their evolution in 10 9 yr generally follow standard stellar evolution. The core temperature limit allows us to halt models during Oxygen burning. Models reaching these core temperatures are expected to undergo core collapse within a timescale ∼yr.
AGN stars rapidly accrete and reach the Eddington luminosity. Because of this, their interiors have comparable radiation and gas pressures and hence follow γ = 4/3 polytropes. This means that they are on the edge of stability, and Cantiello et al. (2020) argued that this means that any of a variety of processes should result in efficient internal mixing. Following this argument, we implement their phenomenological mixing prescription and further assume that these stars rotate as rigid bodies. As a re-sult the rotation of an AGN star is specified entirely by its total angular momentum.

ROTATION EVOLUTION
We assume that AGN stars only change angular momentum through mass loss or accretion. Following Cantiello et al. (2020) we allow AGN stars to both accrete (Ṁ gain ) and lose mass (Ṁ loss ) at the same time, imagining a multidimensional system with simultaneous inflows and radiation-driven outflows.
Because AGN disks are turbulent environments the angular momentum they accrete is best treated as a random variable. In Appendix B we describe a method for modelling the total angular momentum of the AGN star as a normally-distributed random variable characterized by a mean J and a variance σ 2 J . In practice, however, the correlation timescale of velocities in the AGN disk is of order the dynamical time in the Bondi sphere, which is short compared with the evolutionary timescale of an embedded star. As a result we always find that σ 2 J / J 2 1, such that the angular momentum is well-characterized by its expectation value. While our calculations follow the full stochastic model described in Appendix B, in what follows we consider only the mean angular momentum, which we denote simply by J.
We neglect torques due to magnetic coupling between the star and its environment, such that the mean angular momentum of the star evolves due to mass loss and accretion as dJ dt =Ṁ gain j gain,avg −Ṁ loss j loss,avg , whereṀ gain is the accretion rate,Ṁ loss is the rate of mass loss, j gain,avg is the mean specific angular momentum of the accreting material, and j loss,avg is the mean specific angular momentum of the lost material. The remainder of this section computes the terms appearing in this equation.

Mass Loss
We assume that mass is lost preferentially at the equator of the star and so carries the equatorial specific angular momentum This is a conservative choice in that it maximizes the lost angular momentum; any other choice would result in a smaller j loss and hence faster-rotating stars. For simplicity we assume that R equator equals the mean radius of the star, so that where is the moment of inertia of the star and is the gyration parameter (i.e. the non-dimensional gyration radius).

Mass Accretion
Next, we must calculate the specific angular momentum of the accreting mass. There are three relevant length-scales for accretion onto an AGN star, namely the Bondi radius, the Hill radius, and the disk scale height. These three are generally not independent, so we choose to parameterize the accretion physics in terms of the Bondi and Hill radii.
In a stationary, infinite medium we expect accretion onto a lone star to begin at the Bondi radius because that is the radius at which the escape velocity of the gravitational potential of the star becomes comparable to the sound speed of the medium (Bondi 1952).
Here c s is the sound speed in the AGN disk and M is the mass of the star. When the star orbits a SMBH, however, the star's gravity competes not only with the disk pressure but also with tidal forces from the SMBH. The radius at which the star's gravity dominates over tides from the SMBH is the Hill radius where r orb is the orbital radius of the star and M BH is the mass of the central black hole. To account for this effect we model the accretion as beginning at the smaller of R Bondi and R Hill , which we identify as the accretion radius Dittmann et al. (2021) studied a variety of other effects, including vertical density variations, and found them to be comparatively unimportant.
If there is no viscous or magnetic angular momentum transport across the the accretion radius then the angular momentum of accreting material is just that of the material at the accretion radius in the frame comoving SMBH Frame Co-moving Figure 1. Material accretes from a differentially rotating disk onto a star, spinning the star up. This is shown in the frame of the SMBH (upper) and the frame co-moving with the star (lower). AGN stars obtain retrograde rotation (backwards with respect to their orbital motion).
with the star (Figure 1). In that frame the average angular momentum within the Bondi radius is given by the differential rotation of the AGN disk, such that where a is the semi-major axis of the orbit of the AGN star around the central SMBH. Note that this angular momentum is oriented retrograde relative to the disk because material closer to the SMBH is moving faster than the star, and material further out is moving slower. So long as material can fall directly from the accretion radius onto the star and it is likely a good approximation to neglect torques at R acc . However, when j gain,avg > j max material must shed angular momentum in order to accrete. The material likely forms an accretion disk which then transports angular momentum outwards towards and beyond R acc via viscous and/or magnetic torques. We therefore truncate j gain,avg to be no greater than j max . Implicitly we therefore assume that excess angular momentum beyond j max is lost via magnetic/viscous torques across the accretion radius. Dittmann et al. (2021) investigated the effect of modifications to the accretion rate when the accreting angular momentum is large and found that these corrections (1) do not qualitatively change AGN star evolution beyond the effects of tides and (2) are generally less important than the tidal effects which we have included. We therefore do not reduce the accretion rate in this case, though it is likely that the formation of a disk is associated with some reduction inṀ gain and that may have some quantitative effect on the resulting evolution.

Truncation
The star cannot spin faster than its critical rotation rate and so its total angular momentum is limited to where we have ignored aspherical corrections in this approximation. To impose the constraint in equation (12) we truncate J at the end of each time-step to lie between -J crit and +J crit .

ANALYTIC PREDICTIONS
Before studying our numerical results it is worth deriving some analytical predictions. For these purposes we focus on AGN stars that undergo runaway accretion, and divide their evolution into three phases: 1. Initial runaway accretion.

Runaway Accretion
During runaway accretion the accretion rate is always much greater than mass loss. Moreover, because the star begins with J = 0 the mean angular momentum is increasing. Therefore, with j loss, avg ∝ Ω we see that j gain, avg is typically larger than j loss, avg . With these two considerations we neglect angular momentum loss and assume that With some rearranging, we find Inserting equation (12) for J crit and treating k as a constant we find where the total derivative on the right-hand side is equivalent to (M /Ṁ )d ln R /dt. We now estimate d ln R /d ln M . Cantiello et al. (2020) found that when AGN stars become massive they become radiation-dominated and thus approach γ = 4/3 polytropes. For a fixed composition this implies that they have approximately fixed gyration parameter k 1 . Because of their high accretion rates they continue to undergo core hydrogen burning throughout the accretion phase. The rate of nuclear burning is an extremely strong function of core temperature, so this regulates their core temperatures to a narrow window around log T /K ≈ 7.5. Because AGN stars in this phase are radiation-dominated, we know that where the subscript 'c' denotes a quantity evaluated in the core and a is the radiation gas constant. For a polytrope we also know from scaling considerations that Combining equations (16) and (17) we find so if T c is approximately constant then Inserting equation (19) into equation (15) we find Expanding j gain, avg then yields With increasing mass we see that this reaches a fixed point when that is, the specific angular momentum approaches the smaller of either 4/7k times critical or the specific angular momentum of the accreting material.
For many choices of AGN disk parameters, M Ω AGN R 2 acc J crit /k, which means that Hence with increasing mass we see that J/J crit increases rapidly, asymptoting to the fixed point where J = (4/7k)J crit . For a sphere of uniform density, k = 2/5. AGN stars have higher densities in their cores than their envelopes and so have k < 2/5. As a result the fixed point has J = (10/7)J crit > J crit and so in our models J grows to J crit and truncates there.

Constant Mass
In the constant-mass regime, accretion is balanced by mass loss. The mean angular momentum evolves according to This has a fixed point when so stars in this evolutionary phase evolve to a specific angular momentum which is proportional to that which they accrete. When M Ω AGN R 2 acc √ GM R = J crit /k we truncate j gain, avg to √ GM R = J crit /kM , in which case the fixed point has and stars tend towards critical rotation. For M Ω AGN R 2 acc J crit /k, AGN stars will evolve towards sub-critical rotation.

Late-Stage Mass Loss
During late-stage mass loss the rate of mass loss is always much greater than the accretion rate, so the angular momentum evolves according to Following the same reasoning as in Section 4.1 and again assuming constant k we obtain Because density increases towards the center of the star we have k < 2/5, which means that k < 4/7 as well, so J/J crit becomes smaller as the star loses mass. Note, however, the factor of J crit /J difference between equation (21) and (29): during the accretion phase the star evolves towards critical faster than it loses angular momentum in the mass loss phase. As a result we expect stars to net gain angular momentum during their evolution.
In particular, so long as M Ω AGN R 2 acc J crit /k we expect that most AGN stars eventually reach critical rotation. When they subsequently lose mass they spin down. How far they fall below critical depends on how much mass they lose and on the gyration parameter k, which we cannot estimate in an analytic fashion.

RESULTS
We now turn to the results of our numerical simulations. Figure 2 shows the evolution of mass (M , upper), angular velocity relative to critical (J/J c , middle), and gyration parameter (k, lower) as functions of time for stellar models with both the Γ (left) and rotation-reduced (right, Γ − Ω) prescription for the Eddington luminosity and associated mass loss. Evolutionary tracks are coloured by AGN density ρ AGN , which we swept in the range 10 −18 − 10 −11 g cm −3 . We prescribe the AGN temperature by specifying a disk sound speed c s = 10 km s −1 , which is the default used by Cantiello et al. (2020). The Keplerian angular velocity Ω AGN determines the distance from the SMBH and so the strength of tidal effects, and was set to 10 −11 rad s −1 .

Time Evolution
For both the Γ and Γ − Ω L Edd prescriptions we see that models above an AGN disk density of 10 −18 g cm −3 exhibit rapid runaway accretion, in agreement with the findings of Cantiello et al. (2020) and Dittmann et al. (2021). In the case of the Γ prescription, models with density above 3 × 10 −18 g cm −3 are then immortal, exhibiting a balance between accretion and mass loss which replenishes fresh hydrogen in their cores. Models below this critical density eventually deplete their core hydrogen and evolve, rapidly losing mass to become high-metallicity compact objects. In the case of the Γ − Ω prescription, mass loss generally wins over accretion in the end, and we see most models evolve into compact objects.
In each case the initial accretion causes the stars to spin up to critical rotation. Surprisingly, the stars which lose mass remain critically rotating. This is not what we predicted in Section 4.3, and the reason for the discrep-ancy is that there we assumed that the gyration parameter is constant throughout the star's evolution, whereas we see from the lower row of Figure 2 that stars become much more compact as they enter later stages of nuclear burning, resulting in a lower gyration parameter. Thus, even though their specific angular momentum falls, they become compact even faster and remain critically rotating.
The few models which do not end their lives as critical rotators are those which remained at relatively low masses. These models are not chemically or quasichemically homogeneous, and proceed to evolve onto the red giant branch. The resulting large radial extension implies these objects rotate with very slow, sub-critical rotation velocities. We expect such evolution to dominate at low densities of 10 −18 g cm −3 for the Γ prescription and 10 −16 g cm −3 for the Γ − Ω prescription.

Tidal Forces
We next study the role of tides, which we choose to parameterize by Ω AGN . Figure 3 shows the peak mass (upper) and final mass (lower) for models in a grid running over ρ AGN ∈ [10 −18 ...10 −11 ]g cm −3 and Ω AGN ∈ [10 −15 ...10 −7 ]rad s −1 . The range of angular velocities corresponds to radial coordinates in the disk on the order of 10 3...8 gravitational radii, and the range of densities corresponds to of order 10 3...6 gravitational radii. Here the gravitational radius is where c is the speed of light. As before, we study models with both the Γ and Γ − Ω prescription for L Edd , which governs the rate of mass loss. As a reminder the Γ − Ω prescription has a rotationally-reduced L Edd and so undergoes rotationally enhanced mass loss.
With increasing Ω AGN the Hill radius falls below the Bondi radius and accretion onto the star becomes tidally limited. Thus we see a trend towards decreasing peak and final mass with increasing Ω AGN . For the same reason more models successfully ran at higher Ω AGN because they accreted more slowly during the initial model relaxation.
Comparing the Γ and Γ − Ω prescriptions we see lower masses in the models where rotation reduces L Edd . This is because as L Edd decreases the threshold for forming a super-Eddington wind decreases, so significant mass loss begins at lower masses than in the regular-L Edd models.
Consistent with Dittmann et al. (2021) in the Γ grid we see several different classes of evolution: • At low densities of 10 −18 g cm −3 or less stars do not accrete beyond 10M and so follow ordinary mas-  sive stellar evolution, going up the giant branch and reaching R > 100R (blue region in Figure 4).
• At higher densities and Ω 4/3 AGN /ρ AGN 10 2 cm 3 g −1 s −4/3 tidal effects are unimportant. Stars rapidly gain mass and reach 10 2 − 10 3 M . At that point either the models remain at that high mass in the immortal state or the MESA models fail to converge. In the latter case we believe that if they converged they would enter the immortal state at an even higher mass (purple region in left panel).
• At higher Ω 4/3 AGN /ρ AGN 10 2 cm 3 g −1 s −4/3 the Hill radius falls below the Bondi radius for a wide range of stellar masses. This limits the accretion rate and thereby limits the peak mass. However, these objects do not undergo ordinary stellar evolution, because they are near the Eddington limit and rapidly exchange material with the AGN disk via accretion and mass loss (green region).
• Models at very high ρ AGN and Ω AGN accrete rapidly but MESA fails to converge too early into their evolution for us to even guess as to what will happen at late times (red region).
In addition to the above, a small fraction of models on the boundary between regions (2) and (3) peak in mass around 100M , burn through all of their Hydrogen, and undergo rapid mass loss down to 10M , eventually becoming compact helium/carbon/oxygen stars. A more detailed characterization of this behaviour is provided by Dittmann et al. (2021). Because many stars become rapid rotators, when we reduce L Edd to account for rotational effects (Γ − Ω) we see the boundaries between these classes shift considerably: • Rather than an unusual edge-case, a majority of Γ−Ω models with Ω 4/3 AGN /ρ AGN 10 2 cm 3 g −1 s −4/3 peaks around 30 − 1, 000M . This accretion spins them to near-critical rotation and enhances mass loss. They then deplete in hydrogen and rapidly shrink to become compact 10M helium/carbon/oxygen stars (purple region on right in Figure 4).
• At ρ 10 −15 g cm −3 and Ω AGN 10 −14 rad s −1 the accreting angular velocity is not enough to spin stars up to critical. The resulting reduction in L Edd is small, so these objects accrete without bound until MESA fails to converge. We expect these would become immortal if MESA were able to follow their evolution further region (dark blue region on right in Figure 4).
A schematic summarizing the mass evolution we see for both the Γ and Γ − Ω grids is shown in Figure 4. Figure 5 shows the corresponding angular momentum evolution. The upper row shows the critical ratio J/J c at the time of peak mass and the lower row shows the same at the end of the run. In nearly all cases the models reach critical rotation by the time their masses peak and remain critical through the end of the run. The models which do not reach critical rotation at any point are almost all at very low Ω AGN and high ρ AGN . These accrete quickly, but the infalling material has low specific angular momentum and so does not spin them up to critical. MESA then fails to converge when the runs reach very large masses, so we never see if these models are immortal or become compact objects. Interestingly models at the same Ω AGN but lower density do become critical, because while they accrete to a sub-critical rotation rate they subsequently become compact stars which ultimately makes them critical.
A number of models reach critical rotation at some point but end their evolution sub-critical. In the Γ grid these follow the line Ω 4/3 AGN /ρ AGN ≈ 10 2 cm 3 g −1 s −4/3 . Models in this population accrete slowly because tidal effects truncate R acc to be less than R Bondi . This slow accretion means that models only make it up to a mass of roughly 10M , at which point they undergo relatively normal stellar evolution and run up the Red Giant Branch (RGB). This causes them to inflate substantially, raising J c and thereby lowering J/J c .
In the Γ − Ω grid the same thing happens but over a wider range of parameter space, extending down to Ω AGN ≈ 10 −12 rad s −1 at ρ AGN 10 −17 g cm −3 . More models end up on the RGB in this grid because they experienced rotationally-enhanced mass loss.
In both grids, models at higher Ω AGN than this population accrete slower and so end up with M ≈ 2M after 10 9 yr. Because the specific angular momentum of the infalling material is high and k 1/2 this is enough to cause them to rotate critically, though they have not yet reached their peak mass.
The majority of our models accrete mass and angular momentum, reach critical rotation, and are then either immortal or remain critically rotating through the subsequent mass loss. Those which undergo mass loss remain critical for the same reason as the models in Figure 2: as models lose mass they also proceed to later stages of nuclear burning and become more compact. This is shown in Figure 6, which plots the gyration parameter k at peak mass (upper) and the end of the run (lower). Comparing with Figure 3 we see that models  which lose substantial amounts of mass are much more compact at the end of their mass loss than at their peak mass (i.e. k falls with time). This is particularly evident in the runs with Γ − Ω prescription, most of which shed 90% of their mass from peak to end. In both grids the models which do not end in a critical state are split into two populations. There is a cluster at high densities and low Ω AGN for which MESA fails to converge before they reach their maximum masses. However, we believe by analogy with models at slightly lower densities which do converge that these models would become critical if we were able to follow their evolution through into the compact object state. The second population are at low densities and high Ω AGN . These stars accrete slowly enough that they become giants rather than reaching extreme masses and then forming compact objects. These giant models have enormous moments of inertia and so even though they spend most of their lives with near-critical rotation they die as slow rotators.

ASTROPHYSICAL IMPLICATIONS
To summarize our findings, in regions of the AGN disk where ρ AGN > ρ crit ≈ 10 −18 g cm −3 we expect captured stars to undergo rapid accretion. This density scale increases towards the SMBH as tidal effects be-come more important, and decreases with sound speed as ρ crit ∝ c −3 s ). Because there is an angular velocity gradient in the AGN disk, the disk has a net vorticity in the frame of a co-orbiting star. On scales of the Bondi radius this vorticity means that gas in the disk has a large, typically super-Keplerian, specific angular momentum in the frame of the star. When that gas accretes, even if limited to the Keplerian angular velocity, it serves to rapidly spin the star up to critical even very far out in the disk where Ω AGN is as low as 3 × 10 −14 rad s −1 .
Depending on the exact physical prescriptions used, many of these stars then evolve through later stages of nuclear burning, undergo rapid mass loss, and become compact 10M high-metallicity objects. We expect core collapse to occur soon after, though we have not tried to follow the collapse process in MESA (Cantiello et al. 2020). Because these stars become more compact as they lose mass they remain critical rotators through the end despite shedding a large fraction of their peak angular momentum. They are therefore good candidates for producing long GRBs and fast-spinning black holes.
The stars which do not lose mass enter an immortal phase (Cantiello et al. 2020) where fresh hydrogen-rich material is accreted fast enough to continuously replenish the core. This phase ends when these stars either enter a low-density pocket of the AGN disk or when the disk itself dissipates. In either case mass loss then comes to overwhelm accretion and the immortal phase ends, with stars rapidly evolving towards the same compact 10M state as before (Cantiello et al. 2020). We expect this to again end in core collapse of a critically-rotating star.
We now examine the prospects for producing long GRBs and rapidly rotating black holes.

Production of GRBs, and their observability in AGN disks
Our results, and in particular the fact that massive stars in AGNs are found to be fast rotators, bear important implications for long GRBs. These are found to be a fraction of ∼ 0.5 − 4% of SNe-Ibc in the local Universe (e.g. Della Valle 2006), and are known to be associated with very energetic supernovae from the collapse of massive stars (Hjorth et al. 2003;Stanek et al. 2003), as suggested by theoretical models (MacFadyen & Woosley 1999;Woosley & Heger 2006;Yoon et al.  2006). The γ-ray emission is believed to be produced within a relativistic jet (e.g. Piran 1999), and a key element to launch a jet is believed to be an hyperaccreting disk around a BH 2 (MacFadyen et al. 2001).
For an accretion disk to be formed, a fraction of gas must remain bound after the supernova explosion, and it must posses a specific angular momentum j m at least as large as the specific angular momentum of the last stable orbit, j lso . Our results (cfr. upper panel of Fig. 7) show that close to core collapse the envelopes of AGN stars are endowed with enough angular momentum to produce an accretion disk around a newly formed BH (j m > j lso virtually for any BH with nonzero spin). Hence we draw the important conclusion that, upon their death, massive stars in AGN disks are typically expected to produce long GRBs. It is interesting to compare these stars to the Wolf-Rayet progenitors of standard long GRBs from field stars ( Woosley 1999; Yoon et al. 2006;Woosley & Heger 2006;Cantiello et al. 2007). The similarity is not surprising, since here we assume that AGN stars accreting large amounts of mass are well mixed (Cantiello et al. 2020). Hence they evolve quasi-chemically homogeneously, similarly to rapidly rotating long GRB progenitors. The amount of mass which is available for accretion is given by the fraction which remains bound after the supernova explosion (examples are given in Fig.6 of Perna et al. 2014). For weak explosions, most of the material falls back.
The material that remains bound falls back on a timescale which is on the order of the free-fall time (Woosley & Heger 2012) whereρ is the mean density of the star. The precise distribution of the initial fallback radii for all the bound particles will clearly depend on the details of the supernova explosion, but a minimum value is given by the location of the particles prior to the explosion. The freefall time of the envelope (bottom panel of Fig. 7) is on the order of a few tens of seconds, as in the bulk of the typical range of durations of long GRBs. After the bound material falls back, it circularizes at a radius R circ determined by the condition j(R circ ) = j m . Subsequently, the evolution of the disk is determined by the viscous timescale where m 3 = M/(3 M ), R 8 = R/(10 8 cm), Ω K is the Keplerian velocity of the gas in the disk, H the disk scale-height, and α the viscosity parameter, written in units of α −1 ≡ α/0.1 (Shakura & Sunyaev 1973). At early times, while fallback still goes on, the accretion rate is determined by the longest between t ff and t 0 (R circ ). In the inner parts of the disk, up to hundreds of gravitational radii, the scale is set by the free-fall one, yielding accretion rates on the order oḟ m acc ∼ 0.01 − 0.1M s −1 over several tens of seconds, as typical of long GRBs.
With massive stars in AGN disks possessing the key elements to power a long GRB upon their death, the next question to address is the likelihood to observe such sources as they emerge from the dense environments of AGN disks. The question of the observability of relativistic, electromagnetic transients produced in AGN disks was recently addressed by Perna et al. (2021), considering two specific models for the disk structure, the one by Sirko & Goodman (2003) (SG in the following) and the one by Thompson et al. (2005) (TQM in the following). The location of the sources was assumed to be in the disk's mid-plane, which is the most pessimistic case in terms of observability. This turns out to be also the most likely occurrence, since it is expected that most of the stars interacting with the disk should end up in its mid-plane (e.g. Tanaka & Ward 2004).
The analysis by Perna et al. (2021) showed that the outcome is quite dependent on the disk model and on the SMBH mass, which relates to disk properties, such as the density and the radial extent. Long GRBs occurring in disks around SMBHs of mass ∼ 10 6 M , are expected to appear as typical transients (that is similar to the ones occurring in standard galactic environments) for most locations of the disk, except for some regions, ∼ 10 4a few ×10 5 R g (R g being the gravitational radius) in the SG disk, and between a few ×10 5 − 10 6 R g in the TQM disk model, when the prompt emission and early afterglow emerge on a timescale set by the diffusion time where H is the scale height of the disk and ρ 0 the density in the disk mid-plane, σ T the Thomson cross section, and m p the proton mass. For AGNs with SMBHs of larger masses, the regions in which both the prompt GRB emission and the afterglow appear normal are gradually reduced: the increasing opacity of the disk causes the transients to be diluted on the diffusion timescale. The magnitude of this timescale varies from minutes to several years, being generally smaller in the inner disk regions and for less massive AGN disks (see Fig.5 in Perna et al. 2021, for quantitative details).

Black Hole Spins
Our models predict that stars embedded in AGN disks of densities ρ AGN > 10 −18 g cm −3 typically grow to large masses (M max > 50M ). The exceptions are those very near the SMBH with Ω AGN > 10 −11 rad s −1 , where tidal effects slow accretion. Even these less massive stars, however, typically evolve into massive helium/carbon/oxygen stars of roughly 10M (see lower row of Figure 3) which, owing to their compactness, likely undergo core collapse and form black holes (Cantiello et al. 2020).
Our models also suggest that AGN stars end their lives with near-critical rotation. This then seems to be the typical fate of AGN stars, to form black holes with mass M BH ≈ 10M and spin a ≈ 1.
The resulting black holes may then go on to accrete and form a population of more massive objects (Bondi 1952;Salpeter 1964). The same differential rotation in the AGN disk that caused their progenitors to spin up will then maintain their rapid rotation even as they gain mass. The result is a population of first-generation black holes with M 10M and a ≈ 1. This channel of black hole formation is of particular interest given the recent observation of GW190521, a merger of two mass gap black holes (M 1 ≈ 85M , M 2 ≈ 66M ) consistent with large spins (a 1 ≈ 0.69 +0.27 −0.62 , a 2 ≈ 0.73 +0.24 −0.64 ) (Abbott et al. 2020), though see also Nitz & Capano (2021). While we do not have estimates of the formation rates of such objects, these black holes could be the descendants of low-mass stars embedded in an AGN disk. After accreting and becoming massive rapid-rotators, they lost part of their mass and formed ≈ 10M black holes.
These black holes further accreted up from the disk 3 , or they migrated and merged with other compact remnants, reaching their pre-GW190521 masses (e.g. McKernan et al. 2012;Secunda et al. 2019;Yang et al. 2019;Tagawa et al. 2020).
A challenge to this picture is that the observed merger was most consistent with spins misaligned with the orbital plane , while a strong prediction of our models is that the black hole spins should be aligned with the rotation of the AGN disk. While it is certainly possible for the orbital plane of the merging binary to be misaligned with the disk, this does not seem to be the most likely scenario, which suggests that other physics we have not considered could be at work in GW190521.

SUMMARY
Stars in AGN disks are thought to evolve in a wide variety of unusual ways. Depending on the AGN disk density and sound speed and the strength of tidal forces we expect AGN stars to • Cease to age, • Accrete up to masses over 10 3 M , • Undergo quasi-chemically homogeneous evolution, • Shed the vast majority of their mass, • Spin up to critical rotation, and/or • Form compact helium/carbon/oxygen stars.
All of these behaviours are exhibited by stellar models that began with the same zero-age main-sequence 1M initial condition, and the variation we see is entirely a function of the conditions in the AGN disk.
Here we studied the spin evolution of AGN stars, as well as its impact on the accretion and evolution of these objects. At densities ρ AGN 10 −18 g cm −3 AGN stars accrete rapidly. When that gas accretes it serves to rapidly spin AGN stars up to critical, even very far out in the disk where Ω AGN is as low as 3 × 10 −14 s −1 . We find that rotational enhancement of mass loss is then important, causing most of these stars to then rapidly lose mass and evolve into compact, critically-rotating 10M objects made of helium and heavier elements.
We expect most of these compact stars to eventually undergo core collapse, generating Gamma Ray Bursts and leaving behind rapidly-spinning black holes.
For stars very near the central supermassive black hole we expect accretion to be tidally limited, resulting in slightly less massive, longer-lived stars which nonetheless reach critical rotation. These could potentially form a population of rapidly-rotating stars which persist for several million years after the AGN disk dissipates.

ACKNOWLEDGMENTS
The Flatiron Institute is supported by the Simons Foundation. RP acknowledges support by NSF awards AST-1616157 and AST-2006839 and from NASA (Fermi) award 80NSSC20K1570. We thank Yuri Levin for insightful comments on the accretion of angular momentum.