Next Article in Journal
Statistical Modeling of Reliable Intervals for Solutions to Linear Transfer Problems Under Boundary Experimental Data
Previous Article in Journal
Modified Engel Algorithm and Applications in Absorbing/Non-Absorbing Markov Chains and Monopoly Game
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Spherical Shape Functions for a Six-Node Tri-Rectangular Prism and an Eight-Node Quadrangular Right Prism

by
Anna Maria Marotta
1,*,
Riccardo Barzaghi
2 and
Roberto Sabadini
1
1
Department of Earth Sciences “A. Desio”, Università degli Studi di Milano, Botticelli 23/Mangiagalli 32, 20134 Milano, Italy
2
Department of Civil and Environmental Engineering, Politecnico di Milano, Piazza Leonardo Da Vinci sn, 20133 Milano, Italy
*
Author to whom correspondence should be addressed.
Math. Comput. Appl. 2025, 30(4), 88; https://doi.org/10.3390/mca30040088
Submission received: 19 May 2025 / Revised: 28 July 2025 / Accepted: 8 August 2025 / Published: 10 August 2025

Abstract

In this work, we present the procedure to obtain exact spherical shape functions for finite element modeling applications, without resorting to any kind of approximation, for generic prismatic spherical elements and for the case of spherical six-node tri-rectangular and eight-node quadrangular spherical prisms. The proposed spherical shape functions, given in explicit analytical form, are expressed in geographic coordinates, namely colatitude, longitude and distance from the center of the sphere. We demonstrate that our analytical shape functions satisfy all the properties required by this class of functions, deriving at the same time the analytical expression of the Jacobian, which allows us changes in coordinate systems. Within the perspective of volume integration on Earth, entering a variety of geophysical and geodetic problems, as for mass change contribution to gravity, we consider our analytical expression of the shape functions and Jacobian for the six-node tri-rectangular and eight-node quadrangular right spherical prisms as reference volumes to evaluate the volume of generic spherical triangular and quadrangular prisms over the sphere; volume integration is carried out via Gauss–Legendre quadrature points. We show that for spherical quadrangular prisms, the percentage volume difference between the exact and the numerically evaluated volumes is independent from both the geographical position and the depth and ranges from 10−3 to lower than 10−4 for angular dimensions ranging from 1° × 1° to 0.25° × 0.25°. A satisfactory accuracy is attained for eight Gauss–Legendre quadrature points. We also solve the Poisson equation and compare the numerical solution with the analytical solution, obtained in the case of steady-state heat conduction with internal heat production. We show that, even with a relatively coarse grid, our elements are capable of providing a satisfactory fit between numerical and analytical solutions, with a maximum difference in the order of 0.2% of the exact value.

1. Introduction

A number of 3D finite element models have been developed in the last decades in the attempt to simulate large-scale geodynamic processes. Most of them, however, account for a flat Earth, e.g., refs. [1,2,3,4,5,6,7,8,9]. Sphericity is, on the other hand, one main property of the planet that needs to be implemented when dealing with global geophysical problems. Pure radial variations of the physical properties of the Earth, in terms of distance from the center of the planet, can be dealt with via analytical methods, where the independent functions constituting the basis over which each field is expanded can be, for example, the spherical harmonics. Only a few finite element methods are available, e.g., refs. [10,11,12,13], which account for the sphericity of the Earth at the global scale, but at the local scale of each element, sphericity is only approximated.
To handle physical properties that vary along latitude and longitude, beyond the radial direction, appropriate spherical shape functions that interpolate the vectoral fields onto a spherical surface are required. Within this study, we propose the analytical expressions of new spherical shape functions for generic spherical prismatic elements and for the specific case of reference spherical six-node tri-rectangular and eight-node quadrangular prisms. The latter can be used as reference elements within a finite element algorithm: from this perspective, we also derive the explicit analytical expression of the Jacobian matrix as a function of the radius, latitude and longitude.
The proposed procedure for determining the expressions of the shape functions in a spherical coordinate system follows the well-known procedure developed in a Cartesian space and found in classical texts on finite element methods, e.g., refs. [14,15], adapting it to a spherical coordinate system and considering the fact that quantities are interpolated on a spherical surface instead of a flat one.

2. Mathematical Formulation

Consider the generic spherical prismatic element in Figure 1, bounded by two polygonal spherical surfaces with n vertexes and located over two spheres of radius r1 and r2, and (n − 1) flat surfaces along the radial direction, and denote with N θ , λ , r the spherical shape functions, with θ colatitude, λ longitude and r radius of the sphere varying between r1 and r2.
Since interpolation of a vector quantity on a spherical surface necessitates accounting for the different orientations of the unit vectors normal and tangent to the surface, here, we assume that the shape functions N θ , λ , r can be expressed as the product of three functions such that
N θ , λ , r = R r   A θ , λ   F θ , λ
where R i r and A i θ , λ are scalar functions expressing, respectively, the variation of N with the radial distance from the center of the sphere and with the colatitude and longitude when moving from one point to another inside the element. F θ , λ is a matrix function accounting for the variation of N with the variation of the orientation of the unit vector normal to surface when moving from one point to another on the sphere. In the following sections, we will describe the procedure we propose to define functions R r , A θ , λ and F θ , λ .

2.1. Functions R(r)

Functions R r account for the radial variation of N . We here propose to express them in terms of linear variation along the r direction (Figure 2), such that
R r = R 1 r R 2 r
with
R 1 r = r 2 r r 2 r 1   for   points   on   the   sphere   of   radius   r 1 , with   R 1 r = 1   f o r   r = r 1 0   f o r   r = r 2
R 2 r = r r 1 r 2 r 1   for   points   on   the   sphere   of   radius   r 2 , with   R 2 r = 0   f o r   r = r 1 1   f o r   r = r 2

2.2. Functions F(θ,λ)

When a vector quantity is interpolated from one point to another over a sphere, it is necessary to account for the different orientations of the unit vectors normal and tangent to the surface at the two points, as shown in Figure 3.
Let us consider the rotation matrix
R R P θ , λ = cos θ cos λ cos θ sin λ sin θ sin λ cos λ 0 sin θ cos λ sin θ sin λ cos θ
that maps the Earth-Centered Rotational Reference Frame ( n x , n y , n z ) into the Centered P-Rotational Reference Frame ( n θ , n λ , n r ) , such that
n θ n λ n r = R R P θ , λ · n x n y n z
Similarly, let us consider its inverse matrix
R R P θ , λ 1 = R P R θ , λ = cos θ cos λ sin λ sin θ cos λ cos θ sin λ cos λ sin θ sin λ sin θ 0 cos θ
that maps the Centered P-Rotational Reference Frame into the Earth-Centered Rotational Reference Frame, such that
n x n y n z = R P R θ , λ · n θ n λ n r
Moving from point P k = λ k , θ k , r k to point of coordinates P = λ , θ , r over a sphere requires a double rotation of the displacement vector at P k .
Let u k = u θ k , u λ k ,   u r k denote the displacement at point P k = λ k , θ k , r k . Its expression in the P λ , θ , r -centered reference frame can therefore be expressed as
u θ k u λ k u r k P = R R P θ , λ · R P R θ k , λ k · u θ k u λ k u r k = R R P θ , λ · R P R θ k , λ k · u θ k u λ k u r k
The function that makes it possible to walk over the surface of the sphere from one generic point θ k , λ k   to any other generic point θ , λ , in terms of the components of any vectoral quantity, typically displacements and velocities in geophysics, is thus
F k θ , λ = R R P θ , λ · R P R θ k , λ k = cos θ cos λ cos θ sin λ sin θ sin λ cos λ 0 sin θ cos λ sin θ sin λ cos θ · cos θ k cos λ k sin λ k sin θ k cos λ k cos θ k sin λ k cos λ k sin θ k sin λ k sin θ k 0 cos θ k
or, after a few mathematical steps,
F k θ , λ = cos θ cos θ k cos λ λ k + sin θ sin θ k cos θ sin λ λ k cos θ sin θ k cos λ λ k sin θ cos θ k cos θ k sin λ λ k cos λ λ k sin θ k sin λ λ k sin θ cos θ k cos λ λ k cos θ sin θ k sin θ sin λ λ k sin θ sin θ k cos λ λ k + cos θ cos θ k
F k θ , λ = F k θ θ F k θ λ F k θ r F k λ θ F k λ λ F k λ r F k r θ F k r λ F k r r ,   w i t h F k θ θ θ , λ = cos θ cos θ k cos λ λ k + sin θ sin θ k                         F k θ λ θ , λ = cos θ sin λ λ k                                                                                         F k θ r θ , λ = cos θ sin θ k cos λ λ k sin θ cos θ k                         F k λ θ θ , λ = cos θ k sin λ λ k                                                                               F k λ λ θ , λ = cos λ λ k                                                                                                         F k λ r θ , λ = sin θ k sin λ λ k                                                                               F k r θ θ , λ = sin θ cos θ k cos λ λ k cos θ sin θ k                             F k r λ θ , λ = sin θ sin λ λ k                                                                                         F k r r θ , λ = sin θ sin θ k cos λ λ k + cos θ cos θ k                        

2.3. Functions A(θ,λ)

We here derive the expressions of functions A θ , λ for spherical six-node triangular and eight-node quadrangular right prisms (panels a in Figure 4 and Figure 5, respectively).

2.3.1. Spherical Six-Node Triangular Prism

Let us consider the spherical six-node triangular prism shown in panel a in Figure 4 and the spherical triangle with vertices (i, j, k). Using an approach that is similar to that used in the planar configuration (e.g., [14]), we express A θ , λ as
A θ , λ = A i θ , λ = a r e a   o f   s p h e r i c a l   t r i a n g l e   P j k   a r e a   o f   s p h e r i c a l   t r i a n g l e   i j k = T i θ , λ , r T i j k ( r ) A j θ , λ = a r e a   o f   s p h e r i c a l   t r i a n g l e   P k i a r e a   o f   s p h e r i c a l   t r i a n g l e   i j k = T j θ , λ , r T i j k ( r ) A k θ , λ = a r e a   o f   s p h e r i c a l   t r i a n g l e   P i j a r e a   o f   s p h e r i c a l   t r i a n g l e   i j k = T k θ , λ , r T i j k ( r )
where
T i j k ( r ) = r 2 α + β + γ π
denotes the area of the spherical triangle i j k , panel a in Figure 4, with
α = a r c c o s cos a cos b c o s ( c ) sin b s i n ( c ) β = a r c c o s cos b cos c c o s ( a ) sin c s i n ( a ) γ = a r c c o s cos c cos a c o s ( b ) sin a s i n ( b ) ,   with
a = a r c c o s cos θ j cos θ k + sin θ j sin θ k cos λ j λ k b = a r c c o s cos θ k cos θ i + sin θ k sin θ i cos λ k λ i   c = a r c c o s cos θ i cos θ j + sin θ i sin θ j cos λ i λ j      
T i θ , λ , r = r 2 α i + β i + γ i π denotes the area of the spherical triangle P j k , panel b in Figure 4, with
α i = a r c c o s cos a i cos b i c o s ( c i ) sin b i s i n ( c i ) β i = a r c c o s cos b i cos c i c o s ( a i ) sin c i s i n ( a i ) γ i = a r c c o s cos c i cos a i c o s ( b i ) sin a i s i n ( b i ) ,   with
a i = a r c c o s cos θ j cos θ k + sin θ j sin θ k cos λ j λ k b i = a r c c o s cos θ k cos θ + sin θ k sin θ cos λ k λ           c i = a r c c o s cos θ   cos θ j + sin θ sin θ j cos λ λ j          
T j θ , λ , r = r 2 α j + β j + γ j π denotes the area of the spherical triangle P k i , panel c in Figure 4, with
α j = a r c c o s cos a j cos b j c o s ( c j ) sin b j s i n ( c j ) β j = a r c c o s cos b j cos c j c o s ( a j ) sin c j s i n ( a j ) γ j = a r c c o s cos c j cos a j c o s ( b j ) sin a j s i n ( b j ) ,   with
a j = a r c c o s cos θ   cos θ k + sin θ sin θ k cos λ λ k         b j = a r c c o s cos θ k   cos θ i + sin θ k sin θ i cos λ k λ i c j = a r c c o s cos θ i   cos θ + sin θ i sin θ cos λ i λ            
T k θ , λ , r = r 2 α k + β k + γ k π denotes the area of the spherical triangle P i j , panel d in Figure 4, with
α k = a r c c o s cos a k cos b k c o s ( c k ) sin b k s i n ( c k ) β k = a r c c o s cos b k cos c k c o s ( a k ) sin c k s i n ( a k ) γ k = a r c c o s cos c k cos a k c o s ( b k ) sin a k s i n ( b k ) ,   with
a k = a r c c o s cos θ j   cos θ + sin θ j sin θ cos λ j λ       b k = a r c c o s cos θ   cos θ i + sin θ sin θ i cos λ λ i         c k = a r c c o s cos θ i   cos θ j + sin θ i sin θ j cos λ i λ j

