Mechanical Analysis and Optimal Design of Wave Energy Device