Hydraulic calculation and back flow protection