2.3.2. Spherical Eight-Node Quadrangular Right Prism

Consider the eight-node quadrangular prism shown in Figure 5, with sides parallel to the geographic parallels and meridians, and the spherical right rectangle with vertices (i, j, k, l). Functions A θ , λ can be expressed as
A i θ , λ = a r e a   o f   s p h e r i c a l   r i g h t   r e c t a n g l e   P P 2 k P 3 a r e a   o f   s p h e r i c a l   r i g h t   r e c t a n g l e   i j k l = Q i θ , λ , r Q i j k l ( r ) A j θ , λ = a r e a   o f   s p h e r i c a l   r i g h t   r e c t a n g l e P P 3 l P 4 a r e a   o f   s p h e r i c a l   r i g h t   r e c t a n g l e   i j k l = Q j θ , λ , r Q i j k l ( r ) A k θ , λ = a r e a   o f   s p h e r i c a l   r i g h t   r e c t a n g l e P P 4 i P 1 a r e a   o f   s p h e r i c a l   r i g h t   r e c t a n g l e   i j k l = Q k θ , λ , r Q i j k l r A l θ , λ = a r e a   o f   s p h e r i c a l   r i g h t   r e c t a n g l e   P P 1 j P 2 a r e a   o f   s p h e r i c a l   r i g h t   r e c t a n g l e   i j k l = Q l θ , λ , r Q i j k l r
where
Q i j k l ( r ) = r 2 λ j λ i cos θ k cos ( θ i )
is the area of spherical right rectangle i j k l , panel a in Figure 5;
Q i θ , λ , r = r 2 λ k λ cos ( θ k ) cos θ
is the area of spherical right rectangle P P 2 k P 3 , panel b in Figure 5;
Q j ( θ , λ , r ) = r 2 λ λ l cos θ l cos ( θ )
is the area of spherical right rectangle P P 3 l P 4 , panel c in Figure 5;
Q k ( θ , λ , r ) = r 2 λ λ i cos θ cos ( θ i )
is the area of spherical right rectangle P P 4 i P 1 , panel d in Figure 5;
Q l ( θ , λ , r ) = r 2 λ j λ cos θ cos ( θ j )
is the area of spherical right rectangle P P 1 j P 2 , panel e in Figure 5.
Considering that λ k = λ j   a n d   θ l = θ k , the final expressions of A θ , λ functions become
A i θ , λ = λ j λ cos ( θ k ) cos θ λ j λ i cos θ k cos ( θ i ) A j θ , λ = λ λ i cos θ k cos ( θ ) λ j λ i cos θ k cos ( θ i ) A k θ , λ = λ λ i cos θ cos ( θ i ) λ j λ i cos θ k cos ( θ i ) A l θ , λ = λ j λ cos θ cos ( θ i ) λ j λ i cos θ k cos ( θ i )

2.4. Shape Functions N r , θ , λ

We here derive the expressions of the shape functions for a spherical six-node tri-rectangular prism (Section 2.4.1) and for a spherical eight-node quadrangular right prism (Section 2.4.2).

2.4.1. Spherical Six-Node Tri-Rectangular Prism

Assume that the triangular sides of the prism coincide with the spherical three-node tri-rectangular triangle in Figure 6 (panel a). The geographic coordinates of the nodes i, j and k become
θ i , λ i , r = π 2 , 0 , r ,   nodes   1   and   4     θ j , λ j , r = π 2 , π 2 , r ,   nodes   2   and   5 θ k , λ k , r = 0 , 0 , r ,   nodes   3   and   6
The expressions of functions F i θ , λ (Equation (9)) reduce to
F i θ , λ F 1 θ , λ = F 4 θ , λ = sin θ cos θ sin λ cos θ cos λ 0 cos λ sin λ cos θ sin θ sin λ sin θ cos λ F j θ , λ F 2 θ , λ = F 5 θ , λ = sin θ cos θ cos λ cos θ sin λ 0 sin λ cos λ cos θ sin θ cos λ sin θ sin λ F k θ , λ F 3 θ , λ = F 6 θ , λ = cos θ cos λ cos θ sin λ sin θ sin λ cos λ 0 sin θ cos λ sin θ sin λ cos θ
Figure 7a–c shows how functions F i θ , λ vary smoothly with longitude and latitude.
It can be easily demonstrated that
F i θ i , λ i = 1       0       0 0       1       0 0       0       1 F i θ j , λ j = 1       0       0 0       0 1 0       1       0 F i θ k , λ k =       0       0         1       0       1       0 1       0       0 F j θ i , λ i = 1       0       0 0       0       1 0 1       0 F j θ j , λ j = 1       0         0 0       1         0 0       0         1 F j θ k , λ k =       0 1       0       0       0       1 1       0       0 F k θ i , λ i = 0       0 1 0       1       0 1       0     0 F k θ j , λ j =       0     0 1 1     0     0       0     1     0 F k θ k , λ k = 1       0       0 0       1       0 0       0       1
The expressions of function A i θ , λ (Equation (11)) reduce to
A i θ , λ = 2 π a r c c o s cos θ sin λ 1 sin 2 θ sin 2 λ + a r c c o s cos θ 1 sin 2 θ sin 2 λ + a r c c o s sin λ π                                         A j θ , λ = 2 π a r c c o s cos θ 1 sin 2 θ cos 2 λ + a r c c o s cos θ cos λ 1 sin 2 θ cos 2 λ + a r c c o s cos λ π                                 A k θ , λ = 1 A i θ , λ A j θ , λ                                                                                                                                                                                                                                                                                    
The expression of the shape functions in (32) contains the term 1 sin 2 θ sin 2 λ and 1 sin 2 θ cos 2 λ in denominators that may lead the shape functions and their derivatives to have singularities. To make shape functions and derivatives remain finite at singular points, some checkpoints should be introduced into the algorithm to estimate the shape functions and their derivatives at each point of the elements. However, operatively, in finite element applications, the shape functions and their derivatives are calculated only at the quadrature points, which are always within the discretization basis element, and the conditions for the occurrence of singularities cannot occur.
It is trivial to demonstrate that
A i θ i , λ i = 1 ; A i θ j , λ j = 0 ; A i θ k , λ k = 0 A j θ i , λ i = 0 ; A j θ j , λ j = 1 ; A j θ k , λ k = 0 A k θ i , λ i = 0 ; A k θ j , λ j = 0 ; A k θ k , λ k = 1
Figure 8 shows how functions A θ , λ vary with longitude and latitude within the assumed spherical tri-rectangular triangle.
Based on Equation (1), the shape functions for a spherical six-node tri-rectangular prism can be expressed as
N 1 θ , λ , r = R 1 r · A 1 θ , λ · F 1 θ , λ N 2 θ , λ , r = R 1 r · A 2 θ , λ · F 2 θ , λ N 3 θ , λ , r = R 1 r · A 3 θ , λ · F 3 θ , λ N 4 θ , λ , r = R 2 r · A 1 θ , λ · F 1 θ , λ N 5 θ , λ , r = R 2 r · A 2 θ , λ · F 2 θ , λ N 6 θ , λ , r = R 2 r · A 3 θ , λ · F 3 θ , λ
Based on Equations (3), (4), (31) and (33), it is trivial to demonstrate that
N k θ k , λ k , r k = I                                                                                   N k θ i , λ i , r i = 0 ,   f o r   k i   a n d   k , i = 1 ,   6

2.4.2. Spherical Eight-Node Quadrangular Right Prism—Tesseroid

Consider the spherical eight-node quadrangular right prism shown in Figure 6b. Assume that the sides of the prism coincide with the spherical rectangles of Figure 6b; the geographic coordinates of the nodes i, j, k and l become
θ i , λ i , r = 3 4 π , π 4 , r ;   nodes   1   and   5 θ j , λ j , r = 3 4 π , π 4 , r ;   nodes   2   and   6 θ k , λ k , r = π 4 , π 4 , r ;   nodes   3   and   7 θ l , λ l , r = π 4 , π 4 , r ;   nodes   4   and   8
Concerning functions F i θ , λ (Equation (9)), they reduce to
F i θ , λ F 1 θ , λ = F 5 θ , λ = 1 2 sin θ c o s θ c o s π 4 + λ cos θ sin π 4 + λ 1 2 sin θ + c o s θ c o s π 4 + λ 1 2 sin π 4 + λ cos π 4 + λ 1 2 sin π 4 + λ 1 2 cos θ + s i n θ c o s π 4 + λ sin θ sin π 4 + λ 1 2 cos θ + s i n θ c o s π 4 + λ
F j θ , λ F 2 θ , λ = F 6 θ , λ = 1 2 sin θ c o s θ s i n π 4 + λ cos θ cos π 4 + λ 1 2 sin θ + c o s θ s i n π 4 + λ 1 2 sin π 4 λ cos π 4 λ 1 2 sin π 4 λ 1 2 cos θ + s i n θ s i n π 4 + λ sin θ sin π 4 λ 1 2 cos θ + s i n θ s i n π 4 + λ
F k θ , λ F 3 θ , λ = F 7 θ , λ = 1 2 sin θ + c o s θ s i n π 4 + λ cos θ cos π 4 + λ 1 2 sin θ + c o s θ s i n π 4 + λ 1 2 sin π 4 λ cos π 4 λ 1 2 sin π 4 λ 1 2 cos θ + s i n θ s i n π 4 + λ sin θ sin π 4 λ 1 2 cos θ + s i n θ s i n π 4 + λ
F l θ , λ F 4 θ , λ = F 8 θ , λ = 1 2 sin θ + c o s θ c o s π 4 + λ cos θ sin π 4 + λ 1 2 sin θ + c o s θ c o s π 4 + λ 1 2 sin π 4 + λ cos π 4 + λ 1 2 sin π 4 + λ 1 2 cos θ + s i n θ c o s π 4 + λ sin θ sin π 4 + λ 1 2 cos θ + s i n θ c o s π 4 + λ
Figure 9a–d shows how functions F θ , λ vary smoothly with longitude and latitude within the assumed spherical rectangle.
It can be easily demonstrated that
F i θ i , λ i = 1 0 0 0 1 0 0 0 1                                         F i θ j , λ j = 1 2 1 2 1 2 0 2 1 2 1 F i θ k , λ k = 1 2 1 2 1 2 0 2 1 2 1 F i θ l , λ l = 0 0 1 0 1 0 1 0 0                                
The expressions of functions A i θ , λ reduce to
A i θ , λ = A 1 θ , λ = A 5 θ , λ = 1 π π 4 λ 2   c o s   θ 1 A j θ , λ = A 2 θ , λ = A 6 θ , λ = 1 π π 4 + λ 2   c o s   θ 1 A k θ , λ = A 3 θ , λ = A 7 θ , λ = + 1 π π 4 + λ 2 cos θ + 1 A l θ , λ = A 4 θ , λ = A 8 θ , λ = + 1 π π 4 λ 2 cos θ + 1
Figure 10 shows how functions A θ , λ vary with longitude and latitude within the assumed spherical rectangle.
It is trivial to demonstrate that
A i θ i , λ i = 1 ;   A i θ j , λ j = 0 ;   A i θ k , λ k = 0 ;   A i θ l , λ l = 0   A j θ i , λ i = 0 ;   A j θ j , λ j = 1 ;   A j θ k , λ k = 0 ;   A j θ l , λ l = 0   A k θ i , λ i = 0 ;   A k θ j , λ j = 0 ;   A k θ k , λ k = 1 ;   A k θ l , λ l = 0 A l θ i , λ i = 0 ;   A l θ j , λ j = 0 ;   A l θ k , λ k = 0 , ;     A l θ l , λ l = 1
Based on Equation (1), the shape functions for a spherical eight-node quadrangular right prism can be expressed as
N 1 θ , λ , r = R 1 r · A 1 θ , λ · F 1 θ , λ N 2 θ , λ , r = R 1 r · A 2 θ , λ · F 2 θ , λ N 3 θ , λ , r = R 1 r · A 3 θ , λ · F 3 θ , λ N 4 θ , λ , r = R 1 r · A 4 θ , λ · F 4 θ , λ N 5 θ , λ , r = R 2 r · A 1 θ , λ · F 1 θ , λ N 6 θ , λ , r = R 2 r · A 2 θ , λ · F 2 θ , λ N 7 θ , λ , r = R 2 r · A 3 θ , λ · F 3 θ , λ N 8 θ , λ , r = R 2 r · A 4 θ , λ · F 4 θ , λ
Based on Equations (3), (4), (40) and (42), it is trivial to demonstrate that
N k θ k , λ k , r k = I                                                                                                       N k θ i , λ i , r i = 0         f o r   k i       a n d       k , i = 1 ,   8          

