(Abridged) X-ray clusters are conventionally divided into two classes: "cool
core" (CC) clusters and "non-cool core" (NCC) clusters. Yet relatively little
attention has been given to the origins of this dichotomy and, in particular,
to the energetics and thermal histories of the two classes. We develop a model
for the entropy profiles of clusters starting from the configuration
established by gravitational shock heating and radiative cooling. At large
radii, gravitational heating accounts for the observed profiles and their
scalings well. However, at small and intermediate radii, radiative cooling and
gravitational heating cannot be combined to explain the observed profiles of
either type of cluster. The inferred entropy profiles of NCC clusters require
that material is preheated prior to cluster collapse in order to explain the
absence of low entropy (cool) material in these systems. We show that a similar
modification is also required in CC clusters in order to match their properties
at intermediate radii. In CC clusters, this modification is unstable, and an
additional process is required to prevent cooling below a temperature of a few
keV. We show that this can be achieved by adding a self-consistent AGN feedback
loop in which the lowest-entropy, most rapidly cooling material is heated so
that it rises buoyantly to mix with material at larger radii. The resulting
model does not require fine tuning and is in excellent agreement with a wide
variety of observational data. Some of the other implications of this model are
briefly discussed.Comment: 27 pages, 13 figures, MNRAS accepted. Discussion of cluster heating
energetics extended, results unchange