https://doi.org/10.5194/gmd-14-1899-2021
https://doi.org/10.5194/gmd-14-1899-2021
Methods for assessment of models |  | 09 Apr 2021

# Analytical solutions for mantle flow in cylindrical and spherical shells

Stephan C. Kramer, D. Rhodri Davies, and Cian R. Wilson
Abstract

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.

1 Introduction

Mantle convection transports Earth's internal heat to its surface: it is the “engine” driving our dynamic Earth (e.g. Davies1999). The structure, composition, and flow regime within the mantle are reflected in near-surface phenomena such as plate tectonics, mountain building, dynamic topography, sea-level change, volcanism, and the activity of Earth's magnetic field (e.g. ). The grand challenge is to understand the operation of this giant heat engine over geologic time and its relationship to the surface geological record.

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. ), 3-D spherical geometry is required to simulate global mantle dynamics. Global 3-D spherical mantle convection models, and studies focussing on their application, are now in common use (e.g. ). However, the use of this geometry for calculations at a realistic convective vigour remains expensive. As a consequence, simplifying geometries are often used, including the axisymmetric spherical shell (e.g. ), the 2-D cylinder (e.g. ), and the spherical annulus (e.g. Hernlund and Tackley2008). Such 2-D models can also provide a rapid and broad parameter space appraisal, allowing one to focus on a targeted and more sparse study in a full 3-D spherical geometry.

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. ), with benchmarking typically undertaken against solutions from other comparable codes, for incompressible and compressible convection. See also for an overview of geodynamical benchmarks. The number of comparable studies, within a 2-D cylindrical or 3-D spherical geometry, however, is more limited. Given a recent surge in the state-of-the-art tools available for simulating mantle dynamics in these geometries (e.g. ), it is important that these tools are verified and validated against a range of analytical and benchmark solutions.

A popular method to obtain analytical solutions is the method of manufactured solutions (MMS; Roache2002). With this approach, an arbitrary analytical solution is chosen beforehand and the necessary forcing terms on the right-hand side are derived by substitution of the solution into the left-hand side of the flow equations. A drawback of this approach is that it can be hard to choose solutions (i) that satisfy physically realistic boundary conditions, in particular, in less trivial domains; and (ii) with a velocity that is divergence free, in order to avoid unnatural source terms. Alternatively, one can choose a simple analytical expression for the forcing but the derivation of the corresponding analytical solutions is often laborious.

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 (e.g. Hager and Richards1989). Solutions for the Cartesian case have been published (e.g. ). Spherical solutions can be found in, for example, Ribe (2009). They have previously been used for validation by, for example, , , , and . The derivation of these solutions is non-trivial, and often only cases with simpler free-slip boundary conditions are explicitly presented. Here, we derive solutions for both free- and zero-slip boundary conditions. In our convergence analyses, where we compare the analytical solutions with numerical solutions obtained using the Fluidity computational modelling framework , we discuss a limitation of this set of solutions for the benchmarking of geodynamic codes.

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 (Backus1986). This results in a biharmonic equation for the poloidal scalar function. Combined with a set of conditions for the radial dependence of this poloidal function, analytical Stokes solutions can be obtained that satisfy desired free-slip or zero-slip conditions. Similar techniques have been used in and . In Sect. 5.1, we will discuss previously published analytical benchmark cases in shell domains and how they differ from those presented here (e.g. ).

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. 2, we derive the analytical solutions in cylindrical (Sect. 2.2) and spherical (Sect. 2.3) geometries. Smooth solutions are first provided, for free-slip and zero-slip cases, followed by the delta-function solutions. In Sect. 3, we briefly describe the Fluidity computational modelling framework, which is used in Sect. 4 to obtain convergence results of the P2–P1 finite element discretisation to the analytical solutions. In Sect. 5, we discuss these results and relate the analytical solutions presented here to those that have previously been published. In particular, we discuss an issue with the delta-function cases for discretisations that use continuous pressure. To demonstrate, we also show results with a P2bubble–P1DG discretisation that overcomes this issue.

2 Analytical Solutions

## 2.1 Equations

The following derivation is applicable to the incompressible Stokes equations:

$\begin{array}{}\text{(1)}& & -\mathrm{\nabla }\cdot \mathbit{\tau }+\mathrm{\nabla }p=-g{\mathit{\rho }}^{\prime }\stackrel{\mathrm{^}}{\mathbit{r}},\text{(2)}& & \mathbit{\tau }=\mathit{\nu }\left[\mathrm{\nabla }\mathbit{u}+\mathrm{\nabla }{\mathbit{u}}^{T}\right],\text{(3)}& & \mathrm{\nabla }\cdot \mathbit{u}=\mathrm{0},\end{array}$

where the unknowns are velocity u and pressure p, with an assumed constant kinematic viscosity ν. The buoyancy force on the right-hand side (RHS) of Eq. (1) is based on a gravity of constant magnitude g, directed in the inward radial direction $-\stackrel{\mathrm{^}}{\mathbit{r}}$, and a dimensionless density deviation ρ: $\mathit{\rho }={\mathit{\rho }}_{\mathrm{0}}\left(\mathrm{1}+{\mathit{\rho }}^{\prime }\right)$, where ρ is the density and the reference density ρ0 is constant. The equations are solved in a 2-D cylindrical or 3-D spherical domain, bounded by ${R}_{-}\le r\le {R}_{+}$, where r is the radial distance to the origin.

## 2.2 Cylindrical

In 2-D, any incompressible velocity field u can be written as the skew gradient of a streamfunction ψ:

$\begin{array}{}\text{(4)}& {u}_{r}=-\frac{\mathrm{1}}{r}\frac{\partial \mathit{\psi }}{\partial \mathit{\phi }},\phantom{\rule{1em}{0ex}}{u}_{\mathit{\phi }}=\frac{\partial \mathit{\psi }}{\partial r},\end{array}$

where φ is the angle from the x axis in polar coordinates, $x=r\mathrm{cos}\left(\mathit{\phi }\right),y=r\mathrm{sin}\left(\mathit{\phi }\right)$, and ur and uφ are the radial and transverse components of velocity, respectively. The normal deviatoric stress and shear stress components are given by

$\begin{array}{}\text{(5)}& {\mathit{\tau }}_{rr}=\mathrm{2}\mathit{\nu }\stackrel{\mathrm{^}}{\mathbit{r}}\cdot \left[\mathrm{\nabla }\mathbit{u}\right]\cdot \stackrel{\mathrm{^}}{\mathbit{r}}=-\mathrm{2}\mathit{\nu }\frac{\partial }{\partial r}\left(\frac{\mathrm{1}}{r}\frac{\partial \mathit{\psi }}{\partial \mathit{\phi }}\right),\text{(6)}& \begin{array}{rl}{\mathit{\tau }}_{r\mathit{\phi }}& =\mathit{\nu }\stackrel{\mathrm{^}}{\mathbit{r}}\cdot \left[\mathrm{\nabla }\mathbit{u}\right]\cdot \stackrel{\mathrm{^}}{\mathbit{\phi }}+\mathit{\nu }\stackrel{\mathrm{^}}{\mathbit{\phi }}\cdot \left[\mathrm{\nabla }\mathbit{u}\right]\cdot \stackrel{\mathrm{^}}{\mathbit{r}}\\ & =\mathit{\nu }\left(\frac{{\partial }^{\mathrm{2}}\mathit{\psi }}{\partial {r}^{\mathrm{2}}}-\frac{\mathrm{1}}{r}\frac{\partial \mathit{\psi }}{\partial r}-\frac{\mathrm{1}}{{r}^{\mathrm{2}}}\frac{{\partial }^{\mathrm{2}}\mathit{\psi }}{\partial {\mathit{\phi }}^{\mathrm{2}}}\right).\end{array}\end{array}$

The momentum equation (Eq. 1) can be decomposed into radial and transverse components:

$\begin{array}{}\text{(7)}& \frac{\mathit{\nu }}{r}\frac{\partial }{\partial \mathit{\phi }}{\mathrm{\nabla }}^{\mathrm{2}}\mathit{\psi }+\frac{\partial p}{\partial r}& =-g{\mathit{\rho }}^{\prime },\text{(8)}& -\mathit{\nu }\frac{\partial }{\partial r}{\mathrm{\nabla }}^{\mathrm{2}}\mathit{\psi }+\frac{\mathrm{1}}{r}\frac{\partial p}{\partial \mathit{\phi }}& =\mathrm{0},\end{array}$

where the Laplacian, in polar coordinates, is given by

$\begin{array}{}\text{(9)}& {\mathrm{\nabla }}^{\mathrm{2}}\mathit{\psi }=\frac{\mathrm{1}}{r}\frac{\partial }{\partial r}\left(r\frac{\partial \mathit{\psi }}{\partial r}\right)+\frac{\mathrm{1}}{{r}^{\mathrm{2}}}\frac{{\partial }^{\mathrm{2}}\mathit{\psi }}{\partial {\mathit{\phi }}^{\mathrm{2}}}.\end{array}$

For a derivation of Eqs. (5)–(8), see Appendix A.

The curl of the momentum equation is obtained by summation of the operators $-\frac{\mathrm{1}}{r}\frac{\partial \cdot }{\partial \mathit{\phi }}$ and $\frac{\mathrm{1}}{r}\frac{\partial }{\partial r}\left(r\cdot \right)$ applied to the radial (Eq. 7) and transverse (Eq. 8) components, respectively, which leads to

$\begin{array}{}\text{(10)}& -{\mathrm{\nabla }}^{\mathrm{4}}\mathit{\psi }=\frac{g}{\mathit{\nu }}\frac{\mathrm{1}}{r}\frac{\partial {\mathit{\rho }}^{\prime }}{\partial \mathit{\phi }}.\end{array}$

The general, real-valued solution to the biharmonic equation 4ψ=0 is given by

$\begin{array}{}\text{(11)}& \begin{array}{rl}\mathit{\psi }\left(r,\mathit{\phi }\right)=\sum _{n>\mathrm{1}}& \left({A}_{n}{r}^{n}+{B}_{n}{r}^{-n}+{C}_{n}{r}^{n+\mathrm{2}}+{D}_{n}{r}^{-n+\mathrm{2}}\right)\\ & \phantom{\rule{1em}{0ex}}\left({e}_{n}\mathrm{sin}\left(n\mathit{\phi }\right)+{f}_{n}\mathrm{cos}\left(n\mathit{\phi }\right)\right)\\ +& \left({A}_{\mathrm{1}}r+{B}_{\mathrm{1}}{r}^{-\mathrm{1}}+{C}_{\mathrm{1}}{r}^{\mathrm{3}}+{D}_{\mathrm{1}}r\mathrm{ln}r\right)\\ & \phantom{\rule{1em}{0ex}}\left({e}_{\mathrm{1}}\mathrm{sin}\left(\mathit{\phi }\right)+{f}_{\mathrm{1}}\mathrm{cos}\left(\mathit{\phi }\right)\right)\\ +& {A}_{\mathrm{0}}+{B}_{\mathrm{0}}\mathrm{ln}r+{C}_{\mathrm{0}}{r}^{\mathrm{2}}+{D}_{\mathrm{0}}{r}^{\mathrm{2}}\mathrm{ln}r,\end{array}\end{array}$

where An, Bn, Cn, Dn, en, and fn are constant coefficients, n≥0. The An and Bn terms are the standard solutions to the homogeneous harmonic equation, and the Cn and Dn terms are obtained as inhomogeneous solutions of the harmonic equation with the homogeneous harmonic solutions (An and Bn terms) as the right-hand side. The fact that these (the Cn and Dn terms) are homogeneous biharmonic solutions then follows from 4=∇22. In the following, we will, for simplicity, focus on sin (nφ) solutions for a single n>1 and set ${e}_{n}=\mathrm{1},{f}_{n}=\mathrm{0}$.

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

$\begin{array}{}\text{(12)}& {\mathrm{\nabla }}^{\mathrm{2}}p=-\frac{g}{r}\frac{\partial \left(r{\mathit{\rho }}^{\prime }\right)}{\partial r}.\end{array}$

From Eq. (7), it can be seen that sin (nφ) solutions for ψ are associated with cos (nφ) solutions of p and ρ. The homogeneous solutions, i.e. ${\mathit{\rho }}^{\prime }=\mathrm{0}$, are thus the standard harmonic solutions (again neglecting the $n=\mathrm{0},\mathrm{1}$ solutions)

$\begin{array}{}\text{(13)}& p\left(r,\mathit{\phi }\right)=\sum _{n>\mathrm{1}}\left({G}_{n}{r}^{n}+{H}_{n}{r}^{-n}\right)\mathrm{cos}\left(n\mathit{\phi }\right),\end{array}$

where Gn and Hn are constant coefficients, n>1.

After substitution of p and ψ in Eqs. (7)–(8), the following relations

$\begin{array}{}\text{(14)}& {G}_{n}=-\mathrm{4}\mathit{\nu }{C}_{n}\left(n+\mathrm{1}\right),\phantom{\rule{1em}{0ex}}{H}_{n}=-\mathrm{4}\mathit{\nu }{D}_{n}\left(n-\mathrm{1}\right),\end{array}$

between the coefficients of the homogeneous solutions for ψ and p can be derived.

### 2.2.1 Smooth density profile – cylindrical

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

$\begin{array}{}\text{(15)}& {\mathit{\rho }}^{\prime }=\frac{{r}^{k}}{{R}_{+}^{k}}\mathrm{cos}\left(n\mathit{\phi }\right),\end{array}$

with k>0. It is easily verified that an inhomogeneous solution to Eq. (10) exists of the form

$\begin{array}{}\text{(16)}& \begin{array}{rl}& \mathit{\psi }=E{r}^{k+\mathrm{3}}\mathrm{sin}\left(n\mathit{\phi }\right),\\ & \phantom{\rule{1em}{0ex}}E=\frac{g{R}_{+}^{-k}n}{\mathit{\nu }\left(\left(k+\mathrm{3}{\right)}^{\mathrm{2}}-{n}^{\mathrm{2}}\right)\left(\left(k+\mathrm{1}{\right)}^{\mathrm{2}}-{n}^{\mathrm{2}}\right)},\end{array}\end{array}$

assuming $k\ne n-\mathrm{3}$ and $k\ne n-\mathrm{1}$, so that a general solution can be written as

Note that for the remainder of this derivation we drop the subscript n in the coefficients for $A,B,C$, and D.