3. Rigid Displacement on a Sphere

Assume a rigid displacement occurs on a sphere. If u 0 is the displacement at the generic point of coordinates θ ,   λ , r , at any other point k, the displacement must be equal to
u k θ ,   λ , r = F k θ , λ 1 · u 0
Thus, for a rigid displacement, the following expression holds
u 0 = k = 1 n n o d e N k · F k θ , λ 1 · u 0                                                                     = k = 1 n n o d e A k θ , λ · R 1,2 r · F k θ , λ · F k θ , λ 1 · u 0           = k = 1 n n o d e A k θ , λ · R 1,2 r · I · u 0
In conclusion, a rigid displacement implies that
k = 1 n n o d e A k θ , λ · R 1,2 r = 1
For a spherical six-node tri-rectangular prism, it follows that
k = 1 n n o d e A k θ , λ · R 1,2 = A 1 θ , λ · R 1 r + A 2 θ , λ · R 1 r   +   A 3 θ , λ · R 1 r   +                                                 A 4 θ , λ · R 2 r   +   A 5 θ , λ · R 2 r   +   A 6 θ , λ · R 2 r
since A 4 θ , λ = A 1 θ , λ A 5 θ , λ = A 2 θ , λ A 6 θ , λ = A 3 θ , λ
k = 1 n n o d e A k θ , λ · R 1,2 = A 1 θ , λ · R 1 r + A 2 θ , λ · R 1 r   +   A 3 θ , λ · R 1 r + A 1 θ , λ · R 2 r   +   A 2 θ , λ · R 2 r   +   A 3 θ , λ · R 2 r = A 4 A 1 θ , λ · R 1 r + R 2 r + A 2 θ , λ · R 1 r + R 2 r + A 3 θ , λ · R 1 r + R 2 r
but
R 1 r + R 2 r = r 2 r r 2 r 1 + r r 1 r 2 r 1 = r 2 r 1 r 2 r 1 = 1
Thus, from Equation (33),
k = 1 6 A k θ , λ · R 1,2 r = A 1 θ , λ + A 2 θ , λ     +   A 3 θ , λ = 1
Figure 11 shows this result numerically for the spherical six-node tri-rectangular prism.
The same can be demonstrated for the spherical eight-node quadrangular prism:
k = 1 8 A k θ , λ · R 1,2 r = A 1 θ , λ · R 1 r   +   A 2 θ , λ · R 1 r + A 3 θ , λ · R 1 r   +   A 4 θ , λ · R 1 r + A 5 θ , λ · R 2 r   +   A 6 θ , λ · R 2 r   +   A 7 θ , λ · R 2 r   +   A 8 θ , λ · R 2 r
since A 5 θ , λ = A 1 θ , λ A 6 θ , λ = A 2 θ , λ A 7 θ , λ = A 3 θ , λ A 8 θ , λ = A 4 θ , λ
k = 1 8 A k θ , λ · R 1,2 r = A 1 θ , λ · R 1 r + R 2 r + A 2 θ , λ · R 1 r + R 2 r + A 3 θ , λ · R 1 r + R 2 r   +   A 4 θ , λ · R 1 r + R 2 r = A 1 θ , λ   +   A 2 θ , λ + A 3 θ , λ   +   A 4 θ , λ = 1
on the basis of Equation (41).
Figure 12 shows this result numerically for the eight-node quadrangular right prism.
We thus observe that at any point of any spherical surface at any depth within the volume, for both triangular and quadrangular, summation of the contribution from each component attains the value 1, as required by the partition of unity property of the shape functions [14].

4. Transformation from Global to Local Coordinates

The proposed shape functions above are defined into a local space. We here describe the procedure of transformation from the global space, where the problem is defined, to the local space of the shape functions.
Let us consider the spherical curvilinear coordinates in the local space
l θ = r   θ                     l λ = r   λ   s i n θ   l r = r                          
and the spherical curvilinear coordinates in the global space
l θ ~ = r   θ ~                     l λ ~ = r   λ ~   s i n θ ~   l r ~ = r ~                          
Using the usual rules of partial differentiation, we can write
                  1 r N i θ 1 r   s i n θ N i λ                         N i r = N i l θ N i l λ N i l r = l θ ~ l θ l λ ~ l θ l r ~ l θ l θ ~ l λ l λ ~ l λ l r ~ l λ l θ ~ l r l λ ~ l r l r ~ l r · N i l θ ~ N i l λ ~ N i l r ~ = 1 r l θ ~ θ 1 r l λ ~ θ 1 r l r ~ θ 1 r   s i n θ l θ ~ λ 1 r   s i n θ l λ ~ λ 1 r ~   s i n θ l r ~ λ l θ ~ r l λ ~ r l r ~ r ·                   1 r ~ N i θ ~ 1 r ~   s i n θ ~ N i λ ~                       N i r ~ = J                   1 r ~ N i θ ~ 1 r ~   s i n θ ~ N i λ ~                       N i r ~
where J is the Jacobian matrix in spherical coordinates. The global spherical derivatives are thus defined as
                  1 r ~ N i θ ~ 1 r ~   s i n θ ~ N i λ ~                       N i r ~ = J 1                   1 r N i θ 1 r   s i n θ N i λ                         N i r
The curvilinear coordinates of a generic point within each element can be expressed as
l = i = 1 n n o d e N i l i
where nnode is the number of nodal connections of each element of the numerical grid.
The expression of the Jacobian, thus, becomes
J = 1 r l θ ~ θ 1 r l λ ~ θ 1 r l r ~ θ 1 r   s i n θ l θ ~ λ 1 r   s i n θ l λ ~ λ 1 r ~   s i n θ l r ~ λ l θ ~ r l λ ~ r l r ~ r = 1 r i = 1 n n o n e N i θ l θ ~ i 1 r i = 1 n n o n e N i θ l λ ~ i 1 r i = 1 n n o n e N i θ l r ~ i 1 r   s i n θ i = 1 n n o n e N i λ l θ ~ i 1 r   s i n θ i = 1 n n o n e N i λ l λ ~ i 1 r   s i n θ i = 1 n n o n e N i λ r ~ i i = 1 n n o n e N i r l θ ~ i i = 1 n n o n e N i r l λ ~ i i = 1 n n o n e N i r r ~ i
J = 1 r N i θ 1 r N j θ 1 r N k θ       1 r   s i n θ N i λ 1 r   s i n θ N j λ 1 r   s i n θ N k λ       N i r N j r N k r       · l θ ~ i l λ ~ i l r ~ i l θ ~ j l λ ~ j l r ~ j l θ ~ k l λ ~ k l r ~ k .             .           . .             .           . .             .           .
or
J = 1 r 2   s i n θ N i θ N j θ N k θ       N i λ N j λ N k λ       N i r N j r N k r       · l θ ~ i l λ ~ i l r ~ i l θ ~ j l λ ~ j l r ~ j l θ ~ k l λ ~ k l r ~ k .             .           . .             .           . .             .           .

4.1. Spherical Six-Node Tri-Rectangular Prism

J = 1 r 2   s i n θ N 1 θ N 2 θ N 3 θ           N 4 θ           N 5 θ           N 6 θ N 1 λ N 2 λ N 3 λ         N 4 λ           N 5 λ           N 6 λ N 1 r N 2 r N 3 r       N 4 r           N 5 r           N 6 r · l θ ~ 1 l λ ~ 1 l r ~ 1 l θ ~ 2 l λ ~ 2 l r ~ 2 l θ ~ 3 l λ ~ 3 l r ~ 3 l θ ~ 4           l λ ~ 4         l r ~ 4 l θ ~ 5           l λ ~ 5         l r ~ 5 l θ ~ 6           l λ ~ 6       l r ~ 6
N 1 θ = R 1 r · A 1 θ , λ θ · F 1 θ , λ + A 1 θ , λ · F 1 θ , λ θ N 1 λ = R 1 r · A 1 θ , λ λ · F 1 θ , λ + A 1 θ , λ · F 1 θ , λ λ N 1 r = R 1 r r · A 1 θ , λ · F 1 θ , λ                                                                                        
N 2 θ = R 1 r · A 2 θ , λ θ · F 2 θ , λ + A 2 θ , λ · F 2 θ , λ θ N 2 λ = R 1 r · A 2 θ , λ λ · F 2 θ , λ + A 2 θ , λ · F 2 θ , λ λ N 2 r = R 1 r r · A 2 θ , λ · F 2 θ , λ                                                                                        
N 3 θ = R 1 r · A 3 θ , λ θ · F 3 θ , λ + A 3 θ , λ · F 3 θ , λ θ N 3 λ = R 1 r · A 3 θ , λ λ · F 3 θ , λ + A 3 θ , λ · F 3 θ , λ λ N 3 r = R 1 r r · A 3 θ , λ · F 3 θ , λ                                                                                        
N 4 θ = R 2 r · A 1 θ , λ θ · F 1 θ , λ + A 1 θ , λ · F 1 θ , λ θ N 4 λ = R 2 r · A 1 θ , λ λ · F 1 θ , λ + A 1 θ , λ · F 1 θ , λ λ N 4 r = R 2 r r · A 1 θ , λ · F 1 θ , λ                                                                                        
N 5 θ = R 2 r · A 2 θ , λ θ · F 2 θ , λ + A 2 θ , λ · F 2 θ , λ θ N 5 λ = R 2 r · A 2 θ , λ λ · F 2 θ , λ + A 2 θ , λ · F 2 θ , λ λ N 5 r = R 2 r r · A 2 θ , λ · F 2 θ , λ                                                                                        
N 6 θ = R 2 r · A 3 θ , λ θ · F 3 θ , λ + A 3 θ , λ · F 3 θ , λ θ N 6 λ = R 2 r · A 3 θ , λ λ · F 3 θ , λ + A 3 θ , λ · F 3 θ , λ λ N 6 r = R 2 r r · A 3 θ , λ · F 3 θ , λ                                                                                        
Derivatives of F θ , λ :
F 1 θ , λ θ = cos θ s i n θ cos λ sin θ cos λ 0 0 0 sin θ cos θ sin λ cos θ cos λ F 1 θ , λ λ = 0 cos θ sin λ cos θ sin λ 0 sin λ cos λ 0 sin θ cos λ sin θ sin λ              
F 2 θ , λ θ = cos θ sin θ cos λ sin θ sin λ 0 0 0 sin θ cos θ cos λ cos θ sin λ F 2 θ , λ λ = 0 cos θ sin λ cos θ cos λ 0 cos λ sin λ 0 sin θ sin λ sin θ cos λ                            
F 3 θ , λ θ = sin θ cos λ sin θ sin λ cos θ 0 0 0 cos θ cos λ cos θ sin λ sin θ F 3 θ , λ λ = cos θ sin λ cos θ cos λ 0 cos λ sin λ 0 sin θ sin λ sin θ cos λ 0                          
Derivatives of A i θ , λ (Appendix A):
A 1 θ , λ θ = 2 π cos λ 1 + sin θ sin λ                   A 1 θ , λ λ = 2 π cos θ 1 + sin θ sin λ 1
A 2 θ , λ θ = 2 π sin λ 1 + sin θ cos λ                         A 2 θ , λ λ = 2 π cos θ 1 + sin θ cos λ + 1
A 3 θ , λ θ = 2 π cos λ 1 + sin θ sin λ + sin λ 1 + sin θ cos λ A 3 θ , λ λ = 2 π cos θ 1 + sin θ sin λ cos θ 1 + sin θ cos λ    
Derivatives of R 1,2 r :
d R 1 r d r = 1 r 2 r 1 d R 2 r d r = 1 r 2 r 1        

