Optimal design of nonlinear viscous dampers for frame structures