Dynamics and optimization of the OWC spar buoy wave energy converter