Scanning underwater areas, using magnetometers, in search of unexploded ordnance is a difficult challenge, where machine learning methods can find a significant application. However, this requires the creation of a set enabling the training of prediction models. Such a task is difficult and costly due to the limited availability of relevant data. To meet this challenge in the article, we propose the use of numerical modeling to solve this task. The conducted experiments allow us to conclude that it is possible to obtain high compliance of the numerical model with the results of physical tests. In addition, the paper discusses the methodology of simplifying the computational model, allowing for almost three times reduction of the calculation time. In addition, in the work we present the methodology of creating an appropriate data set, enabling the generation of any number of training samples.