Device with a self-aligned microgap for studying microscale flows