  We study how the gas in a sample of galaxies (M* > 10e9 Msun) in clusters,
obtained in a cosmological simulation, is affected by the interaction with the
intra-cluster medium (ICM). The dynamical state of each elemental parcel of gas
is studied using the total energy. At z ~ 2, the galaxies in the simulation are
evenly distributed within clusters, moving later on towards more central
locations. In this process, gas from the ICM is accreted and mixed with the gas
in the galactic halo. Simultaneously, the interaction with the environment
removes part of the gas. A characteristic stellar mass around M* ~ 10e10 Msun
appears as a threshold marking two differentiated behaviours. Below this mass,
galaxies are located at the external part of clusters and have eccentric
orbits. The effect of the interaction with the environment is marginal. Above,
galaxies are mainly located at the inner part of clusters with mostly radial
orbits with low velocities. In these massive systems, part of the gas, strongly
correlated with the stellar mass of the galaxy, is removed. The amount of
removed gas is sub-dominant compared with the quantity of retained gas which is
continuously influenced by the hot gas coming from the ICM. The analysis of
individual galaxies reveals the existence of a complex pattern of flows,
turbulence and a constant fuelling of gas to the hot corona from the ICM that
could make the global effect of the interaction of galaxies with their
environment to be substantially less dramatic than previously expected.
