Integration to give total flow