An inhomogeneous solution for pressure of Eq. (12) is given by

$\begin{array}{}\text{(18)}& p\left(r,\mathit{\phi }\right)=F{r}^{k+\mathrm{1}}\mathrm{cos}\left(n\mathit{\phi }\right),\phantom{\rule{1em}{0ex}}F=-\frac{g{R}_{+}^{-k}\left(k+\mathrm{1}\right)}{\left(k+\mathrm{1}{\right)}^{\mathrm{2}}-{n}^{\mathrm{2}}}.\end{array}$

The general solution for pressure is thus

$\begin{array}{}\text{(19)}& p\left(r,\mathit{\phi }\right)=\left(G{r}^{n}+H{r}^{-n}+F{r}^{k+\mathrm{1}}\right)\mathrm{cos}\left(n\mathit{\phi }\right),\end{array}$

with G and H given by Eq. (14).

The four remaining coefficients ($A,B,C,$ and D) are fixed by a choice of boundary conditions at the inner and outer surfaces of the cylindrical domain at $r={R}_{+}$ and $r={R}_{-}$, respectively. At both, no-normal-flow conditions are imposed via $\frac{\partial \mathit{\psi }}{\partial \mathit{\phi }}=\mathrm{0}$. Two further equations are found by imposing either τrφ=0 (free slip) or $\frac{\partial \mathit{\psi }}{\partial }r=\mathrm{0}$ (zero slip) at both boundaries.

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

$\begin{array}{ll}A& =\frac{g{R}_{+}^{-n+\mathrm{3}}}{\mathit{\nu }}\frac{{\mathit{\alpha }}^{k+n+\mathrm{3}}-{\mathit{\alpha }}^{\mathrm{2}}}{\mathrm{4}\left(\mathit{\alpha }+{\mathit{\alpha }}^{n}\right)\left({\mathit{\alpha }}^{n}-\mathit{\alpha }\right)\left(k+n+\mathrm{1}\right)\left(k-n+\mathrm{3}\right)}\\ B& =\frac{g{R}_{+}^{n+\mathrm{3}}}{\mathit{\nu }}\frac{{\mathit{\alpha }}^{k+n+\mathrm{3}}-{\mathit{\alpha }}^{\mathrm{2}n+\mathrm{2}}}{\mathrm{4}\left({\mathit{\alpha }}^{n+\mathrm{1}}+\mathrm{1}\right)\left({\mathit{\alpha }}^{n+\mathrm{1}}-\mathrm{1}\right)\left(k+n+\mathrm{3}\right)\left(k-n+\mathrm{1}\right)}\\ C& =\frac{g{R}_{+}^{-n+\mathrm{1}}}{\mathit{\nu }}\frac{-{\mathit{\alpha }}^{k+n+\mathrm{3}}+\mathrm{1}}{\mathrm{4}\left({\mathit{\alpha }}^{n+\mathrm{1}}+\mathrm{1}\right)\left({\mathit{\alpha }}^{n+\mathrm{1}}-\mathrm{1}\right)\left(k+n+\mathrm{3}\right)\left(k-n+\mathrm{1}\right)}\\ D& =\frac{g{R}_{+}^{n+\mathrm{1}}}{\mathit{\nu }}\frac{-{\mathit{\alpha }}^{k+n+\mathrm{3}}+{\mathit{\alpha }}^{\mathrm{2}n}}{\mathrm{4}\left(\mathit{\alpha }+{\mathit{\alpha }}^{n}\right)\left({\mathit{\alpha }}^{n}-\mathit{\alpha }\right)\left(k+n+\mathrm{1}\right)\left(k-n+\mathrm{3}\right)},\end{array}$

where we use $\mathit{\alpha }={R}_{-}/{R}_{+}$.

The zero-slip solution coefficients are given by

$\begin{array}{ll}A& =\frac{g{R}_{+}^{-n+\mathrm{3}}n}{\mathit{\nu }}\left[\left({\mathit{\alpha }}^{k+n+\mathrm{3}}+{\mathit{\alpha }}^{\mathrm{2}n}\right)\left(k+n+\mathrm{1}\right)\left(n+\mathrm{1}\right)\\ & \phantom{\rule{1em}{0ex}}-\left({\mathit{\alpha }}^{k+n+\mathrm{1}}+{\mathit{\alpha }}^{\mathrm{2}n+\mathrm{2}}\right)\left(k+n+\mathrm{3}\right)n-\left({\mathit{\alpha }}^{k+\mathrm{3}n+\mathrm{3}}+\mathrm{1}\right)\\ & \phantom{\rule{1em}{0ex}}\left(k-n+\mathrm{1}\right)\right]/\left[\mathrm{2}\left({\left({\mathit{\alpha }}^{n+\mathrm{1}}-{\mathit{\alpha }}^{n-\mathrm{1}}\right)}^{\mathrm{2}}{n}^{\mathrm{2}}-{\left({\mathit{\alpha }}^{\mathrm{2}n}-\mathrm{1}\right)}^{\mathrm{2}}\right)\\ & \phantom{\rule{1em}{0ex}}\left({\left(k+\mathrm{3}\right)}^{\mathrm{2}}-{n}^{\mathrm{2}}\right)\left({\left(k+\mathrm{1}\right)}^{\mathrm{2}}-{n}^{\mathrm{2}}\right)\right]\\ B& =\frac{g{R}_{+}^{n+\mathrm{3}}n}{\mathit{\nu }}\left[-\left({\mathit{\alpha }}^{k+\mathrm{3}n+\mathrm{3}}+{\mathit{\alpha }}^{\mathrm{2}n}\right)\left(k-n+\mathrm{1}\right)\left(n-\mathrm{1}\right)\\ & \phantom{\rule{1em}{0ex}}+\left({\mathit{\alpha }}^{k+\mathrm{3}n+\mathrm{1}}+{\mathit{\alpha }}^{\mathrm{2}n+\mathrm{2}}\right)\left(k-n+\mathrm{3}\right)n-\left({\mathit{\alpha }}^{k+n+\mathrm{3}}+{\mathit{\alpha }}^{\mathrm{4}n}\right)\\ & \phantom{\rule{1em}{0ex}}\left(k+n+\mathrm{1}\right)\right]/\left[\mathrm{2}\left({\left({\mathit{\alpha }}^{n+\mathrm{1}}-{\mathit{\alpha }}^{n-\mathrm{1}}\right)}^{\mathrm{2}}{n}^{\mathrm{2}}-{\left({\mathit{\alpha }}^{\mathrm{2}n}-\mathrm{1}\right)}^{\mathrm{2}}\right)\\ & \phantom{\rule{1em}{0ex}}\left({\left(k+\mathrm{3}\right)}^{\mathrm{2}}-{n}^{\mathrm{2}}\right)\left({\left(k+\mathrm{1}\right)}^{\mathrm{2}}-{n}^{\mathrm{2}}\right)\right]\\ C& =\frac{g{R}_{+}^{-n+\mathrm{1}}n}{\mathit{\nu }}\left[\left({\mathit{\alpha }}^{k+n+\mathrm{1}}+{\mathit{\alpha }}^{\mathrm{2}n}\right)\left(k+n+\mathrm{3}\right)\left(n-\mathrm{1}\right)\\ & \phantom{\rule{1em}{0ex}}-\left({\mathit{\alpha }}^{k+n+\mathrm{3}}+{\mathit{\alpha }}^{\mathrm{2}n-\mathrm{2}}\right)\left(k+n+\mathrm{1}\right)n+\left({\mathit{\alpha }}^{k+\mathrm{3}n+\mathrm{1}}+\mathrm{1}\right)\\ & \phantom{\rule{1em}{0ex}}\left(k-n+\mathrm{3}\right)\right]/\left[\mathrm{2}\left({\left({\mathit{\alpha }}^{n+\mathrm{1}}-{\mathit{\alpha }}^{n-\mathrm{1}}\right)}^{\mathrm{2}}{n}^{\mathrm{2}}-{\left({\mathit{\alpha }}^{\mathrm{2}n}-\mathrm{1}\right)}^{\mathrm{2}}\right)\\ & \phantom{\rule{1em}{0ex}}\left({\left(k+\mathrm{3}\right)}^{\mathrm{2}}-{n}^{\mathrm{2}}\right)\left({\left(k+\mathrm{1}\right)}^{\mathrm{2}}-{n}^{\mathrm{2}}\right)\right]\\ D& =\frac{g{R}_{+}^{n+\mathrm{1}}n}{\mathit{\nu }}\left[-\left({\mathit{\alpha }}^{k+\mathrm{3}n+\mathrm{1}}+{\mathit{\alpha }}^{\mathrm{2}n}\right)\left(k-n+\mathrm{3}\right)\left(n+\mathrm{1}\right)\\ & \phantom{\rule{1em}{0ex}}+\left({\mathit{\alpha }}^{k+\mathrm{3}n+\mathrm{3}}+{\mathit{\alpha }}^{\mathrm{2}n-\mathrm{2}}\right)\left(k-n+\mathrm{1}\right)n+\left({\mathit{\alpha }}^{k+n+\mathrm{1}}+{\mathit{\alpha }}^{\mathrm{4}n}\right)\\ & \phantom{\rule{1em}{0ex}}\left(k+n+\mathrm{3}\right)\right]/\left[\mathrm{2}\left({\left({\mathit{\alpha }}^{n+\mathrm{1}}-{\mathit{\alpha }}^{n-\mathrm{1}}\right)}^{\mathrm{2}}{n}^{\mathrm{2}}-{\left({\mathit{\alpha }}^{\mathrm{2}n}-\mathrm{1}\right)}^{\mathrm{2}}\right)\\ & \phantom{\rule{1em}{0ex}}\left({\left(k+\mathrm{3}\right)}^{\mathrm{2}}-{n}^{\mathrm{2}}\right)\left({\left(k+\mathrm{1}\right)}^{\mathrm{2}}-{n}^{\mathrm{2}}\right)\right].\end{array}$

### 2.2.2 Green's function solution – cylindrical

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

$\begin{array}{}\text{(20)}& {\mathit{\rho }}^{\prime }=\mathit{\delta }\left(r-{r}^{\prime }\right)\mathrm{cos}\left(n\mathit{\phi }\right),\end{array}$

representing an infinitely thin density anomaly at $r={r}^{\prime }$ with ${R}_{-}<{r}^{\prime }<{R}_{+}$. Since ${\mathit{\rho }}^{\prime }=\mathrm{0}$ for ${r}^{\prime }\ne r$, the solution is described by combining two homogeneous solutions

We thus have eight coefficients that are fixed by boundary conditions and conditions at the interface. Boundary conditions at the inner and outer boundaries again provide four equations. Furthermore, we impose continuity of both velocity components at the interface:

Since no lateral force is being applied at the interface, we also expect continuity of the shear stress (6) which, in combination with the above, implies

$\begin{array}{}\text{(23)}& \frac{{\partial }^{\mathrm{2}}{\mathit{\psi }}_{-}}{\partial {r}^{\mathrm{2}}}\left({r}^{\prime },\mathit{\phi }\right)=\frac{{\partial }^{\mathrm{2}}{\mathit{\psi }}_{+}}{\partial {r}^{\mathrm{2}}}\left({r}^{\prime },\mathit{\phi }\right).\end{array}$

Finally, the eighth equation is obtained by integrating Eq. (10) over a small strip ${r}^{\prime }-\mathit{ϵ}\le r\le {r}^{\prime }+\mathit{ϵ}$, between two arbitrary angles ${\mathit{\phi }}_{\mathrm{1}}\le \mathit{\phi }\le {\mathit{\phi }}_{\mathrm{2}}$:

$\begin{array}{ll}& \underset{r={r}^{\prime }-\mathit{ϵ}}{\overset{{r}^{\prime }+\mathit{ϵ}}{\int }}\phantom{\rule{0.25em}{0ex}}\underset{\mathit{\phi }={\mathit{\phi }}_{\mathrm{1}}}{\overset{{\mathit{\phi }}_{\mathrm{2}}}{\int }}\left({\mathrm{\nabla }}^{\mathrm{4}}\mathit{\psi }\right)r\mathrm{d}r\mathrm{d}\mathit{\phi }\\ \text{(24)}& \phantom{\rule{1em}{0ex}}& =\underset{r={r}^{\prime }-\mathit{ϵ}}{\overset{{r}^{\prime }+\mathit{ϵ}}{\int }}\phantom{\rule{0.25em}{0ex}}\underset{\mathit{\phi }={\mathit{\phi }}_{\mathrm{1}}}{\overset{{\mathit{\phi }}_{\mathrm{2}}}{\int }}\frac{gn\mathrm{sin}\left(n\mathit{\phi }\right)}{\mathit{\nu }r}\mathit{\delta }\left(r-{r}^{\prime }\right)r\mathrm{d}r\mathrm{d}\mathit{\phi },& {\left[\phantom{\rule{0.25em}{0ex}}\underset{\mathit{\phi }={\mathit{\phi }}_{\mathrm{1}}}{\overset{{\mathit{\phi }}_{\mathrm{2}}}{\int }}\stackrel{\mathrm{^}}{\mathbit{r}}\cdot \mathrm{\nabla }\left({\mathrm{\nabla }}^{\mathrm{2}}\mathit{\psi }\right)rd\mathit{\phi }\right]}_{r={r}^{\prime }-\mathit{ϵ}}^{r={r}^{\prime }+\mathit{ϵ}}\\ & +{\left[\phantom{\rule{0.25em}{0ex}}\underset{r={r}^{\prime }-\mathit{ϵ}}{\overset{{r}^{\prime }+\mathit{ϵ}}{\int }}\stackrel{\mathrm{^}}{\mathbit{\phi }}\cdot \mathrm{\nabla }\left({\mathrm{\nabla }}^{\mathrm{2}}\mathit{\psi }\right)r\mathrm{d}r\right]}_{\mathit{\phi }={\mathit{\phi }}_{\mathrm{1}}}^{{\mathit{\phi }}_{\mathrm{2}}}\\ \text{(25)}& & =\underset{\mathit{\phi }={\mathit{\phi }}_{\mathrm{1}}}{\overset{{\mathit{\phi }}_{\mathrm{2}}}{\int }}\frac{gn\mathrm{sin}\left(n\mathit{\phi }\right)}{\mathit{\nu }}\mathrm{d}\mathit{\phi }.\end{array}$

Taking the limit ϵ→0, the second term on the left-hand side disappears, whereas the first term becomes

