Coronal and heliospheric magnetic flux circulation and its relation to open solar flux evolution