Microfluidic channels are powerful means of control of minute volumes such as droplets. These droplets are usually conveyed at will in an externally imposed flow that follows the geometry of the micro-channel. It has recently been pointed out by Dangla et al. [Phys. Rev. Let. 107(12), 124501 (2011)] that the motion of transported droplets may also be stopped in the flow, when they are anchored to grooves which are etched in the channels top wall. This feature of the channel geometry explores a direction that is usually uniform in microfluidics. Herein, this anchoring effect exploiting the three spatial directions is studied combining a depth averaged fluid description and a geometrical model that accounts for the shape of the droplet in the anchor. First, the presented method is shown to enable the capture and release droplets in numerical simulations. Second, this tool is used in a numerical investigation of the physical mechanisms at play in the capture of the droplet: a localized reduced Laplace pressure jump is found on its interface when the droplet penetrates the groove. This modified boundary condition helps the droplet cope with the linear pressure drop in the surrounding fluid. Held on the anchor the droplet deforms and stretches in the flow. The combination of these ingredients leads to recover the scaling law for the critical capillary number at which the droplets exit the anchors where is the channel height and the droplet undeformed radius.