Energy harvesting and aeroelastic instabilities using prescribed and elastically-mounted pitching and heaving hydrofoils