4.2. Spherical Eight-Node Quadrangular Right Prism

J = 1 r 2   s i n θ N 1 θ N 2 θ N 3 θ           N 4 θ           N 5 θ           N 6 θ           N 7 θ           N 8 θ N 1 λ N 2 λ N 3 λ         N 4 λ           N 5 λ           N 6 λ         N 7 λ           N 8 λ N 1 r N 2 r N 3 r       N 4 r           N 5 r           N 6 r         N 7 r           N 8 r · l θ ~ 1 l λ ~ 1 l r ~ 1 l θ ~ 2 l λ ~ 2 l r ~ 2 l θ ~ 3 l λ ~ 3 l r ~ 3 l θ ~ 4           l λ ~ 4       l r ~ 4 l θ ~ 5           l λ ~ 5         l r ~ 5 l θ ~ 6           l λ ~ 6       l r ~ 6 l 7           l λ ~ 7         l r ~ 7 l θ ~ 8           l λ ~ 8         l r ~ 8
N 1 θ = R 1 r · A 1 θ , λ θ · F 1 θ , λ + A 1 θ , λ · F 1 θ , λ θ N 1 λ = R 1 r · A 1 θ , λ λ · F 1 θ , λ + A 1 θ , λ · F 1 θ , λ λ N 1 r = R 1 r r · A 1 θ , λ · F 1 θ , λ                                                                                        
N 2 θ = R 1 r · A 2 θ , λ θ · F 2 θ , λ + A 2 θ , λ · F 2 θ , λ θ N 2 λ = R 1 r · A 2 θ , λ λ · F 2 θ , λ + A 2 θ , λ · F 2 θ , λ λ N 2 r = R 1 r r · A 2 θ , λ · F 2 θ , λ                                                                                        
N 3 θ = R 1 r · A 3 θ , λ θ · F 3 θ , λ + A 3 θ , λ · F 3 θ , λ θ N 3 λ = R 1 r · A 3 θ , λ λ · F 3 θ , λ + A 3 θ , λ · F 3 θ , λ λ N 3 r = R 1 r r · A 3 θ , λ · F 3 θ , λ                                                                                        
N 4 θ = R 1 r · A 4 θ , λ θ · F 4 θ , λ + A 4 θ , λ · F 4 θ , λ θ N 4 λ = R 1 r · A 4 θ , λ λ · F 4 θ , λ + A 4 θ , λ · F 4 θ , λ λ N 4 r = R 1 r r · A 4 θ , λ · F 4 θ , λ                                                                                        
N 5 θ = R 2 r · A 1 θ , λ θ · F 1 θ , λ + A 1 θ , λ · F 1 θ , λ θ N 5 λ = R 2 r · A 1 θ , λ λ · F 1 θ , λ + A 1 θ , λ · F 1 θ , λ λ N 5 r = R 2 r r · A 1 θ , λ · F 1 θ , λ                                                                                          
N 6 θ = R 2 r · A 2 θ , λ θ · F 2 θ , λ + A 2 θ , λ · F 2 θ , λ θ N 6 λ = R 2 r · A 2 θ , λ λ · F 2 θ , λ + A 2 θ , λ · F 2 θ , λ λ N 6 r = R 2 r r · A 3 θ , λ · F 3 θ , λ                                                                                        
N 7 θ = R 2 r · A 3 θ , λ θ · F 3 θ , λ + A 3 θ , λ · F 3 θ , λ θ N 7 λ = R 2 r · A 3 θ , λ λ · F 3 θ , λ + A 3 θ , λ · F 3 θ , λ λ N 7 r = R 2 r r · A 3 θ , λ · F 3 θ , λ                                                                                        
N 8 θ = R 2 r · A 4 θ , λ θ · F 4 θ , λ + A 4 θ , λ · F 4 θ , λ θ N 8 λ = R 2 r · A 4 θ , λ λ · F 4 θ , λ + A 4 θ , λ · F 4 θ , λ λ N 8 r = R 2 r r · A 4 θ , λ · F 4 θ , λ                                                                                        
F i θ , λ θ = 1 2 cos θ + sin θ c o s π 4 + λ sin θ sin π 4 + λ 1 2 cos θ sin θ c o s π 4 + λ 0 0 0 1 2 sin θ + cos θ c o s π 4 + λ cos θ sin π 4 + λ 1 2 sin θ + c o s θ c o s π 4 + λ F i θ , λ λ = 1 2 cos θ s i n π 4 + λ cos θ cos π 4 + λ 1 2 cos θ s i n π 4 + λ 1 2 cos π 4 + λ sin π 4 + λ 1 2 cos π 4 + λ 1 2 sin θ s i n π 4 + λ sin θ cos π 4 + λ 1 2 sin θ s i n π 4 + λ                           i = 1,5  
F j θ , λ θ = 1 2 cos θ + sin θ s i n π 4 + λ + sin θ cos π 4 + λ 1 2 cos θ sin θ s i n π 4 + λ 0 0 0 1 2 sin θ + cos θ s i n π 4 + λ cos θ sin π 4 λ 1 2 sin θ + cos θ s i n π 4 + λ F j θ , λ λ = 1 2 cos θ c o s π 4 + λ cos θ sin π 4 + λ 1 2 cos θ c o s π 4 + λ 1 2 cos π 4 λ sin π 4 λ 1 2 cos π 4 λ 1 2 sin θ c o s π 4 + λ sin θ cos π 4 λ 1 2 sin θ c o s π 4 + λ                                     i = 2,6  
F k θ , λ θ = 1 2 cos θ sin θ s i n π 4 + λ sin θ cos π 4 + λ 1 2 cos θ sin θ s i n π 4 + λ 0 0 0 1 2 sin θ + cos θ s i n π 4 + λ cos θ sin π 4 λ 1 2 sin θ + cos θ s i n π 4 + λ F k θ , λ λ = 1 2 cos θ c o s π 4 + λ cos θ sin π 4 + λ 1 2 cos θ c o s π 4 + λ 1 2 cos π 4 λ sin π 4 λ 1 2 cos π 4 λ 1 2 sin θ cos π 4 + λ sin θ cos π 4 λ 1 2 sin θ cos π 4 + λ                               k = 3,7
F l θ , λ θ = 1 2 cos θ sin θ c o s π 4 + λ sin θ sin π 4 + λ 1 2 cos θ sin θ cos π 4 + λ 0 0 0 1 2 sin θ + cos θ cos π 4 + λ cos θ sin π 4 + λ 1 2 sin θ + cos θ cos π 4 + λ F l θ , λ λ = 1 2 cos θ sin π 4 + λ cos θ cos π 4 + λ 1 2 cos θ s i n π 4 + λ 1 2 cos π 4 + λ sin π 4 + λ 1 2 cos π 4 + λ 1 2 sin θ sin π 4 + λ sin θ cos π 4 + λ 1 2 sin θ sin π 4 + λ                     i = 4 ,   8  
Derivatives of A i θ , λ (Appendix A):
A i θ , λ θ = 2 π π 4 λ s i n   θ A i θ , λ λ = 1 π 2   c o s   θ 1   i = 1,5
A j θ , λ θ = 2 π π 4 + λ s i n   θ           A j θ , λ λ = 1 π 2   c o s   θ 1   j = 2,6
A k θ , λ θ = 2 π π 4 + λ s i n   θ A k θ , λ λ = 1 π 2 cos θ + 1           k = 3,7
A l θ , λ θ = 2 π π 4 λ sin θ A l θ , λ λ = 1 π 2 cos θ + 1   l = 4 ,   8
Note that, as for the shape functions proposed for the spherical six-node tri-rectangular prisms and their derivatives, Jacobian expressions (61), (62) and (76) may have singularities if evaluated at the center of the sphere (r = 0) or at the poles (θ = 0 or 180). However, operationally, in finite element applications, the Jacobian is calculated only at the quadrature points, which are always within the discretization basis element, and the conditions for the occurrence of singularities cannot occur.

5. Infinitesimal Volume—Global to Local

Let us consider the point P on a sphere of global spherical coordinates θ ~ ,   λ ~ ,   r ~ . The position of P can be defined in terms of the curvilinear coordinates
l θ ~ = r ~   θ ~                     l λ ~ = r ~   λ ~   s i n θ ~   l r ~ = r ~                          
evaluated along the directions of the meridian and of the parallel passing through P and of the line connecting P to the center of the sphere O, from O outwards. For any infinitesimal increment of the curvilinear coordinates d l θ ~ ,   d l λ ~   a n d   d l r ~ the spherical infinitesimal volume can be expressed as
d V ~ = r ~ 2   s i n θ ~   d θ ~   d λ ~     d r ~ = r ~   d θ ~   r ~   s i n θ ~   d λ ~     d r ~ = d l θ ~   d l λ ~ d l r ~
Assuming that the global curvilinear coordinates l θ ~ ,   l λ ~ ,   l r ~ are functions of the local curvilinear coordinates l θ , l λ , l r   of the reference element of the numerical grid defined in paragraphs 2, it follows that
d l θ ~ = l θ ~ l θ d l θ + l θ ~ l λ d l λ + l θ ~ l r d l r d l λ ~ = l λ ~ l θ d l θ + l λ ~ l λ d l λ + l λ ~ l r d l r d l r ~ = l r ~ l θ d l θ + l r ~ l λ d l λ + l r ~ l r d l r
The volume in the global space becomes
d V ~ = l θ ~ l θ d l θ + l θ ~ l λ d l λ + l θ ~ l r d l r   l λ ~ l θ d l θ + l λ ~ l λ d l λ + l λ ~ l r d l r l r ~ l θ d l θ + l r ~ l λ d l λ + l r ~ l r d l r
or, after a few mathematical steps,
d V ~ = d e t l θ ~ l θ l λ ~ l θ l r ~ l θ l θ ~ l λ l λ ~ l λ l r ~ l λ l θ ~ l r l λ ~ l r l r ~ l r d l θ d l λ d l r
d V ~ = r 2   s i n θ   det J   d θ   d λ   d r

6. Validation Tests

