Computational models of mantle convection must accurately represent curved boundaries and the associated boundary conditions of a 3-D spherical shell, bounded by Earth's surface and the core–mantle boundary. This is also true for comparable models in a simplified 2-D cylindrical geometry. It is of fundamental importance that the codes underlying these models are carefully verified prior to their application in a geodynamical context, for which comparisons against analytical solutions are an indispensable tool. However, analytical solutions for the Stokes equations in these geometries, based upon simple source terms that adhere to physically realistic boundary conditions, are often complex and difficult to derive. In this paper, we present the analytical solutions for a smooth polynomial source and a delta-function forcing, in combination with free-slip and zero-slip boundary conditions, for both 2-D cylindrical- and 3-D spherical-shell domains. We study the convergence of the Taylor–Hood (P2–P1) discretisation with respect to these solutions, within the finite element computational modelling framework Fluidity, and discuss an issue of suboptimal convergence in the presence of discontinuities. To facilitate the verification of numerical codes across the wider community, we provide a Python package, Assess, that evaluates the analytical solutions at arbitrary points of the domain.

Mantle convection transports Earth's internal heat to its surface: it is the “engine”
driving our dynamic Earth

Computational modelling is one of the primary tools available for tackling this
challenge. Whilst 2- and 3-D numerical models of mantle convection processes in
Cartesian domains have
provided important insights into a range of mantle processes (e.g.

Recent decades have seen extensive validation, verification, and benchmarking of
Cartesian mantle dynamics codes, in both 2- and 3-D. Verification is typically
achieved via comparisons of numerical predictions against analytical solutions
(e.g.

A popular method to obtain analytical solutions is the method of manufactured
solutions

For the Stokes equations, a well-known set of solutions in the latter category
is based on a forcing term in the form of a delta function, corresponding to an
infinitely thin density anomaly at a certain depth. The solutions to these are
also used in the propagator matrix method, where a convolution of delta-function
solutions at different depths is used to obtain the response to arbitrary
density anomalies

For this reason, we also present solutions based on a smooth forcing term, with radial dependence formed by a polynomial of arbitrary order, again for free- and zero-slip cases. This set of solutions provides a flexible way to test mantle dynamics codes with physically relevant solutions, where, for instance, a high-order polynomial forcing can be used to obtain solutions with a strong gradient near the surface. The radial dependence can be combined with spherical harmonics of arbitrary degree and order.

A key step in the derivation of these benchmarks is a decomposition of the
solution into poloidal and toroidal components in the Mie
representation

Finally, in addition to the delta-function and smooth cases with either
free-slip or zero-slip boundary conditions in a spherical-shell domain, we
present the solutions for the corresponding four cases in a 2-D cylindrical-shell domain (annulus). Although, ultimately, mantle convection is a 3-D
phenomenon, a number of processes can be modelled adequately in two dimensions,
and accordingly access to benchmark cases for 2-D numerical models is equally
important. The number of published analytical Stokes
solutions in 2-D cylindrical-shell domains, which are suitable as geodynamical
benchmarks and include a complete derivation, is limited. By presenting this
extensive set of explicit analytical solutions, we provide a suite of
verification cases for use by the wider community of mantle dynamics code
developers. An implementation of the solutions is provided through the Python
package Assess (Analytical Solutions for the Stokes Equations in Spherical Shells;

The remainder of this paper is structured as follows. In Sect.

The following derivation is applicable to the incompressible Stokes equations:

In 2-D, any incompressible velocity field

The curl of the momentum equation is obtained by summation of the operators

An equation for pressure can be derived
by taking the divergence of the momentum equation:

After substitution of

In the first test case, we consider a density perturbation of the following form:

An inhomogeneous solution for pressure of Eq. (

The four remaining coefficients (

The solution coefficients for free-slip, no normal flow at both boundaries are given by

The zero-slip solution coefficients are given by

Another set of useful solutions is found considering the following perturbation density,

Zero-slip conditions at both boundaries lead to

Density perturbation (

In this section, we derive the equivalent of the four cylindrical cases in a 3-D
spherical domain,

Taking the curl of the momentum equation,

Solutions to the biharmonic equation

As in 2-D, an equation for the pressure is obtained by taking the divergence of
the momentum equation, giving

Illustrations of the density perturbation (

We consider a density perturbation of the following form:

As before, the four coefficients (

For free-slip conditions at both

As in two dimensions, we find solutions for the case where

The free-slip solution coefficients are given by

The zero-slip solution coefficients are given by

The test cases in the previous section have been examined using Fluidity, a
finite element, control-volume computational modelling framework

The numerical solutions for velocity and pressure,

The Stokes equations are written
in the weak form, using the same

Note that we apply strong Dirichlet boundary conditions, so that the boundary
integrals can indeed be neglected.
In the free-slip case, a local rotation is applied to the velocity vectors, so that the degrees of freedom
correspond to velocity components in either the normal or tangential directions.
This allows us to enforce a zero-normal component, while leaving the tangential
components free. For additional details about Fluidity and its implementation, see

Convergence for 2-D cylindrical cases with free-slip and zero-slip boundary conditions at a series of different wavenumbers,

For an accurate representation of the quadratic approximation of velocity, we
need to also approximate the curved cylindrical/spherical domain quadratically. This means that rather
than each cell in the mesh being described by a linear map

Convergence of velocity and pressure for 3-D spherical cases with
free-slip and zero-slip boundary conditions, at a range of degrees

Convergence of velocity

The density perturbation

Equations (

In all cases, the pressure solution is only defined up to an arbitrary constant.
The analytical pressure solution has the property that its mean is zero. For
comparative purposes, we therefore subtract the volume-averaged pressure from the obtained numerical
pressure solution:

Similarly, for free-slip cases, in 2-D, we may add an arbitrary rotation of the
form

It should be noted that the same velocity and pressure modes lead to zero modes
(eigenvectors)
for the linear system based on Eqs. (

In this section, we show the convergence of the numerical solutions obtained with
Fluidity, using the P2–P1 element pair, towards the analytical solutions.
For 2-D cylindrical cases, the series of meshes start at refinement
level 1, where the mesh consists of
128 divisions in the horizontal, and 16 layers, giving

In all figures, errors are given as relative errors,
comparing the numerical solution,

Convergence plots for the 2-D cylindrical cases are presented in Fig.

We see similar results for the spherical results illustrated in Fig.

To examine the importance of an isoparametric approximation of the domain by a
quadratic mesh, we ran the same cases with a linear mesh. The results are shown
in Fig.

As indicated in the introduction, spherical delta-function cases, like those presented herein, have previously been
used to validate global mantle convection codes (e.g.

The derivation for all 3-D cases in this paper relies on the Mie representation that
decomposes the velocity solution into poloidal and toroidal components, through which, under the
assumption of purely poloidal flow, the Stokes equations can be reduced to a
biharmonic equation (

In

The number of published benchmarks for 2-D cylindrical-shell domains is more limited
(e.g.

In

At first sight, the reduced order of convergence for the delta-function cases
seems at odds with those expected for the P2–P1 element pair. However, the
mathematical proofs for the ideal order of convergence to solutions of the Stokes
equations rely on certain regularity assumptions of the right-hand side
forcing term and, related to that, on the regularity of the velocity and
pressure solutions. The regularity of the delta function can be classified as
being a member of the Sobolev space

For velocity–pressure finite element pairs
that satisfy the standard inf-sup, or Ladyzhenskaya–Babuška–Brezzi (LBB) condition

In other words, the convergence of

Convergence of velocity

A solution to this problem is found by allowing for discontinuities in the
discrete pressure space. We demonstrate this here by considering

Convergence of velocity and radial stresses at top

Finally, we compare our results with those presented in

The results of

We have presented a series of 2-D cylindrical and 3-D spherical analytical
solutions for the purpose of verifying mantle dynamics codes. These solutions
are based upon either a delta-function density perturbation or a smooth forcing
term, and we provide solutions for both free-slip and zero-slip boundary
conditions. The combinations of dimension, forcing, and boundary conditions
provide a series of eight analytical solutions that can be used as a basis for
validating existing and future numerical codes, in cylindrical and spherical
geometries. To facilitate this, we provide solutions in the form of a Python
package (Assess: Analytical Solutions for the Stokes Equations in Spherical Shells;

We verify the convergence of the P2–P1 (Taylor–Hood) finite element discretisation using
Fluidity

In this appendix, we work out the incompressible Stokes equations in polar
coordinates in terms of a streamfunction

The Python package Assess, which implements the analytical
solutions and evaluates them at arbitrary locations in the domain, is
available from

SCK derived the analytical solutions presented herein and updated Fluidity to run these cases. DRD ran the cases and prepared the corresponding figures. SCK wrote the manuscript with input from DRD and CRW. CRW implemented, set up, and ran the P2

The authors declare that they have no conflict of interest.

D. Rhodri Davies and Stephan C. Kramer acknowledge support from the Australian Research Council, under grant nos. FT140101262 and DP170100058. Stephan C. Kramer also acknowledges support from the UK Engineering and Physical Sciences Research Council (EPSRC) under grant no. EP/R029423/1. Numerical simulations were undertaken on the NCI National Facility in Canberra, Australia, which is supported by the Australian Commonwealth Government. We would also to thank Marcus Mohr for his very thorough review of the paper and thank him and a second anonymous reviewer for their constructive feedback.

This research has been supported by the Australian Research Council (grant nos. DP170100058 and FT140101262) and the UK Engineering and Physical Sciences Research Council (EPSRC) (grant no. EP/R029423/1).

This paper was edited by Thomas Poulet and reviewed by Marcus Mohr and one anonymous referee.