A new contact detection algorithm for three-dimensional non-spherical particles