How much water must flow trough canal to maintain a constant water deep? In order to maintain a constant water deep in canal, how much water must flow trought the pipe ?

As shown on picture, canal have a rectangular shape.
I don't know if canal length  have an influence.
EDIT : to simplify things let's consider there is no turbulence, no viscosity, and that water falling from pipe do not disturb water in canal.

I tried to solve the problem by myself (i'm a physics beginner so it could be totally wrong, please do not downvote the question if you think this is not correct) :
Area of canal section : $A = w \, h$
If I calculate water velocity $v$ in canal, using this and surface $A$, I can calculate how much water $Q$ will flow :
$$Q = A \, v$$
and solve the problem...
So only thing left is to calculate $v$.
Let's say the canal have no inclination $Z = 0$, I think water velocity for a given water height can be calculated like this (I'm not sure about this) : 
$$    v = \sqrt{ 2 \, g \,  h } $$
$$    \delta Q = A \, v = w \, \delta h \, \sqrt{ 2 \, g \,  h } $$
integrating h from 0 to H and gives : 
$$  Q = w  \, \sqrt{ 2 \, g } \int_0^H h^{1/2} \, dh$$
so discharge for a given height and width :
$$ Q = \frac{2}{3} \, w  \, \sqrt{ 2 \, g } \, H ^{3/2} $$
Could anyone tell me if the above is correct (assuming there is not inclination), and try to answer my initial question ?
 A: From the potential application of the question, I assume that question is to provide design parameters for a water slide.  Because the depth of the water will be reduced from acceleration, the real question is how to add resistance to the canal.   Resistance can be provided through the disruption through the use of twists and turns.  I would generate empirical data of an actual set up for model.  A water flow meter could show how various degree turns affect the speed reduction of the fluid.  The use of a lower viscosity fluid could help to reduce the size of the pipe for modeling purposes.  Because the fluid is not strictly contained within the diameter of a pipe, common equations are not applicable, however someone on this forum may provide something of use in the modeling area.
A: I think there is a fundamental difference between the inclined slope and a flat surface.
If you consider the sloped case, you have gravity as a driving force to accelerate the flow downwards. As the fluid accelerates, you know from mass conservation that the value of $h$ along the slope will decrease. But at some point, you got friction at the wall preventing further acceleration. Lets focus at this far downstream point where
$$ \frac{dh(x)}{dx}=0$$
Therefore, we also know that $\vec{u}(x,y)$ reduces to $u(y)$, only a velocity component in the direction parallel to the bottom, that is only varying in the direction perpendicular to the bottom.
We know from experience that this kind of laminar flow will give a Poisseuille profile, so we assume that $u(y)=ay^2+by+c$ and boundary conditions.


*

*At $y=0$, $u(0)=0$

*At $y=h$, $\frac{du}{dy}=0$, because there is no slip at the free surface.

*We now that mass is conserved, thus $\int_0^h u(y)dy=Q$ with $Q$ the flow rate. Note that $Q$ has dimensions $m^2/s$ as this case is two-dimensional.


This give $c=0$, $b=-2ha$ and $a=-\frac{2}{3}\frac{Q}{h^3}$ respectively, and thus
$$u(y)=\frac{3Q}{h^3}(yh-\frac{1}{2}y^2)$$
Now we will balance the friction along the bottom with the gravity force on the bulk. This is valid, as there is no pressure gradient acting (the pressure at the top is uniform ambient pressure).
The friction force along the bottom over a length $\Delta x$ equals $\mu\frac{du}{dy}(0)\Delta x$ and the gravity force in that direction equals $\rho h g \sin \alpha$, where $\mu$ is the viscosity, $\rho$ the density and $\alpha$ the angle of the slope with the horizontal.
$$friction = gravity\\
\mu \frac{3Q}{h^2} \Delta x = \rho h \Delta x g \sin \alpha \\
h=\sqrt[3]{\frac{3\mu Q}{\rho g  \sin \alpha}}$$
From this expression, you see that for increasing flow rate, the height of the film increases. Also when you decrease the slope angle, the film thickness will increase.
Finally, increasing the viscosity, will increase film height. This makes sense when you realize that when there is more friction, the same area can withstand more mass.
