  By means of three-dimensional hydrodynamical simulations, we investigate the
formation of second generation (SG) stars in young globular clusters of
different masses. We consider clusters with a first generation of asymptotic
giant branch (AGB) stars with mass 10^5 and 10^6 Msun moving at constant
velocity through a uniform gas with density 10^(-24) and 10^(-23) g cm^(-3).
Our setup is designed to reproduce the encounter of a young cluster with a
reservoir of dense gas, e. g. during its orbital motion in the host galaxy. In
the low-density models, as a result of the cooling AGB ejecta which collect in
the centre, weakly perturbed by the external ram pressure, a compact central
He-rich SG stellar component is formed on a timescale which decreases with
increasing initial cluster mass. Our high-density models are subject to
stronger ram pressure, which prevents the accumulation of the most He-rich AGB
ejecta in the cluster centre. As a result, the SG is more extended and less
He-enhanced than in the low-density models. By combining our results with
previous simulations, we are able to study relevant, cluster-related scaling
relations across a dynamical range of two orders of magnitude in mass (from
10^5 Msun to 10^7 Msun). In agreement with current observationally-based
estimates, we find positive correlations between the SG-to-total number ratio
and maximum He enhancement in SG stars as a function of the initial cluster
mass.
