  We analyze compact groups of galaxies appearing in a galaxy formation
simulation dominated by cold dark matter (omega_0=1, omega_{baryon}=0.1). The
simulation uses an N-body code to model the behavior of the non-baryonic matter
and smoothed particle hydrodynamics to model the baryons. One run includes gas
dynamics alone, and the other incorporates star formation as well. Groups
identified as physically compact at z=0 form originally along filaments and
become compact in the final ~20% of the simulation; they contain
x-ray--luminous diffuse gas well before becoming compact. The component masses,
baryon fractions, and gas-to-galaxy mass fractions of the simulated groups are
roughly similar somewhat more gas-rich and have x-ray temperatures a factor of
3 lower than those seen in HCGs. These discrepancies may be alleviated by
adding the effects of energy input into the diffuse group gas by star formation
and supernovae.
