If it is just a circular pipe flowing part full it is relatively easy to calculate the flow. The flow is dependent on the profile, roughness and the gradient.
You can calculate pipeflow using mannings equation (as this is essentially open channel flow), there are published tables for flow rates and velocities (HR Wallingford Tables), you can determine full bore discharge using colebrook-white and modify the diameter using the Butler pinkerton shape correction factor to account for pipes part full. However, these are only valid if you do not have significant head behind the pipe and assume steady non-uniform flow.
As you have a tank with an inlet and an outlet it might be more complicated. If the tank is completely full all the flow that enters will ultimately leave, subject to the buffering capacity of the tank itself. It is also likely to flow in surges instead of a constant flow. You basically have a length small diameter pipe, widening to a very large length or pipe, narrowing back down to a small length of pipe. This is an non uniform flow situation. And if the flow entering is changing with respect to time it also becomes an unsteady flow situation.
As an approximatation, I would do a rough calc for a number of different top water levels, use that to calculate a hydraulic gradient across the tank and use that values as gradient (slope) then plug that into mannings equation.