A geometric local frame approach for flexible multibody systems