Calculate pipe diameter from flow rate and velocity with friction loss consideration — free plumbing design tool