Effects of flexibility on energy extraction performance of an oscillating hydrofoil under a semi-activated mode