  We present results of an attempt to include more detailed gas physics
motivated from hydrodynamical simulations within semi-analytic models (SAM) of
galaxy formation, focusing on the role that environmental effects play. The
main difference to previous SAMs is that we include 'gravitational' heating of
the intra-cluster medium (ICM) by the net surplus of gravitational potential
energy released from gas that has been stripped from infalling satellites.
Gravitational heating appears to be an efficient heating source able to prevent
cooling in environments corresponding to dark matter halos more massive than
$\sim 10^{13} $M$_{\odot}$. The energy release by gravitational heating can
match that by AGN-feedback in massive galaxies and can exceed it in the most
massive ones. However, there is a fundamental difference in the way the two
processes operate. Gravitational heating becomes important at late times, when
the peak activity of AGNs is already over, and it is very mass dependent. This
mass dependency and time behaviour gives the right trend to recover down-sizing
in the star-formation rate of massive galaxies. Abridged...
