Numerical investigations of the vortex interactions for a flow over a pitching foil at different stages