1. A method comprising: creating a virtual domain including a grid, the grid comprising multiple grid cells; defining a height level field in the virtual domain, the height level field including height values assigned to respective grid cells and wherein the height values represent a height of a granular material at each corresponding grid cell; defining a rigid object having a position in the virtual domain, the object being positioned in the virtual domain with an interference between at least part of the object and the granular material, the interference being that part of the object occupying a same space as some of the granular material; identifying interference grid cells from among the grid cells of the virtual domain, wherein an interference grid cell is a grid cell where the object interferes with the granular material, the identified interference grid cells forming a closed region in the granular material; identifying boundary grid cells associated with the closed region from among the grid cells of the virtual domain, wherein a boundary grid cell is a grid cell that abuts at least one of the interference grid cells and is not also an interference grid cell; removing a portion of the granular material from the closed region including determining a size of the closed region by integrating a gradient of a potential field for the virtual domain over the boundary grid cells; modifying the height level field of at least one boundary grid cell by placing additional granular material in the at least one boundary grid cell; and generating an image of the virtual domain, the image reflecting an impact of the object on the granular material.