Logo Tesseroids 1.0: User Manual and API Documentation

src/c/grav_sphere.h File Reference

Functions that calculate the gravitational potential and its first and second derivatives for the sphere in spherical coordinates. More...

#include "utils.h"

Go to the source code of this file.

Functions

double sphere_pot (SPHERE sphere, double lonp, double latp, double rp)
 Calculates potential caused by a sphere.
double sphere_gx (SPHERE sphere, double lonp, double latp, double rp)
 Calculates gx caused by a sphere (Grombein et al., 2010).
double sphere_gy (SPHERE sphere, double lonp, double latp, double rp)
 Calculates gy caused by a sphere (Grombein et al., 2010).
double sphere_gz (SPHERE sphere, double lonp, double latp, double rp)
 Calculates gz caused by a sphere (Grombein et al., 2010).
double sphere_gxx (SPHERE sphere, double lonp, double latp, double rp)
 Calculates gxx caused by a sphere (Grombein et al., 2010).
double sphere_gxy (SPHERE sphere, double lonp, double latp, double rp)
 Calculates gxy caused by a sphere (Grombein et al., 2010).
double sphere_gxz (SPHERE sphere, double lonp, double latp, double rp)
 Calculates gxz caused by a sphere (Grombein et al., 2010).
double sphere_gyy (SPHERE sphere, double lonp, double latp, double rp)
 Calculates gyy caused by a sphere (Grombein et al., 2010).
double sphere_gyz (SPHERE sphere, double lonp, double latp, double rp)
 Calculates gyz caused by a sphere (Grombein et al., 2010).
double sphere_gzz (SPHERE sphere, double lonp, double latp, double rp)
 Calculates gzz caused by a sphere (Grombein et al., 2010).

Detailed Description

Functions that calculate the gravitational potential and its first and second derivatives for the sphere in spherical coordinates.

The position of the sphere and computation point are in spherical coordinates.

The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out. So it would be normal for a sphere of positive density to have negative gz.

Used the generic formula for gravity gradient computation (Grombein et al., 2010):

\[ g_{ij}(r_p,\phi_p,\lambda_p) = G M \left(\frac{3\Delta x_i \Delta x_j}{\ell^5} - \frac{\delta_{ij}}{\ell^3} \right)\ \ i,j \in \{1,2,3\} \]

where M is the mass of the sphere, the subscripts 1, 2, and 3 should be interpreted as the x, y, and z axis and

\begin{eqnarray*} \Delta x_1 &=& r_c K_{\phi} \\ \Delta x_2 &=& r_c \cos \phi_c \sin(\lambda_c - \lambda_p) \\ \Delta x_3 &=& r_c \cos \psi - r_p\\ \ell &=& \sqrt{r_c^2 + r_p^2 - 2 r_c r_p \cos \psi} \\ \cos\psi &=& \sin\phi_p\sin\phi_c + \cos\phi_p\cos\phi_c \cos(\lambda_c - \lambda_p) \\ K_{\phi} &=& \cos\phi_p\sin\phi_c - \sin\phi_p\cos\phi_c \cos(\lambda_c - \lambda_p) \end{eqnarray*}

$ \phi $ is latitude, $ \lambda $ is longitude, $ r $ is radius. The subscript $ c $ is for the center of the sphere and $ p $ for the computation point.

References

Todo:
Possible speedup: Replace sphere.rc with a local copy
Author:
Leonardo Uieda
Date:
25 Jan 2011

Function Documentation

double sphere_gx ( SPHERE  sphere,
double  lonp,
double  latp,
double  rp 
)

Calculates gx caused by a sphere (Grombein et al., 2010).

\[ g_x(r_p,\phi_p,\lambda_p) = G M \frac{r_c K_{\phi}}{\ell^3} \]

The position of the sphere and computation point should be in spherical coordinates.

The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out

Input values in SI units and degrees and returns values in mGal!

Parameters:
sphere data structure describing the sphere
lonp longitude of the computation point P
latp latitude of the computation point P
rp radial coordinate of the computation point P
Returns:
field calculated at P
double sphere_gxx ( SPHERE  sphere,
double  lonp,
double  latp,
double  rp 
)

Calculates gxx caused by a sphere (Grombein et al., 2010).

\[ g_{xx}(r_p,\phi_p,\lambda_p) = G M \frac{3(r_c K_{\phi})^2 - \ell^2}{\ell^5} \]

The position of the sphere and computation point are in spherical coordinates.

The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out

Input values in SI units and degrees and returns values in Eotvos!

Parameters:
sphere data structure describing the sphere
lonp longitude of the computation point P
latp latitude of the computation point P
rp radial coordinate of the computation point P
Returns:
field calculated at P
double sphere_gxy ( SPHERE  sphere,
double  lonp,
double  latp,
double  rp 
)

Calculates gxy caused by a sphere (Grombein et al., 2010).

\[ g_{xy}(r_p,\phi_p,\lambda_p) = G M \frac{3r_c^2 K_{\phi}\cos\phi_c \sin(\lambda_c - \lambda_p)}{\ell^5} \]

