Numerical models are a powerful tool for investigating the dynamic processes in the interior of the Earth and other planets, but the reliability and predictive power of these discretized models depends on the numerical method as well as an accurate representation of material properties in space and time. In the specific context of geodynamic models, particle methods have been applied extensively because of their suitability for advection-dominated processes and have been used in applications such as tracking the composition of solid rock and melt in the Earth's mantle, fluids in lithospheric- and crustal-scale models, light elements in the liquid core, and deformation properties like accumulated finite strain or mineral grain size, along with many applications outside the Earth sciences.

There have been significant benchmarking efforts to measure the accuracy and convergence behavior of particle methods, but these efforts have largely been limited to instantaneous solutions, or time-dependent models without analytical solutions. As a consequence, there is little understanding about the interplay of particle advection errors and errors introduced in the solution of the underlying transient, nonlinear flow equations. To address these limitations, we present two new dynamic benchmarks for transient Stokes flow with analytical solutions that allow us to quantify the accuracy of various advection methods in nonlinear flow. We use these benchmarks to measure the accuracy of our particle algorithm as implemented in the ASPECT geodynamic modeling software against commonly employed field methods and analytical solutions. In particular, we quantify if an algorithm that is higher-order accurate in time will allow for better overall model accuracy and verify that our algorithm reaches its intended optimal convergence rate. We then document that the observed increased accuracy of higher-order algorithms matters for geodynamic applications with an example of modeling small-scale convection underneath an oceanic plate and show that the predicted place and time of onset of small-scale convection depends significantly on the chosen particle advection method.

Descriptions and implementations of our benchmarks are openly available and can be used to verify other advection algorithms. The availability of accurate, scalable, and efficient particle methods as part of the widely used open-source code ASPECT will allow geodynamicists to investigate complex time-dependent geodynamic processes such as elastic deformation, anisotropic fabric development, melt generation and migration, and grain damage.