We have performed some validation tests in order to verify the performance of our analytical shape functions in evaluating the finite volumes of generic spherical prisms by which the real or a normalized Earth is discretized and the numerical solution of Poisson equation.

6.1. Volume

In these tests, we compare the value of the volume of a spherical prism calculated numerically using the Jacobian containing the derivatives of the shape functions proposed here and the volume of the same spherical prism calculated using the exact formula described below.

6.1.1. Spherical Triangular Prism

V = 1 3   r m a x 3 r m i n 3 α + β + γ π
with
α = a r c c o s cos a cos b c o s ( c ) sin b s i n ( c ) β = a r c c o s cos b cos c c o s ( a ) sin c s i n ( a ) γ = a r c c o s cos c cos a c o s ( b ) sin a s i n ( b )
a = a r c c o s cos θ 2 cos θ 3 + sin θ 2 sin θ 3 cos λ 2 λ 3 b = a r c c o s cos θ 3 cos θ 1 + sin θ 3 sin θ 1 cos λ 3 λ 1     c = a r c c o s cos θ 1 cos θ 2 + sin θ 1 sin θ 2 cos λ 1 λ 2      
where θ i   a n d   λ j are the colatitude and longitude of the three vertexes of the triangular base of the prism, respectively, and r m i n and r m a x are the minimum and the maximum distances from the center of the sphere.

6.1.2. Spherical Quadrangular Prism–Tesseroid

V = 1 3   r m a x 3 r m i n 3 cos θ m i n cos θ m a x λ m a x λ m i n
where θ m a x ,   θ m i n   and λ m a x ,   λ m i n are the maximum and minimum values of the colatitude and longitude that delimit the tesseroid, and r m i n and r m a x are the same as for the spherical triangular prism.
While geometry is exact, numerical integration of transcendental functions remains approximate. We numerically perform the integral over the volume of the local reference element, taking advantage of the well-known Gauss–Legendre quadrature formula, where the n Gauss–Legendre points are the zeros of the Legendre polynomials, complemented by the corresponding weights.
The results of these tests are discussed in terms of volume difference and percentage volume difference, expressed as
V = V n u m e r i c V e x a c t
and
% V = V n u m e r i c V e x a c t V e x a c t × 100
Figure 13 shows the volume difference and the percentage volume difference obtained for a spherical quadrangular prism, for different dimensions along the colatitude and the longitude (ranging from 1° to 0.25°) and along the radial direction (ranging from 100 km to 10 km for the real Earth, and to 1 km for the normalized Earth) using 125 Gauss–Legendre points.
There are two main results that are worthy of note.
  • The volume difference decreases from tens of kilometers to a few units as the radial dimension of the spherical quadrangular spherical decreases (compare, in the first column, the first two panels at the top, with radial dimension of 100 km, with the two panels at the bottom, with radial dimension of 10 km), and decreases from the equator to the poles.
  • Despite these differences in the volume difference related to r, however, the percentage volume difference is totally independent of r and of colatitude and longitude. It depends only on the angular dimension of the prism along the colatitude ( θ ) and the longitude ( λ ) and decreases as both decrease, from 10 3 to lower than 10 4 when θ and λ vary from 1 o to 0.25 o . A decrease in the percentage volume difference occurs when 27 Gauss–Legendre points are used, up to two orders of magnitude, but still below 10 3 . The accuracy of the numerical estimation of the volume degrades significantly, instead, if only eight Gauss–Legendre points are used (Figure 14). The invariance of the percentage volume difference from the distance from the center of the sphere, as well as from the radial dimensions of the prism, is also confirmed by the results obtained for a normalized sphere (Figure 15).
Figure 14. Values of volume differences (panels ai) and percentage volume differences (panels bidi) for a spherical eight-node quadrangular right prism, for different angular dimensions θ and λ , along the colatitude and the longitude of the prism, for 8 and 27 Gauss–Legendre points. The distance of the prisms from the center of the sphere is r = 5776 km; their radial dimension is dr = 10 km. A sphere with a radius of 6371 km is considered.
Figure 14. Values of volume differences (panels ai) and percentage volume differences (panels bidi) for a spherical eight-node quadrangular right prism, for different angular dimensions θ and λ , along the colatitude and the longitude of the prism, for 8 and 27 Gauss–Legendre points. The distance of the prisms from the center of the sphere is r = 5776 km; their radial dimension is dr = 10 km. A sphere with a radius of 6371 km is considered.
Mca 30 00088 g014
Figure 15. Values of volume differences (a) and percentage volume differences (bd) for a spherical eight-node quadrangular right prism, for different angular dimensions θ and λ , along the colatitude and the longitude of the prism, for 125 Gauss–Legendre points. The distance of the prisms from the center of the sphere is r = 1.5 km; their radial dimension is dr = 1 km. A sphere with a radius of 2 km is considered.
Figure 15. Values of volume differences (a) and percentage volume differences (bd) for a spherical eight-node quadrangular right prism, for different angular dimensions θ and λ , along the colatitude and the longitude of the prism, for 125 Gauss–Legendre points. The distance of the prisms from the center of the sphere is r = 1.5 km; their radial dimension is dr = 1 km. A sphere with a radius of 2 km is considered.
Mca 30 00088 g015
Figure 16 gives the results of an analysis similar to that performed for quadrangular spherical prisms, performed for a triangular spherical prism constructed on the same grid of points used to construct the quadrangular prisms in Figure 13, Figure 14 and Figure 15 and with two sides running along parallels and meridians.
Both volume difference and percentage volume difference show different behavior from that of the spherical quadrangular prism. Specifically, while for a spherical quadrangular prism the numerical integral always underestimates the volume, in the case of a spherical triangular prism, the same occurs at lower latitudes and for few Gauss–Legendre quadrature points (panel a1), while at high latitudes and for many Gauss–Legendre quadrature points, the numerical integral is overestimated (panel a2), due to the coalescence of the Gauss points when the two upper sides of the triangular prisms become close when approaching the North Pole. Furthermore, the percentage volume difference for a spherical triangular prism varies with colatitude and reaches minimum values at middle latitudes. In the rest of the domain, the percentage volume difference remains at least one order of magnitude greater than those shown by the spherical quadrangular prism, but still below 10 2 , with the sole exception occurring in proximity of the North Pole.
Figure 17 summarizes the results of the error variation analysis, expressed as the percentage difference between the numerically and analytically calculated volume, as a function of the number of Gauss–Legendre quadrature points for both models using six-node triangular prisms and those using eight-node quadrangular right prisms. This overall synthesized vision confirms the considerations made previously in the detailed discussion of some of the test models. It is worth emphasizing once again that, with the exception of the relatively high maximum percentage error (still less than 2%) that occurs only in the few spherical six-node triangular prisms facing the North Pole, the percentage error remains around 0.1% for eight Gauss–Legendre quadrature points, decreasing to 10−2 and 10−4 for 27 Gauss–Legendre quadrature points, and even as low as 10−6 for 125 Gauss–Legendre quadrature points.
Furthermore, for eight Gauss–Legendre quadrature points, the variation of the percentage error remains smaller than one order of magnitude when different types of elements (six-node triangular and eight-node quadrangular prisms) and different discretizations in longitude and colatitude are used, around 0.1%; for higher orders of numerical integration, instead, the variation of the percentage error spans from three orders of magnitude (for 27 Gauss–Legendre quadrature points) to as many as five orders of magnitude (for 125 Gauss–Legendre quadrature points).

6.2. Steady-State Heat Conduction in a Sphere — Poisson and Laplace Problems

The second test is performed considering the numerical integration of the Poisson equation end comparing the numerical solution with specific analytical solutions of the same differential equation.
The Poisson equation has numerous applications in physics, such as in heat transfer, fluid dynamics, gravity field and electromagnetism. For our tests, we consider the equation for steady-state heat conduction in a sphere with internal heat production.

6.2.1. Numerical Integration of the Equation of Steady-State Heat Conduction in a Sphere with Internal Heat Production

The energy equation for steady-state heat conduction with internal heat production in spherical coordinates has the following expression:
· K T + ρ H = 1 r 2 r r 2 K T r + 1 r sin θ θ sin θ K 1 r   T θ + 1 r sin θ λ K 1 r sin θ T λ + Q = 0
where T is the temperature, K is the thermal conductivity and Q is the internal energy per unit volume, with, in general, K and Q functions of the position θ , λ , r .
To proceed with the numerical integration, we use the Galerkin-weighted residual method. We herein synthetize the well-known mathematical formulation of the problem (e.g., ref. [14]), adapting the procedure to the spherical coordinates and proposed shape functions.
Let us consider the steady-state heat conduction problem defined, in compact form, by the following differential equation:
A T = · K T + Q = 0
Let us assume the following boundary conditions:
B 1 T =   T T ¯ = 0 on   boundary   S T
B 2 T = K T n + q ¯ = 0 on   boundary   S q
with T ¯ is the temperature prescribed on boundary S T and q ¯ is the heat flow prescribed through the boundary S q .
The integral form of the problem is
V v   A T d V + S T w 1   B 1 T   d S S q w 2   B 2 T   d S = 0
where v , w 1 and w 2 are generic C 0 continuous functions. Without loss of generality, we can assume w 1 = w 2 = v and the integral form of the problem simplifies as
V v   · K T d V + V v   Q   d V S T v   T T ¯   d S S q v   K T n + q ¯   d S = 0
or, after integrating by part,
V T v   · K T d V + S v K T · n d S + V v   Q   d V S T v   T T ¯   d S S q v   K T n   d S S q v   q ¯   d S = 0
but
S v K T · n d S S q v   K T n   d S + S T v   K T n   d S
and the integral weak form of the problem takes the following form
V T v   · K T d V + V v   Q   d V + S T v   K T n   d S I 1 S T v   T T ¯   d S I 2 S q v   q ¯   d S I 3 = 0
Operatively, the evaluation of integral I 1 can be omitted by choosing function v such that v = 0 on S T . Furthermore, integral I 2 can be also omitted, since its result is easily handled during the resolution of the final system of algebraic equations. Finally, integral I 3 must be calculated only if a non-zero heat flow is assumed trough the boundary S q .
In conclusion, neglecting integrals I 1 , I 2 and I 3 , the integral weak form simplifies as
V T v   · K T d V + V v   Q   d V = 0
If the unknown T is approximated by the expression
T θ ,   ϕ ,   r i N i θ ,   ϕ ,   r   T i
where N i are the shape functions prescribed in terms of the independent variable and T i are the unknown temperatures at each of the n grid nodes, and function v is substituted by a set of prescribed functions in a number equal to the number of the unknown T i , and made to coincide with the shape functions N j (Galerkin approximation), the integral weak form becomes
V T N j   · K N i T i d V + V N j   Q   d V = 0
V T N j   · K N i   d V T i + V N j   Q   d V = 0
or
K · a = q
with K stiffness matrix, whose elements are
K j i = V T N j · K N i   d V
and q load, whose elements are
q j V N j   Q   d V
In spherical coordinates θ , λ , r the expression of the elements of the stiffness matrix becomes
K j i = V T N j   · K N i   d V = V N j r , 1 r N j θ , 1 r sin θ N j λ n λ · K N i r K 1 r N i θ K 1 r sin θ N i λ r 2 sin θ d θ   d λ   d r
K j i = V N j r K N i r + 1 r N j θ K 1 r N i θ + 1 r sin θ N j λ K 1 r sin θ N i λ r 2 sin θ d θ   d λ   d r
To compute the volume integrals over the whole spherical volume V , we summed the volume integrals computed over each spherical volume V e in which we discretized the continuum. We computed the elemental volume integrals numerically by means of the same Gauss–Legendre quadrature formula used for the validation test of the volume described in the previous sub-section. Since the unknown is a scalar, only the scalar component of the spherical shape functions has been considered, that is,
N i θ , λ , r S j θ , λ , r = R r A ( θ , λ )
Numerical integration is performed on a spherical domain extending from the r = R b = 6341   k m to r = R s = 6371   k m , calculated from the center of a sphere of radius equal to 6371   k m . The longitude varies from 0 to 360° and the colatitude varies from 0 to 180°. A discretization varying from 5° to 1° is considered along both longitude and colatitude; a discretization of 5 and 10 km is assumed along the radial direction. Based on the results of the previous sub-section, we performed the numerical integration using eight Gauss–Legendre quadrature points.

