A model for calculating the angular momentum distribution of fission fragments