Again using Eqs. (22) and (23), only the jump term for the third radial derivative of ψ± remains:

$\begin{array}{ll}& \underset{\mathit{\phi }={\mathit{\phi }}_{\mathrm{1}}}{\overset{{\mathit{\phi }}_{\mathrm{2}}}{\int }}\left(\frac{{\partial }^{\mathrm{3}}{\mathit{\psi }}_{+}}{\partial {r}^{\mathrm{3}}}\left({r}^{\prime },\mathit{\phi }\right)-\frac{{\partial }^{\mathrm{3}}{\mathit{\psi }}_{-}}{\partial {r}^{\mathrm{3}}}\left({r}^{\prime },\mathit{\phi }\right)\right){r}^{\prime }\mathrm{d}\mathit{\phi }=\\ & \phantom{\rule{1em}{0ex}}\underset{\mathit{\phi }={\mathit{\phi }}_{\mathrm{1}}}{\overset{{\mathit{\phi }}_{\mathrm{2}}}{\int }}\frac{gn\mathrm{sin}\left(n\mathit{\phi }\right)}{\mathit{\nu }}\mathrm{d}\mathit{\phi }.\end{array}$

Thus, for this to hold for arbitrary φ1 and φ2, we need

$\begin{array}{}\text{(26)}& \frac{{\partial }^{\mathrm{3}}{\mathit{\psi }}_{+}}{\partial {r}^{\mathrm{3}}}\left({r}^{\prime },\mathit{\phi }\right)-\frac{{\partial }^{\mathrm{3}}{\mathit{\psi }}_{-}}{\partial {r}^{\mathrm{3}}}\left({r}^{\prime },\mathit{\phi }\right)=\frac{gn\mathrm{sin}\left(n\mathit{\phi }\right)}{\mathit{\nu }{r}^{\prime }}.\end{array}$

The solution coefficients for free-slip boundary conditions at $r={R}_{-}$ and $r={R}_{+}$ are

$\begin{array}{ll}{A}_{±}& =\frac{g{{r}^{\prime }}^{-n+\mathrm{2}}}{\mathit{\nu }}\frac{±\left({\mathit{\alpha }}_{\mp }^{\mathrm{2}n-\mathrm{2}}-\mathrm{1}\right)}{\mathrm{8}\left({\mathit{\alpha }}_{±}^{\mathrm{2}n-\mathrm{2}}-{\mathit{\alpha }}_{\mp }^{\mathrm{2}n-\mathrm{2}}\right)\left(n-\mathrm{1}\right)}\\ {B}_{±}& =\frac{g{{r}^{\prime }}^{n+\mathrm{2}}}{\mathit{\nu }}\frac{±\left({\mathit{\alpha }}_{\mp }^{\mathrm{2}n+\mathrm{2}}-\mathrm{1}\right){\mathit{\alpha }}_{±}^{\mathrm{2}n+\mathrm{2}}}{\mathrm{8}\left({\mathit{\alpha }}_{±}^{\mathrm{2}n+\mathrm{2}}-{\mathit{\alpha }}_{\mp }^{\mathrm{2}n+\mathrm{2}}\right)\left(n+\mathrm{1}\right)}\\ {C}_{±}& =\frac{g{{r}^{\prime }}^{-n}}{\mathit{\nu }}\frac{±\left({\mathit{\alpha }}_{\mp }^{\mathrm{2}n+\mathrm{2}}-\mathrm{1}\right)}{\mathrm{8}\left({\mathit{\alpha }}_{\mp }^{\mathrm{2}n+\mathrm{2}}-{\mathit{\alpha }}_{±}^{\mathrm{2}n+\mathrm{2}}\right)\left(n+\mathrm{1}\right)}\\ {D}_{±}& =\frac{g{{r}^{\prime }}^{n}}{\mathit{\nu }}\frac{±\left({\mathit{\alpha }}_{\mp }^{\mathrm{2}n-\mathrm{2}}-\mathrm{1}\right){\mathit{\alpha }}_{±}^{\mathrm{2}n-\mathrm{2}}}{\mathrm{8}\left({\mathit{\alpha }}_{\mp }^{\mathrm{2}n-\mathrm{2}}-{\mathit{\alpha }}_{±}^{\mathrm{2}n-\mathrm{2}}\right)\left(n-\mathrm{1}\right)},\end{array}$

where we use ${\mathit{\alpha }}_{±}={R}_{±}/{r}^{\prime }$.

Zero-slip conditions at both boundaries lead to

where, in addition, we use $\mathit{\gamma }={R}_{-}/{R}_{+}$.

Figure 1Density perturbation (δρ) field for smooth cylindrical cases across a range of n and k. As the wavenumber n increases, the wavelength of the perturbation decreases. As k increases, the perturbation becomes more concentrated towards the domain's outer boundary.

## 2.3 Spherical

In this section, we derive the equivalent of the four cylindrical cases in a 3-D spherical domain, ${R}_{-}\le r\le {R}_{+}$. A more detailed derivation of the equations can be found in Ribe (2009). In 3-D, a solenoidal velocity field u can be decomposed as

$\begin{array}{}\text{(27)}& \mathbit{u}=\mathrm{\nabla }×\left(\mathbit{r}×\mathrm{\nabla }\mathcal{P}\right)+\mathbit{r}×\mathrm{\nabla }\mathcal{T}\end{array}$

using poloidal and toroidal scalar fields 𝒫 and 𝒯 (Backus1986), where $\mathbit{r}=r\stackrel{\mathrm{^}}{\mathbit{r}}$. In spherical coordinates,

$\begin{array}{}\text{(28)}& \begin{array}{rl}& {u}_{r}=\frac{\mathrm{1}}{r}{\mathrm{\Lambda }}^{\mathrm{2}}\mathcal{P},\phantom{\rule{1em}{0ex}}{u}_{\mathit{\theta }}=-\frac{\mathrm{1}}{r}\frac{{\partial }^{\mathrm{2}}\left(r\mathcal{P}\right)}{\partial r\partial \mathit{\theta }}-\frac{\mathrm{1}}{\mathrm{sin}\left(\mathit{\theta }\right)}\frac{\partial \mathcal{T}}{\partial \mathit{\phi }},\\ & \phantom{\rule{1em}{0ex}}{u}_{\mathit{\phi }}=-\frac{\mathrm{1}}{r\mathrm{sin}\left(\mathit{\theta }\right)}\frac{{\partial }^{\mathrm{2}}\left(r\mathcal{P}\right)}{\partial r\partial \mathit{\phi }}+\frac{\partial \mathcal{T}}{\partial \mathit{\theta }},\end{array}\end{array}$

where φ is the longitude and θ is the co-latitude, and

We further derive the components of stress normal to a spherical surface:

$\begin{array}{ll}\text{(30)}& {\mathit{\tau }}_{rr}& =\mathrm{2}\mathit{\nu }\frac{\partial {u}_{r}}{\partial r}=\mathrm{2}\mathit{\nu }\frac{\partial }{\partial r}\left(\frac{\mathrm{1}}{r}{\mathrm{\Lambda }}^{\mathrm{2}}\mathcal{P}\right),{\mathit{\tau }}_{r\mathit{\theta }}& =\mathit{\nu }r\frac{\partial }{\partial r}\left(\frac{{u}_{\mathit{\theta }}}{r}\right)+\frac{\mathit{\nu }}{r}\frac{\partial {u}_{r}}{\partial \mathit{\theta }}=\\ & \phantom{\rule{1em}{0ex}}\mathit{\nu }\frac{\partial }{\partial \mathit{\theta }}\left(\frac{\mathrm{1}}{{r}^{\mathrm{2}}}{\mathrm{\Lambda }}^{\mathrm{2}}\mathcal{P}-\frac{{\partial }^{\mathrm{2}}\mathcal{P}}{\partial {r}^{\mathrm{2}}}+\frac{\mathrm{2}}{{r}^{\mathrm{2}}}\mathcal{P}\right)-\\ \text{(31)}& & \phantom{\rule{1em}{0ex}}\mathit{\nu }r\frac{\partial }{\partial r}\left(\frac{\mathrm{1}}{r\mathrm{sin}\left(\mathit{\theta }\right)}\frac{\partial \mathcal{T}}{\partial \mathit{\phi }}\right),{\mathit{\tau }}_{r\mathit{\phi }}& =\mathit{\nu }r\frac{\partial }{\partial r}\left(\frac{{u}_{\mathit{\phi }}}{r}\right)+\frac{\mathit{\nu }}{r\mathrm{sin}\left(\mathit{\theta }\right)}\frac{\partial {u}_{r}}{\partial \mathit{\phi }}=\\ & \phantom{\rule{1em}{0ex}}\frac{\mathit{\nu }}{\mathrm{sin}\left(\mathit{\theta }\right)}\frac{\partial }{\partial \mathit{\phi }}\left(\frac{\mathrm{1}}{{r}^{\mathrm{2}}}{\mathrm{\Lambda }}^{\mathrm{2}}\mathcal{P}-\frac{{\partial }^{\mathrm{2}}\mathcal{P}}{\partial {r}^{\mathrm{2}}}+\frac{\mathrm{2}}{{r}^{\mathrm{2}}}\mathcal{P}\right)\\ \text{(32)}& & \phantom{\rule{1em}{0ex}}+\mathit{\nu }r\frac{\partial }{\partial r}\left(\frac{\mathrm{1}}{r}\frac{\partial \mathcal{T}}{\partial \mathit{\theta }}\right).\end{array}$

Using these, we can work out spherical components of the momentum equation (Eq. 1) to be

$\begin{array}{}\text{(33)}& & -\frac{\mathit{\nu }}{r}{\mathrm{\Lambda }}^{\mathrm{2}}{\mathrm{\nabla }}^{\mathrm{2}}\mathcal{P}+\frac{\partial p}{\partial r}=-g{\mathit{\rho }}^{\prime },\text{(34)}& & \frac{\mathit{\nu }}{r}\frac{{\partial }^{\mathrm{2}}\left(r{\mathrm{\nabla }}^{\mathrm{2}}\mathcal{P}\right)}{\partial r\partial \mathit{\theta }}+\frac{\mathit{\nu }}{\mathrm{sin}\left(\mathit{\theta }\right)}\frac{\partial {\mathrm{\nabla }}^{\mathrm{2}}\mathcal{T}}{\partial \mathit{\phi }}+\frac{\mathrm{1}}{r}\frac{\partial p}{\partial \mathit{\theta }}=\mathrm{0},\text{(35)}& & \frac{\mathit{\nu }}{r\mathrm{sin}\left(\mathit{\theta }\right)}\frac{{\partial }^{\mathrm{2}}\left(r{\mathrm{\nabla }}^{\mathrm{2}}\mathcal{P}\right)}{\partial r\partial \mathit{\phi }}+\mathit{\nu }\frac{\partial {\mathrm{\nabla }}^{\mathrm{2}}\mathcal{T}}{\partial \mathit{\theta }}+\frac{\mathrm{1}}{r\mathrm{sin}\left(\mathit{\theta }\right)}\frac{\partial p}{\partial \mathit{\phi }}=\mathrm{0}.\end{array}$

As can be seen from these equations, the toroidal part of the solution is independent of the density distribution. A non-zero toroidal component is only introduced through a particular choice of boundary conditions. For the test cases in this paper, we only consider free-slip and zero-slip boundary conditions with radial forcing so we may assume 𝒯=0. The assumption of the velocity field being solenoidal, which underlies the Mie representation Eq. (27), follows directly from the incompressibility condition and the no-normal-flow condition on the boundary.

Taking the curl of the momentum equation,

$\begin{array}{}\text{(36)}& \begin{array}{rl}& -\stackrel{\mathrm{^}}{\mathbit{\theta }}\frac{\mathit{\nu }}{\mathrm{sin}\left(\mathit{\theta }\right)}\frac{\partial {\mathrm{\nabla }}^{\mathrm{4}}\mathcal{P}}{\partial \mathit{\phi }}+\stackrel{\mathrm{^}}{\mathbit{\phi }}\mathit{\nu }\frac{\partial {\mathrm{\nabla }}^{\mathrm{4}}\mathcal{P}}{\partial \mathit{\theta }}=-\stackrel{\mathrm{^}}{\mathbit{\theta }}\frac{\mathrm{1}}{r\mathrm{sin}\left(\mathit{\theta }\right)}\frac{\partial g{\mathit{\rho }}^{\prime }}{\partial \mathit{\phi }}\\ & \phantom{\rule{1em}{0ex}}+\stackrel{\mathrm{^}}{\mathbit{\phi }}\frac{\mathrm{1}}{r}\frac{\partial g{\mathit{\rho }}^{\prime }}{\partial \mathit{\theta }}.\end{array}\end{array}$

In a spherical domain, this implies that $\mathit{\nu }{\mathrm{\nabla }}^{\mathrm{4}}\mathcal{P}-g{\mathit{\rho }}^{\prime }/r$ varies in the radial direction only. Without loss of generality, we may therefore seek solutions 𝒫 that satisfy

$\begin{array}{}\text{(37)}& {\mathrm{\nabla }}^{\mathrm{4}}\mathcal{P}=\frac{g{\mathit{\rho }}^{\prime }}{\mathit{\nu }r},\end{array}$

since for any other solution $\mathcal{P}+{\mathcal{P}}^{\prime }$ of Eq. (36) we know that 4𝒫 is purely radial, and therefore 𝒫 can be written as a sum of biharmonic solutions and a purely radial function. The biharmonic solutions are included in Eq. (37) and the purely radial function is discarded by Eq. (27).

Solutions to the biharmonic equation 4𝒫=0 in 3-D are given by

where Alm, Blm, Clm, and Dlm are constant coefficients, and Ylm indicates Laplace's spherical harmonic functions of degree l and order m, which have the property that

$\begin{array}{}\text{(39)}& {\mathrm{\Lambda }}^{\mathrm{2}}{Y}_{lm}=-l\left(l+\mathrm{1}\right){Y}_{lm}.\end{array}$

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

$\begin{array}{}\text{(40)}& {\mathrm{\nabla }}^{\mathrm{2}}p=-\frac{g}{{r}^{\mathrm{2}}}\frac{\partial }{\partial r}\left({r}^{\mathrm{2}}{\mathit{\rho }}^{\prime }\right).\end{array}$

Homogeneous solutions for pressure are written as

