  Context. Earlier work has suggested that large-scale dynamos can reach and
maintain equipartition field strengths on a dynamical time scale only if
magnetic helicity of the fluctuating field can be shed from the domain through
open boundaries. Aims. Our aim is to test this scenario in convection-driven
dynamos by comparing results for open and closed boundary conditions. Methods.
Three-dimensional numerical simulations of turbulent compressible convection
with shear and rotation are used to study the effects of boundary conditions on
the excitation and saturation of large-scale dynamos. Open (vertical-field) and
closed (perfect-conductor) boundary conditions are used for the magnetic field.
The shear flow is such that the contours of shear are vertical, crossing the
outer surface, and are thus ideally suited for driving a shear-induced magnetic
helicity flux. Results. We find that for given shear and rotation rate, the
growth rate of the magnetic field is larger if open boundary conditions are
used. The growth rate first increases for small magnetic Reynolds number, Rm,
but then levels off at an approximately constant value for intermediate values
of Rm. For large enough Rm, a small-scale dynamo is excited and the growth rate
of the field in this regime increases as Rm^(1/2). Regarding the nonlinear
regime, the saturation level of the energy of the total magnetic field is
independent of Rm when open boundaries are used. In the case of perfect
conductor boundaries, the saturation level first increases as a function of Rm,
but then decreases proportional to Rm^(-1) for Rm > 30, indicative of
catastrophic quenching. These results suggest that the shear-induced magnetic
helicity flux is efficient in alleviating catastrophic quenching when open
boundaries are used. The horizontally averaged mean field is still weakly
decreasing as a function of Rm even for open boundaries.
