Analytical and numerical modelling of the Swift effect in elastoplastic torsion