$\begin{array}{}\text{(41)}& p\left(r,\mathit{\theta },\mathit{\phi }\right)=\sum _{l\ge \mathrm{0}}\sum _{m=-l}^{l}\left({G}_{lm}{r}^{l}+{H}_{lm}{r}^{-l-\mathrm{1}}\right){Y}_{lm}\left(\mathit{\theta },\mathit{\phi }\right),\end{array}$

where the substitution of Eqs. (38) and (41) in Eq. (33) gives

$\begin{array}{}\text{(42)}& \begin{array}{rl}{G}_{lm}=& -\mathrm{2}\mathit{\nu }\left(l+\mathrm{1}\right)\left(\mathrm{2}l+\mathrm{3}\right){C}_{lm},\\ {H}_{lm}=& -\mathrm{2}\mathit{\nu }l\left(\mathrm{2}l-\mathrm{1}\right){D}_{lm}.\end{array}\end{array}$

Figure 2Illustrations of the density perturbation (δρ) field for smooth spherical cases across a range of l, m, and k.

### 2.3.1 Smooth density profile – spherical

We consider a density perturbation of the following form:

$\begin{array}{}\text{(43)}& {\mathit{\rho }}^{\prime }=\frac{{r}^{k}}{{R}_{+}^{k}}{Y}_{lm}\left(\mathit{\theta },\mathit{\phi }\right).\end{array}$

An inhomogeneous solution of Eq. (37) is given by

with a more generic solution written as

$\begin{array}{}\text{(45)}& \mathcal{P}=\left(A{r}^{l}+B{r}^{-l-\mathrm{1}}+C{r}^{l+\mathrm{2}}+D{r}^{-l+\mathrm{1}}+E{r}^{k+\mathrm{3}}\right){Y}_{lm},\end{array}$

where we have dropped the lm subscripts of coefficients A, B, C, and D. The pressure solution for Eq. (40) is

$\begin{array}{}\text{(46)}& \begin{array}{rl}p=& \left(G{r}^{l}+H{r}^{-l-\mathrm{1}}+F{r}^{k+\mathrm{1}}\right){Y}_{lm},\\ F=& -\frac{g\left(k+\mathrm{2}\right){R}_{+}^{-k}}{\left(k+\mathrm{1}\right)\left(k+\mathrm{2}\right)-l\left(l+\mathrm{1}\right)},\end{array}\end{array}$

and G and H are given by Eq. (42).

As before, the four coefficients (A, B, C, and D) are fixed by the boundary conditions:

where we use ${\mathrm{\Lambda }}^{\mathrm{2}}\mathcal{P}=-l\left(l+\mathrm{1}\right)\mathcal{P}$. The two no-normal-flow conditions at $r={R}_{-}$ and $r={R}_{+}$ are combined with two further conditions:

For free-slip conditions at both $r={R}_{-}$ and $r={R}_{+}$, the solution coefficients are given by

$\begin{array}{ll}A& =\frac{g{R}_{+}^{-l+\mathrm{3}}\left({\mathit{\alpha }}^{k+\mathrm{3}}-{\mathit{\alpha }}^{-l+\mathrm{1}}\right)}{\mathrm{2}\mathit{\nu }\left({\mathit{\alpha }}^{l}-{\mathit{\alpha }}^{-l+\mathrm{1}}\right)\left(k+l+\mathrm{2}\right)\left(k-l+\mathrm{3}\right)\left(\mathrm{2}l+\mathrm{1}\right)}\\ B& =\frac{g{R}_{+}^{l+\mathrm{4}}-{\mathit{\alpha }}^{k+\mathrm{4}}+{\mathit{\alpha }}^{l+\mathrm{3}}}{\mathrm{2}\mathit{\nu }\left({\mathit{\alpha }}^{-l}-{\mathit{\alpha }}^{l+\mathrm{3}}\right)\left(k+l+\mathrm{4}\right)\left(k-l+\mathrm{1}\right)\left(\mathrm{2}l+\mathrm{1}\right)}\\ C& =\frac{g{R}_{+}^{-l+\mathrm{1}}{\mathit{\alpha }}^{k+\mathrm{4}}-{\mathit{\alpha }}^{-l}}{\mathrm{2}\mathit{\nu }\left({\mathit{\alpha }}^{-l}-{\mathit{\alpha }}^{l+\mathrm{3}}\right)\left(k+l+\mathrm{4}\right)\left(k-l+\mathrm{1}\right)\left(\mathrm{2}l+\mathrm{1}\right)}\\ D& =\frac{g{R}_{+}^{l+\mathrm{2}}-{\mathit{\alpha }}^{k+\mathrm{3}}+{\mathit{\alpha }}^{l}}{\mathrm{2}\mathit{\nu }\left({\mathit{\alpha }}^{l}-{\mathit{\alpha }}^{-l+\mathrm{1}}\right)\left(k+l+\mathrm{2}\right)\left(k-l+\mathrm{3}\right)\left(\mathrm{2}l+\mathrm{1}\right)}.\end{array}$

Zero-slip conditions at both boundaries lead to the following solution coefficients:

### 2.3.2 Green's function solution – spherical

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

$\begin{array}{}\text{(50)}& {\mathit{\rho }}^{\prime }=\mathit{\delta }\left(r-{r}^{\prime }\right){Y}_{lm}\left(\mathit{\theta },\mathit{\phi }\right),\end{array}$

by combining two homogeneous solutions:

The eight coefficients are found by imposing the same four constraints derived from the boundary conditions at $r={R}_{-}$ and $r={R}_{+}$ as in the previous section and by imposing a further four conditions: continuity of all components of u, no shear force between the two halves of the domain, and a normal force that is proportional to the density anomaly:

where Eq. (55) is derived from Eq. (37) in the same way as Eq. (26), and Eqs. (53)–(55) assume Eq. (52).

The free-slip solution coefficients are given by

$\begin{array}{ll}{A}_{±}& =\frac{g{{r}^{\prime }}^{-l+\mathrm{2}}}{\mathit{\nu }}\frac{±\left({\mathit{\alpha }}_{\mp }^{\mathrm{2}l-\mathrm{1}}-\mathrm{1}\right)}{\mathrm{2}\left({\mathit{\alpha }}_{±}^{\mathrm{2}l-\mathrm{1}}-{\mathit{\alpha }}_{\mp }^{\mathrm{2}l-\mathrm{1}}\right)\left(\mathrm{2}l-\mathrm{1}\right)\left(\mathrm{2}l+\mathrm{1}\right)}\\ {B}_{±}& =\frac{g{{r}^{\prime }}^{l+\mathrm{3}}}{\mathit{\nu }}\frac{±\left({\mathit{\alpha }}_{\mp }^{-\mathrm{2}l-\mathrm{3}}-\mathrm{1}\right)}{\mathrm{2}\left({\mathit{\alpha }}_{±}^{-\mathrm{2}l-\mathrm{3}}-{\mathit{\alpha }}_{\mp }^{-\mathrm{2}l-\mathrm{3}}\right)\left(\mathrm{2}l+\mathrm{1}\right)\left(\mathrm{2}l+\mathrm{3}\right)}\\ {C}_{±}& =\frac{g{{r}^{\prime }}^{-l}}{\mathit{\nu }}\frac{±\left(-{\mathit{\alpha }}_{\mp }^{\mathrm{2}l+\mathrm{3}}+\mathrm{1}\right)}{\mathrm{2}\left({\mathit{\alpha }}_{±}^{\mathrm{2}l+\mathrm{3}}-{\mathit{\alpha }}_{\mp }^{\mathrm{2}l+\mathrm{3}}\right)\left(\mathrm{2}l+\mathrm{1}\right)\left(\mathrm{2}l+\mathrm{3}\right)}\\ {D}_{±}& =\frac{g{{r}^{\prime }}^{l+\mathrm{1}}}{\mathit{\nu }}\frac{±\left(-{\mathit{\alpha }}_{\mp }^{-\mathrm{2}l+\mathrm{1}}+\mathrm{1}\right)}{\mathrm{2}\left({\mathit{\alpha }}_{±}^{-\mathrm{2}l+\mathrm{1}}-{\mathit{\alpha }}_{\mp }^{-\mathrm{2}l+\mathrm{1}}\right)\left(\mathrm{2}l-\mathrm{1}\right)\left(\mathrm{2}l+\mathrm{1}\right)}.\end{array}$

The zero-slip solution coefficients are given by

$\begin{array}{ll}{A}_{±}& =\frac{g{{r}^{\prime }}^{-l+\mathrm{2}}}{\mathit{\nu }}\left[{\mathit{\alpha }}_{+}^{\mathrm{2}}-{\mathit{\alpha }}_{-}^{\mathrm{2}}+\frac{\mathrm{2}}{\mathrm{2}l+\mathrm{1}}\left({\mathit{\alpha }}_{+}^{-\mathrm{2}l-\mathrm{1}}-{\mathit{\alpha }}_{-}^{-\mathrm{2}l-\mathrm{1}}\right)\\ & \phantom{\rule{1em}{0ex}}±\frac{\mathrm{2}l+\mathrm{3}}{\mathrm{2}l+\mathrm{1}}+\frac{\mathrm{2}}{\mathrm{2}l-\mathrm{1}}\left({\mathit{\alpha }}_{+}^{\mathrm{2}}{\mathit{\alpha }}_{-}^{-\mathrm{2}l-\mathrm{1}}-{\mathit{\alpha }}_{+}^{-\mathrm{2}l-\mathrm{1}}{\mathit{\alpha }}_{-}^{\mathrm{2}}\right)\\ & \phantom{\rule{1em}{0ex}}±\frac{\mathrm{4}{\mathit{\gamma }}^{±\left(\mathrm{2}l+\mathrm{1}\right)}}{\left(\mathrm{2}l-\mathrm{1}\right)\left(\mathrm{2}l+\mathrm{1}\right)}\mp \frac{{\mathit{\gamma }}^{\mp \mathrm{2}}\left(\mathrm{2}l+\mathrm{1}\right)}{\mathrm{2}l-\mathrm{1}}\right]/\\ & \phantom{\rule{1em}{0ex}}\left[-\mathrm{8}{\mathit{\gamma }}^{-\mathrm{2}l-\mathrm{1}}-\mathrm{8}{\mathit{\gamma }}^{\mathrm{2}l+\mathrm{1}}+\mathrm{2}\left({\mathit{\gamma }}^{\mathrm{2}}+{\mathit{\gamma }}^{-\mathrm{2}}\right){\left(\mathrm{2}l+\mathrm{1}\right)}^{\mathrm{2}}\\ & \phantom{\rule{1em}{0ex}}-\mathrm{4}\left(\mathrm{2}l-\mathrm{1}\right)\left(\mathrm{2}l+\mathrm{3}\right)\right]\\ {B}_{±}& =\frac{g{{r}^{\prime }}^{l+\mathrm{3}}}{\mathit{\nu }}\left[{\mathit{\alpha }}_{+}^{\mathrm{2}}-{\mathit{\alpha }}_{-}^{\mathrm{2}}-\frac{\mathrm{2}}{\mathrm{2}l+\mathrm{1}}\left({\mathit{\alpha }}_{+}^{\mathrm{2}l+\mathrm{1}}-{\mathit{\alpha }}_{-}^{\mathrm{2}l+\mathrm{1}}\right)\\ & \phantom{\rule{1em}{0ex}}±\frac{\mathrm{2}l-\mathrm{1}}{\mathrm{2}l+\mathrm{1}}-\frac{\mathrm{2}}{\mathrm{2}l+\mathrm{3}}\left({\mathit{\alpha }}_{+}^{\mathrm{2}}{\mathit{\alpha }}_{-}^{\mathrm{2}l+\mathrm{1}}-{\mathit{\alpha }}_{+}^{\mathrm{2}l+\mathrm{1}}{\mathit{\alpha }}_{-}^{\mathrm{2}}\right)\\ & \phantom{\rule{1em}{0ex}}±\frac{\mathrm{4}{\mathit{\gamma }}^{\mp \left(\mathrm{2}l+\mathrm{1}\right)}}{\left(\mathrm{2}l+\mathrm{1}\right)\left(\mathrm{2}l+\mathrm{3}\right)}\mp \frac{{\mathit{\gamma }}^{\mp \mathrm{2}}\left(\mathrm{2}l+\mathrm{1}\right)}{\mathrm{2}l+\mathrm{3}}\right]/\\ & \phantom{\rule{1em}{0ex}}\left[-\mathrm{8}{\mathit{\gamma }}^{-\mathrm{2}l-\mathrm{1}}-\mathrm{8}{\mathit{\gamma }}^{\mathrm{2}l+\mathrm{1}}+\mathrm{2}\left({\mathit{\gamma }}^{\mathrm{2}}+{\mathit{\gamma }}^{-\mathrm{2}}\right){\left(\mathrm{2}l+\mathrm{1}\right)}^{\mathrm{2}}\\ & \phantom{\rule{1em}{0ex}}-\mathrm{4}\left(\mathrm{2}l-\mathrm{1}\right)\left(\mathrm{2}l+\mathrm{3}\right)\right]\\ {C}_{±}& =\frac{g{{r}^{\prime }}^{-l}}{\mathit{\nu }}\left[{\mathit{\alpha }}_{-}^{-\mathrm{2}}-{\mathit{\alpha }}_{+}^{-\mathrm{2}}+\frac{\mathrm{2}}{\mathrm{2}l+\mathrm{1}}\left({\mathit{\alpha }}_{+}^{-\mathrm{2}l-\mathrm{1}}-{\mathit{\alpha }}_{-}^{-\mathrm{2}l-\mathrm{1}}\right)\\ & \phantom{\rule{1em}{0ex}}\mp \frac{\mathrm{2}l-\mathrm{1}}{\mathrm{2}l+\mathrm{1}}+\frac{\mathrm{2}}{\mathrm{2}l+\mathrm{3}}\left({\mathit{\alpha }}_{+}^{-\mathrm{2}}{\mathit{\alpha }}_{-}^{-\mathrm{2}l-\mathrm{1}}-{\mathit{\alpha }}_{+}^{-\mathrm{2}l-\mathrm{1}}{\mathit{\alpha }}_{-}^{-\mathrm{2}}\right)\\ & \phantom{\rule{1em}{0ex}}\mp \frac{\mathrm{4}{\mathit{\gamma }}^{±\left(\mathrm{2}l+\mathrm{1}\right)}}{\left(\mathrm{2}l+\mathrm{1}\right)\left(\mathrm{2}l+\mathrm{3}\right)}±\frac{{\mathit{\gamma }}^{±\mathrm{2}}\left(\mathrm{2}l+\mathrm{1}\right)}{\mathrm{2}l+\mathrm{3}}\right]/\\ & \phantom{\rule{1em}{0ex}}\left[-\mathrm{8}{\mathit{\gamma }}^{-\mathrm{2}l-\mathrm{1}}-\mathrm{8}{\mathit{\gamma }}^{\mathrm{2}l+\mathrm{1}}+\mathrm{2}\left({\mathit{\gamma }}^{\mathrm{2}}+{\mathit{\gamma }}^{-\mathrm{2}}\right){\left(\mathrm{2}l+\mathrm{1}\right)}^{\mathrm{2}}\\ & \phantom{\rule{1em}{0ex}}-\mathrm{4}\left(\mathrm{2}l-\mathrm{1}\right)\left(\mathrm{2}l+\mathrm{3}\right)\right]\\ {D}_{±}& =\frac{g{{r}^{\prime }}^{l+\mathrm{1}}}{\mathit{\nu }}\left[{\mathit{\alpha }}_{-}^{-\mathrm{2}}-{\mathit{\alpha }}_{+}^{-\mathrm{2}}-\frac{\mathrm{2}}{\mathrm{2}l+\mathrm{1}}\left({\mathit{\alpha }}_{+}^{\mathrm{2}l+\mathrm{1}}-{\mathit{\alpha }}_{-}^{\mathrm{2}l+\mathrm{1}}\right)\\ & \phantom{\rule{1em}{0ex}}\mp \frac{\mathrm{2}l+\mathrm{3}}{\mathrm{2}l+\mathrm{1}}-\frac{\mathrm{2}}{\mathrm{2}l-\mathrm{1}}\left({\mathit{\alpha }}_{+}^{-\mathrm{2}}{\mathit{\alpha }}_{-}^{\mathrm{2}l+\mathrm{1}}-{\mathit{\alpha }}_{+}^{\mathrm{2}l+\mathrm{1}}{\mathit{\alpha }}_{-}^{-\mathrm{2}}\right)\\ & \phantom{\rule{1em}{0ex}}\mp \frac{\mathrm{4}{\mathit{\gamma }}^{\mp \left(\mathrm{2}l+\mathrm{1}\right)}}{\left(\mathrm{2}l-\mathrm{1}\right)\left(\mathrm{2}l+\mathrm{1}\right)}±\frac{{\mathit{\gamma }}^{±\mathrm{2}}\left(\mathrm{2}l+\mathrm{1}\right)}{\mathrm{2}l-\mathrm{1}}\right]/\\ & \phantom{\rule{1em}{0ex}}\left[-\mathrm{8}{\mathit{\gamma }}^{-\mathrm{2}l-\mathrm{1}}-\mathrm{8}{\mathit{\gamma }}^{\mathrm{2}l+\mathrm{1}}+\mathrm{2}\left({\mathit{\gamma }}^{\mathrm{2}}+{\mathit{\gamma }}^{-\mathrm{2}}\right){\left(\mathrm{2}l+\mathrm{1}\right)}^{\mathrm{2}}\\ & \phantom{\rule{1em}{0ex}}-\mathrm{4}\left(\mathrm{2}l-\mathrm{1}\right)\left(\mathrm{2}l+\mathrm{3}\right)\right].\end{array}$
3 Fluidity

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

