1. Introduction
Pulsars are rapidly rotating neutron stars associated with a wide range of high-energy astrophysical phenomena. Those in binary systems are of particular interest: they can be spun up into millisecond pulsars (MSPs), form double compact objects that eventually merge, and contribute to the dynamical evolution of their host systems. Despite their importance, most direct N-body codes do not explicitly model pulsar evolution. The only exception to date is Ye et al. (Reference Ye, Kremer and Chatterjee2019), which adopted a highly simplified prescription. Here, we implement a more realistic treatment of pulsar spin and magnetic field evolution (Chattopadhyay et al. Reference Chattopadhyay, Stevenson and Hurley2020; Song et al. Reference Song, Stevenson and Chattopadhyay2024) into the state-of-the-art direct N-body code NBODY6++GPU (Wang et al. Reference Wang, Spurzem and Aarseth2015; Kamlah et al. Reference Kamlah, Leveque and Spurzem2022; Spurzem & Kamlah Reference Spurzem and Kamlah2023).
Globular clusters (GCs), which contain
$\sim 10^6$
stars in dense stellar environments, are natural laboratories for studying pulsar formation and evolution. Observations with Fermi-LAT have detected
$\gamma$
-ray emission from 36 of the 154 known Galactic GCs, and recent stacking analyses (e.g., Henry et al. Reference Henry, Paglione and Song2024) suggest that even more clusters may emit at these energies. The
$\gamma$
-ray emission is thought to originate primarily from MSPs, either through the superposition of unresolved pulsars or via inverse Compton scattering between relativistic pulsar winds and ambient soft photons.
The number and properties of MSPs in clusters are expected to depend on the stellar encounter rate (Tauris & van den Heuvel Reference Tauris and van den Heuvel2006), linking their
$\gamma$
-ray output directly to cluster dynamics. In this work, we use direct N-body simulations to investigate how GC dynamical evolution shapes the MSP population and, consequently, the
$\gamma$
-ray emission of clusters.
2. Pulsar Evolution Model
In this section, we introduce the pulsar evolution models implemented in NBODY6++GPU.
2.1 Evolution of Isolated Pulsars
Isolated pulsars are assumed to spin down via magnetic braking with braking index
$n=3$
. Their surface magnetic fields may decay over time, though the decay timescale remains uncertain. Field decay is thought to arise from the Hall effect, which redistributes magnetic energy and enhances Ohmic dissipation (Romani Reference Romani1990; Konar & Bhattacharya Reference Konar and Bhattacharya1997). In this work, we adopt a simple exponential decay model, consistent with previous studies (Kiel et al. Reference Kiel, Hurley and Bailes2008; Chattopadhyay et al. Reference Chattopadhyay, Stevenson and Hurley2020; Dirson et al. Reference Dirson, Pétri and Mitra2022; Song et al. Reference Song, Stevenson and Chattopadhyay2024):
where
$B_i$
and
$B_f$
are the initial and final magnetic fields,
$B_{\textrm{min}} = 10^{8}$
G (Zhang & Kojima Reference Zhang and Kojima2006), and
$\tau$
is the decay timescale.
The spin period derivative, assuming vacuum dipole radiation, is
where
$R=10$
km, c is the speed of light,
$\alpha$
is the inclination angle, and the NS moment of inertia is (Lattimer & Schutz Reference Lattimer and Schutz2005)
\begin{equation} I = (0.237 \pm 0.008) M R^2 \left[1 + 4.2\frac{\textrm{M}}{\textrm{M}_{\odot}} \frac{\textrm{km}}{\textrm{R}} + 90\left(\frac{\textrm{M}}{\textrm{M}_{\odot}}\frac{\textrm{km}}{\textrm{R}}\right)^4\right] , \end{equation}
Integrating Eq. 2 with B(t) from Eq. 1 gives
where
$P_0$
is the initial spin period. The evolution of P depends on
$\alpha$
. Although
$\alpha$
may evolve with B (Dirson et al. Reference Dirson, Pétri and Mitra2022), here we assume a fixed
$\alpha$
, decoupling its evolution from P and B. Observations suggest older pulsars align their axes (Young et al. Reference Young, Chan and Burman2010), but modeling of radio and pulsars favors large
$\alpha$
values (Johnston et al. Reference Johnston, Smith and Karastergiou2020). Accordingly, we set
$\alpha = \pi/2$
.
2.2 Evolution of Pulsars in Roche Lobe Overflow
Roche lobe overflow (RLOF) occurs when a star fills its Roche lobe and transfers mass through the inner Lagrangian point, often forming an accretion disk. The Roche lobe radius is approximated by Eggleton (Reference Eggleton1983):
where
$R_{\rm L}$
is the Roche-lobe radius, a the orbital separation, and
$q = M_{\rm comp}/M_{\rm NS}$
the companion-to-NS mass ratio.
Accretion during RLOF drives (i) magnetic field decay through burial and (ii) NS spin-up. Field decay follows
where
$\Delta M$
is the accreted mass,
$\Delta M_d$
a characteristic mass scale,
$B_0$
the initial field, and
$B_{\rm min}$
the minimum allowed field. The rate of angular momentum increase during accretion is
where
$\varepsilon=1.0$
is the efficiency factor,
$\dot{M}_{\textrm{NS}}$
the accretion rate,
$V_{\textrm{diff}}$
the difference between the Keplerian angular velocity at the magnetic radius and the co-rotation velocity, and
$R_A$
half the Alfvén radius:
The final spin period after mass transfer is
where
$P_{\rm i}$
is the initial spin period,
$\Delta J_{\rm acc}$
the angular momentum gained, and I the moment of inertia (Eq. 3). The corresponding
$\dot{P}$
is computed by following Song et al. (Reference Song, Stevenson and Chattopadhyay2024).
2.3 Evolution of Pulsars in Common Envelope
Common envelope (CE) evolution occurs when the donor engulfs its companion in a shared envelope, typically leading to dramatic orbital shrinkage. CE evolution is critical for forming tight binaries that may merge as gravitational-wave sources. NS behavior during CE is uncertain, so we implement three scenarios.
-
(1) No accretion during CE; NS spins down naturally.
-
(2) NS accretes via an accretion disk, as in RLOF, allowing spin-up.
-
(3) Direct surface accretion onto the NS with spin-up, where
$V_{\textrm{diff}}$
in Eq. 7 is the velocity difference at the NS surface.
We adopt the accretion model from Chattopadhyay et al. (Reference Chattopadhyay, Stevenson and Hurley2020) which is fitted to Figure 4 of MacLeod & Ramirez-Ruiz (Reference MacLeod and Ramirez-Ruiz2015), with
$\Delta M_{\rm NS} \le 0.1 M_{\odot}$
, e.g.
3. N-body Simulation and Preliminary Results
We implemented pulsar evolution in NBODY6++GPU by introducing the switch, KZ(29), which enables or disables the pulsar treatment. The code accepts pulsar parameters through the namelist input file, including the birth distributions of spin period and magnetic field, as well as the magnetic field decay timescale and mass scale.
As a first test, we model the Galactic globular cluster M71. M71 has a present-day mass of
$1.7 \times 10^4\,M_{\odot}$
, an age of
$\sim 10$
Gyr, and hosts five observed pulsars, all in binary systems. To mimic its properties, we initialized a cluster with 200,000 particles, adopting a 10% primordial binary fraction and metallicity
$Z=0.002$
. Stellar masses were drawn from a Kroupa initial mass function (Kroupa Reference Kroupa2001) ranging
$0.08$
–
$150\,M_{\odot}$
. Initial conditions were generated using mcluster (Kamlah et al. Reference Kamlah, Leveque and Spurzem2022). We also use a NS natal kick distribution with Maxwellian distribution peaking at 10 km/h for retaining NSs in the cluster.
At the time of the Symposium, the cluster has been evolved for 20 Myr with the simulation. At this snapshot, the simulation contains 179 isolated pulsars and 2 pulsars in binaries. Figure 1 shows both the spatial distribution of cluster members and the P-
$\dot{P}$
diagram of the pulsars.
Left: Spatial distribution of cluster members (gray) and pulsars (blue). The black dashed circle marks the half-mass radius, and the red dashed circle the core radius. Right: P-
$\dot{P}$
diagram of pulsars at 20 Myr. The population includes 179 isolated pulsars and 2 pulsars in binaries.

4. Follow-up
Once the N-body simulation of M71 is evolved to
$\sim 10$
Gyr, we will examine the resulting pulsar population in detail. We will combine the intrinsic pulsar population with survey parameters for current and future radio facilities (e.g., FAST, MeerKAT, SKA) to predict the number and properties of observable pulsars. We will also study double compact object mergers as gravitational wave sources and compare them with detections from the LVK collaborations. Finally, we will use the simulated pulsars to explain observed
$\gamma$
-ray emission from M71.

P˙