The position of the sphere and computation point are in spherical coordinates.

The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out

Input values in SI units and degrees and returns values in Eotvos!

Parameters:
sphere data structure describing the sphere
lonp longitude of the computation point P
latp latitude of the computation point P
rp radial coordinate of the computation point P
Returns:
field calculated at P
double sphere_gxz ( SPHERE  sphere,
double  lonp,
double  latp,
double  rp 
)

Calculates gxz caused by a sphere (Grombein et al., 2010).

\[ g_{xz}(r_p,\phi_p,\lambda_p) = G M \frac{3 r_c K_{\phi}(r_c \cos\psi - r_p)} {\ell^5} \]

The position of the sphere and computation point are in spherical coordinates.

The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out

Input values in SI units and degrees and returns values in Eotvos!

Parameters:
sphere data structure describing the sphere
lonp longitude of the computation point P
latp latitude of the computation point P
rp radial coordinate of the computation point P
Returns:
field calculated at P
double sphere_gy ( SPHERE  sphere,
double  lonp,
double  latp,
double  rp 
)

Calculates gy caused by a sphere (Grombein et al., 2010).

\[ g_y(r_p,\phi_p,\lambda_p) = G M \frac{r_c\cos\phi_c\sin(\phi_c-\phi_p)}{\ell^3} \]

The position of the sphere and computation point should be in spherical coordinates.

The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out

Input values in SI units and degrees and returns values in mGal!

Parameters:
sphere data structure describing the sphere
lonp longitude of the computation point P
latp latitude of the computation point P
rp radial coordinate of the computation point P
Returns:
field calculated at P
double sphere_gyy ( SPHERE  sphere,
double  lonp,
double  latp,
double  rp 
)

Calculates gyy caused by a sphere (Grombein et al., 2010).

\[ g_{yy}(r_p,\phi_p,\lambda_p) = G M \frac{3(r_c\cos\phi_c \sin(\lambda_c - \lambda_p))^2 - \ell^2}{\ell^5} \]

The position of the sphere and computation point are in spherical coordinates.

The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out

Input values in SI units and degrees and returns values in Eotvos!

Parameters:
sphere data structure describing the sphere
lonp longitude of the computation point P
latp latitude of the computation point P
rp radial coordinate of the computation point P
Returns:
field calculated at P
double sphere_gyz ( SPHERE  sphere,
double  lonp,
double  latp,
double  rp 
)

Calculates gyz caused by a sphere (Grombein et al., 2010).

\[ g_{yz}(r_p,\phi_p,\lambda_p) = G M \frac{3 r_c \cos\phi_c \sin(\lambda_c - \lambda_p)(r_c\cos\psi - r_p)}{\ell^5} \]

The position of the sphere and computation point are in spherical coordinates.

The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out

Input values in SI units and degrees and returns values in Eotvos!

Parameters:
sphere data structure describing the sphere
lonp longitude of the computation point P
latp latitude of the computation point P
rp radial coordinate of the computation point P
Returns:
field calculated at P
double sphere_gz ( SPHERE  sphere,
double  lonp,
double  latp,
double  rp 
)

Calculates gz caused by a sphere (Grombein et al., 2010).

\[ g_z(r_p,\phi_p,\lambda_p) = G M \frac{r_c\cos\psi - r_p}{\ell^3} \]

The position of the sphere and computation point should be in spherical coordinates.

The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out

Input values in SI units and degrees and returns values in mGal!

Parameters:
sphere data structure describing the sphere
lonp longitude of the computation point P
latp latitude of the computation point P
rp radial coordinate of the computation point P
Returns:
field calculated at P
double sphere_gzz ( SPHERE  sphere,
double  lonp,
double  latp,
double  rp 
)

Calculates gzz caused by a sphere (Grombein et al., 2010).

\[ g_{zz}(r_p,\phi_p,\lambda_p) = G M \frac{3(r_c\cos\psi-r_p)^2 - \ell^2}{\ell^5} \]

The position of the sphere and computation point are in spherical coordinates.

The derivatives of the potential are made with respect to the local coordinate system x->North, y->East, z->out

Input values in SI units and degrees and returns values in Eotvos!

Parameters:
sphere data structure describing the sphere
lonp longitude of the computation point P
latp latitude of the computation point P
rp radial coordinate of the computation point P
Returns:
field calculated at P
double sphere_pot ( SPHERE  sphere,
double  lonp,
double  latp,
double  rp 
)

Calculates potential caused by a sphere.

\[ V(r_p,\phi_p,\lambda_p) = \frac{G M}{\ell} \]

The position of the sphere and computation point should be in spherical coordinates.

Input and output values in SI units and degrees

Parameters:
sphere data structure describing the sphere
lonp longitude of the computation point P
latp latitude of the computation point P
rp radial coordinate of the computation point P
Returns:
field calculated at P
Generated on Tue Apr 26 12:17:07 2011 for Tesseroids 1.0: User manual and API documentation by doxygen 1.6.3