Hey! You did not write what kind of analyses of DEMs You need to do? There are many software. I prefer ArcGIS and QGIS, but very simple and free is SAGA GIS.
Thank you all for suggestions. By DEM, I mean discrete element analysis. Since in masonry walls, the mortar between blocks loose its strength by time so the bricks will resist against loads just by friction force between the blocks.
I would strongly recommend AEM based simulations which is an extended technique of DEM. This software is validated over many types and cases of masonry problems.