Interaction of square prisms in two flow fields