  We present numerical simulations of galaxy clusters with stochastic heating
from active galactic nuclei (AGN) that are able to reproduce the observed
entropy and temperature profiles of non-cool-core (NCC) clusters. Our study
uses N-body hydrodynamical simulations to investigate how star formation, metal
production, black hole accretion and the associated feedback from supernovae
and AGN heat and enrich diffuse gas in galaxy clusters. We assess how different
implementations of these processes affect the thermal and chemical properties
of the intracluster medium (ICM), using high-quality X-ray observations of
local clusters to constrain our models. For the purposes of this study we have
resimulated a sample of 25 massive galaxy clusters extracted from the
Millennium Simulation. Sub-grid physics is handled using a semi-analytic model
of galaxy formation, thus guaranteeing that the source of feedback in our
simulations is a population of galaxies with realistic properties. We find that
supernova feedback has no effect on the entropy and metallicity structure of
the ICM, regardless of the method used to inject energy and metals into the
diffuse gas. By including AGN feedback, we are able to explain the observed
entropy and metallicity profiles of clusters, as well as the X-ray
luminosity-temperature scaling relation for NCC systems. A stochastic model of
AGN energy injection motivated by anisotropic jet heating - presented for the
first time here - is crucial for this success. With the addition of
metal-dependent radiative cooling, our model is also able to produce CC
clusters, without overcooling of gas in dense, central regions.
