Analysis and shape optimization in incompressible flows with unstructured grids