A Rapid Location Independent Full Tensor Gravity Algorithm
V. Jayaram, K.D. Crain, G.R. Keller
Mewbourne College of Earth and Energy
The University of Oklahoma
Norman OK, U.S.A
Email: {vjayaram,kevin.crain,grkeller}@ou.edu

Abstract—We present an algorithm to rapidly calculate
the vertical gravitational attraction and full tensor gravity
gradient (FTG) values due to a 3D geologic model. Our
technique is based on the vertical line source (VLS) element
approximation with a constant density within each grid cell.
This type of parameterization is well suited for high-resolution
elevation datasets with grid size typically in the range of 1
m to 30 m. Our approach can perform rapid computations
on large topographies including crustal-scale models derived
from complex geologic interpretations. Most importantly the
proposed model is location independent i.e. we can compute
FTG anywhere in the geologic volume of interest (VOI) and is
not limited to performing computations outside the VOI.
Keywords-3D Geology & Interpretation, full tensor gravity,
GPU, line-element, crustal-scale models.

I. I NTRODUCTION
A modern geophysical interpretation requires an integrated approach in which a variety of geological and geophysical data are employed in and 3-D analysis. However,
many computational challenges exist, particularly when considering the available ’state of the art’ computing resources.
Gravity data are widely available and relatively inexpensive
to obtain and are a good starting point for an integrated
analysis. Forward modeling of mass distributions is a powerful tool to model and visualize gravity anomalies that
result from different geologic settings.Thanks to database
development efforts around the world and the emergence of
high-quality gravity field models based on satellite measurements, gravity data are available globally as are high quality
digital elevation models (DEM) thanks to NASA’s Shuttle
Radar Topography Mission and national and local efforts to
provide DEM data. Thus, development of an efficient and
flexible approach to 3-D modeling and inversion of gravity
anomaly data is very timely. Historically, a classic technique
used to model gravity data in 2D was developed by Talwani
(1959)[6]. The gravity anomaly resulting from either a 2D
or 3D model is computed as the sum of contributions of
individual bodies, each with a given density (ρ) and volume
(V ) which is a mass m directly proportional to ρ × V .
In this paper, we demonstrate our new 3D gravity modeling approach utilizing the derived VLS algorithm [4].
However, the computational requirements are substantial,
and below, we describe our approach to perform large scale

978-1-4799-1114-1/13/$31.00 ©2013 IEEE

Mark Baker
Geomedia Research & Development
El Paso TX, U.S.A
Email: bakergrd@cs.com

(in terms of areas and elevation changes) location independent calculations can be executed utilizing high throughput
processing hardware.
T HEORY
Unlike traditional gravity computational algorithms, the
VLS approach [5], [1] can calculate gravity effects at locations interior or exterior to the model.The only condition
that must be met is the observation point cannot be located
directly above the line element. Therefore, we perform a
location test and then apply appropriate formulation to those
data points. We will present and compare the computational
performance of the traditional prism method versus the line
element approach on different CPU-GPU system configurations.
The algorithm calculates the expected gravity at station
locations where the observed gravity and FTG data were
acquired. This algorithm can be used for all fast forward
model calculations of 3D geologic interpretations for data
from airborne, space and submarine gravity, and FTG instrumentation.
A. Equations
Now, consider a vertical gravitational line source shown
in Figure 1. The vertical line source is located at (xo, yo )
and extends from ztop to zbot (positive z direction). The line
source have a linear mass density of λ ( kg/m). The element
of mass dmo = λ dzo . The total mass is given by
∫ zo = zbot
∫ zo = zbot
dmo = λ
dzo = λ ( zbot − ztop ) (1)
zo = ztop

zo = ztop

Since, λ = ρ Area where Area is the cross-sectional
area of a vertical rectangular prism ( ∆x ∆y ) then
λ = ρ Area
= ρ Area

zBOT − zT OP
zBOT − zT OP

=

mass
zBOT − zT OP

Since we know the anomalous gravitational field and
gradients of the point source, we merely integrate to find
the gravity tensor components.

2931

IGARSS 2013
As we derive these components, there are several integrals
that must be evaluated. We will set these up first.
Figure 1 shows the sphere model used in our experiments.
The diameter of this sphere was set to 1kms. The sphere
is modeled using vertical line elements at different grid size
spacings ranging from 10 m to 100 m.

