  We develop a new sub-grid model for the growth of supermassive Black Holes
(BHs) and their associated Active Galactic Nuclei (AGN) feedback in
hydrodynamical cosmological simulations. Assuming that BHs are created in the
early stages of galaxy formation, they grow by mergers and accretion of gas at
a Eddington-limited Bondi accretion rate. However this growth is regulated by
AGN feedback which we model using two different modes: a quasar-heating mode
when accretion rates onto the BHs are comparable to the Eddington rate, and a
radio-jet mode at lower accretion rates. In other words, our feedback model
deposits energy as a succession of thermal bursts and jet outflows depending on
the properties of the gas surrounding the BHs. We assess the plausibility of
such a model by comparing our results to observational measurements of the
coevolution of BHs and their host galaxy properties, and check their robustness
with respect to numerical resolution. We show that AGN feedback must be a
crucial physical ingredient for the formation of massive galaxies as it appears
to be the only physical mechanism able to efficiently prevent the accumulation
of and/or expel cold gas out of halos/galaxies and significantly suppress star
formation. Our model predicts that the relationship between BHs and their host
galaxy mass evolves as a function of redshift, because of the vigorous
accretion of cold material in the early Universe that drives Eddington-limited
accretion onto BHs. Quasar activity is also enhanced at high redshift. However,
as structures grow in mass and lose their cold material through star formation
and efficient BH feedback ejection, the AGN activity in the low-redshift
Universe becomes more and more dominated by the radio mode, which powers jets
through the hot circum-galactic medium.
