Does using Bernoulli's equation for a region of zero mean flow violate mass conservation?

Let's say I have a pressure reservoir with zero mean flow connected to a pipe with mean flow. So for the reservoir we have $p_1>0$ and $v_1=0$. For the pipe we have $p_2,v_2>0.$ Bernoulli's equation says $p_1=p_2 + (1/2) \rho v_2^2$. Why doesn't this violate mass conservation? It seems like there is no flow into the pipe, but there is flow coming out of it. What's happening physically?

• There is usually an mgh term on the left-hand-side as well, as you need a pressure 'head' to drive the flow through the pipe. Basically, gravitational potential energy in the reservoir is being converted into kinetic energy in the pipe. – Time4Tea Jan 24 '15 at 1:12

It does not violate mass conservation. As @Time4Tea suggested, $p_1$ will have a contribution of the form $h\rho g$. Let us consider the simple situation of the pipe opening to the air. In that case, $p_2$ at that end will be $p_a$, the atmospheric pressure. Similarly, $p_1$ will be $p_a + h\rho g$ at the point where the pipe starts from the reservoir. Applying Bernoulli equation, you will get $v_2 = \sqrt{gh}$. As the fluid is drained out, $h$ drops and so does $v_2$. Eventually, as $h$ drops to zero, so will $v_2$.