6.2.2. Analytical Solution of the Equation of Steady-State Heat Conduction in a Sphere with Internal Heat Production

Let us consider again the energy equation for steady-state heat conduction with internal heat production in spherical coordinates
· K T + ρ H = 1 r 2 r r 2 K T r + 1 r sin θ θ sin θ K 1 r   T θ + 1 r sin θ λ K 1 r sin θ T λ + Q = 0
This differential equation has an exact solution only under certain simplifications.
Assume that thermal conductivity does not vary with θ , λ , r . In this case, the differential equation becomes
K · T = K 2 T = K 1 r 2 r r 2 T r + K 1 r 2 sin θ θ sin θ T θ + K 1 r 2 sin 2 θ 2 T λ 2 + Q = 0
or
2 T = 1 r 2 r r 2 T r + 1 r 2 sin θ θ sin θ T θ + 1 r 2 sin 2 θ 2 T λ 2 = Q K
which corresponds to the Poisson equation for temperature T θ , λ , r , with internal energy source Q θ , λ , r and uniform conductivity K . In absence of internal energy source, Q θ , λ , r = 0 , the energy equation reduces to the Laplace equation for temperature T θ , λ , r .
Under spherical symmetry, with properties varying only in the radial direction, the solution of the Poisson equation can be expressed by spherical harmonics expansion
T θ , λ , r = l = 0 m = l l Y l m θ , λ   C l m ( r )  
where Y l m θ , λ are the spherical harmonics, of order m and degree l, and C l m ( r ) are the coefficients depending on the radial distance, which must be determined by solving the Poisson equation.
For our test, we assume the simple case of a temperature that varies only along the radial distance, T r , and the internal energy source is uniform. In this case, the Poisson equation reduces to
1 r 2 r r 2 T ( r ) r + Q K = 0
which can be integrated directly, obtaining the following general solution
T ( r ) = r 2 6 ρ H K + C 1 r + C 2
with C 1 and C 2 integration constants to be determined after the application of appropriate boundary conditions.
We make use of Dirichlet boundary conditions:
  T r = R s = T s   T r = R b = T b
After a few mathematical steps, we obtain the solution for temperature in the form of
T r = T s + 1 r 1 R s R s R b T b T s R s R b ρ H 6 K R s R b R s + R b + ρ H 6 K R s 2 r 2
Figure 18 and Figure 19 show, for eight-node quadrangular right prisms and six-node triangular prisms, respectively, the comparison between the numerical and the analytical solutions, in terms of difference in temperature (left vertical panels) and percentage difference (circular panels), at different depths, from the base of the crust, at a 30 km depth, or r = R b = 6341   k m , to the Earth’s surface, at r = R b = 6371   k m , by 5 km stepping.
Unlike what was undertaken for the volume estimate (Section 6.1), for the present test, the numerical grid covers the whole sphere.
We assume Q = 2.59   μ W / m 3 , K = 3   W / ° K m , T s = 300   ° K and T b = 800   ° K . In order to eliminate edge effects, along longitude 360° and colatitude 180°, the temperature is fixed to the analytical values. Based on the results in Section 6.1, n = 8 Gauss–Legendre quadrature points have been used.
The left panels of Figure 18 and Figure 19 contain a solid continuous line providing the analytical solution based on Equation (131), varying from 300 to 800 °K according to the prescribed Dirichlet boundary conditions and according to the temperature Kelvin degree scale at the top of the panels. The left panels contain also the difference in temperature between the analytical solution and the numerical solutions, provided by the black symbols at the different depths, including the spherical surfaces where the temperature matches the boundary conditions; for the symbols, the scale to be considered is the bottom one, from 0 to 2 °K. At the various depths, each black symbol is representative of each node of the numerical grid lying on the sphere at that depth; in the right circular panels, the same points are distributed spatially as a function of θ ,   λ . The temperature difference varies from 0 °K to less than 1 °K for the eight-node quadrangular right prisms (Figure 18), with some increases at intermediate depths, as expected for the farthest distances from the fixed temperature boundary conditions. For the six-node triangular prisms (Figure 19) the temperature differences reach 2 °K, which are only encountered at the North Pole, at 10 and 15 km depths.
The four columns on the circular maps in Figure 18 and Figure 19 provide the percentage differences between the numerical solution and the analytical solution according to the bottom colored bar. Two different resolutions in latitude and longitude have been considered, 5° (first and second columns) and 2.5° (third and fourth columns), and the same depths as those for the vertical left panels are used. The first and third rows provide the North Pole perspective, and the second and fourth rows the South Pole perspective. Compared to the left vertical panels, these circular maps provide information on how differences between the numerical and analytical solutions are distributed over the spherical surfaces at the various depths. Only at 10 km depths, for both quadrangular and triangular prims, the percentage difference is slightly higher than 0.1%, with values that can be as low as 0.01% elsewhere. The white color in the top and bottom circular maps indicates that the boundary conditions are matched at the Earth’s surface and at the bottom of the crust; the white radii indicate at longitude 360° and colatitude 180°, matching with the analytical solution.
It is worth noting that the maximum percentage difference of 0.1 found in this test for the estimate of the temperature is of the same order of magnitude as that obtained for the volume estimate test (Section 6.1) for the same number of Gauss–Legendre quadrature points (eight).
Finally, even the relatively coarse grid ( Δ θ / Δ λ = 2.5 ° ;   5.0 ° ) used is already capable of providing a satisfactory fit between numerical and analytical solutions. The maximum difference is in the order of 0.2% of the exact value, corresponding to a maximum difference of less than 1 °K for the absolute temperature, with the exception of the six-node triangular prism elements that show a maximum error, even if only at the North Pole, of about 2 °K (Figure 19).

7. Conclusions

We present the procedure to determine rigorous spherical shape functions for generic spherical prismatic elements and, in particular, for the case of spherical six-node tri-rectangular and eight-node quadrangular spherical prisms. The proposed analytical shape functions, as required, satisfy the properties of attaining the value one separately over each vertex, and smoothly reaching zero over all the remaining vertices. They also make it possible to interpolate a rigid displacement. We also derive the expression of the Jacobian. The results of numerical tests in which we compare the value of the exact volume of quadrangular and triangular spherical prisms and the value calculated numerically using the Jacobian formula containing the derivatives of the shape functions proposed here demonstrate the full capability of the presented spherical shape functions and the high degree of accuracy that can be achieved.
Our analytical shape functions make it possible to handle lateral variations in the physical properties of the Earth, thereby overcoming the limitation of spherical symmetry being required to solve global problems.
The proposed spherical shape functions can be used to rigorously interpolate scalar and vectoral fields within a spherical domain, which can be taken as reference elements within a finite element numerical code.

Author Contributions

Conceptualization, A.M.M., R.B. and R.S.; methodology, A.M.M., R.B. and R.S.; software, A.M.M.; validation, A.M.M., R.B. and R.S.; formal analysis, A.M.M., R.B. and R.S.; investigation, A.M.M., R.B. and R.S.; resources, A.M.M.; data curation, A.M.M., R.B. and R.S.; writing—original draft preparation, A.M.M., R.B. and R.S.; writing—review and editing, A.M.M., R.B. and R.S.; visualization, A.M.M.; supervision, A.M.M., R.B. and R.S.; project administration, A.M.M.; funding acquisition, A.M.M. All authors have read and agreed to the published version of the manuscript.

Funding

Research reported in this publication was supported by the ASI (Italian Space Agency)-funded project “NGGM/MAGIC-a breakthrough in the understanding of the dynamics of the Earth”, contr. n. CI-UOT-2023-057.

Data Availability Statement

The data generated and/or analyzed during this work are available from the corresponding author on reasonable request.

Acknowledgments

All figures have been made using GMT–The Generic Mapping Tools [16]. We thank the Editor and the reviewers for the valuable comments that helped us to improve the original manuscript.

Conflicts of Interest

The authors have no conflicts of interest to declare that are relevant to this work.

Appendix A. Partial Derivatives of A i θ , λ for a Spherical Six-Node Tri-Rectangular Prism

