  Observationally, the quenching of star-forming galaxies appears to depend
both on their mass and environment. The exact cause of the environmental
dependence is still poorly understood, yet semi-analytic models (SAMs) of
galaxy formation need to parameterise it to reproduce observations of galaxy
properties. In this work, we use hydrodynamical simulations to investigate the
quenching of disk galaxies through ram-pressure stripping (RPS) as they fall
into galaxy clusters with the goal of characterising the importance of this
effect for the reddening of disk galaxies. Our set-up employs a live model of a
galaxy cluster that interacts with infalling disk galaxies on different orbits.
We use the moving-mesh code AREPO, augmented with a special refinement strategy
to yield high resolution around the galaxy on its way through the cluster in a
computationally efficient way. Our direct simulations differ substantially from
stripping models employed in current SAMs, which in most cases overpredict the
mass loss from RPS. Furthermore, after pericentre passage, as soon as ram
pressure becomes weaker, gas that remains bound to the galaxy is redistributed
to the outer parts, an effect that is not captured in simplified treatements of
RPS. Star formation in our model galaxies is quenched mainly because the hot
gas halo is stripped, depriving the galaxy of its gas supply. The cold gas disk
is only stripped completely in extreme cases, leading to full quenching and
significant reddening on timescale of ~200 Myr. On the other hand, galaxies
experiencing only mild ram pressure actually show an enhanced star formation
rate that is consistent with observations and are quenched on timescales > 1
Gyr. Stripped gas in the wake is mixed efficiently with intracluster gas
already a few tens of kpc behind the disk, and this gas is free of residual
star formation.
