emptying problem Recently I was working on a problem related to the emptying of a tank. There are numerous examples  that actually solves the problem. However the problem I was working with had a time dependent lateral opening area. How can you model such a problem taking account of the area as some function of time. And I guess, the velocity along the  lateral opening will also vary along the entire length of the opening area. 
Eg. 
Initial Height of tank: $H = 50$ m
Area of tank: $A = 6.5 h^4 - 5.4 h^3 + 1.8 h^2 - 2.6*h + 1.65$ (*1000 m^2)
Height of lateral opening from bottom point of the tank : $b=f(t)=0.6 t^3-1.5 t^2+0.876$ m for $b\leq 1$, and  $b=1$ m for remaining time
Width of opening : $2m$
Find the time to empty the tank.
Hoping to get answers.
 A: Even without multiplying by $1000$, $A(50)$ turns out
to be $\approx 40\, km^2$, which is a lake more than a tank (?!).
If so, it will take approx. one month to lower the level by $1\,m$.
Also, $b(t)$ is becoming negative before reaching full opening in about $2.5\, s$
Your problem is concerning more hydraulic Engineering
than mathematics and you should move it [to this site]
(https://engineering.stackexchange.com/).
However,  all the problem 
consists in applying energy and mass conservation.

In a very first approximation (ideal case) you will have that
$$
\eqalign{
  & \left\{ \matrix{
  \rho \,A(t)\,dh = \rho \,A(t)\,\dot h(t)dt = \rho \,2\,b(t)\,v(t)dt \hfill \cr 
  \rho \,A(t)\,\dot h(t)dt\,h(t) = {1 \over 2}\rho \,2\,b(t)\,v(t)dt\;v(t)^{\,2}  \hfill \cr}  \right.  \cr 
  & \left\{ \matrix{
  \,A(t)\,\dot h(t) = \,2\,b(t)\,v(t) \hfill \cr 
  A(t)\,\dot h(t)\,h(t) = \,b(t)\,v(t)\;v(t)^{\,2}  \hfill \cr}  \right.  \cr 
  & \left\{ \matrix{
  \,v(t) = \sqrt {2\,\,h(t)} \; \hfill \cr 
  \,\dot h(t) = \,{{2\,b(t)} \over {A(t)}}\sqrt {2\,\,h(t)}  \hfill \cr}  \right. \cr} 
$$
where $\rho$ is the density and $v$ the (mean) outgoing speed, 
and where it is assumed that $h$ and thus $A(h)$, are enough high 
that it is possible to assume that the kinetic energy of the top level be practically null.
For $h=50$ this would give $v=10\,m/s$ and a debit of max $20\,m^3/s$.
But in the reality that would be an unattainable max, since losses comes into play
which depend on the geometry of the outlet, rugosity of its walls, actual water speed profile
etc.. Correction coefficients shall be introduced accordingly, [see for instance this article]
(https://www.engineeringtoolbox.com/sluice-gate-flow-measurement-d_591.html).
