This paper presents an implementation of the contact dynamics method for discrete non-spherical particles. The algorithm can handle particles with a wide range of geometries as long as they are described in triangular surface meshes. The contact detection between particles is organized into two phases: coarse-grained and fine-grained contact detection. Specifically, different hierarchies of grids are utilized to perform fast contact detection: (a) A spatial sorting method is utilized for coarse-grained contact detection, where each non-spherical particle is represented with a corresponding bounding-sphere (b) The Polygonal Contact Method is introduced into the fine-grained contact detection phase to accurately determine the active contact areas between the interacting particles. These techniques solve the difficulties of determining the action point(s) of contact force and torque between non-spherical particles. The smooth (force-based) method is employed to calculate the contact force and torque, which is generally regarded as conforming to the actual physical process. Particularly, the non-linear Hertz and Mindlin-Deresiewicz theories are adopted to calculate the normal and tangential forces. The non-spherical Brazil nut effect under the shear vibration mode is simulated as validation by comparing with the existing experimental results. The simulation results confirmed that the convection and percolation mechanism mutually affect the nut heap's behavior and finally drive the rise of the Brazil nut from the bottom to the top layer.