# Bernoulli's Equation application to find velocity of a leak

I was trying to do my homework. I just want to understand how do I find a velocity of a leak when the area of a given hole should be considered. I can find it if the hole's area is omitted from by just using the torricelli's theorem which can be derived from bernoulli's equation. But not sure what to do when I know the area of the pipe that the water is going to leak

Bernoulli's Equation: $P_1+{1\over2}\rho v_1^2+\rho g h_1 = P_2+{1\over2}\rho v_2^2+\rho g h_2$

Torricelli's theorem: $v_2= \sqrt{2g\Delta h}$

Edit: I think I got it but I'm just writing this to be sure. If I apply bernoulli's equation to the pipe I can find its velocity. It is very simple but it was a long day sorry for bothering you

$\rho g h_2$ I can take $h_2$ as the diameter of the hole right? and from there I can get the velocity

By conservation of mass $$dM = \rho A_1 v_1 dt = \rho A_2 v_2 dt \Longrightarrow v_1 = \frac{A_2}{A_1} v_2$$ Where $A_1$ and $A_2$ are the areas of the pipe and the hole. Replace in Bernoulli's equation and solve for $v_2$.