Galactic nuclei evolution with spinning black holes: method and
  implementation
  Supermassive black holes at the centre of galactic nuclei mostly grow in mass
through gas accretion over cosmic time. This process also modifies the angular
momentum (or spin) of black holes, both in magnitude and in orientation.
Despite being often neglected in galaxy formation simulations, spin plays a
crucial role in modulating accretion power, driving jet feedback, and
determining recoil velocity of coalescing black hole binaries. We present a new
accretion model for the moving-mesh code {\sc arepo} that incorporates (i) mass
accretion through a thin $\alpha$-disc, and (ii) spin evolution through the
Bardeen-Petterson effect. We use a diverse suite of idealised simulations to
explore the physical connection between spin evolution and larger scale
environment. We find that black holes with mass $\lesssim 10^{7}$ M$_{\odot}$
experience quick alignment with the accretion disc. This favours prolonged
phases of spin-up, and the spin direction evolves according to the gas inflow
on timescales as short as $\lesssim 100$ Myr, which might explain the observed
jet direction distribution in Seyfert galaxies. Heavier black holes ($\gtrsim
10^{8}$ M$_{\odot}$) are instead more sensitive to the local gas kinematic.
Here we find a wider distribution in spin magnitudes: spin-ups are favoured if
gas inflow maintains a preferential direction, and spin-downs occur for nearly
isotropic infall, while the spin direction does not change much over short
timescales $\sim 100$ Myr. We therefore conclude that supermassive black holes
with masses $\gtrsim 5 \times 10^{8}$ M$_{\odot}$ may be the ideal testbed to
determine the main mode of black hole fuelling over cosmic time.
