Generalized finite element dynamic modelling and simulation for flexible robot manipulators