Find the size required using the Maximum head loss criterion and Moody chart (diagram not included).
Undigon/pipe-diameter-by-head-loss
Find pipe size required using the Maximum head loss criterion and Moody chart (diagram not included). C and HTML+JS available.
HTMLMIT