Simulation of wave-energy converter with octagonal linear generator