When does $ S\cdot v=\mathrm{cost}$ hold? In fluids dynamics what are the limitations for the use of the volume flow rate conservation law?
$$ S\cdot v=\mathrm{cost}$$
Does it still hold when there are external forces acting on the system, e.g. gravity, or when there is a source adding fluid in the system?
I'll make an example where I do get confused. Consider the motion of the fluid in the picture. It comes out of a tube of constant section $S$.

Now continuity equation says $S v= cost$ but the velocity here cannot be constant in the tube from Bernoulli equation since the fluid change in altitude. Furthermore it would not make sens to have constant velocity because that would means that the fluid, when it is released from the bucket, "already knows" how high it is.
So this makes me think that the continuity equation is not valid in this case, but what is the reason of this? Is it because of gravity? In which other situations is continuity equation not valid?
 A: The situation where the equation holds is when the fluid is imcompressible. 
In your example where you have a fluid flowing in a tube under gravity, you can imagine two situations. One is where there is no dissipative interaction between the fluid and the tube, and one where there is. 
In the situation with no dissipation, then the fluid should accelerate as it flows down the tube. This seems paradoxical because $v$ (the speed of the fluid) is not a constant and $S$ (the cross-sectional area of the pipe) is so $Sv$ is not constant. The resolution here is that the fliud is not really acting incompressible. To see what is really happening imagine water flowing down a rain gutter downspout. The bottom of one is shown here.

At the top, the downspout is completely filled with water, but at the bottom, only a fraction of the cross-sectional area is occupied by water. It is the product of the velocity times the cross-sectional area actually occupied by water that remains constant here. 
Now you can imagine another case, where you pour syrup down this downspout. What might happen in this case is that the syrup is so viscous that it moves very slowly and always occupies the entire cross-section. Here we have that the velocity of the syrup is constant over the length of the downspout, so there is no contradiction. The velocity is constant because the force of gravity is balanced by the drag forces from the walls of the downspout.