## 3.1 Discretisation

The numerical solutions for velocity and pressure, u and p, are written as a linear combination of basis functions Nj and Ml:

$\begin{array}{}\text{(56)}& \mathbit{u}=\sum _{j}{\mathbit{u}}_{j}{N}_{j},\phantom{\rule{1em}{0ex}}p=\sum _{l}{p}_{l}{M}_{l}.\end{array}$

We use either the P2–P1 (Taylor–Hood) or P2bubble–P1DG element pairs. In both cases, the velocity and pressure basis functions Nj and Ml are piecewise quadratic and linear, respectively, on a triangular (2-D) or tetrahedral (3-D) mesh of the domain Ω. Because the curved boundaries of the cylindrical- and spherical-shell domains can only be approximated by the mesh, the numerical domain is denoted by Ωh. When using the P2–P1 element pair, the basis functions are continuous between cells. For the P2bubble–P1DG element pair, the piecewise-linear pressure is treated as discontinuous between cells and the continuous quadratic velocity basis functions are enriched by an extra cubic “bubble” function with a corresponding cell-centred degree of freedom .

The Stokes equations are written in the weak form, using the same Nj and Ml basis as test functions. After integrating by parts, Eqs. (1) and (3) then become (omitting boundary terms)

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 .

Figure 3Convergence for 2-D cylindrical cases with free-slip and zero-slip boundary conditions at a series of different wavenumbers, n, as indicated in the legend. Note that cases with a smooth forcing are run at k=2 and k=8, as indicated. Convergence rate is indicated by dashed lines, with the order of convergence provided in the legend.

## 3.2 Isoparametric representation of the domain

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 ${X}_{\text{lin}}:\mathit{\xi }↦{X}_{\text{lin}}\left(\mathit{\xi }\right)$ from local coordinates ξ in a reference element to physical coordinates X, we use a quadratic map Xquad(ξ), which maps to a curved triangle/tetrahedron that better represents the domain. This map can be obtained from a linear mesh with coordinate mappings, Xlin, through quadratic interpolation:

$\begin{array}{}\text{(59)}& {X}_{\text{quad}}\left(\mathit{\xi }\right)\stackrel{\text{quad. interp.}}{\approx }\frac{{r}_{\text{lin}}\left(\mathit{\xi }\right)}{‖{X}_{\text{lin}}\left(\mathit{\xi }\right)‖}{X}_{\text{lin}}\left(\mathit{\xi }\right),\end{array}$

at the standard Lagrange nodes of the quadratic function space. Here, rlin(ξ) is the linear interpolation of the radius, i.e. ${r}_{\text{lin}}=‖{X}_{\text{lin}}‖$ at the vertices of the linear mesh. This particular choice ensures that for an equal-radius boundary, with the boundary vertices of the linear mesh exactly on the boundary, the quadratic Lagrange nodes also lie exactly on this boundary.

Figure 4Convergence of velocity and pressure for 3-D spherical cases with free-slip and zero-slip boundary conditions, at a range of degrees l and orders m. Note that all cases with a smooth forcing are run at $k=l+\mathrm{1}$.

Figure 5Convergence of velocity (a, b) and pressure (c, d), respectively, for smooth (k=2) 2-D cylindrical cases with free-slip and zero-slip boundary conditions. Note that these cases do not incorporate an isoparametric approximation of the domain; hence, the reduced convergence is relative to comparable cases in Fig. 3.

## 3.3 Forcing term

The density perturbation ρ on the RHS of Eq. (57) is a prescribed analytical expression in each of the test cases. For Green's function solutions in 2-D and 3-D, using Eqs. (20) and (50), respectively, we get

$\begin{array}{ll}& -\underset{{\mathrm{\Omega }}_{h}}{\int }{N}_{i}g{\mathit{\rho }}^{\prime }\stackrel{\mathrm{^}}{\mathbit{r}}=-\underset{{\mathrm{\Omega }}_{h}}{\int }{N}_{i}\left(r,\mathit{\theta }\right)g\mathrm{cos}\left(n\mathit{\theta }\right)\mathit{\delta }\left(r-{r}^{\prime }\right)\stackrel{\mathrm{^}}{\mathbit{r}}=\\ \text{(60)}& & \phantom{\rule{1em}{0ex}}-\underset{{\mathrm{\Gamma }}^{\prime }}{\int }{N}_{i}\left(r,\mathit{\theta }\right)g\mathrm{cos}\left(n\mathit{\theta }\right)\mathbit{n},& -\underset{{\mathrm{\Omega }}_{h}}{\int }{N}_{i}\left(r,\mathit{\theta }\right)g{\mathit{\rho }}^{\prime }\stackrel{\mathrm{^}}{\mathbit{r}}=-\underset{{\mathrm{\Omega }}_{h}}{\int }{N}_{i}\left(r,\mathit{\theta },\mathit{\phi }\right)g{Y}_{lm}\left(\mathit{\theta },\mathit{\phi }\right)\mathit{\delta }\left(r-{r}^{\prime }\right)\stackrel{\mathrm{^}}{\mathbit{r}}\\ \text{(61)}& & \phantom{\rule{1em}{0ex}}=-\underset{{\mathrm{\Gamma }}^{\prime }}{\int }{N}_{i}\left(r,\mathit{\theta },\mathit{\phi }\right)g{Y}_{lm}\left(\mathit{\theta },\mathit{\phi }\right)\mathbit{n},\end{array}$

where Γ is an internal boundary at $r={r}^{\prime }$ oriented such that its normal $\mathbit{n}=\stackrel{\mathrm{^}}{\mathbit{r}}$ points outwards.

## 3.4 Solving the linear system and dealing with null spaces

Equations (57) and (58) form a saddle point linear system which is solved by applying a Schur decomposition technique where the outer iteration, which solves for the pressure degrees of freedom, is solved with a flexible Krylov subspace method, FGMRES. The inner solve associated with the velocity degrees of freedom, is solved with the conjugate gradient method preconditioned with an algebraic multigrid method (GAMG available through PETSc; Balay et al.1997).

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:

$\begin{array}{}\text{(62)}& p\to p-\frac{{\int }_{{\mathrm{\Omega }}_{h}}p}{{\int }_{{\mathrm{\Omega }}_{h}}\mathrm{1}}.\end{array}$

Similarly, for free-slip cases, in 2-D, we may add an arbitrary rotation of the form $\left(-y,x\right)=r\stackrel{\mathrm{^}}{\mathbit{\theta }}$ to the velocity solution. We therefore apply the following projection to the numerical solution:

$\begin{array}{}\text{(63)}& \mathbit{u}\to \mathbit{u}-\frac{{\int }_{{\mathrm{\Omega }}_{h}}r\stackrel{\mathrm{^}}{\mathbit{\theta }}\cdot \mathbit{u}}{{\int }_{{\mathrm{\Omega }}_{h}}{r}^{\mathrm{2}}}r\stackrel{\mathrm{^}}{\mathbit{\theta }},\end{array}$

which ensures that the angular momentum $\int r\stackrel{\mathrm{^}}{\mathbit{\theta }}\cdot \mathbit{u}$ is zero, as it is for the analytical solutions. In the same way, in three dimensions, we subtract the three rotational (rigid body) modes.

It should be noted that the same velocity and pressure modes lead to zero modes (eigenvectors) for the linear system based on Eqs. (57) and (58), rendering the resulting matrix singular. In preconditioned Krylov methods, we typically need to subtract the zero modes from the approximate solution at every iteration. With iterative approximation xi and zero eigenvector λ, we get

$\begin{array}{}\text{(64)}& {\mathbit{x}}^{\mathrm{i}}\to {\mathbit{x}}^{\mathrm{i}}-〈\mathbit{\lambda },{\mathbit{x}}^{\mathrm{i}}〉\mathbit{\lambda }.\end{array}$

This l2 projection, based on the l2 inner product $〈\cdot ,\cdot 〉$, is analogous but not equivalent to the projections in Eqs. (62) and (63) (which are L2 projections). Therefore, despite the l2 projections fixing the null modes during the iterative solve, the L2 projections should be applied as an additional step after the iterative solvers have completed to ensure convergence to the analytical solution.

4 Convergence Results

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 $\mathrm{128}×\mathrm{16}×\mathrm{2}=\mathrm{4096}$ triangles. At each subsequent level, the mesh is refined, doubling the resolution in both directions. For the spherical cases, the mesh at refinement level 1 is obtained from an icosahedron refined three times, starting with 1280 triangles in the horizontal, which is extruded radially to 16 layers, giving a 3-D mesh consisting of 61 440 tetrahedra. Again, resolution is doubled in all directions for subsequent refinement levels. In all cases, non-dimensionalised coordinates were used with ${R}_{-}=\mathrm{1.22}$ and ${R}_{+}=\mathrm{2.22}$, and the delta-function cases used ${r}^{\prime }=\left({R}_{-}+{R}_{+}\right)/\mathrm{2}$. This choice of r ensures the density anomaly coincides with a grid layer at all mesh resolutions considered herein.

In all figures, errors are given as relative errors, comparing the numerical solution, u and p, with the analytical solutions, u and p (interpolated into the P2 and P1 function spaces, respectively) in the L2 norm:

$\begin{array}{}\text{(65)}& \begin{array}{rl}\frac{‖\mathbit{u}-{\mathbit{u}}^{\ast }{‖}_{\mathrm{2}}}{‖{\mathbit{u}}^{\ast }{‖}_{\mathrm{2}}}=& \frac{\sqrt{{\int }_{{\mathrm{\Omega }}_{h}}|\mathbit{u}-{\mathbit{u}}^{\ast }{|}^{\mathrm{2}}}}{\sqrt{{\int }_{{\mathrm{\Omega }}_{h}}|{\mathbit{u}}^{\ast }{|}^{\mathrm{2}}}},\\ \frac{‖p-{p}^{\ast }{‖}_{\mathrm{2}}}{‖{p}^{\ast }{‖}_{\mathrm{2}}}=& \frac{\sqrt{{\int }_{{\mathrm{\Omega }}_{h}}\left(p-{p}^{\ast }{\right)}^{\mathrm{2}}}}{\sqrt{{\int }_{{\mathrm{\Omega }}_{h}}\left({p}^{\ast }{\right)}^{\mathrm{2}}}}.\end{array}\end{array}$

Convergence plots for the 2-D cylindrical cases are presented in Fig. 3. With a smooth density profile, we see optimal convergence for the P2–P1 element pair at third and second order for velocity and pressure, respectively, with both free-slip and zero-slip boundary conditions. Cases with lower wavenumber n show smaller relative error than those at higher n, as expected. The same observation holds for lower and higher polynomial order, k=2 and k=8, for the radial density profile. For the free-slip and zero-slip delta-function cases, however, convergence drops to 1.5 and 0.5 for velocity and pressure, respectively. Furthermore, cases with lower n do not consistently show smaller relative error than those at higher n.

We see similar results for the spherical results illustrated in Fig. 4: third and second order for velocity and pressure for the cases with a smooth density profile, with smaller relative errors for lower wave numbers l and m. Note that here, the smooth vertical profile for density uses $k=l+\mathrm{1}$ in all cases. Again, for cases with a delta-function density anomaly, we observe a reduced order of convergence of 1.5 and 0.5 for velocity and pressure, respectively.

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. 5, which demonstrates that the order of convergence of velocity in the smooth cylindrical cases is indeed limited to second order. The convergence of pressure remains at second order.