Numerical models have been a key tool for geoscientists investigating the processes governing plate tectonics and mantle convection. Among the many one could cite, a cross-section of publications include studies of the evolution of mantle heterogeneities over time (e.g.,

Due to their inherent suitability for modeling advection-dominated problems, different variants of particle methods have become popular in the geodynamic modeling community

In this work, we measure the particle advection error in transient flow using the particle architecture we have developed as part of our work on the Advanced Solver for Planetary Evolution, Convection, and Tectonics (ASPECT;

For the models in this work, we will consider the incompressible Stokes equations using the Boussinesq approximation. They consist of a force balance and a mass continuity equation:

The models evolve in time because the density and viscosity may depend on time through additional variables

We end this section by noting that while for simplicity we use the

Over the past years we have developed a flexible, scalable, and efficient particle architecture

We have discussed the numerical methods for most steps of our particle algorithm

In particle methods, the values of fields

In practice, the exact velocity

The particle positions contain error contributions from the inexactly known velocity field discussed in the previous subsection, as well as the error introduced by time stepping the ODEs describing particle position and properties. If we denote by

Given these considerations and that ODE integrators require the expensive step of evaluating the velocity field

For simplicity, we will omit the particle index

In the following, we briefly describe some of the common time stepping algorithms, including those we use in this work:

Forward Euler (FE) – the simplest method often used is the forward Euler scheme,

Runge–Kutta second order (RK2) – accuracy and stability can be improved by using a second-order Runge–Kutta scheme (that is,

Runge–Kutta second-order space, first-order time (RK2FOT) – in practice, many geodynamic modeling packages only store a single velocity solution at a time, which prevents the interpolation of the velocity field at

Runge–Kutta fourth order (RK4) – a further improvement in particle advection can be achieved by a fourth-order Runge–Kutta scheme. We choose the most commonly used scheme that computes the new position as

The primary expense in all of the methods above is the evaluation of the velocity field

Based on our earlier work measuring the convergence properties of the integrators described above in analytically known flow (see the Supplement in

For our benchmarks we want to reduce the coupling between Eqs. (

The set of benchmarks we will consider is an extension of previously published benchmarks

The benchmarks below extend these steady-state models with a nonlinear time dependence, which will test how much error the chosen advection scheme accumulates over time when the velocity changes. In order to derive such solutions, we make use of the fact that we can superimpose two independent flow fields. In addition to a steady flow based on a stream function

As described, we start from an instantaneous solution for Stokes flow in a spherical shell and add a time-dependent rotational flow that is enforced using the boundary conditions. A detailed derivation of the benchmark solution is given in Appendix

The constants

Solution of a transient spherical shell benchmark.

We note that this solution can be interpreted as consistent with a stream function that is variable in time, with a flow field that conveniently advects the density in such a way as to satisfy our Stokes solution at the current point in time. We also note that this solution effectively consists of two parts: a density-driven internal convection in small convection cells and a forced and analytically known rotational flow of the whole model.

Our solution for the box benchmark is analogous to the spherical shell case, but we can build directly on our earlier model setup of

As for the spherical case described above, we will use a nonlinear choice for

Solution of a transient box benchmark with known analytic solution.

Adding time dependence to the benchmarks modifies the numerical solution and the accumulated error in distinct ways, depending on which advection method we choose. Here we will consider five cases:

We obtain a computed solution by using the exact density

We use the (interpolated) exact density as an initial condition for the density advection Eq. (

Same as case 2, but we use continuous, piecewise quadratic (

We use the exact density as the initial condition for particles whose position we advect using a second-order accurate Runge–Kutta (RK2) algorithm. Where we need the density for the solution of the Stokes equations, we interpolate properties from particles onto a DGQ

Same as case 4, but we use RK2FOT as described in Sect.

In order to limit ourselves to examining

Because the number of particles in a cell can change during the model run, we enforce a minimum of 12 particles per cell, which guarantees that the linear least-squares interpolation algorithm is always sufficiently constrained. We do not limit the maximum number of particles per cell in these models. In practice, the presented benchmarks never require the addition of particles, and therefore the number of particles stays constant (for the box) or decreases by less than

In the following subsections, let us use the benchmarks derived above for the numerical evaluation of particle schemes.

Figure

Transient spherical annulus benchmark.

The left column illustrates that all advection methods but RK2FOT reach second-order convergence for the density with increasing resolution (bottom left panel). As expected, RK2FOT is limited by the available time information and only reaches first-order convergence. An additional detail is that the field methods (

The analysis of error evolution over time (the right column of Fig.

Summarizing these findings, low-order particle methods show larger errors than the tested field methods, while higher-order particle methods outperform the field methods in our benchmark both with increasing resolution and with increasing model time. Therefore, whenever the other error sources of the solution are sufficiently small (i.e., if the Stokes element and time-stepping scheme allow for higher-order accuracy), a higher-order particle scheme can significantly improve accuracy.

The box benchmark results follow a similar pattern for the dependence of errors on the methods used (see Fig.

Transient box benchmark.

When evaluating the error norms of the solution as a function of time for a fixed resolution (right column of Fig.

For our conclusion it is important to note that even though both particle methods start with a significantly smaller error than finite-element advection methods, the first-order accuracy of the RK2FOT scheme produces significantly larger errors, and that this effect becomes more pronounced with increasing resolution and increasing model runtime.

Summarizing the benchmark results, first-order particle methods yield larger errors than the tested field-based methods, while higher-order particle methods outperform the investigated field-based methods both with increasing resolution and increasing model time. Therefore, whenever other error sources of the solution are sufficiently small (i.e., if the Stokes element and time-stepping scheme allow for higher-order accuracy), a higher-order particle scheme can significantly enhance the accuracy of the solution. Even though we cannot prove it here, this conclusion is likely also true for the common case of a solution that is not smooth enough to allow for the optimal convergence rate of RK2. For discontinuous solutions the convergence rate of higher-order finite elements can break down to the same rate as for first-order elements

Finally, the improved accuracy of higher-order particle methods has to be discussed in the context of their larger memory requirement and computational cost. RK2 requires the storage of two velocity solutions instead of a single solution like RK2FOT; thus, very coarsely (neglecting the memory cost of the particles) one could consider RK2 to be twice as expensive in terms of memory. However, this additional cost has to be compared with the total memory requirement of a modern geodynamic model and is only relevant if models are typically limited by the available memory. Many modern Stokes solvers in geodynamics either rely on matrix-based algorithms or Krylov subspace solvers with a long recurrence relation (e.g., GMRES), both of which can easily require the memory of tens to hundreds of solution vectors. For all of these models, storing an additional velocity solution for the particle advection represents a negligible memory cost. Even if models are computed with modern matrix-free solvers with short-recurrence relations

In theory, and at the most granular level, RK2 could be expected to require 50 % more memory bandwidth than RK2FOT, because simplistically speaking its second stage computes

Performance comparison of RK2 and RK2FOT for the box benchmark with a shortened end time of

All performance results were computed on one core of an AMD EPYC 7453 processor with the software listed in the Data Availability statement.

Table

Above we have illustrated the influence of algorithmic choices on the accuracy and performance of benchmark results. However, this does not by itself justify the increased cost of such an algorithm in practical models: perhaps, in typical geodynamic applications, the error due to a low-order time approximation is negligible compared with other error sources, and therefore a simple advection method may be sufficient. In the following, we use an application model to show that the higher accuracy is indeed important and can influence first-order outcomes and the interpretation of a geodynamic study.

In order to illustrate this point, we use an example where the property carried on the particles (the grain size

In this model, we use particles to carry information about the mineral grain size

Here,

In addition, particles are not just advected, but both the temperature and the strain rate in the model influence the evolution of the grain size. For a single particle moving along the flow field, we describe this evolution via the equation

As can be seen in Fig.

Onset of convection for RK2 and RK2FOT for the application model with a CFL number of 0.15 over time. The table shows distance from ridge and plate age of onset of convection listed for different model times for both RK2 and RK2FOT.

More importantly, one could assume that the shown variations just illustrate temporal variability in the convection pattern, and that the RK2FOT results are only a temporary state at the end of the model (200 Myr). To investigate this question we track the onset of convection over time for both RK2 and RK2FOT, and show the results in Table

The exact timing of the onset of convection beneath an oceanic plate is relevant for the argument that small-scale convection causes a flattening of topography in seafloor subsidence datasets, and therefore ultimately relevant also for supporting the plate model of oceanic lithosphere cooling

Because both the onset of small-scale convection and the length scale of convection cells is governed by the growth of small instabilities in a boundary layer, it is reasonable to assume that the lower accuracy of RK2FOT supports this growth of instabilities and explains the earlier onset of convection. The growth of instabilities in a boundary layer (or internally layered systems) is one of the most common processes for developing flow features in convecting systems like the Earth's mantle and lithosphere. Examples are the generation of plumes at the core–mantle boundary, the stagnation of subducted slabs or plumes at phase transitions, or the initiation of plate boundaries in models of lithosphere dynamics. We therefore infer from our results that models of all of these processes can benefit from incorporating more accurate particle advection methods, and that predictions of models using lower-order advection schemes may need to be adjusted or reproduced in higher-resolution studies.

We have shown in our benchmarks and applications that implementing accurate particle algorithms, in particular higher order in time, can significantly improve the numerical accuracy of geodynamic models. One of the conclusions of our benchmarks is that commonly used particle advection methods that are higher order in space but first order in time acquire significant amounts of numerical error in time-variable flow, which becomes more pronounced the higher the resolution and the longer the model runs. The reason this error is not often discussed in the geodynamic literature is that traditional benchmarks that either rely on instantaneous analytical solutions or on steady-state solutions cannot show this error by their design. Only model comparison studies or benchmarks with analytical solutions in transient flow can point out this error source. Given that many geodynamic finite-element models already use Stokes elements that allow for higher-order accuracy to ensure stability (e.g., Taylor–Hood

We believe that sharper focus on quantifying the numerical accuracy of geodynamic models will generate more trust in geodynamic model solutions and increase the impact of the discipline of geodynamic modeling as a whole. We provide the reference implementation of our algorithms and benchmarks in the open-source community software ASPECT and hope that they are useful to the community at large.

Extending our previously published spherical benchmark

We therefore begin by deriving a new exact solution to the stationary, incompressible Stokes equations for an isoviscous, isothermal fluid in a 2D annulus. Given the geometry of the problem, we work in polar coordinates. We denote the orthonormal basis vectors by

Given these assumptions, the incompressible Stokes equations in the annulus are

We then seek solutions whose circumferential velocity can be written as

In this work we choose

Taking

In summary, Eqs. (

We can use the velocity solution for

The solution above is time independent and only valid for instantaneous models where the density is not advected. To make it time dependent, we first modify the density and gravity to create a steady-state variant of the benchmark and add a known time-dependent component to the velocity as described in Sect.

In order to transform this steady-state benchmark into a known transient solution, we then add a solid body rotation with a nonlinear time-dependent rotational velocity to the flow field. Since solid body rotations lie in the nullspace of the incompressible Stokes equations on an annular domain, the resulting flow field will still be a solution of the incompressible Stokes equations. This approach will work as long as we perform an appropriate rotation of all components of the solution, and it is equivalent to defining the solution in a rotating reference frame. We therefore modify the velocity components in

Since the modification of the velocity in Eq. (

The final consideration is how to achieve this prescribed rotation in the model. Since in the incompressible Stokes equations stresses are transmitted instantaneously throughout the entire domain, we can use the exact, known velocities as boundary conditions and expect the motion to apply equally to the entire model domain.

In order to better understand the accuracy of the RK2 method and investigate the source of the error decrease late in the model, we show in Fig.

Transient spherical annulus benchmark.

Turning to the evolution of error over model time (Fig.

To understand the reduction in velocity error and density error at certain model times requires us to take a closer look at the benchmark solution. Particularly relevant is that the benchmark solution is rotation symmetric, with four regions of upwelling and four regions of downwelling. Therefore, rotating the density field by 90° at any given time would lead to exactly the same solution. For some reason the reduction in velocity error in RK2 coincides almost exactly with a quarter rotation of the model solution at

Computations were done using the ASPECT code

RG devised the study, devised and ran the benchmark cases, and wrote the majority of the paper. JD provided and described the grain size application model. WB developed the integrator error analysis. EGP provided the particle interpolation algorithm. EGP and CT developed the instantaneous solution of the annulus benchmark case. All authors jointly interpreted the results and improved the paper.

The contact author has declared that none of the authors has any competing interests.

Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this paper. While Copernicus Publications makes every effort to include appropriate place names, the final responsibility lies with the authors.

The authors acknowledge University of Florida Research Computing for providing computational resources and support that contributed to the research results reported in this paper. Computations were also run on the Stampede2 system at the Texas Advanced Computing Center (TACC) as part of award TG-EAR080022N.

We thank the Computational Infrastructure for Geodynamics – funded by the National Science Foundation under awards EAR-1550901 and EAR-2149126 – for supporting the development of ASPECT.

Rene Gassmöller and Wolfgang Bangerth were partially supported by the National Science Foundation under award OCI-1148116 as part of the Software Infrastructure for Sustained Innovation (SI2) program; and by the Computational Infrastructure in Geodynamics initiative (CIG), through the National Science Foundation under awards EAR-0949446, EAR-1550901, and EAR-2149126. Wolfgang Bangerth was also supported by the National Science Foundation under awards OAC-1835673 and EAR-1925595.

Elbridge Gerry Puckett was supported by the National Science Foundation under award ACI-1440811 as part of the SI2 Scientific Software Elements (SSE) program.

Juliane Dannberg and Rene Gassmöller were supported by the National Science Foundation under awards EAR-1925677 and EAR-2054605.

This research has been supported by the National Science Foundation (grant nos. EAR-1550901, EAR-2149126, OCI-1148116, EAR-0949446, OAC-1835673, EAR-1925595, ACI-1440811, EAR-1925677, and EAR-2054605).

This paper was edited by Boris Kaus and reviewed by two anonymous referees.