A nonlinear finite element model for dynamics of flexible manipulators