I am having a bit of difficulty establishing the efflux velocity of an open tank of water in terms of time, i.e. $u(t)$, according to Torricelli's law. I know that for a known height $h$ (where $h = H - c$, and $H$ is the vertical position of the surface of the water level in the tank, while $c$ is the vertical position of the hole in the tank), the velocity $u = \sqrt{2gh}$.
However, since $h$ is decreasing over time, $u$ is not constant and it has a decreasing parabolic shape over $t$. So what is the right formula for $u(t)$?
I tried to follow the explanation here (Equation 14) but this doesn't make sense, because that is just a straight line. A more realistic solution is here, which says that since $u(t) = \sqrt{2gh(t)}$, we just need to find the rate of change of $h(t)$ and plug it in. In the answer $h(t)$ seems to be defined as $h(t) = [\sqrt{h_0} - \frac{A}{a_t} \sqrt{\frac{g}{2}t} ]^2$, where $h_0$ is the initial $h$, $A$ is the area of the hole in the tank, while $a_t$ is the area of the surface of the water in the tank.
But when I plugged it in the above formula for $u(t)$ and tried to plot it, I didn't get the parabolic shape I was expecting. The rate of change seems to start descending with the expected curve, but towards the end where the tank presumably becomes close to empty, the line seems to become a straight one. It then reflects back up again almost as a straight line. You can see it plotted here for $h_0 = 20$, $A = 1$ and $a_t = 10$.
However, if I remember well, it should just continue the parabola (obviously physically this does not happen). Unless I am wrong about what I am expecting, this doesn't seem right.
What is the right formula for $u(t)$ given a height $h$? What am I missing?