  We consider the effects of material flows on the dynamics of toroidal
magnetic flux tubes located close to the base of the solar convection zone,
initially within the overshoot region. The problem is to find the physical
conditions in which magnetic flux can be stored for periods comparable to the
dynamo amplification time, which is of the order of a few years. We carry out
nonlinear numerical simulations to investigate the stability and dynamics of
thin flux tubes subject to perpendicular and longitudinal flows. We compare the
simulations with the results of simplified analytical approximations. We
determine ranges of the flow parameters for which a linearly Parker-stable
magnetic flux tube is stored in the middle of the overshoot region for a period
comparable to the dynamo amplification time. The residence time for magnetic
flux tubes with fluxes of 2x10^{21} Mx in the convective overshoot layer is
comparable to the dynamo amplification time, provided that the average speed
and the duration of the downflow do not exceed about 50 m/s and 100 days,
respectively, and that the lateral extension of the flow is smaller than about
10 degrees.
