# Bernouli equation in a glass of water

If a glass full of water has a hole in the bottom connected to a horizontal straw with a known diameter and length. How could you apply Bernoulli to calculate the height of the glass if you could measure the flow rate at the exit and you knew the irreversible head loss of the system?

$$\dfrac{P_1}{\rho g} + \dfrac{V_1^2}{2g} + z_1$$ = $$\dfrac{P_2}{\rho g} + \dfrac{V_2^2}{2g} + z_2$$

If the cup and the outlet both are open to the atmosphere, $$P_1 = P_2$$, and with $$V_1 = 0$$, the equation reduces to $$z_1 = \dfrac{V_2^2}{2g} + z_2$$. Thus, the discharge velocity, at any time $$t$$, $$V_i = \sqrt{2g\Delta z}$$. And, the flow rate at discharge point $$Q = V_ia = a\sqrt{2g\Delta z}$$ ("$$a$$" is the area of the outlet).

For the water in the cup, we can write the equation for the flow rate (a negative quantity) as,

$$Q = -A\dfrac{dz}{dt}$$ ("$$A$$" is the area of the cup)

Equate both $$Q's$$, then integrate "z" from $$z_o$$ to $$z_i$$ and integrate t from $$t_o =0$$ to $$t_i$$, then solve for time $$t$$, which is the time required for the liquid to fall from $$z_o$$ to $$z_i$$:

$$t = \dfrac{A}{a}(\sqrt{z_o} - \sqrt{z_i})\sqrt{\dfrac{2}{g}}$$

Now you can find the time for draining the cup completely by setting $$z_i = z_f = 0$$. And with $$t$$ is known, you can check the change in $$z$$, $$z_i - z_o$$ of any time you want quite easily.