First use the Hazen-Williams equation to find the velocity of the fluid: v = k × C × R0.63 × S0.54. In this equation, k is either 0.849 for metric or 1.318 if using imperial units, C is the roughness coefficient of the pipe material, R is the hydraulic radius (cross-sectional area divided by perimeter), and S is the slope of the pipe.
You can then calculate the volume that flows through the pipe per second by multiplying v by the cross-sectional area of the pipe. Read more