Numerical study on the power extraction performance of a flapping foil with a flexible tail