Modeling the potential of the gravitational field at the upper boundary of the region with the presence of an underground anomaly