  We study the chemodynamical evolution of elliptical galaxies and their X-ray
and optical properties using high-resolution cosmological simulations. Our Tree
N-body/SPH code includes a self-consistent treatment of radiative cooling, star
formation, supernovae feedback, and chemical enrichment. We present a series of
LCDM cosmological simulations which trace the spatial and temporal evolution of
abundances of heavy elements in both the stellar and gas components of
galaxies. A giant elliptical galaxy formed in one of the simulations is
quantitatively compared with the observational data in both the X-ray and
optical regime. We implement a treatment of both pre-heating and AGN heating in
this simulation, and examine the effect of these processes on elliptical galaxy
formation. We find that the adopted pre-heating (T=10^7 K at z=4) is not strong
enough to explain the observed X-ray or optical properties. On the other hand,
our AGN heating model in which the gas inflow induces the AGN heating is
consistent with both the X-ray and optical properties.