5 Discussion

## 5.1 Existing analytical benchmarks in shell domains

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. ). These will be discussed in more detail in the following section.

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 (10). Any solution to the inhomogeneous solution can then be combined with four linearly independent homogeneous solutions to this equation, the coefficients of which can be derived through the imposition of boundary conditions. For the smooth case with a generic monomial forcing term, the same decomposition (i.e. Eqs. 45 and 44) was used in to derive the analytical solution for Stokes flow in two eccentrically nested spheres.

In , similar techniques were employed to derive benchmarks in spherical-shell domains that satisfy zero-slip and free-slip conditions and, in addition, a mixed zero-slip/free-slip case. Here, the derivation starts by simply selecting four, in principle arbitrary, linearly independent solutions for the radially dependent part of the poloidal scalar function. Again the imposition of boundary conditions fixes the coefficients of this linear combination. The corresponding right-hand side forcing term is then obtained by substitution.

The number of published benchmarks for 2-D cylindrical-shell domains is more limited (e.g. ). The derivation of the equivalent cases in 2-D cylindrical-shell domains is somewhat simpler, but also ultimately relies on combining four independent homogeneous solutions and one inhomogeneous solution to a biharmonic equation.

In , analytical solutions in both cylindrical and spherical domains are presented for the Stokes equations with a radially dependent viscosity. Because these are solutions in cylindrical or spherical coordinates without reference to any specific domain, they do not satisfy no-normal-flow conditions on the boundary of a shell domain. They can be used in such domains as a numerical benchmark by specifying all velocity components of the analytical solution as a Dirichlet condition for the model. Analytical solutions for radially dependent viscosity were also presented in . Their solutions (in 3-D only) do satisfy no-normal-flow conditions in a spherical-shell domain, but the tangential components are non-zero at the boundary and thus still require inhomogeneous Dirichlet conditions. Spatially varying viscosity is of course an import aspect of mantle convection models for which these are effective benchmarks. The isoviscous solutions presented here, and those in , however, allow for the testing of zero-slip and free-slip conditions, where in particular free-slip conditions may pose various numerical challenges such as rotational modes and, depending on the discretisation used, the (non-)alignment of velocity components with normal and tangential directions at the boundary.

## 5.2 Reduced order of convergence with discontinuous pressures

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 H−1(Ω) the dual of the Sobolev space H1(Ω), where for the sake of simplicity we assume Ω=Ωh in this section. This means that the delta function can be thought of as a continuous function:

$\begin{array}{}\text{(66)}& {\mathit{\delta }}_{{r}^{\prime }}:v↦\underset{\mathrm{\Omega }}{\int }\mathit{\delta }\left(r-{r}^{\prime }\right)v\left(r,\mathit{\varphi }\right)r\mathrm{d}r\mathrm{d}\mathit{\varphi }=\underset{\mathrm{\Omega }}{\int }v\left({r}^{\prime }\right){r}^{\prime }\mathrm{d}\mathit{\varphi },\end{array}$

which maps functions vH1(Ω), the space of square integrable functions with square integrable weak derivatives, to . demonstrate that even with the very loose regularity condition that the right-hand side f is in Hm(Ω) with $m\ge -\mathrm{1}$, the Stokes equations in the weak form have a unique solution (given sufficient integral constraints) with velocity in Hm+2(Ω) and pressure in Hm+1(Ω). The analytical solutions derived here for the delta case with $m=-\mathrm{1}$ indeed have a discontinuous pressure in H0(Ω)=L2(Ω) and a velocity with discontinuous normal derivative in H1(Ω).

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

where V and W are the discrete vector and scalar function spaces, respectively, and β is a constant, it can be shown that the method converges and in fact

$|{\mathbit{u}}^{\ast }-\mathbit{u}{|}_{\mathrm{1}}+‖{p}^{\ast }-p{‖}_{\mathrm{2}}\le {C}_{\mathrm{1}}\left\{\underset{\mathbit{v}\in V}{inf}|{\mathbit{u}}^{\ast }-\mathbit{v}{|}_{\mathrm{1}}+\underset{q\in W}{inf}‖{p}^{\ast }-q{‖}_{\mathrm{2}}\right\},$

where C1 is a constant independent of h, u and p are the exact solutions, u and p the numerical solutions in the discrete function spaces V and W based on a mesh with mesh distance h, and $|\cdot {|}_{\mathrm{1}}$ is the semi-norm

$\begin{array}{}\text{(68)}& |\mathbit{u}{|}_{\mathrm{1}}=\sqrt{\sum _{i=\mathrm{1}}^{\text{dim}}\underset{\mathrm{\Omega }}{\int }‖{\partial }_{i}\mathbit{u}{‖}^{\mathrm{2}}}.\end{array}$

In other words, the convergence of u and p to u and p is bounded by the best possible approximation of u and p in the discrete spaces V and W. For bounded functions with a discontinuity along a smooth interface, such as our analytical pressure solution p, the best approximation by continuous, piecewise-linear polynomials, i.e. W=P1, is bounded by

$\begin{array}{}\text{(69)}& \underset{q\in W}{inf}‖{p}^{\ast }-q{‖}_{\mathrm{2}}\le {C}_{\mathrm{2}}{h}^{\frac{\mathrm{1}}{\mathrm{2}}}‖{p}^{\ast }{‖}_{\mathrm{2}}\end{array}$

(this bound can be derived from the order of convergence results in ). This therefore limits the convergence of the method.

Figure 6Convergence of velocity (a, b) and pressure (c, d), respectively, for delta-function 2-D cylindrical cases with free-slip and zero-slip boundary conditions with the P2bubble–P1DG element pair.

A solution to this problem is found by allowing for discontinuities in the discrete pressure space. We demonstrate this here by considering W=P1DG the space of piecewise-linear but discontinuous functions. To satisfy the inf-sup condition, this requires enriching the quadratic function space P2 for velocity with a cubic bubble . Convergence results for this element pair are shown in Fig. 6. For the 2-D cylindrical delta-function cases, we observe the expected orders of convergence: third order for velocity and second order for pressure.

Figure 7Convergence of velocity and radial stresses at top (a, c) top and (b, d) bottom surfaces ($r={R}_{±}$), respectively, for delta-function 3-D spherical cases with free-slip boundary conditions.

Finally, we compare our results with those presented in , , , and , who ran the same spherical cases with a delta-function forcing and found second-order convergence for velocity and second-order convergence for pressure related diagnostics. It should be noted, however, that these studies only examined surface diagnostics, such as the velocity divergence and the normal stress. When we examine comparable diagnostics, specifically, the relative error in velocity at the boundary and the boundary normal stress (illustrated in Fig. 7), we find velocity convergence at third order and normal stress at second order. It therefore appears that the reduced order of accuracy in the interior of the domain does not affect the surface response which still converges at the same order as for the smooth case.

The results of (using CitcomS) and (using TERRA) were based on a Q1–P0 discretisation with a continuous piecewise-trilinear velocity and piecewise-constant, discontinuous pressure. Although our analysis above limits the convergence of $‖p-{p}^{\ast }{‖}_{\mathrm{2}}$ for a P0 pressure p to first order, second-order super-convergence can be obtained in some cases by evaluating the analytical solution only in the cell centre. In other words, by comparing to a filtered piecewise-constant analytical approximation ${\overline{p}}^{\ast }$, second-order convergence can sometimes be observed in $‖p-{\overline{p}}^{\ast }{‖}_{\mathrm{2}}$. For continuous pressure approximations, such as the P2–P1 results in this paper, the Q1–Q1 discretisation of the Rhea model in , and the Q2–Q1 discretisation of ASPECT in , reduced convergence in the interior of the domain is to be expected.

6 Conclusions

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 . The continuous approximation of pressure can lead to a reduced order of convergence in the presence of discontinuities, which can be overcome using a discontinuous numerical approximation of pressure. It is important to note that this reduced order of convergence was only observed by comparing the numerical solution with the entire analytical solution in the interior of the domain. A comparison based on surface response only failed to highlight this issue.

Appendix A: Equations in polar coordinates

In this appendix, we work out the incompressible Stokes equations in polar coordinates in terms of a streamfunction ψ, where the components of velocity are given by

$\begin{array}{}\text{(A1)}& {u}_{r}=-\frac{\mathrm{1}}{r}\frac{\partial \mathit{\psi }}{\partial \mathit{\phi }},\phantom{\rule{1em}{0ex}}{u}_{\mathit{\phi }}=\frac{\partial \mathit{\psi }}{\partial }r.\end{array}$

We make use of the following expressions for the derivatives of the unit vectors $\stackrel{\mathrm{^}}{\mathbit{r}}$ and $\stackrel{\mathrm{^}}{\mathbit{\phi }}$ with respect to r and φ:

$\begin{array}{}\text{(A2)}& \stackrel{\mathrm{^}}{\mathbit{r}}\cdot \mathrm{\nabla }\stackrel{\mathrm{^}}{\mathbit{r}}& =\frac{\partial \stackrel{\mathrm{^}}{\mathbit{r}}}{\partial r}=\mathrm{0},& \stackrel{\mathrm{^}}{\mathbit{\phi }}\cdot \mathrm{\nabla }\stackrel{\mathrm{^}}{\mathbit{r}}& =\frac{\mathrm{1}}{r}\frac{\partial \stackrel{\mathrm{^}}{\mathbit{r}}}{\partial \mathit{\phi }}=\frac{\mathrm{1}}{r}\stackrel{\mathrm{^}}{\mathbit{\phi }},\text{(A3)}& \stackrel{\mathrm{^}}{\mathbit{r}}\cdot \mathrm{\nabla }\stackrel{\mathrm{^}}{\mathbit{\phi }}& =\frac{\partial \stackrel{\mathrm{^}}{\mathbit{\phi }}}{\partial r}=\mathrm{0},& \stackrel{\mathrm{^}}{\mathbit{\phi }}\cdot \mathrm{\nabla }\stackrel{\mathrm{^}}{\mathbit{\phi }}& =\frac{\mathrm{1}}{r}\frac{\partial \stackrel{\mathrm{^}}{\mathbit{\phi }}}{\partial \mathit{\phi }}=-\frac{\mathrm{1}}{r}\stackrel{\mathrm{^}}{\mathbit{r}}.\end{array}$

Using these, we can work out the different components of stress:

$\begin{array}{}\text{(A4)}& \begin{array}{rl}& {\mathit{\tau }}_{rr}=\mathrm{2}\mathit{\nu }\stackrel{\mathrm{^}}{\mathbit{r}}\cdot \left[\mathrm{\nabla }\mathbit{u}\right]\cdot \stackrel{\mathrm{^}}{\mathbit{r}}=\mathrm{2}\mathit{\nu }\stackrel{\mathrm{^}}{\mathbit{r}}\cdot \mathrm{\nabla }\left(\stackrel{\mathrm{^}}{\mathbit{r}}\cdot \mathbit{u}\right)-\mathrm{2}\mathit{\nu }\left(\stackrel{\mathrm{^}}{\mathbit{r}}\cdot \mathrm{\nabla }\stackrel{\mathrm{^}}{\mathbit{r}}\right)\\ & \phantom{\rule{1em}{0ex}}\cdot \mathbit{u}=\mathrm{2}\mathit{\nu }\frac{\partial {u}_{r}}{\partial r}-\mathrm{0}=-\mathrm{2}\mathit{\nu }\frac{\partial }{\partial r}\left(\frac{\mathrm{1}}{r}\frac{\partial \mathit{\psi }}{\partial \mathit{\phi }}\right),\end{array}\text{(A5)}& \begin{array}{rl}& {\mathit{\tau }}_{\mathit{\phi }\mathit{\phi }}=\mathrm{2}\mathit{\nu }\stackrel{\mathrm{^}}{\mathbit{\phi }}\cdot \left[\mathrm{\nabla }\mathbit{u}\right]\cdot \stackrel{\mathrm{^}}{\mathbit{\phi }}=\mathrm{2}\mathit{\nu }\stackrel{\mathrm{^}}{\mathbit{\phi }}\cdot \mathrm{\nabla }\left(\stackrel{\mathrm{^}}{\mathbit{\phi }}\cdot \mathbit{u}\right)\\ & \phantom{\rule{1em}{0ex}}-\mathrm{2}\mathit{\nu }\left(\stackrel{\mathrm{^}}{\mathbit{\phi }}\cdot \mathrm{\nabla }\stackrel{\mathrm{^}}{\mathbit{\phi }}\right)\mathbit{u}=\frac{\mathrm{2}\mathit{\nu }}{r}\frac{\partial {u}_{\mathit{\phi }}}{\partial \mathit{\phi }}+\frac{\mathrm{2}\mathit{\nu }}{r}\stackrel{\mathrm{^}}{\mathbit{r}}\cdot \mathbit{u}\\ & \phantom{\rule{1em}{0ex}}=\frac{\mathrm{2}\mathit{\nu }}{r}\frac{{\partial }^{\mathrm{2}}\mathit{\psi }}{\partial r\partial \mathit{\phi }}-\frac{\mathrm{2}\mathit{\nu }}{{r}^{\mathrm{2}}}\frac{\partial \mathit{\psi }}{\partial \mathit{\phi }}=\mathrm{2}\mathit{\nu }\frac{\partial }{\partial r}\left(\frac{\mathrm{1}}{r}\frac{\partial \mathit{\psi }}{\partial \mathit{\phi }}\right),\end{array}\text{(A6)}& \begin{array}{rl}& {\mathit{\tau }}_{r\mathit{\phi }}=\mathit{\nu }\stackrel{\mathrm{^}}{\mathbit{r}}\cdot \left[\mathrm{\nabla }\mathbit{u}\right]\cdot \stackrel{\mathrm{^}}{\mathbit{\phi }}+\mathit{\nu }\stackrel{\mathrm{^}}{\mathbit{\phi }}\cdot \left[\mathrm{\nabla }\mathbit{u}\right]\cdot \stackrel{\mathrm{^}}{\mathbit{r}}=\mathit{\nu }\stackrel{\mathrm{^}}{\mathbit{r}}\cdot \mathrm{\nabla }\left(\mathbit{u}\cdot \stackrel{\mathrm{^}}{\mathbit{\phi }}\right)\\ & \phantom{\rule{1em}{0ex}}-\mathit{\nu }\left(\stackrel{\mathrm{^}}{r}\cdot \mathrm{\nabla }\stackrel{\mathrm{^}}{\mathbit{\phi }}\right)\cdot \mathbit{u}+\mathit{\nu }\stackrel{\mathrm{^}}{\mathbit{\phi }}\cdot \mathrm{\nabla }\left(\mathbit{u}\cdot \stackrel{\mathrm{^}}{\mathbit{r}}\right)-\mathit{\nu }\left(\stackrel{\mathrm{^}}{\mathit{\phi }}\cdot \mathrm{\nabla }\stackrel{\mathrm{^}}{\mathbit{r}}\right)\cdot \mathbit{u}\\ & \phantom{\rule{1em}{0ex}}=\mathit{\nu }\frac{\partial }{\partial r}\left(\frac{\partial \mathit{\psi }}{\partial r}\right)-\mathrm{0}+\frac{\mathit{\nu }}{r}\frac{\partial {u}_{r}}{\partial \mathit{\phi }}-\frac{\mathit{\nu }}{r}\stackrel{\mathrm{^}}{\mathbit{\phi }}\cdot \mathbit{u}\\ & \phantom{\rule{1em}{0ex}}=\mathit{\nu }\left(\frac{{\partial }^{\mathrm{2}}\mathit{\psi }}{\partial {r}^{\mathrm{2}}}-\frac{\mathrm{1}}{r}\frac{\partial }{\partial \mathit{\phi }}\left(\frac{\mathrm{1}}{r}\frac{\partial \mathit{\psi }}{\partial \mathit{\phi }}\right)-\frac{\mathrm{1}}{r}\frac{\partial \mathit{\psi }}{\partial r}\right).\end{array}\end{array}$

