The simulation of lunar granular regolith requires the use of models that accurately represent the interaction of highly angular particles. Discrete element method (DEM) is an effective tool for the simulation of granular material behaviors such as particle flows and tool-medium interactions. This paper describes the development of a new three-dimensional discrete element code BLOKS3D for the simulation of polyhedral particles. New algorithms are presented for neighbor search and contact detection. These algorithms are more efficient than currently available in the literature and significantly improve the analysis speed. A series of simulation examples on direct shear tests are presented to demonstrate and evaluate the performance of the proposed algorithms and the overall DEM code. A comparison with a series of physical experiments of the interaction of earthmoving equipment with soil further demonstrates the performance of the developed DEM code. Copyright ASCE 2006.