Potential-driven flows in capacitated networks