A 1 θ , λ = 2 π a r c c o s cos θ sin λ 1 sin 2 θ sin 2 λ + a r c c o s cos θ 1 sin 2 θ sin 2 λ + a r c c o s sin λ π
A 1 θ , λ θ = 2 π sin θ cos 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ sin θ 1 sin 2 θ sin 2 λ 1 cos 2 θ 1 sin 2 θ sin 2 λ sin θ sin λ 1 sin 2 θ sin 2 λ sin θ cos 2 θ sin 3 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 cos 2 θ sin 2 λ 1 sin 2 θ sin 2 λ
A 1 θ , λ θ = 2 π sin θ cos 2 θ sin 2 λ sin θ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 cos 2 θ 1 sin 2 θ sin 2 λ sin θ sin λ 1 sin 2 θ sin 2 λ sin θ cos 2 θ sin 3 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 cos 2 θ sin 2 λ 1 sin 2 θ sin 2 λ
A 1 θ , λ θ = 2 π sin θ cos 2 θ sin 2 λ 1 + sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ cos 2 θ 1 sin 2 θ sin 2 λ sin θ sin λ 1 sin 2 θ sin 2 λ cos 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ cos 2 θ sin 2 λ 1 sin 2 θ sin 2 λ
A 1 θ , λ θ = 2 π sin θ 1 + sin 2 λ cos 2 θ + sin 2 θ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ cos 2 θ 1 sin 2 θ sin 2 λ sin θ sin λ 1 sin 2 λ sin 2 θ + cos 2 θ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ cos 2 θ sin 2 λ 1 sin 2 θ sin 2 λ
A 1 θ , λ θ = 2 π sin θ 1 + sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 cos 2 θ sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ sin θ sin λ 1 sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 λ sin 2 θ + cos 2 θ 1 sin 2 θ sin 2 λ
A 1 θ , λ θ = 2 π sin θ cos 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ sin 2 θ 1 sin 2 λ 1 sin 2 θ sin 2 λ sin θ sin λ cos 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 λ 1 sin 2 θ sin 2 λ
A 1 θ , λ θ = 2 π sin θ cos 2 λ 1 sin 2 θ sin 2 λ sin θ cos λ + sin θ sin λ cos 2 λ 1 sin 2 θ sin 2 λ cos λ
A 1 θ , λ θ = 2 π cos λ 1 sin 2 θ sin 2 λ sin θ sin λ cos λ 1 sin 2 θ sin 2 λ
A 1 θ , λ θ = 2 π cos λ 1 sin θ sin λ 1 sin 2 θ sin 2 λ
A 1 θ , λ θ = 2 π cos λ 1 sin θ sin λ 1 sin θ sin λ 1 + sin θ sin λ
A 1 θ , λ θ = 2 π cos λ 1 + sin θ sin λ
A 1 θ , λ λ = 2 π sin 2 θ cos θ sin λ cos λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 cos 2 θ 1 sin 2 θ sin 2 λ sin 2 θ cos θ sin 2 λ cos λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ cos θ cos λ 1 sin 2 θ sin 2 λ 1 cos 2 θ sin 2 λ 1 sin 2 θ sin 2 λ cos λ 1 s i n 2 λ
A 1 θ , λ λ = 2 π sin 2 θ cos θ sin λ cos λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ cos 2 θ 1 sin 2 θ sin 2 λ + sin 2 θ cos θ sin 2 λ cos λ + cos θ cos λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ cos 2 θ sin 2 λ 1 sin 2 θ sin 2 λ cos λ cos λ
A 1 θ , λ λ = 2 π sin 2 θ cos θ sin λ cos λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 cos 2 θ sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ + cos θ cos λ sin 2 θ sin 2 λ + 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 λ sin 2 θ + cos 2 θ 1 sin 2 θ sin 2 λ 1
A 1 θ , λ λ = 2 π sin 2 θ cos θ sin λ cos λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ sin 2 θ 1 sin 2 λ 1 sin 2 θ sin 2 λ + cos θ cos λ + 1 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ 1 sin 2 λ 1 sin 2 θ sin 2 λ 1
A 1 θ , λ λ = 2 π sin 2 θ cos θ sin λ cos λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ sin 2 θ cos 2 λ 1 sin 2 θ sin 2 λ + cos θ cos λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ cos 2 λ 1 sin 2 θ sin 2 λ 1
A 1 θ , λ λ = 2 π sin 2 θ cos θ sin λ cos λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ sin θ cos λ 1 sin 2 θ sin 2 λ + cos θ cos λ 1 sin 2 θ sin 2 λ 1 sin 2 θ sin 2 λ cos λ 1 sin 2 θ sin 2 λ 1
A 1 θ , λ λ = 2 π sin θ cos θ sin λ 1 sin 2 θ sin 2 λ + cos θ 1 sin 2 θ sin 2 λ 1
A 1 θ , λ λ = 2 π sin θ cos θ sin λ + cos θ 1 sin 2 θ sin 2 λ 1
A 1 θ , λ λ = 2 π cos θ 1 + sin θ sin λ 1
A 2 θ , λ = 2 π a r c c o s cos θ 1 sin 2 θ cos 2 λ + a r c c o s cos θ cos λ 1 sin 2 θ cos 2 λ + a r c c o s cos λ π
A 2 θ , λ θ = 2 π sin θ cos 2 θ cos 2 λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ sin θ 1 sin 2 θ cos 2 λ 1 cos 2 θ 1 sin 2 θ cos 2 λ sin θ cos λ 1 sin 2 θ cos 2 λ sin θ cos 2 θ cos 3 λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ 1 cos 2 θ cos 2 λ 1 sin 2 θ cos 2 λ  
A 2 θ , λ θ = 2 π sin θ cos 2 θ cos 2 λ + sin θ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ cos 2 θ 1 sin 2 θ cos 2 λ + sin θ cos λ 1 sin 2 θ cos 2 λ + sin θ cos 2 θ cos 3 λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ cos 2 θ cos 2 λ 1 sin 2 θ cos 2 λ
A 2 θ , λ θ = 2 π sin θ cos 2 θ cos 2 λ + 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ sin 2 θ + cos 2 θ sin 2 θ cos 2 λ cos 2 θ 1 sin 2 θ cos 2 λ + sin θ cos λ 1 + sin 2 θ cos 2 λ + cos 2 θ cos 2 λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ 1 cos 2 λ sin 2 θ + cos 2 θ 1 sin 2 θ cos 2 λ
A 2 θ , λ θ = 2 π sin θ cos 2 λ cos 2 θ + sin 2 θ + 1 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ sin 2 θ 1 cos 2 λ 1 sin 2 θ cos 2 λ + sin θ cos λ 1 + cos 2 λ cos 2 θ + sin 2 θ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ 1 cos 2 λ 1 sin 2 θ cos 2 λ
A 2 θ , λ θ = 2 π sin 2 λ sin θ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ sin 2 θ sin 2 λ 1 sin 2 θ cos 2 λ + sin θ cos λ sin 2 λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ sin 2 λ 1 sin 2 θ cos 2 λ
A 2 θ , λ θ = 2 π sin 2 λ sin θ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ sin θ sin λ 1 sin 2 θ cos 2 λ + sin θ cos λ sin 2 λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ sin λ 1 sin 2 θ cos 2 λ
A 2 θ , λ θ = 2 π sin λ 1 sin 2 θ cos 2 λ sin θ cos λ sin λ 1 sin 2 θ cos 2 λ
A 2 θ , λ θ = 2 π sin λ 1 sin θ cos λ 1 sin θ cos λ 1 + sin θ cos λ
A 2 θ , λ θ = 2 π sin λ 1 + sin θ cos λ
A 2 θ , λ λ = 2 π sin 2 θ cos θ sin λ cos λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ 1 cos 2 θ 1 sin 2 θ cos 2 λ sin 2 θ cos θ sin λ cos 2 λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ + cos θ sin λ 1 sin 2 θ cos 2 λ 1 cos 2 θ cos 2 λ 1 sin 2 θ cos 2 λ + s i n ( λ ) 1 c o s 2 ( λ )
A 2 θ , λ λ = 2 π sin 2 θ cos θ sin λ cos λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ cos 2 θ 1 sin 2 θ cos 2 λ sin 2 θ cos θ sin λ cos 2 λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ + cos θ sin λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ cos 2 θ cos 2 λ 1 sin 2 θ cos 2 λ + s i n ( λ ) s i n ( λ )
A 2 θ , λ λ = 2 π sin 2 θ cos θ sin λ cos λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ sin 2 θ + cos 2 θ sin 2 θ cos 2 λ cos 2 θ 1 sin 2 θ cos 2 λ sin 2 θ cos θ sin λ cos 2 λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ + cos θ sin λ 1 sin 2 θ cos 2 λ 1 cos 2 λ sin 2 θ + cos 2 θ 1 sin 2 θ cos 2 λ + 1
A 2 θ , λ λ = 2 π sin 2 θ cos θ sin λ cos λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ sin 2 θ 1 cos 2 λ 1 sin 2 θ cos 2 λ sin 2 θ cos θ sin λ cos 2 λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ + cos θ sin λ 1 sin 2 θ cos 2 λ 1 cos 2 λ 1 sin 2 θ cos 2 λ + 1
A 2 θ , λ λ = 2 π sin 2 θ cos θ sin λ cos λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ sin θ sin λ 1 sin 2 θ cos 2 λ + sin 2 θ cos θ sin λ cos 2 λ 1 sin 2 θ cos 2 λ 1 sin 2 θ cos 2 λ cos θ sin λ 1 sin 2 θ cos 2 λ sin λ 1 sin 2 θ cos 2 λ + 1
A 2 θ , λ λ = 2 π sin θ cos θ cos λ 1 sin 2 θ cos 2 λ sin 2 θ cos θ cos 2 λ 1 sin 2 θ cos 2 λ cos θ + 1
A 2 θ , λ λ = 2 π sin θ cos θ cos λ sin 2 θ cos θ cos 2 λ cos θ + sin 2 θ cos θ cos 2 λ 1 sin 2 θ cos 2 λ + 1
A 2 θ , λ λ = 2 π cos θ 1 sin θ cos λ 1 sin θ cos λ 1 + sin θ cos λ + 1
A 2 θ , λ λ = 2 π cos θ 1 + sin θ cos λ + 1
A 3 θ , λ = 1 A 1 θ , λ A 2 θ , λ
A 3 θ , λ θ = A 1 θ , λ θ A 2 θ , λ θ = 2 π cos λ 1 + sin θ sin λ 2 π sin λ 1 + sin θ cos λ
A 3 θ , λ θ = 2 π cos λ 1 + sin θ sin λ + sin λ 1 + sin θ cos λ
A 3 θ , λ λ = A 1 θ , λ λ A 2 θ , λ λ = 2 π cos θ 1 + sin θ sin λ 1 cos θ 1 + sin θ cos λ + 1
A 3 θ , λ λ = 2 π cos θ 1 + sin θ sin λ cos θ 1 + sin θ cos λ

References

  1. Schmeling, H.; Babeyko, A.; Enns, A.; Faccenna, C.; Funiciello, F.; Gerya, T.; Golabek, G.; Grigull, S.; Kaus, B.; Morra, G.; et al. A benchmark comparison of spontaneous subduction models—Towards a free surface. Phys. Earth Planet. Inter. 2008, 171, 198–223. [Google Scholar] [CrossRef]
  2. Moresi, L.; Quenette, S.; Lemiale, V.; Meériaux, C.; Appelbe, B.; Mühlhaus, H.-B. Computational approaches to studying non-linear dynamics of the crust and mantle. Phys. Earth Planet. Inter. 2007, 163, 69–82. [Google Scholar] [CrossRef]
  3. Moresi, L.; Dufour, F.; Mühlhaus, H.B. A Lagrangian integration point finite element method for large deformation modeling of viscoelastic geomaterials. J. Comput. Phys. 2003, 184, 476–497. [Google Scholar] [CrossRef]
  4. O’Neill, C.; Moresi, L.; Müller, D.; Albert, R.; Dufour, F. Ellipsis 3D: A particle-in-cell finite-element hybrid code for modelling mantle convection and lithospheric deformation. Comp. Geosci. 2006, 32, 1769–1779. [Google Scholar] [CrossRef]
  5. Braun, J.; Thieulot, C.; Fullsack, P.; DeKool, M.; Beaumont, C.; Huismans, R. DOUAR: A new three-dimensional creeping flow numerical model for the solution of geological problems. Phys. Earth Planet. Inter. 2008, 171, 76–91. [Google Scholar] [CrossRef]
  6. Popov, A.; Sobolev, S. SLIM3D: A tool for three-dimensional thermomechanical modelling of lithospheric deformation with elasto-visco-plastic rheology. Phys. Earth Planet. Inter. 2008, 171, 55–75. [Google Scholar] [CrossRef]
  7. Zhu, G.; Gerya, T.; Yuen, D.; Honda, S.; Yoshida, T.; Connolly, T. Three-dimensional dynamics of hydrous thermal-chemical plumes in oceanic subduction zones. Geochem. Geophy. Geosy. 2009, 118, 4682–4698. [Google Scholar] [CrossRef]
  8. Thieulot, C. FANTOM: Two- and three-dimensional numerical modelling of creeping flows for the solution of geological problems. Phys. Earth Planet. Inter. 2011, 188, 47–68. [Google Scholar] [CrossRef]
  9. Pusok, A.E.; Kaus, B.J.P. Development of topography in 3-D continental-collision models. Geochem. Geophys. Geosystems 2015, 16, 1378–1400. [Google Scholar] [CrossRef]
  10. Zhong, S.; Zuber, M.T.; Moresi, L.; Gurnis, M. Role of temperature-dependent viscosity and surface plates in spherical shell models of mantle convection. J. Geophys. Res. Solid Earth 2000, 105, 11063–11082. [Google Scholar] [CrossRef]
  11. Moresi, L.; Zhong, S.; Han, L.; Conrad, C.; Tan, E.; Gurnis, M.; Choi, E.; Thoutireddy, P.; Manea, V.; McNamara, A.; et al. CitcomS v3.3.1. Available online: https://zenodo.org/records/7271920 (accessed on 19 May 2025).
  12. Thieulot, C. ELEFANT: A user-friendly multipurpose geodynamics code. Solid Earth Discuss. 2014, 6, 1949–2096. [Google Scholar] [CrossRef]
  13. Bangerth, W.; Dannberg, J.; Fraters, M.; Gassmoeller, R.; Glerum, A.; Heister, T.; Myhill, R.; Naliboff, J. ASPECT: Advanced Solver for Problems in Earth’s ConvecTion, User Manual. Available online: https://figshare.com/articles/journal_contribution/ASPECT_Advanced_Solver_for_Problems_in_Earth_s_ConvecTion_User_Manual/4865333?file=51103820 (accessed on 19 May 2025).
  14. Zienkiewich, O.C.; Taylor, R.L. The Finite Element Method, Volume 1: The Basis; Butterworth-Heinemann: Oxford, UK, 2000. [Google Scholar]
  15. Cook, R.D.; David, S.M.; Michael, E.P. Concepts and Applications of Finite Element Analysis; Wiley: New York, NY, USA, 1989. [Google Scholar]
  16. Wessel, P.; Smith, W.H.F.; Scharroo, R.; Luis, J.F.; Wobbe, F. Generic Mapping Tools: Improved version released. Eos. Trans. AGU 2013, 94, 409–410. [Google Scholar] [CrossRef]
