  The majority of massive stars reside in binary systems, which are expected to
experience mass transfer during their evolution. However, so far the conditions
under which mass transfer leads to a common envelope, and thus possibly to a
merging of both stars, are not well understood. Main uncertainties arise from
the possible swelling of the mass gainer, and from angular momentum loss from
the binary system, during non-conservative mass transfer. We have computed a
dense grid of detailed models of stars accreting mass at constant rates, to
determine their radius increase due to their thermal disequilibrium. While we
find that models with faster than thermal timescale accretion generally expand,
this expansion remains quite limited in the intermediate mass regime even for
accretion rates which exceed the thermal timescale accretion rate by a factor
of 100. Our models of massive accretion stars expand to extreme radii under
those conditions. When the accretion rate exceed the Eddington accretion rate,
our models expand dynamically. We have derived analytical fits to the radius
evolution of our models and a prescription for the borderline between stable
mass transfer and mergers for arbitrary accretion efficiencies. We then apply
our results to grids of binary models adopting various constant mass transfer
efficiencies and angular momentum budgets. We find that the former parameter
has the stronger effect on the outcome of the Roche lobe overflow. Our results
are consistent with detailed binary evolution models, and often lead to a
smaller initial parameter space for stable mass transfer than other recipes in
the literature. We use this method to investigate the origin of the Wolf-Rayet
stars with O star companions in the Small Magellanic Cloud, and find that the
efficiency of the mass transfer process which lead to the formation of the
Wolf-Rayet star was likely below 50%.
