Computer simulation of beam crystallization under non-ideal fields and perturbations in a storage ring