# Problem 57969. Compute flow in a partially full pipe

Problem statement
When does the maximum flow occur in a pipe? Intuition might suggest that it occurs when the pipe is flowing full—i.e., when the depth of flow h equals the diameter D of the pipe.
Write a function that takes the ratio and produces the flow rate as a fraction of the value for a full pipe. For example, when the input is 1/2, the output should be 1/2, and when the input is 1, the output should be 1. Assume that Manning’s equation applies and Manning’s roughness coefficient is constant.
See Test 13 for the answer to the initial question.
Background
Steady uniform flow in a channel is often computed with Manning’s equation, which results from a balance between the component of the fluid’s weight in the flow direction and friction on the walls of the channel. The shear stress on the channel walls is computed with an empirical relation. Manning’s equation for the flow Q is
where n is Manning’s roughness coefficient, is the hydraulic radius, is the slope of the channel, A is the cross-sectional area of the flow, and P is the wetted perimeter (i.e., the perimeter of the solid wall of the channel that is touching the water.) The coefficient C is 1 for SI units and 1.5 (or 1.49) for U.S. customary units.

### Solution Stats

33.33% Correct | 66.67% Incorrect
Last Solution submitted on Jun 05, 2023

Show comments

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!