I4 =

∫

1
r 5 dz0

=

 2
 A ̸= 0


( z0 − z )⟨ 3A2 + 2(z0 − z )2 ⟩



3 A4 r 3
 2
 A =0



|z

− 4( z0 − z | 5
o − z )
∫ z0
r 5 dz0

=
 I5
 A2 ̸= 0


4

z)3
3 2

− A − 2 z (z0 − 3 A4+ 3 A z ( z − z0 )

r

=

 2
 A =0





z − 4 z0
12(z0 − z)3 | z0 − z |

Each integral will be evaluated from zT OP to zBOT so,
for example, the I 1 integral will become (if A2 ̸= 0)
∆I 1 =
=

∫ zbot

1
=z
o
dz0 = − zA−z z0 = zBOT
2r
z0
ztop r 3
T OP
zBOT z
−z
− A2 rBOT + zT2OPOP
A rT

and the same notation will be used for the other five
integral evaluations.
Then the gravitational field at (x,y,z) due to the vertical
line source is given by
• line Tz
•
•
•
•

Figure 1. Figure 1: Sphere model constituting vertical line sources with
each line source being placed at the center of the grid.

•
•

We define as before
2

A2 = (x − xo )
→

2

+ (y − yo )

→

and r = r − ro
√
2
2
2
= ( x − xo ) + ( y − yo ) + ( z − zo ) .
These integrals are:

I1 =

I2 =

∫

∫

 2
 A ̸= 0


z0 − z


A2 r

1
r 3 dz0

=

z0
r 3 dz0

=

 A2 = 0




− 2( zo − z 1 zo − z |
)|
 2
 A ̸= 0 2


z (z

− A + A2 r − z0 )

 2
 A =0




z − 2 z0
2( z0 − z )| z0 − z |

=

line gz (x, y, z)

=

∫ zbot

dgz
∫ zbot
line Txx = line gxx (x, y, z) = ztop dgxx
∫ zbot
line Txy = line gxy (x, y, z) = ztop dgxy
∫ zbot
line Txz =line gxz (x, y, z) = ztop dgxz
∫ zbot
line Tyy = line gyy (x, y, z) = ztop dgyy
∫ zbot
line Tyz = line gyz (x, y, z) = ztop dgyz
∫ zbot
line Tzz = line gzz (x, y, z) = ztop dgzz
ztop

In most gradiometry applications, the vertical derivative Tz
is the most meaningful component as it locates the target [9].
The Txx and Tyy components identify N-S and E-W edges
of the target. In interpretations, the horizontal derivatives
of the vertical component Tzx and Tzy , and horizontal
component derivatives Txx and Tyy provide the central
axes of target mass, highs and lows defining fault trends.
Similarly, Txy shows anomalies associated with corners of
the target. Finally, Tzz identifies vertical changes in gravity
and also represents the difference between the near and far
response. It highlights all edges and is the easiest gradient
to interpret directly. Geologic structure is usually evident in
the data when large mass anomalies, such as salt dome, are
present. Notice from the equations above, the Tzz gradient
data is a summation of Txx and Tyy gradients. It highlights
all edges and is useful for understanding the approximate
shape of the dominant mass anomaly.Figures 3-6 show the
contour plots of FTG computed at different levels - above,
below and inside the sphere. Now, in order to perform a
benchmark test the accuracy of our VLS algorithm, we are

2932
compare it to the calculated analytical solution of a buried
sphere model as shown below.

B. Tables
Table I
MAE

COMPARISON OF VARIOUS S PHERE MODEL WITH VARYING
GRID - SIZE TO ITS CALCULATED ANALYTICAL SOLUTION

Prism
10 m
25 m
50 m
100 m

MAE
0.0041670475
0.080921998
0.163206964
0.003493141
0.003493141

Table II
C OMPARISON OF VARIOUS GPU-CPU COMPUTATION TIMES FOR A
S PHERE MODEL WITH VARYING GRID - SIZE
Figure 2. A buried sphere model for analytical gz calculations. Figure
depicted is a courtesy of [7].

The buried sphere model (Telford et. al. 1990)
[8]illustrated in Figure 2 depicts the fundamental properties of gravity anomalies. Here we describe the analytical
formulation of the buried sphere model and compare the gz
calculations to our derived VLS sphere models at varying
grid size. Using G = 6.67 × 10−11 N m2 /kg 2 [9]
δgz =

10 m
25 m
50 m
100 m

CPU
Prism
in sec.
4595.27
13.96
3.46
0.86

CPU
Line
in sec.
24.73
3.37
0.78
0.19

GPUMAT
Line
in sec.
11.32
1.34
0.42
0.023

CUDA
Line
in sec.
2.23
0.14
0.05
0.02

4π
z
G(δρ)R3 2
3
(x + z 2 )3/2

where the variables and units are:
• δgz = vertical component of gravitational attraction
measured by a gravimeter (mGal)
• δρ = difference in density between the sphere and the
surrounding material (g/cm3 )
• R = radius of the sphere (m)
• x = horizontal distance from the observation point to
a point directly above the center of the sphere (m)
• z = vertical distance from the surface to the center of
the sphere (m)
In Table I below we show the various gz model errors
based on maximum absolute error (MAE) that is associated
with the prism model [3] and the proposed VLS sphere models with varying grid sizes. The closed expression solution of
a right angular prism is derived by Nagy 1966 [3]. We have
compared the closed form expression of the right angular
prism to the VLS at different prism resolutions. Through this
result we have tried to demonstrate that the proposed VLS
technique very closely approximates the analytical closed
form solution of a right angular prism. In this section we
also show the computations speeds achieved while using
different compute architectures.

Figure 3. FTG Computations at 100 m above the top of the Sphere model.

II. C ONCLUSIONS
The results in Table II suggests that giga-scale order of
calculations can be done in matter of milliseconds with the
VLS algorithm compared to the traditional prism technique
[3] utilizing GPU-CPU hardware configurations. Most importantly the proposed model is location independent i.e.
we can compute FTG anywhere in the geologic volume of
interest (VOI) and rather than being limited to performing
computations outside the VOI. Figures 3-6 show the contour
plots of FTG computed at different levels - above, below
and inside the sphere. Notice the flip in the coloring of the
contours when the direction are changed above and below
the zero-plane of the sphere. We also demonstrated in Table

2933
I that the accuracy based on the MAE metric of our models
comes very close to the calculated analytical solution of
the buried sphere model. Based on these results, we have
begun to apply our software to the calculation of geologically realistic models with good results. When applied to
large complex geologic structures, our approach makes the
computations for the application of inverse methods tractable
and very efficient.
R EFERENCES
[1] B.J. Drenth, G.R. Keller, and R.A. Thompson, Geophysical
study of the San Juan Mountains batholith complex, southwestern Colorado, Geosphere, June 2012, v. 8, p. 669-684.

Figure 4.
model.

FTG Computations at 100 m below the bottom of the Sphere

[2] G.R. Keller, T.G. Hildenbrand, W.J. Hinze, and X. Li, The
quest for the perfect gravity anomaly: Part 2 Mass effects
and anomaly inversion: Society of Exploration Geophysicists
Technical Program Expanded Abstracts, v. 25, p. 864., 2006.
[3] Dezso Nagy, The Gravitational attraction of a right angular
prism, Geophysics, Vol. XXXI, April 1966, pp.362-371.
[4] Z. Frankenberger Danes, On a successive approximation
method for interpreting Gravity Anomalies, Geophysics, Vol
XXV, No. 6, December 1960, pp. 1215-1228.
[5] Kevin Crain, Three Dimensional gravity inversion with a priori
and statistical constraints, Ph.D. Dissertation, 2006, University
of Texas at El Paso.
[6] M. Talwani, J.L. Worzel, and M. Landisman, Rapid gravity
computations for two-dimensional bodies with application to
the Mendocino submarine fracture zone, J. Geophys. Res.,
64(1), 4959, 1959.
[7] R.J. Lille, Whole Earth Geophysics: An Introductory Textbook
for Geologists and Geophysicists”, Prentice Hall, 1999

Figure 5. FTG Computations at 300 m inside the upper half of the Sphere
model

[8] W. M. Telford, L. P. Geldart, R. E. Sheriff, Applied Geophysics, Second Edition, Cambridge University Press, Oct 26,
1990 - Science - 792 pages.
[9] R.J. Blakely, Potential Theory in Gravity and Magnetic Applications, Cambridge University Press, 441 p., 1995.

Figure 6. FTG Computations at 300 m inside the lower half of the Sphere
model

2934

A Rapid Location Independent Full Tensor Gravity Algorithm

  • 1.
    A Rapid LocationIndependent Full Tensor Gravity Algorithm V. Jayaram, K.D. Crain, G.R. Keller Mewbourne College of Earth and Energy The University of Oklahoma Norman OK, U.S.A Email: {vjayaram,kevin.crain,grkeller}@ou.edu Abstract—We present an algorithm to rapidly calculate the vertical gravitational attraction and full tensor gravity gradient (FTG) values due to a 3D geologic model. Our technique is based on the vertical line source (VLS) element approximation with a constant density within each grid cell. This type of parameterization is well suited for high-resolution elevation datasets with grid size typically in the range of 1 m to 30 m. Our approach can perform rapid computations on large topographies including crustal-scale models derived from complex geologic interpretations. Most importantly the proposed model is location independent i.e. we can compute FTG anywhere in the geologic volume of interest (VOI) and is not limited to performing computations outside the VOI. Keywords-3D Geology & Interpretation, full tensor gravity, GPU, line-element, crustal-scale models. I. I NTRODUCTION A modern geophysical interpretation requires an integrated approach in which a variety of geological and geophysical data are employed in and 3-D analysis. However, many computational challenges exist, particularly when considering the available ’state of the art’ computing resources. Gravity data are widely available and relatively inexpensive to obtain and are a good starting point for an integrated analysis. Forward modeling of mass distributions is a powerful tool to model and visualize gravity anomalies that result from different geologic settings.Thanks to database development efforts around the world and the emergence of high-quality gravity field models based on satellite measurements, gravity data are available globally as are high quality digital elevation models (DEM) thanks to NASA’s Shuttle Radar Topography Mission and national and local efforts to provide DEM data. Thus, development of an efficient and flexible approach to 3-D modeling and inversion of gravity anomaly data is very timely. Historically, a classic technique used to model gravity data in 2D was developed by Talwani (1959)[6]. The gravity anomaly resulting from either a 2D or 3D model is computed as the sum of contributions of individual bodies, each with a given density (ρ) and volume (V ) which is a mass m directly proportional to ρ × V . In this paper, we demonstrate our new 3D gravity modeling approach utilizing the derived VLS algorithm [4]. However, the computational requirements are substantial, and below, we describe our approach to perform large scale 978-1-4799-1114-1/13/$31.00 ©2013 IEEE Mark Baker Geomedia Research & Development El Paso TX, U.S.A Email: bakergrd@cs.com (in terms of areas and elevation changes) location independent calculations can be executed utilizing high throughput processing hardware. T HEORY Unlike traditional gravity computational algorithms, the VLS approach [5], [1] can calculate gravity effects at locations interior or exterior to the model.The only condition that must be met is the observation point cannot be located directly above the line element. Therefore, we perform a location test and then apply appropriate formulation to those data points. We will present and compare the computational performance of the traditional prism method versus the line element approach on different CPU-GPU system configurations. The algorithm calculates the expected gravity at station locations where the observed gravity and FTG data were acquired. This algorithm can be used for all fast forward model calculations of 3D geologic interpretations for data from airborne, space and submarine gravity, and FTG instrumentation. A. Equations Now, consider a vertical gravitational line source shown in Figure 1. The vertical line source is located at (xo, yo ) and extends from ztop to zbot (positive z direction). The line source have a linear mass density of λ ( kg/m). The element of mass dmo = λ dzo . The total mass is given by ∫ zo = zbot ∫ zo = zbot dmo = λ dzo = λ ( zbot − ztop ) (1) zo = ztop zo = ztop Since, λ = ρ Area where Area is the cross-sectional area of a vertical rectangular prism ( ∆x ∆y ) then λ = ρ Area = ρ Area zBOT − zT OP zBOT − zT OP = mass zBOT − zT OP Since we know the anomalous gravitational field and gradients of the point source, we merely integrate to find the gravity tensor components. 2931 IGARSS 2013
  • 2.
    As we derivethese components, there are several integrals that must be evaluated. We will set these up first. Figure 1 shows the sphere model used in our experiments. The diameter of this sphere was set to 1kms. The sphere is modeled using vertical line elements at different grid size spacings ranging from 10 m to 100 m. I4 = ∫ 1 r 5 dz0 =  2  A ̸= 0   ( z0 − z )⟨ 3A2 + 2(z0 − z )2 ⟩    3 A4 r 3  2  A =0    |z  − 4( z0 − z | 5 o − z ) ∫ z0 r 5 dz0 =  I5  A2 ̸= 0   4  z)3 3 2  − A − 2 z (z0 − 3 A4+ 3 A z ( z − z0 )  r =  2  A =0     z − 4 z0 12(z0 − z)3 | z0 − z | Each integral will be evaluated from zT OP to zBOT so, for example, the I 1 integral will become (if A2 ̸= 0) ∆I 1 = = ∫ zbot 1 =z o dz0 = − zA−z z0 = zBOT 2r z0 ztop r 3 T OP zBOT z −z − A2 rBOT + zT2OPOP A rT and the same notation will be used for the other five integral evaluations. Then the gravitational field at (x,y,z) due to the vertical line source is given by • line Tz • • • • Figure 1. Figure 1: Sphere model constituting vertical line sources with each line source being placed at the center of the grid. • • We define as before 2 A2 = (x − xo ) → 2 + (y − yo ) → and r = r − ro √ 2 2 2 = ( x − xo ) + ( y − yo ) + ( z − zo ) . These integrals are: I1 = I2 = ∫ ∫  2  A ̸= 0   z0 − z   A2 r 1 r 3 dz0 = z0 r 3 dz0 =  A2 = 0     − 2( zo − z 1 zo − z | )|  2  A ̸= 0 2   z (z  − A + A2 r − z0 )   2  A =0    z − 2 z0 2( z0 − z )| z0 − z | = line gz (x, y, z) = ∫ zbot dgz ∫ zbot line Txx = line gxx (x, y, z) = ztop dgxx ∫ zbot line Txy = line gxy (x, y, z) = ztop dgxy ∫ zbot line Txz =line gxz (x, y, z) = ztop dgxz ∫ zbot line Tyy = line gyy (x, y, z) = ztop dgyy ∫ zbot line Tyz = line gyz (x, y, z) = ztop dgyz ∫ zbot line Tzz = line gzz (x, y, z) = ztop dgzz ztop In most gradiometry applications, the vertical derivative Tz is the most meaningful component as it locates the target [9]. The Txx and Tyy components identify N-S and E-W edges of the target. In interpretations, the horizontal derivatives of the vertical component Tzx and Tzy , and horizontal component derivatives Txx and Tyy provide the central axes of target mass, highs and lows defining fault trends. Similarly, Txy shows anomalies associated with corners of the target. Finally, Tzz identifies vertical changes in gravity and also represents the difference between the near and far response. It highlights all edges and is the easiest gradient to interpret directly. Geologic structure is usually evident in the data when large mass anomalies, such as salt dome, are present. Notice from the equations above, the Tzz gradient data is a summation of Txx and Tyy gradients. It highlights all edges and is useful for understanding the approximate shape of the dominant mass anomaly.Figures 3-6 show the contour plots of FTG computed at different levels - above, below and inside the sphere. Now, in order to perform a benchmark test the accuracy of our VLS algorithm, we are 2932
  • 3.
    compare it tothe calculated analytical solution of a buried sphere model as shown below. B. Tables Table I MAE COMPARISON OF VARIOUS S PHERE MODEL WITH VARYING GRID - SIZE TO ITS CALCULATED ANALYTICAL SOLUTION Prism 10 m 25 m 50 m 100 m MAE 0.0041670475 0.080921998 0.163206964 0.003493141 0.003493141 Table II C OMPARISON OF VARIOUS GPU-CPU COMPUTATION TIMES FOR A S PHERE MODEL WITH VARYING GRID - SIZE Figure 2. A buried sphere model for analytical gz calculations. Figure depicted is a courtesy of [7]. The buried sphere model (Telford et. al. 1990) [8]illustrated in Figure 2 depicts the fundamental properties of gravity anomalies. Here we describe the analytical formulation of the buried sphere model and compare the gz calculations to our derived VLS sphere models at varying grid size. Using G = 6.67 × 10−11 N m2 /kg 2 [9] δgz = 10 m 25 m 50 m 100 m CPU Prism in sec. 4595.27 13.96 3.46 0.86 CPU Line in sec. 24.73 3.37 0.78 0.19 GPUMAT Line in sec. 11.32 1.34 0.42 0.023 CUDA Line in sec. 2.23 0.14 0.05 0.02 4π z G(δρ)R3 2 3 (x + z 2 )3/2 where the variables and units are: • δgz = vertical component of gravitational attraction measured by a gravimeter (mGal) • δρ = difference in density between the sphere and the surrounding material (g/cm3 ) • R = radius of the sphere (m) • x = horizontal distance from the observation point to a point directly above the center of the sphere (m) • z = vertical distance from the surface to the center of the sphere (m) In Table I below we show the various gz model errors based on maximum absolute error (MAE) that is associated with the prism model [3] and the proposed VLS sphere models with varying grid sizes. The closed expression solution of a right angular prism is derived by Nagy 1966 [3]. We have compared the closed form expression of the right angular prism to the VLS at different prism resolutions. Through this result we have tried to demonstrate that the proposed VLS technique very closely approximates the analytical closed form solution of a right angular prism. In this section we also show the computations speeds achieved while using different compute architectures. Figure 3. FTG Computations at 100 m above the top of the Sphere model. II. C ONCLUSIONS The results in Table II suggests that giga-scale order of calculations can be done in matter of milliseconds with the VLS algorithm compared to the traditional prism technique [3] utilizing GPU-CPU hardware configurations. Most importantly the proposed model is location independent i.e. we can compute FTG anywhere in the geologic volume of interest (VOI) and rather than being limited to performing computations outside the VOI. Figures 3-6 show the contour plots of FTG computed at different levels - above, below and inside the sphere. Notice the flip in the coloring of the contours when the direction are changed above and below the zero-plane of the sphere. We also demonstrated in Table 2933
  • 4.
    I that theaccuracy based on the MAE metric of our models comes very close to the calculated analytical solution of the buried sphere model. Based on these results, we have begun to apply our software to the calculation of geologically realistic models with good results. When applied to large complex geologic structures, our approach makes the computations for the application of inverse methods tractable and very efficient. R EFERENCES [1] B.J. Drenth, G.R. Keller, and R.A. Thompson, Geophysical study of the San Juan Mountains batholith complex, southwestern Colorado, Geosphere, June 2012, v. 8, p. 669-684. Figure 4. model. FTG Computations at 100 m below the bottom of the Sphere [2] G.R. Keller, T.G. Hildenbrand, W.J. Hinze, and X. Li, The quest for the perfect gravity anomaly: Part 2 Mass effects and anomaly inversion: Society of Exploration Geophysicists Technical Program Expanded Abstracts, v. 25, p. 864., 2006. [3] Dezso Nagy, The Gravitational attraction of a right angular prism, Geophysics, Vol. XXXI, April 1966, pp.362-371. [4] Z. Frankenberger Danes, On a successive approximation method for interpreting Gravity Anomalies, Geophysics, Vol XXV, No. 6, December 1960, pp. 1215-1228. [5] Kevin Crain, Three Dimensional gravity inversion with a priori and statistical constraints, Ph.D. Dissertation, 2006, University of Texas at El Paso. [6] M. Talwani, J.L. Worzel, and M. Landisman, Rapid gravity computations for two-dimensional bodies with application to the Mendocino submarine fracture zone, J. Geophys. Res., 64(1), 4959, 1959. [7] R.J. Lille, Whole Earth Geophysics: An Introductory Textbook for Geologists and Geophysicists”, Prentice Hall, 1999 Figure 5. FTG Computations at 300 m inside the upper half of the Sphere model [8] W. M. Telford, L. P. Geldart, R. E. Sheriff, Applied Geophysics, Second Edition, Cambridge University Press, Oct 26, 1990 - Science - 792 pages. [9] R.J. Blakely, Potential Theory in Gravity and Magnetic Applications, Cambridge University Press, 441 p., 1995. Figure 6. FTG Computations at 300 m inside the lower half of the Sphere model 2934