  Using the full, three-dimensional potential of galaxy cluster halos (drawn
from an N-body simulation of the current, most favored cosmology), the
distribution of the X-ray emitting gas is found by assuming a polytropic
equation of state and hydrostatic equilibrium, with constraints from
conservation of energy and pressure balance at the cluster boundary. The
resulting properties of the gas for these simulated redshift zero clusters (the
temperature distribution, mass-temperature and luminosity-temperature
relations, and the gas fraction) are compared with observations in the X-ray of
nearby clusters. The observed properties are reproduced only under the
assumption that substantial energy injection from non-gravitational sources has
occurred. Our model does not specify the source, but star formation and AGN may
be capable of providing this energy, which amounts to 3 to 5 x10^{-5} of the
rest mass in stars (assuming ten percent of the gas initially in the cluster
forms stars). With the method described here it is possible to generate
realistic X-ray and Sunyaev-Zel'dovich cluster maps and catalogs from N-body
simulations, with the distributions of internal halo properties (and their
trends with mass, location, and time) taken into account.