Note that, as expected, ${\mathit{\tau }}_{rr}+{\mathit{\tau }}_{\mathit{\phi }\mathit{\phi }}=\mathrm{0}$. In the same way, we derive the following expression for the vorticity, or curl of the velocity:

$\begin{array}{}\text{(A7)}& \begin{array}{rl}& \mathrm{curl}\phantom{\rule{0.25em}{0ex}}\mathbit{u}=\stackrel{\mathrm{^}}{\mathbit{r}}\cdot \left[\mathrm{\nabla }\mathbit{u}\right]\cdot \stackrel{\mathrm{^}}{\mathbit{\phi }}-\stackrel{\mathrm{^}}{\mathbit{\phi }}\cdot \left[\mathrm{\nabla }\mathbit{u}\right]\cdot \stackrel{\mathrm{^}}{\mathbit{r}}=\\ & \phantom{\rule{1em}{0ex}}\frac{{\partial }^{\mathrm{2}}\mathit{\psi }}{\partial {r}^{\mathrm{2}}}+\frac{\mathrm{1}}{r}\frac{\partial }{\partial \mathit{\phi }}\left(\frac{\mathrm{1}}{r}\frac{\partial \mathit{\psi }}{\partial \mathit{\phi }}\right)+\frac{\mathrm{1}}{r}\frac{\partial \mathit{\psi }}{\partial r}={\mathrm{\nabla }}^{\mathrm{2}}\mathit{\psi }.\end{array}\end{array}$

The viscosity term in the Stokes equations can be written as

$\begin{array}{ll}\text{(A8)}& & \mathrm{\nabla }\cdot \mathit{\tau }=\mathrm{\nabla }\cdot \left(\stackrel{\mathrm{^}}{\mathbit{r}}{\mathit{\tau }}_{rr}\stackrel{\mathrm{^}}{\mathbit{r}}+\stackrel{\mathrm{^}}{\mathbit{r}}{\mathit{\tau }}_{r\mathit{\phi }}\stackrel{\mathrm{^}}{\mathbit{\phi }}+\stackrel{\mathrm{^}}{\mathbit{\phi }}{\mathit{\tau }}_{\mathit{\phi }r}\stackrel{\mathrm{^}}{\mathbit{r}}+\stackrel{\mathrm{^}}{\mathbit{\phi }}{\mathit{\tau }}_{\mathit{\phi }\mathit{\phi }}\stackrel{\mathrm{^}}{\mathbit{\phi }}\right)& \phantom{\rule{1em}{0ex}}=\left(\mathrm{\nabla }\cdot \stackrel{\mathrm{^}}{\mathbit{r}}\right)\left({\mathit{\tau }}_{rr}\stackrel{\mathrm{^}}{\mathbit{r}}+{\mathit{\tau }}_{r\mathit{\phi }}\stackrel{\mathrm{^}}{\mathbit{\phi }}\right)+\stackrel{\mathrm{^}}{\mathbit{r}}\cdot \mathrm{\nabla }\left({\mathit{\tau }}_{rr}\stackrel{\mathrm{^}}{\mathbit{r}}+{\mathit{\tau }}_{r\mathit{\phi }}\stackrel{\mathrm{^}}{\mathbit{\phi }}\right)\\ \text{(A9)}& & \phantom{\rule{1em}{0ex}}+\left(\mathrm{\nabla }\cdot \stackrel{\mathrm{^}}{\mathbit{\phi }}\right)\left({\mathit{\tau }}_{\mathit{\phi }r}\stackrel{\mathrm{^}}{\mathbit{r}}+{\mathit{\tau }}_{\mathit{\phi }\mathit{\phi }}\stackrel{\mathrm{^}}{\mathbit{\phi }}\right)+\stackrel{\mathrm{^}}{\mathbit{\phi }}\cdot \mathrm{\nabla }\left({\mathit{\tau }}_{\mathit{\phi }r}\stackrel{\mathrm{^}}{\mathbit{r}}+{\mathit{\tau }}_{\mathit{\phi }\mathit{\phi }}\stackrel{\mathrm{^}}{\mathbit{\phi }}\right).\end{array}$

In addition to Eq. (A3), we use the following identities:

$\begin{array}{}\text{(A10)}& \mathrm{\nabla }\cdot \stackrel{\mathrm{^}}{\mathbit{r}}=\frac{\mathrm{1}}{r},\phantom{\rule{1em}{0ex}}\mathrm{\nabla }\cdot \stackrel{\mathrm{^}}{\mathbit{\phi }}=\mathrm{0},\end{array}$

and the fact that ${\mathit{\tau }}_{\mathit{\phi }\mathit{\phi }}=-{\mathit{\tau }}_{rr}$. After reordering to group the radial and transverse components, this leads to

In combination with the pressure gradient term in polar coordinates

$\begin{array}{}\text{(A14)}& \mathrm{\nabla }p=\frac{\partial p}{\partial r}\stackrel{\mathrm{^}}{\mathbit{r}}+\frac{\mathrm{1}}{r}\frac{\partial p}{\partial \mathit{\phi }}\stackrel{\mathrm{^}}{\mathbit{\phi }},\end{array}$

we obtain the radial and transverse components of the Stokes momentum equation in Eqs. (7) and (8).

Code availability

The Python package Assess, which implements the analytical solutions and evaluates them at arbitrary locations in the domain, is available from http://github.com/stephankramer/assess (last access: 12 June 2020) (see https://assess.readthedocs.io (last access: 12 June 2020). An archived version is available from https://doi.org/10.5281/zenodo.3891545 (Kramer2020). To ensure correctness, in the paper as well as in the Python package, the coefficients for the various solutions are extracted from the LaTeX source automatically using SymPy , verified to adhere to the equations using SageMath , and substituted in the Python package. Assess has also been used to compute the errors in the Fluidity results in this paper. The Fluidity model, including source code and documentation, is available from https://fluidityproject.github.io/ (last access: 17 August 2020). All cases in this paper have been run with tag version 4.1.17, which is archived at https://doi.org/10.5281/zenodo.3988620 .

Author contributions

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 P2bubble–P1DG cases. All authors had significant input on the design and development of this research.

Competing interests

The authors declare that they have no conflict of interest.

Acknowledgements

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.

Financial support

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).

Review statement

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

References

Backus, G.: Poloidal and toroidal fields in geomagnetic field modeling, Rev. Geophys., 24, 75–109, 1986. a, b

Balay, S., Gropp, W. D., McInnes, L. C., and Smith, B. F.: Efficient management of parallelism in object-oriented numerical software libraries, in: Modern software tools for scientific computing, Birkhauser, Boston Inc., 163–202, 1997. a

Baumgardner, J. R.: Three-dimensional treatment of convective flow in the Earth's mantle, J. Stat. Phys., 39, 501–511, https://doi.org/10.1007/BF01008348, 1985. a

Bernardi, C.: Optimal finite-element interpolation on curved domains, SIAM J. Numer. Anal., 26, 1212–1240, 1989. a

Blankenbach, B., Busse, F., Christensen, U., Cserepes, L., Gunkel, D., Hansen, U., Harder, H., Jarvis, G., Koch, M., Marquart, G., Moore, D., Olson, P., Schmeling, H., and Schnaubelt, T.: A benchmark comparison for mantle convection codes, Geophys. J. Int., 98, 23–38, https://doi.org/10.1111/j.1365-246X.1989.tb05511.x, 1989. a

Blinova, I., Makeev, I., and Popov, I.: Benchmark solutions for stokes flows in cylindrical and spherical geometry, Bulletin of the Transilvania University of Brasov., Mathematics, Informatics, Physics. Series III, 9, 11–16, 2016. a, b, c

Boffi, D., Brezzi, F., and Fortin, M.: Incompressible Materials and Flow Problems, in: Mixed Finite Element Methods and Applications, Springer Series in Computational Mathematics, Springer, Berlin, Heidelberg, chap. 8, 459–538, 2013. a, b

Buffa, A., De Falco, C., and Sangalli, G.: Isogeometric analysis: stable elements for the 2D Stokes equation, Int. J. Numer. Meth. Fl., 65, 1407–1422, 2011. a

Bunge, H.-P., Richards, M. A., and Baumgardner, J. R.: The effect of depth–dependent viscosity on the planform of mantle convection, Nature, 279, 436–438, https://doi.org/10.1038/379436a0, 1996. a

Bunge, H.-P., Richards, M. A., and Baumgardner, J. R.: A sensitivity study of 3-D-spherical mantle convection at 108 Rayleigh number: effects of depth-dependent viscosity, heating mode and an endothermic phase change, J. Geophys. Res., 102, 11991–12007, https://doi.org/10.1029/96JB03806, 1997. a

Burstedde, C., Stadler, G., Alisic, L., Wilcox, L. C., Tan, E., Gurnis, M., and Ghattas, O.: Large-scale adaptive mantle convection simulation, Geophys. J. Int., 192, 889–906, https://doi.org/10.1093/gji/ggs070, 2013. a, b, c, d, e, f

Busse, F. H., Christensen, U., Clever, R., Cserepes, L., Gable, C., Giannandrea, E., Guillou, L., Houseman, G., Nataf, H. C., Ogawa, M., Parmentier, M., Sotin, C., and Travis, B.: 3D convection at infinite Prandtl number in Cartesian geometry – a benchmark comparison, Geophys. Astrophys. Fluid Dyn., 75, 39–59, https://doi.org/10.1080/03091929408203646, 1994. a

Choblet, G., Cadek, O., Couturier, F., and Dumoulin, C.: OEDIPUS: a new tool to study the dynamics of planetary interiors, Geophys. J. Int., 170, 9–30, https://doi.org/10.1111/j.1365-246X.2007.03419.x, 2007. a, b

Dannberg, J. and Gassmoller, R.: Chemical trends in ocean islands explained by plume-slab interaction, P. Natl. Acad. Sci. USA, 115, 4351–4356, https://doi.org/10.1073/pnas.1714125115, 2018. a

Davies, D. R. and Davies, J. H.: Thermally–driven mantle plumes reconcile multiple hotspot observations, Earth Planet. Sc. Lett., 278, 50–54, https://doi.org/10.1016/j.epsl.2008.11.027, 2009. a

Davies, D. R., Wilson, C. R., and Kramer, S. C.: Fluidity: a fully unstructured anisotropic adaptive mesh computational modeling framework for geodynamics, Geochem. Geophy. Geosy., 120, Q06001, https://doi.org/10.1029/2011GC003551, 2011. a, b, c, d

Davies, D. R., Davies, J. H., Bollada, P. C., Hassan, O., Morgan, K., and Nithiarasu, P.: A hierarchical mesh refinement technique for global 3-D spherical mantle convection modelling, Geosci. Model Dev., 6, 1095–1107, https://doi.org/10.5194/gmd-6-1095-2013, 2013. a, b, c, d, e

Davies, D. R., Le Voci, G., Goes, S., Kramer, S. C., and Wilson, C. R.: The mantle wedge's transient 3-D flow regime and thermal structure, Geochem. Geophy. Geosy., 17, 78–100, https://doi.org/10.1002/2015GC006125, 2016. a

Davies, D. R., Valentine, A. P., Kramer, S. C., Rawlinson, N., Hoggard, M. J., Eakin, C., and Wilson, C.: Earth's multi-scale topographic response to global mantle flow, Nat. Geosci., 12, 845–850, https://doi.org/10.1038/s41561-019-0441-4, 2019. a

Davies, G. F.: Dynamic Earth: plates, plumes and mantle convection, Cambridge University Press, Cambridge, 1999. a

Davies, J. H. and Stevenson, D. J.: Physical Model of Source Region of Subduction Zone Volcanics, J. Geophys. Res., 97, 2037–2070, https://doi.org/10.1029/91JB02571, 1992. a

Ern, A. and Guermond, J.-L.: Theory and Practice of Finite Elements, Springer, Princeton, 2004. a, b

Garel, F., Goes, S., Davies, D. R., Davies, J. H., Kramer, S. C., and Wilson, C. R.: Interaction of subducted slabs with the mantle transition-zone: A regime diagram from 2-D thermo-mechanical models with a mobile trench and an overriding plate, Geochem. Geophy. Geosy., 15, 1739–1765, https://doi.org/10.1002/2014GC005257, 2014. a

Girault, V. and Raviart, P.-A.: Finite element methods for Navier-Stokes equations: theory and algorithms, vol. 5, Springer Science & Business Media, Berlin, Heidelberg, 2012. a

Gurnis, M.: Phanerozoic marine inundation of continents driven by dynamic topography above subducting slabs, Nature, 364, 589–593, https://doi.org/10.1038/364589a0, 1993. a