Figure 1. Generic spherical prismatic element. The inner and the outer spheres of radius r1 and r2, where the base and the top of the spherical prismatic element are located, are indicated in red and green colors, respectively.
Figure 1. Generic spherical prismatic element. The inner and the outer spheres of radius r1 and r2, where the base and the top of the spherical prismatic element are located, are indicated in red and green colors, respectively.
Mca 30 00088 g001
Figure 2. 1D element along the radial direction. r 1 and r 2 are the radii of the inner (red color) and outer (green color) spheres.
Figure 2. 1D element along the radial direction. r 1 and r 2 are the radii of the inner (red color) and outer (green color) spheres.
Mca 30 00088 g002
Figure 3. Scheme illustrating the variation of the orientation of unit vector normal to the sphere surface moving from point P to point Pk.
Figure 3. Scheme illustrating the variation of the orientation of unit vector normal to the sphere surface moving from point P to point Pk.
Mca 30 00088 g003
Figure 4. (a) Scheme of a generic six-node triangular prism. (b) Spherical triangle (gold color) whose area is defined in Equations (17) and (18). (c) Spherical triangle (gold color) whose area is defined in Equations (19) and (20). (d) Spherical triangle (gold color) whose area is defined in Equations (21) and (22).
Figure 4. (a) Scheme of a generic six-node triangular prism. (b) Spherical triangle (gold color) whose area is defined in Equations (17) and (18). (c) Spherical triangle (gold color) whose area is defined in Equations (19) and (20). (d) Spherical triangle (gold color) whose area is defined in Equations (21) and (22).
Mca 30 00088 g004
Figure 5. (a) Scheme of a generic eight-node rectangular right prism. (b) Spherical right rectangle (blue color) whose area is defined in Equation (25). (c) Spherical right rectangle (blue color) whose area is defined in Equation (26). (d) Spherical right rectangle (blue color) whose area is defined in Equation (27). (e) Spherical right rectangle (blue color) whose area is defined in Equation (28).
Figure 5. (a) Scheme of a generic eight-node rectangular right prism. (b) Spherical right rectangle (blue color) whose area is defined in Equation (25). (c) Spherical right rectangle (blue color) whose area is defined in Equation (26). (d) Spherical right rectangle (blue color) whose area is defined in Equation (27). (e) Spherical right rectangle (blue color) whose area is defined in Equation (28).
Mca 30 00088 g005
Figure 6. Scheme of a spherical six-node tri-rectangular prism (a) and a spherical eight-node rectangular right prism (b).
Figure 6. Scheme of a spherical six-node tri-rectangular prism (a) and a spherical eight-node rectangular right prism (b).
Mca 30 00088 g006
Figure 7. (a) Values of functions F i θ , λ   for a spherical six-node tri-rectangular prism. (b) Values of functions F j θ , λ   for a spherical six-node tri-rectangular prism. (c) Values of functions F k θ , λ   for a spherical six-node tri-rectangular prism.
Figure 7. (a) Values of functions F i θ , λ   for a spherical six-node tri-rectangular prism. (b) Values of functions F j θ , λ   for a spherical six-node tri-rectangular prism. (c) Values of functions F k θ , λ   for a spherical six-node tri-rectangular prism.
Mca 30 00088 g007aMca 30 00088 g007b
Figure 8. Values of functions A θ , λ for a spherical six-node tri-rectangular prism.
Figure 8. Values of functions A θ , λ for a spherical six-node tri-rectangular prism.
Mca 30 00088 g008
Figure 9. (a) Values of functions F i θ , λ   for a spherical eight-node quadrangular right prism. (b) Values of functions F j θ , λ   for a spherical eight-node quadrangular right prism. (c) Values of functions F k θ , λ   for a spherical eight-node quadrangular right prism. (d) Values of functions F l θ , λ   for a spherical eight-node quadrangular right prism.
Figure 9. (a) Values of functions F i θ , λ   for a spherical eight-node quadrangular right prism. (b) Values of functions F j θ , λ   for a spherical eight-node quadrangular right prism. (c) Values of functions F k θ , λ   for a spherical eight-node quadrangular right prism. (d) Values of functions F l θ , λ   for a spherical eight-node quadrangular right prism.
Mca 30 00088 g009aMca 30 00088 g009bMca 30 00088 g009c
Figure 10. Values of functions A θ , λ for a spherical eight-node quadrangular right prism.
Figure 10. Values of functions A θ , λ for a spherical eight-node quadrangular right prism.
Mca 30 00088 g010
Figure 11. Values of R(r A θ , λ for a spherical six-node tri-rectangular prism.
Figure 11. Values of R(r A θ , λ for a spherical six-node tri-rectangular prism.
Mca 30 00088 g011
Figure 12. Values of R(r A θ , λ for a spherical eight-node quadrangular right prism.
Figure 12. Values of R(r A θ , λ for a spherical eight-node quadrangular right prism.
Mca 30 00088 g012
Figure 13. Values of volume differences (panels ai) and percentage volume differences (panels bidi) for a spherical eight-node quadrangular right prism, for different distances r from the center of the spherical Earth, radial dr and angular θ and λ , along the colatitude and the longitude of the prism. A sphere with a radius of 6371 km is considered. In total, 125 Gauss–Legendre quadrature points are used.
Figure 13. Values of volume differences (panels ai) and percentage volume differences (panels bidi) for a spherical eight-node quadrangular right prism, for different distances r from the center of the spherical Earth, radial dr and angular θ and λ , along the colatitude and the longitude of the prism. A sphere with a radius of 6371 km is considered. In total, 125 Gauss–Legendre quadrature points are used.
Mca 30 00088 g013
Figure 16. Values of volume differences (panels ai) and percentage volume differences (panels bidi) for a spherical six-node triangular prism, for different angular dimensions θ and λ , along the colatitude and the longitude of the prism, for 27 (panels a1d1) and 125 Gauss–Legendre points (panels a2d2). The distance of the prisms from the center of the sphere is r = 5776 km; their radial dimension is dr = 10 km. A sphere with a radius of 6371 km is considered.
Figure 16. Values of volume differences (panels ai) and percentage volume differences (panels bidi) for a spherical six-node triangular prism, for different angular dimensions θ and λ , along the colatitude and the longitude of the prism, for 27 (panels a1d1) and 125 Gauss–Legendre points (panels a2d2). The distance of the prisms from the center of the sphere is r = 5776 km; their radial dimension is dr = 10 km. A sphere with a radius of 6371 km is considered.
Mca 30 00088 g016
Figure 17. Variation of the error, in terms of maximum (solid symbols) and minimum (empty symbols) values of percentage difference between numerically and analytically computed volume, in function of the number of Gauss–Legendre quadrature points, for models using six-node triangular prisms (triangles) and eight-node quadrangular right prisms (squares). Different intervals of discretization have been used along the longitude (λ) and the colatitude (θ). The radial discretization is fixed at 10 km for all models except one, where it is 100 km (stars). Note that, for better clarity of the figure, for each order of quadrature, the symbols have been distributed within a horizontal band so as to avoid overlapping between them.
Figure 17. Variation of the error, in terms of maximum (solid symbols) and minimum (empty symbols) values of percentage difference between numerically and analytically computed volume, in function of the number of Gauss–Legendre quadrature points, for models using six-node triangular prisms (triangles) and eight-node quadrangular right prisms (squares). Different intervals of discretization have been used along the longitude (λ) and the colatitude (θ). The radial discretization is fixed at 10 km for all models except one, where it is 100 km (stars). Note that, for better clarity of the figure, for each order of quadrature, the symbols have been distributed within a horizontal band so as to avoid overlapping between them.
Mca 30 00088 g017
Figure 18. Comparison between numerical and analytical solutions for eight-node quadratic right prisms, in terms of difference in temperature (black squares and circles in the left vertical panel) and percentage difference (circular maps), at different levels from the base of the crust, from 30 km depth (r = 6341 km), to the surface of the Earth (r = 6371 km). Different intervals of discretization have been used along the longitude and the colatitude, 5° (black squares in the left vertical panels and first and second columns on circular maps) and 2.5° (black circles in the left vertical panels and third and fourth columns on circular maps). The radial discretization is fixed at 10 km. Eight Gauss–Legendre quadrature nodes have been used. The solid line in the left vertical panel indicates the analytical solution.
Figure 18. Comparison between numerical and analytical solutions for eight-node quadratic right prisms, in terms of difference in temperature (black squares and circles in the left vertical panel) and percentage difference (circular maps), at different levels from the base of the crust, from 30 km depth (r = 6341 km), to the surface of the Earth (r = 6371 km). Different intervals of discretization have been used along the longitude and the colatitude, 5° (black squares in the left vertical panels and first and second columns on circular maps) and 2.5° (black circles in the left vertical panels and third and fourth columns on circular maps). The radial discretization is fixed at 10 km. Eight Gauss–Legendre quadrature nodes have been used. The solid line in the left vertical panel indicates the analytical solution.
Mca 30 00088 g018
Figure 19. Comparison between numerical and analytical solutions for six-node triangular prisms, in terms of difference in temperature (black squares and circles in the left vertical panels) and percentage difference (circular maps), at different levels from the base of the crust, from a 30 km depth (r = 6341 km), to the surface of the Earth (r = 6371 km). Different intervals of discretization have been used along the longitude and the colatitude, 5° (black squares in the left vertical panels and first and second columns on circular maps) and 2.5° (black circles in the left vertical panel and third and fourth columns on circular maps). The radial discretization is fixed at 10 km. Eight Gauss–Legendre quadrature nodes have been used. The solid line in the left vertical panel indicates the analytical solution.
Figure 19. Comparison between numerical and analytical solutions for six-node triangular prisms, in terms of difference in temperature (black squares and circles in the left vertical panels) and percentage difference (circular maps), at different levels from the base of the crust, from a 30 km depth (r = 6341 km), to the surface of the Earth (r = 6371 km). Different intervals of discretization have been used along the longitude and the colatitude, 5° (black squares in the left vertical panels and first and second columns on circular maps) and 2.5° (black circles in the left vertical panel and third and fourth columns on circular maps). The radial discretization is fixed at 10 km. Eight Gauss–Legendre quadrature nodes have been used. The solid line in the left vertical panel indicates the analytical solution.
Mca 30 00088 g019
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Marotta, A.M.; Barzaghi, R.; Sabadini, R. Spherical Shape Functions for a Six-Node Tri-Rectangular Prism and an Eight-Node Quadrangular Right Prism. Math. Comput. Appl. 2025, 30, 88. https://doi.org/10.3390/mca30040088

AMA Style

Marotta AM, Barzaghi R, Sabadini R. Spherical Shape Functions for a Six-Node Tri-Rectangular Prism and an Eight-Node Quadrangular Right Prism. Mathematical and Computational Applications. 2025; 30(4):88. https://doi.org/10.3390/mca30040088

Chicago/Turabian Style

Marotta, Anna Maria, Riccardo Barzaghi, and Roberto Sabadini. 2025. "Spherical Shape Functions for a Six-Node Tri-Rectangular Prism and an Eight-Node Quadrangular Right Prism" Mathematical and Computational Applications 30, no. 4: 88. https://doi.org/10.3390/mca30040088

APA Style

Marotta, A. M., Barzaghi, R., & Sabadini, R. (2025). Spherical Shape Functions for a Six-Node Tri-Rectangular Prism and an Eight-Node Quadrangular Right Prism. Mathematical and Computational Applications, 30(4), 88. https://doi.org/10.3390/mca30040088

Article Metrics

Back to TopTop