Energy extraction and hydrodynamic behavior analysis by an oscillating hydrofoil device