Gurnis, M. and Davies, G. F.: Mixing in numerical-models of mantle convection incorporating plate kinematics, J. Geophys. Res., 91, 6375–6395, https://doi.org/10.1029/JB091iB06p06375, 1986. a

Hager, B. H. and Richards, A. M.: Long–wavelength variations in Earth's geoid: Physical models and dynamical implications, Philos. T. R. Soc. London, 328, 309–327, 1989. a

Heister, T., Dannberg, J., Gassmoller, R., and Bangerth, W.: High accuracy mantle convection simulation through modern numerical methods: II: realistic models and problems, Geophys. J. Int., 210, 833–851, https://doi.org/10.1093/gji/ggx195, 2017. a, b

Hernlund, J. W. and Tackley, P. J.: Modeling mantle convection inside the spherical annulus, Phys. Earth Planet. Int., 171, 48–54, https://doi.org/10.1016/j.pepi.2008.07.037, 2008. a

Hoang, T., Verhoosel, C. V., Auricchio, F., van Brummelen, E. H., and Reali, A.: Mixed isogeometric finite cell methods for the stokes problem, Comput. Meth. Appl. M., 316, 400–423, 2017. a

Horbach, A., Mohr, M., and Bunge, H.-P.: A semi-analytic accuracy benchmark for Stokes flow in 3-D spherical mantle convection codes, GEM-International J. Geomath., 11, 1–35, 2020. a, b, c, d

Hunt, S. A., Davies, D. R., Walker, A. M., McCormack, R. J., Wills, A. S., Dobson, D. P., and Li, L.: On the increase in thermal diffusivity caused by the perovskite to post-perovskite phase transition and its implications for mantle dynamics, Earth Planet. Sc. Lett., 319, 96–103, https://doi.org/10.1016/j.epsl.2011.12.009, 2012. a

Jarvis, G. T.: Effects of curvature on two–dimensional models of mantle convection: cylindrical polar coordinates, J. Geophys. Res., 98, 4477–4485, 1993. a

Jones, T. D., Davies, D. R., Campbell, I. H., Wilson, C. R., and Kramer, S. C.: Do mantle plumes preserve the heterogeneous structure of their deep-mantle source?, Earth Planet. Sc. Lett., 434, 10–17, https://doi.org/10.1016/j.epsl.2015.11.016, 2016. a

Jones, T. D., Davies, D. R., and Sossi, P. A.: Tungsten isotopes in mantle plumes: Heads it's positive, tails it's negative, Earth Planet. Sc. Lett., 506, 255–267, https://doi.org/10.1016/j.epsl.2018.11.008, 2019. a

King, S. D., Lee, C., van Keken, P. E., Leng, W., Zhong, S., Tan, E., Tosi, N., and Kameyama, M. C.: A community benchmark for 2-D Cartesian compressible convection in Earth's mantle, Geophys. J. Int., 179, 1–11, 2009. a

Kloecking, M., White, N. J., Maclennan, J., McKenzie, D., and Fitton, J. G.: Quantitative Relationships Between Basalt Geochemistry, Shear Wave Velocity, and Asthenospheric Temperature Beneath Western North America, Geochem. Geophy. Geosy., 19, 3376–3404, https://doi.org/10.1029/2018GC007559, 2019. a

Kramer, S. C.: Assess (v1.0), Analytical Solutions for the Stokes Equations in Spherical Shells in python, Zenodo, https://doi.org/10.5281/zenodo.3891545, 2020. a, b, c

Kramer, S. C., Wilson, C. R., and Davies, D. R.: An implicit free-surface algorithm for geodynamical simulations, Phys. Earth Planet. Int., 194, 25–37, https://doi.org/10.1016/j.pepi.2012.01.001, 2012. a, b, c, d

Kramer, S. C., Wilson, C. R., Davies, D. R., et al.: FluidityProject/fluidity: New test cases Analytical solutions for mantle flow in cylindrical and spherical shells (Version 4.1.17), Zenodo, https://doi.org/10.5281/zenodo.3988620, 2020. a

Kronbichler, M., Heister, T., and Bangerth, W.: High accuracy mantle convection simulation through modern numerical methods, Geophys. J. Int., 191, 12–29, https://doi.org/10.1111/j.1365-246X.2012.05609.x, 2012. a, b

Liu, S. and King, S. D.: A benchmark study of incompressible Stokes flow in a 3-D spherical shell using ASPECT, Geophys. J. Int., 217, 650–667, 2019. a, b, c

Logg, A., Mardal, K.-A., and Wells, G.: Automated Solution of Differential Equations by the Finite Element Method: The FEniCS Book, Lecture Notes in Computational Science and Engineering, Springer, Berlin, 84, https://doi.org/10.1007/978-3-642-23099-8, 2012. a

McKenzie, D. P., Roberts, J. M., and Weiss, N. O.: Convection in the Earth's mantle: towards a numerical simulation, J. Fluid Mech., 62, 465–538, https://doi.org/10.1017/S0022112074000784, 1974. a

McNamara, A. K. and Zhong, S.: Thermo–chemical structures beneath Africa and the Pacific Ocean, Nature, 437, 1136–1139, https://doi.org/10.1038/nature04066, 2005. a

Meurer, A., Smith, C. P., Paprocki, M., Čertík, O., Kirpichev, S. B., Rocklin, M., Kumar, A., Ivanov, S., Moore, J. K., Singh, S., Rathnayake, T., Vig, S., Granger, B. E., Muller, R. P., Bonazzi, F., Gupta, H., Vats, S., Johansson, F., Pedregosa, F., Curry, M. J., Terrel, A. R., Roučka, v., Saboo, A., Fernando, I., Kulal, S., Cimrman, R., and Scopatz, A.: SymPy: symbolic computing in Python, PeerJ, 3, e103, https://doi.org/10.7717/peerj-cs.103, 2017. a

Mitrovica, J. X., Beaumont, C., and Jarvis, G. T.: Tilting of continental interiors by the dynamical effects of subduction, Tectonics, 8, 1079–1094, https://doi.org/10.1029/TC008i005p01079, 1989. a

Moresi, L. N. and Solomatov, V. S.: Numerical investigations of 2D convection with extremely large viscosity variations, Phys. Fluid, 7, 2154–2162, https://doi.org/10.1063/1.868465, 1995. a

Morgan, W. J.: Deep mantle convection plumes and plate motions, Am. Assoc. Petr. Geol. B., 56, 203–213, 1972. a

Nakagawa, T. and Tackley, P. J.: The interaction between the post-perovskite phase change and a thermo-chemical boundary layer near the core-mantle boundary, Earth Planet. Sc. Lett., 238, 204–216, 2005. a

Oldham, D. N. and Davies, J. H.: Numerical investigation of layered convection in a three-dimensional shell with application to planetary mantles, Geochem. Geophy. Geosy., 5, Q12C04, https://doi.org/10.1029/2003GC000603, 2004. a

Olson, P., Deguen, R., Hinnov, L. A., and Zhong, S. J.: Controls on geomagnetic reversals and core evolution by mantle convection in the Phanerozoic, Phys. Earth Planet. Int., 214, 87–103, https://doi.org/10.1016/j.pepi.2012.10.003, 2013. a

Popov, I. Yu., Lobanov, I. S., Popov, S. I., Popov, A. I., and Gerya, T. V.: Practical analytical solutions for benchmarking of 2-D and 3-D geodynamic Stokes problems with variable viscosity, Solid Earth, 5, 461–476, https://doi.org/10.5194/se-5-461-2014, 2014. a

Rathgeber, F., Ham, D. A., Mitchell, L., Lange, M., Luporini, F., Mcrae, A. T. T., Bercea, G.-T., Markall, G. R., and Kelly, P. H. J.: Firedrake: Automating the Finite Element Method by Composing Abstractions, ACT T. Math. Softw., 43, 1–24, https://doi.org/10.1145/2998441, 2016. a

Ribe, N. M.: Analytical Approaches to Mantle Dynamics, in: Mantle Dynamics, edited by: Bercovici, D. and Schubert, G., vol. 7 of Treatise on Geophysics, Elsevier, New York, 167–226,2009. a, b

Roache, P. J.: Code Verification by the Method of Manufactured Solutions, J. Fluid. Eng.-T. ASME, 124, 4–10, https://doi.org/10.1115/1.1436090, 2002. a

Solheim, L. P. and Peltier, W. R.: Avalanche effects in phase transition modulated convection – a model of Earth's mantle, J. Geophys. Res., 99, 6997–7018, 1994. a

Stadler, G., Gurnis, M., Burstedde, C., Wilcox, L. C., Alisic, L., and Ghattas, O.: The dynamics of plate tectonics and mantle flow: from local to global scales, Science, 329, 1033–1038, https://doi.org/10.1126/science.1191223, 2010. a

Stotz, I. L., Iaffaldano, G., and Davies, D. R.: Pressure-Driven Poiseuille Flow: A Major Component of the Torque-Balance Governing Pacific Plate Motion, Geophys. Res. Lett., 45, 117–125, https://doi.org/10.1002/2017GL075697, 2018. a

Tackley, P. J.: Modelling compressible mantle convection with large viscosity contrasts in a three-dimensional spherical shell using the Yin-Yang grid, Phys. Earth Planet. Int., 171, 7–18, https://doi.org/10.1016/j.pepi.2008.08.005, 2008. a

Tackley, P. J., Stevenson, D. J., Glatzmaier, G. A., and Schubert, G.: Effects of an endothermic phase transition at 670 km depth in a spherical model of convection in the Earth's mantle, Nature, 361, 699–704, https://doi.org/10.1038/361699a0, 1993. a

Tan, E., Leng, W., Zhong, S., and Gurins, M.: On the location of plumes and mobility of thermo–chemical structures with high bulk modulus in the 3-D compressible mantle, Geochem. Geophy. Geosy., 12, Q07005, https://doi.org/10.1029/2011GC003665, 2011. a

The Sage Developers: SageMath, the Sage Mathematics Software System (Version 8.6), available at: https://www.sagemath.org (last access: 1 June 2020), 2019. a

Thieulot, C.: Analytical solution for viscous incompressible Stokes flow in a spherical shell, Solid Earth, 8, 1181–1191, https://doi.org/10.5194/se-8-1181-2017, 2017. a, b

Tosi, N. and Martinec, Z.: Semi-analytical solution for viscous Stokes flow in two eccentrically nested spheres, Geophys. J. Int., 170, 1015–1030, 2007. a, b

Tosi, N., Stein, C., Noack, L., Hüttig, C., Maierová, P., Samuel, H., Davies, D. R., Wilson, C. R., Kramer, S. C., Thieulot, C., Glerum, A., Fraters, M., Spakman, W., Rozel, A., and Tackley, P. J.: A community benchmark for viscoplastic thermal convection in a 2-D square box, Geochem. Geophy. Geosy., 16, 2175–2196, https://doi.org/10.1002/2015GC005807, 2015. a

Travis, B. J., Anderson, C., Baumgardner, J. R., Gable, C. W., Hager, B. H., O'Connell, R. J., Olson, P., Raefsky, A., and Schubert, G.: A benchmark comparison of numerical methods for infinite Prandtl number thermal convection in two–dimensional Cartesian geometry, Geophys. Astrophys. Fluid Dyn., 55, 137–160, 1990. a

van Keken, P. E.: Cylindrical scaling for dynamical cooling models of the Earth, Phys. Earth. Planet. Int., 124, 119–130, 2001. a

van Keken, P. E. and Ballentine, C. J.: Whole–mantle versus layered mantle convection and the role of a high–viscosity lower mantle in terrestrial volatile evolution, Earth Planet. Sc. Lett., 156, 19–32, 1998. a

van Keken, P. E. and Ballentine, C. J.: Dynamical models of mantle volatile evolution and the role of phase transitions and temperature–dependent rheology, J. Geophys. Res., 104, 7137–7151, 1999. a

van Keken, P. E. and Yuen, D. A.: Dynamical influences of high viscosity in the lower mantle induced by the steep melting curve of perovskite: effects of curvature and time–dependence, J. Geophys. Res., 100, 15233–15248, 1995. a

van Keken, P. E., King, S. D., Schmeling, H., Christensen, U. R., Neumeister, D. and Doin, M. P.: A comparison of methods for the modeling of thermo–chemical convection, J. Geophys. Res., 102, 22477–22495, 1997. a

van Keken, P. E., Kiefer, B., and Peacock, S.: High resolution models of subduction zones: Implications for mineral dehydration reactions and the transport of water into the deep mantle, Geochem. Geophy. Geosy., 3, 1056, https://doi.org/10.1029/2001GC000256, 2002. a

van Keken, P. E., Currie, C., King, S. D., Behn, M. D., Cagnioncle, A., He, J., Katz, R. F., Lin, S., Parmentier, E. M., Spiegelman, M., and Wang, K.: A community benchmark for subduction zone modeling, Phys. Earth Planet. Int., 171, 187–197, https://doi.org/10.1016/j.pepi.2008.04.015, 2008. a

Wilson, C. R., Spiegelman, M., and van Keken, P. E.: TerraFERMA: The Transparent Finite Element Rapid Model Assembler for multiphysics problems in Earth sciences, Geochem. Geophy. Geosy., 18, 769–810, https://doi.org/10.1002/2016GC006702, 2017. a

Wolstencroft, M., Davies, J. H., and Davies, D. R.: Nusselt-Rayleigh number scaling for spherical shell Earth mantle simulation up to a Rayleigh number of 109, Phys. Earth Planet. Int., 176, 132–141, https://doi.org/10.1016/j.pepi.2009.05.002, 2009. a

Zhong, S., Gurnis, M., and Hulbert, G.: Accurate determination of surface normal stress in viscous flow from a consistent boundary flux method, Phys. Earth Planet. Int., 78, 1–8, https://doi.org/10.1016/0031-9201(93)90078-N, 1993. a, b

Zhong, S., Zuber, M. T., Moresi, L., and Gurnis, M.: Role of temperature-dependent viscosity and surface plates in spherical shell models of mantle convection, J. Geophys. Res., 105, 11063–11082, https://doi.org/10.1029/2000JB900003, 2000.  a, b

Zhong, S., McNamara, A., Tan, E., Moresi, L., and Gurnis, M.: A benchmark study on mantle convection in a 3-D spherical shell using CitcomS, Geochem. Geophy. Geosy., 9, Q10017, https://doi.org/10.1029/2008GC002048, 2008. a, b, c, d, e