Abstract
To avoid the problem of the traditional methods consuming large computational resources to calculate the kernel matrix and 2D discrete convolution, we present a novel approach for 3D gravity and magnetic modelling. This method combines the midpoint quadrature method with a 2D fast Fourier transform (FFT) to calculate the gravity and magnetic anomalies with arbitrary density or magnetic susceptibility distribution. In this scheme, we apply the midpoint quadrature method to calculate the volume element of the integral. Then, the convolution of the weight coefficient matrix with density or magnetization is efficiently computed via the 2D FFT. Finally, the accuracy and efficiency of the proposed algorithm are validated by using an artificial model and a real topography model. The numerical results demonstrate that the proposed algorithm’s computation time and the memory requirement are decreased by approximately two orders of magnitude compared with the space-wavenumber domain method.
Similar content being viewed by others
Introduction
The efficient and accurate forward modelling of the gravity and magnetic potential fields, generated by arbitrary mass density or magnetization distribution of the 3D geological body is the foundation of the geophysical applications1,2. Gravity and magnetic forward modelling, which can be solved in the space or Fourier domains, is part of the potential field data processing.
The earliest numerical modelling of the potential field is mainly studied in the space domain. For the space domain forward techniques, convolution integrals satisfied by the potential fields can be directly calculated by analytical solution3,4,5,6,7,8, Gaussian quadrature method9,10,11, Cauchy-type integral method12,13,14 or multilevel fast multipole method1,15. However, whether performed by analytical formulea or numerical integration, several calculations are required for every subdivided volume cell16. Moreover, the discrete convolution of the weight coefficients with density or magnetization takes much time. Therefore, 3D gravity and magnetic numerical modelling suffer from a prohibitive computational cost, especially when the number of observation sites and source elements are huge14,15.
Another method to evaluate the convolution integrals is transformed into the Fourier domain. Many researchers have considered fast computation of integral kernel, including the calculation of the integral in the Fourier domain17,18,19,20 and by discretization of the operator and calculation in the space domain21,22,23,24,25. Then, Li et al.17 and Dai et al.18 developed the space-wavenumber domain method based on 2D Gauss-FFT26 to calculate gravity and magnetic anomalies. Their research mainly focus on reducing the boundary effect of the standard FFT in the Fourier domain, which significantly improving the accuracy.
Forward modelling for geophysics kernels has utilized the FFT in a variety of situations. Vogel27 first applied the FFT algorithm to the integral kernel where observations and dipoles are aligned on a regularly-spaced grid. For a multilayer model, Zhang and Wong21 introduced the use of the Block-Toeplitz-Toeplitz-Block (BTTB) structure for fast 3D gravity forward modelling and inversion. Wu22 combined the Gaussian quadrature and FFT algorithm to develop a fast method for complex 3D gravity forward modelling. Subsequently, Chen and Liu23 used an analytical expression to calculate the weight coefficients, but only for gravity case. Yuan et al.25 achieved the magnetic forward modelling based BTTB matrix. Hogue et al.24 discussed the properties of the coefficient matrix of the gravity and magnetic potential field. However, the majority of previous work apply the analytical soulution or Gaussian quadrature method to caluculate the kernel martrix which hit a computational cost and memory requirement constraint, rendering them prohibitive in scenarios with a large number of mesh elements.
In this study, we propose a novel method to solve large-scale gravity and magnetic potential field forward problems swiftly. In this scheme, we introduce an approach to explore the symmetric structures of the coefficient matrix for the gravity and magnetic kernel. To reduce the computation time, the midpoint quadrature28,29 is used to calculate the coefficient matrix, and the 2D FFT is applied to achieve the fast discrete convolution of the coefficient matrix with the density or magnetization function. The accuracy and efficiency of our algorithm are examined using a synthetic model and a realistic topography model.
Basic theory
Statement of problem
For general mass density or magnetization distribution, the integral response of both gravity and magnetic signals can be expressed as the convolution of the Green’s function \(G({\textbf{r}},{\textbf{r}}^{\prime })\) with the source function \(f({\textbf{r}}^{\prime })\)30
which can be further simplified as
where \({\textbf{r}}\) is the field coordinates, \({\textbf{r}}^{\prime }\) is the source coordinates, \(h({\textbf{r}})\) represents the response of the gravity or magnetic signals, \(J({\textbf{r}},{\textbf{r}}^{\prime })=cG({\textbf{r}},{\textbf{r}}^{\prime })\) is the weight coefficients matrix. For the gravity forward problem, \(c=\gamma\), \(f({\textbf{r}}^{\prime })=\rho ({\textbf{r}}^{\prime })\), \(\gamma\) is the gravitational constant, \(\rho ({\textbf{r}}^{\prime })\) is the density distribution function. For the magnetic forward problem, \(c=\mu\), \(f({\textbf{r}}^{\prime })={\textbf{M}}({\textbf{r}}^{\prime })\), \(\mu\) is the permeability of vacuum, \({\textbf{M}}({\textbf{r}}^{\prime })\) is the intensity of the magnetization distribution function.
Numerical integration of 3D integral
The computational burden of evaluating element integral by an analytical solution7,31 or numerical integration14,15 is pretty large, even if the density or magnetization profile of the cell is as simple as constant. To solve it, we introduce the midpoint quadrature method28,29 to calculate the volume element of the integration by multiplying the value of the midpoint with the length of the integration interval. In this section, \(J({\textbf{r}},{\textbf{r}}^{\prime })\) can be computed by applying the midpoint quadrature method. The model space \([x_{1},x_{L}]\times [y_{1},y_{M}]\times [z_{1},z_{N}]\) can be discretized into \(L\times M\times N\) grid points. And, we assume that the mass density or magnetization of each grid point is constant. Therefore, for the fields point \((x_{l}, y_{m}, z_{0})\) on the 2D horizontal grid, the general 3D convolution problem can be written as
where \((x_{i}^{\prime }, y_{j}^{\prime }, z_{k}^{\prime })\) are the coordinate of the source point (i, j, k), \(f(x_{i}^{\prime }, y_{j}^{\prime }, z_{k}^{\prime })\) is the density or magnetization of the source point. Equation (3) can be further expressed as
let
where
\((\mu _{l}, \nu _{m}, \omega _{n})\) are the quadrature weights, \(\mu _{l}=\dfrac{x_{L}-x_{1}}{L}\), \(\nu _{m}=\dfrac{y_{M}-y_{1}}{M}\), \(\omega _{n}=\dfrac{z_{N}-z_{1}}{N}\). Taking gravity field’s Green function as an example, the weight coefficient of the formula (6) can be expressed as
Similarly, we can obtain Green’s function the weight coefficients for gravity and magnetic anoamly quantities.
Acceleration technique for 2D convolution
When the observation point coincides with the horizontal projection of the centroid of the splitting point masses, the weight coefficient matrix \(J_{LM}\) is a block Toeplitz matrix23. Due to a large number of repeated matrix elements, the full matrix can be obtained by calculating only some elements. Thus, it can effectively reduce the calculation time of the weight coefficient matrix. Finally, the convolution problem of the weight coefficient matrix \(J_{LM}\) with \(f_{LM}\) for Eq. (5) can be achieved using the 2D FFT.
According to the convolution theorem:
where \(F_{2D}\) denotes the 2D discrete Fourier transform operators; ‘\(\otimes\)’ denotes the 2D multiplication operator; ‘\(.*\)’ is the dot multiplication operator. It can be found that the convolution of \(J_{LM}\) and \(f_{LM}\) is converted to the product of the Fourier domain with the help of the 2D FFT technique. Applying the convolution theorem, Eq. (5) can be computed by
where
and then Eq. (10) can be further denoted as
and
The final source matrix \(f_{2L \times 2M}\) is obtained by filling the original source matrix \(f_{L \times M}\) with zero element, which is equal to the size of kernel matrix.
Appling the 2D inverse Fourier transform on Eq. (9), the gravity anomaly in the space domain can be obtained
where \(F_{2D}^{-1}\) denotes the 2D inverse discrete Fourier transform operators. \(\lfloor \rfloor _{L \times M}\) means to take the first L row and M column elements of the matrix. Finally, the gravitational anomaly is obtained by accumulating the influence of the N layer source on the observation height. Repeating the above process, we can also easily get the magnetic anomaly.
Results
In this section, we examine the proposed method by presenting two different kinds of numerical experiments. At first, we use a benchmark scenario model32,33 to verify the proposed algorithm and evaluate the performance of the proposed algorithm by comparing it with existing implementation algorithms. Then, we apply the proposed approach to a local real topographic model in New Zealand to demonstrate the practical application. All the numerical experiments are implemented on a laptop with Intel Core i5-10210U 1.6 GHz and 8 GB of RAM.
Performance comparison with existing implementations
As shown in Fig. 1, the benchmark model is used to verify the correctness and evaluate the performance of the gravity and magnetic forward modelling code. The model setup is identical to that used in Pan et al.32, with a modelling domain of 100 km \(\times\) 100 km \(\times\) 100 km , which contains two cubic bodies. The model region is discretized into 128 \(\times\) 128 \(\times\) 128 cells with an equal interval of 781.25 m in three directions. The number of observation points is 128 \(\times\) 128 on a horizontal observation plane with a height of 12.5 km.
The forward results in comparison with the analytical solution30 are shown in Figs. 2 and 3. For the gravity case, the maximum errors for the gravity field \(g_{z}\) and gravity gradient \(T_{zz}^{g}\) are 1.07 × 10\(^{-5}\) mGal and 1.06 × 10\(^{-6}\) E, respectively. For the magnetic case, the maximum errors for the magnetic field \(B_{z}\) and magnetic gradient \(T^{m}_{zz}\) are 1.7 × 10\(^{-5}\) nT and 5.91 × 10\(^{-6}\) nT/m, respectively. The trivial difference between the numerical results and analytical solution for all data types obviously verifies the accuracy of the proposed algorithm.
To evaluate the numerical performance of the proposed method, the forward results are compared with the space-wavenumber domain method18, which transforms the 3D integral equation methods into a 1D integral with different wavenumbers. In addition to the method mentioned18, we also compare our method with the compact difference scheme for solving the Posson’s equation32.
The gravity field \(g_{z}\) and gravity gradient \(T_{zz}^{g}\) of the analytical solutions are shown in the first columns of Fig. 2. The absolute differences of our method and the space-wavenumber domain method with 8 gauss nodes18 are shown in the second and third columns of Fig. 2, respectively. For the gravity field \(g_{z}\) and the gravity gradient \(T_{zz}^{g}\), we can find that the differences of our method are two orders of magnitude lower than those of Dai et al.18. Taking \(T_{zz}^{g}\) as an example, the execution time, rrms, maximum absolute error and computing resources for the different methods are shown in Table 1. The maximum error and the relative root mean square error (Rrms) of our method is 1.06 × 10\(^{-6}\) E and 7.89 × 10\(^{-6}\) \(\%\) , which are much lower than Dai et al.18 (1.34 × 10\(^{-5}\) E and 4.32 × 10\(^{-4}\) \(\%\)) and Pan et al.32 (9.25 × 10\(^{-4}\) E and 9.2 × 10\(^{-3}\) \(\%\)). In addition, the calculation time of the proposed method only required 0.25 s, whereas 19.48 s and 31.0 s were required for the method of Dai et al.18 and Pan et al.32, respectively. Our method has a speedup ratio of 78 and 124 over the Dai et al.18 and Pan et al.32 methods, respectively. It can be seen that our proposed method has higher computational accuracy and efficiency.
We also study the execution time and memory requirement in cases of different model sizes. The model is discretized into different small cells, which are from 50 \(\times\) 50 \(\times\) 50 cells to 250 \(\times\) 250 \(\times\) 250 cells. As illustrated in Fig. 4b, the computation time of our method increases from 0.029 s (50 \(\times\) 50 \(\times\) 50) to 1.81 s (250 \(\times\) 250 \(\times\) 250). By contrast, the method of Dai et al.18 spends 0.9 s and 699.26 s for the same condition. It can be evident that the computation time of both approaches increases exponentially with the increase of the mesh as shown in Fig. 4b. However, the computation time of our method is more gently compared with Dai et al.18. Moreover, our method requires only 1/16 of the computation memory of Dai et al.18 in Fig. 4a. So, it can be further considered that our method is more favor for 3D large-scale gravity and magnetic forward problems.
Topography effect on airborne data
Figure 5 shows the final testing model, which derived from a digital elevation model (DEM) of Rotorua city, New Zealand, with significant terrain. Our motivation is to set up a rugged topography model to investigate the effect of topography on airborne gravity and magnetic data. The DEM data with a spatial resolution 3\(^{\prime \prime }\) \(\times\) 3\(^{\prime \prime }\), can be obtained from the http://dwtkns.com/srtm/. The DEM data are resampled with a spacing of 50 m in the horizontal directions. The area’s maximum elevation of the undulating terrain is 1091 m, and the lowest is 3.2 m. Thus, the rugged topography model can be built by 400 \(\times\) 400 \(\times\) 100 cells. For all elements below the topographic ground surface, we assign a constant value of 2760 kg m\(^{-3}\). The magnetic field strength is 53861 nT, and the magnetic declination and inclination are 20.9\(^{\circ }\) and − 63.5\(^{\circ }\), respectively. The local magnetic data can be obtained from the Magnetic Declination website (Magnetic declination, n.a.). The magnetic susceptibility of the region is taken as 0.02 SI. We set up a horizontal computational plane with 400 \(\times\) 400 observation sites that cover the entire area at a local height of 2000 m to imitate the airborne gravity and magnetic survey.
We calculate the vertical gravity to evaluate the accuracy and efficiency of the proposed method based on the terrain mode as shown in Fig. 5b. Figure 6 compares the vertical gravity computed using our method with the analytical solution based on cell merging and parallel computing33, and both solutions are in excellent agreement. The maximal relative error of the two methods is less than 2.2 × 10\(^{-3}\) \(\%\). Additionally, compared to the 46,779.56 s required by the analytical solution, our method only took 2.56 s. Our solution has a speedup ratio of 18,273 over the analytical solution based on cell merging and parallel computing. The excellent agreement of the two solutions, as well as the considerable speedup clearly demonstrate the better performance of our method for tackling complicated topography model.
In addition, we also compute the gravity fields (Fig. 7a,b), the gravity gradient tensors (Fig. 7c–i), the magnetic fields (Fig. 8a–c) and the magnetic gradient tensors (Fig. 8d–i) caused by the terrain model. From Fig. 7f, we can see that the maximum value of \(T_{xx}^{g}+T_{yy}^{g}+T_{zz}^{g}\) is less than 1.0 × 10\(^{-7}\) E, which is approximately equal to 0. Obviously, it again demonstrates that our method is suitable for a complex topography model.
Discussion
In this article, we propose an efficient approach by utilizing the midpoint quadrature for computing the weight coefficient matrix and the 2D FFT method to directly calculate gravity and magnetic anomalies. We evaluate its precision and effectiveness using an artificial model and a real topography model. The results show that our method can almost ignore the effect near the boundary compared with the traditional Fourier domain method based on Gauss-FFT. At the same time, this approach not only greatly improves efficiency, but also requires much less computational memory. The results show the great potential of our method to be applicable to 3D fast inversion of gravity and magnetic data in a large-scale realistic terrain model.
Data availability
The datasets generated during and analysed during the current study are available from the corresponding author on reasonable request.
References
Casenave, F., Metivier, L., Pajot-Metivier, G. & Panet, I. Fast computation of general forward gravitation problems. J. Geodesy 90, 1–21 (2016).
Dai, S., Zhao, D., Wang, S., Xiong, B. & Chen, Q. Three-dimensional numerical modeling of gravity and magnetic anomaly in a mixed space-wavenumber domain. Geophysics 84, 41–54 (2019).
Takin, M. & Talwani, M. Rapid computation of the gravitation attraction of topography on a spherical earth. Geophys. Prospect. 14, 119–142 (1966).
Nagy, D. The gravitational attraction of a right rectangular prism. Geophysics 31, 362–371 (1966).
Okabe, M. Analytical expressions for gravity anomalies due to homogeneous polyhedral bodies and translations into magnetic anomalies. Geophysics 44, 730–741 (1979).
Li, X. & Chouteau, M. Three-dimensional gravity modeling in all space. Surv. Geophys. 19, 339–368 (1998).
Nagy, D., Papp, G. & Benedek, J. The gravitational potential and its derivatives for the prism. J. Geodesy 74, 552–560 (2000).
Ren, Z., Zhong, Y., Chen, C., Tang, J. & Pan, K. Gravity anomalies of arbitrary 3d polyhedral bodies with horizontal and vertical mass contrasts up to cubic ordergravity for 3d polyhedral mass body. Geophysics 83, G1–G13 (2018).
Ku, C. C. A direct computation of gravity and magnetic anomalies caused by 2-and 3-dimensional bodies of arbitrary shape and arbitrary magnetic polarization by equivalent-point method and a simplified cubic spline. Geophysics 42, 610–622 (1977).
Asgharzadeh, M., Von Frese, R., Kim, H., Leftwich, T. & Kim, J. Spherical prism gravity effects by Gauss-Legendre quadrature integration. Geophys. J. Int. 169, 1–11 (2007).
Zhong, Y. et al. A new method for gravity modeling using tesseroids and 2d Gauss-Legendre quadrature rule. J. Appl. Geophys. 164, 53–64 (2019).
Cai, H. & Zhdanov, M. S. Modeling and inversion of magnetic anomalies caused by sediment-basement interface using three-dimensional cauchy-type integrals. IEEE Geosci. Remote Sens. Lett. 12, 477–481 (2014).
Cai, H. & Zhdanov, M. S. Joint inversion of gravity and magnetotelluric data for the depth-to-basement estimation. IEEE Geosci. Remote Sens. Lett. PP, 1–5 (2017).
Mohammadi, N., Motavalli-Anbaran, S.-H. & Ebrahimzadeh Ardestani, V. Improved 3D Cauchy-type integral for faster and more accurate forward modeling of gravity data caused by basement relief. Pure Appl. Geophys. 178, 79–90 (2021).
Ren, Z., Tang, J., Kalscheuer, T. & Maurer, H. Fast 3-D large-scale gravity and magnetic modeling using unstructured grids and an adaptive multilevel fast multipole method. J. Geophys. Res. Solid Earth 122, 79–109 (2017).
Zhdanov, M. S. & Liu, X. 3-D Cauchy-type integrals for terrain correction of gravity and gravity gradiometry data. Geophys. J. Int. 194, 249–268 (2013).
Li, K. et al. Fast 3D forward modeling of the magnetic field and gradient tensor on an undulated surface. Appl. Geophys. 15, 500–512 (2018).
Dai, S., Chen, Q., Li, K. & Ling, J. The forward modeling of 3d gravity and magnetic potential fields in space-wavenumber domains based on an integral method. Geophysics 87, G83–G96 (2022).
Wang, X. et al. Fast numerical simulation of 2d gravity anomaly based on nonuniform fast Fourier transform in mixed space-wavenumber domain. J. Appl. Geophys. 194, 104465 (2021).
Wang, X., Zhao, D., Liu, J. & Zhang, Q. Efficient 2D modeling of magnetic anomalies using NUFFT in the Fourier domain. Pure Appl. Geophys. 179, 2311–2325 (2022).
Zhang, Y. & Wong, Y. BTTB-based numerical schemes for three-dimensional gravity field inversion. Geophys. J. Int. 203, 243–256 (2015).
Wu, L. Efficient modeling of gravity fields caused by sources with arbitrary geometry and arbitrary density distribution. Surv. Geophys. 39, 401–434 (2018).
Chen, L. & Liu, L. Fast and accurate forward modelling of gravity field using prismatic grids. Geophys. J. Int. 216, 1062–1071 (2019).
Hogue, J. D., Renaut, R. A. & Vatankhah, S. A tutorial and open source software for the efficient evaluation of gravity and magnetic kernels. Comput. Geosci. 144, 104575 (2020).
Yuan, Y. et al. Fast and high accuracy 3D magnetic anomaly forward modeling based on BTTB matrix. Chin. J. Geophys. 65, 1107–1124 (2022).
Wu, L. & Tian, G. High-precision Fourier forward modeling of potential fields. Geophysics 79, G59–G68 (2014).
Vogel, C. R. Computational Methods for Inverse Problems (SIAM, 2002).
Dragomir, S. S. On the midpoint quadrature formula for mappings with bounded variation and applications. Kragujevac J. Math. 22, 13–19 (2000).
Jeyakarthikeyan, P. V., Subramanian, G. & Yogeshwaran, R. An alternate stable midpoint quadrature to improve the element stiffness matrix of quadrilaterals for application of functionally graded materials (FGM). Comput. Struct. 178, 71–87 (2017).
Blakely, R. J. Potential Theory in Gravity and Magnetic Applications (Cambridge University Press, 1996).
Fukushima, T. Speed and accuracy improvements in standard algorithm for prismatic gravitational field. Geophys. J. Int. 222, 1898–1908 (2020).
Pan, K. et al. Three-dimensional forward modelling of gravity field vector and its gradient tensor using the compact difference schemes. Geophys. J. Int. 224, 1272–1286 (2021).
Chen, T. & Zhang, G. Forward modeling of gravity anomalies based on cell mergence and parallel computing. Comput. Geosci. 120, 1–9 (2018).
Author information
Authors and Affiliations
Contributions
X.W., J.L. and J.L. ran the examples, plotted the results and wrote the draft. J.L. and J.L. supervised the project. H.C. designed the models. All authors have read and agreed to the published version of the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher's note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Wang, X., Liu, J., Li, J. et al. Fast 3D gravity and magnetic modelling using midpoint quadrature and 2D FFT. Sci Rep 13, 9304 (2023). https://doi.org/10.1038/s41598-023-36525-2
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-023-36525-2
- Springer Nature Limited