Skip to content

Surface boundary

What this page checks

This page checks the prescribed surface temperature, outer_boundary_condition = 5: the surface of the mantle is held at a fixed temperature, and the solver works out how much heat leaves through it (see Surface boundary conditions). Validation here means that we run Aragog on a case where the right answer is known from a textbook solution or from a convergence law, and check that Aragog gives that answer. If this boundary condition were wrong, every run with a fixed surface temperature would lose heat at the wrong rate, and its interior temperature and lid thickness would be wrong. Each case below says why the check exists, what it tests, how we know the right answer and why it matters, then shows a plot and the test details.

All cases use the constant-properties mode: thermal conductivity \(k\) = 4 W/m/K, density \(\rho\) = 4000 kg/m³ times heat capacity \(c_p\) = 1000 J/kg/K, \(\rho c_p\) = 4 × 10⁶ J/m³/K, so the thermal diffusivity is \(\kappa = k / (\rho c_p)\) = 10⁻⁶ m²/s. The outer radius is 6371 km, the mesh is uniform in radius, no heat crosses the bottom of the shell, and the floor of the eddy diffusivity (kappah_floor) is 0. The tests drive the solver's own right-hand side with SciPy, so they test the same code a run uses.

A heated shell in steady state

Why this check exists. The surface face could use a wrong rule: conduction over a full cell in place of a half cell, an entropy difference over the half cell in place of the temperature difference, or \(c_p/T\) of the top cell in place of the surface node. A heated shell then settles at the wrong temperatures. With a full-cell face the temperature error falls only as \(N^{-1}\); the other two keep the \(N^{-2}\) decrease but give a top-cell error 3.4 and 5.9 times larger, and the test sees all three.

What it tests. A mantle shell from 3480 km to 6371 km radius is heated uniformly, \(H\) = 3.4 × 10⁻¹³ W/kg, with the surface held at \(T_s\) = 1000 K and convection off. The test finds the steady state, where heating and heat loss balance, on 50, 100 and 200 cells. It checks the surface heat flux and the temperature in every cell.

How we know the right answer. Conduction with uniform heating \(H\) [W/kg] in a sphere or spherical shell has the general steady solution \(T = -\rho H r^2 / (6k) + c_1 / r + c_2\) (Turcotte and Schubert 2014, section 4.9, eq. 4.40, p. 177). Choosing the constants for no flux at the inner radius \(r_\mathrm{in}\) and \(T_s\) at the outer radius \(r_\mathrm{out}\) gives the shell form

\[T(r) = T_s + \frac{\rho H}{6k}\left(r_\mathrm{out}^2 - r^2\right) + \frac{\rho H r_\mathrm{in}^3}{3k}\left(\frac{1}{r_\mathrm{out}} - \frac{1}{r}\right),\]

and all heat made in the shell leaves through the surface: the surface heat flux is \(F_\mathrm{top} = \rho H (r_\mathrm{out}^3 - r_\mathrm{in}^3) / (3 r_\mathrm{out}^2)\) [W/m²]. The solver uses exact shell volumes, so this flux holds on every grid. The temperature error of a second-order scheme falls as \(N^{-2}\), with \(N\) the number of cells.

Why it matters. The interior temperature of a run with a fixed surface temperature depends on how the surface face converts the temperature difference into a flux.

Steady temperature of the heated shell against the closed form, and N squared times the temperature error against N Steady temperature of the heated shell against the closed form, and N squared times the temperature error against N

How to read the plot. Top: the temperature against radius from the closed form (line) and from Aragog on 50 cells (dots); the dots lie on the line. Bottom: \(N^2\) times the largest temperature error, divided by the temperature rise at the inner radius; a horizontal line means the error falls as \(N^{-2}\).

Test details
  • Reference: Turcotte and Schubert (2014), section 4.9, eq. 4.40 (p. 177), with the constants for zero flux at the inner radius.
  • Tolerance: surface flux to a relative 10⁻⁸ on each grid; temperature error with order 2.0 ± 0.2 between 50, 100 and 200 cells; \(N^2\) times the top-cell error at 0.159 of the temperature rise at the inner radius to 10 % on each grid (a pin of this scheme, measured at 0.1586, 0.1585 and 0.1585).
  • Discrimination: the surface flux checks the energy balance and holds for any face rule. A full-cell face drops the order to 1.00 (largest error on 50 cells 1.8 % of the rise, against 0.01 % with the half cell). An entropy difference over the half cell and \(c_p/T\) of the top cell keep order 2 but give \(N^2\) times the top-cell error 0.55 and 0.94, outside the pin.
  • Test id: tests/test_entropy_bc5_validation.py::test_the_steady_heated_shell_matches_the_closed_form
  • Command: pytest tests/test_entropy_bc5_validation.py -k steady_heated (add --validation-plots to write the plot pair)

Cooling below a fixed surface temperature

Why this check exists. A wrong surface face also gives a wrong heat flux while the mantle cools, not only in steady state. This case follows the flux through time; a full-cell face turns the early flux error from +4.6 × 10⁻³ to −4.7 × 10⁻³, and the test sees it.

What it tests. A shell 25 km thick, divided into 400 cells (62.5 m each), starts at \(T_i\) = 1100 K everywhere. Its surface is held at \(T_s\) = 1000 K, and convection is off. The test records the surface flux at 16 times \(t\) from 5.3 × 10¹⁰ s to 7.5 × 10¹² s (about 1700 to 240,000 years).

How we know the right answer. A half space that starts at \(T_i\), with its surface held at \(T_s\), loses heat at the rate \(F(t) = k (T_i - T_s) / \sqrt{\pi \kappa t}\) (Turcotte and Schubert 2014, section 4.15, eq. 4.116, p. 189). The shell differs from a half space in 3 small ways:

  • The grid error of the flux is about \(0.063\,(h/\delta)^2\), with \(h\) the cell size and \(\delta = \sqrt{\kappa t}\) the depth of the cooled layer: 4.64 × 10⁻³ at the first time and 3.3 × 10⁻⁵ at the last. The coefficient 0.063 comes from a finite-volume solution with the same half-cell face and a temperature-based scheme, outside this repository, so the check of the signed error below is a pin of this scheme at \(h\) = 62.5 m, not an independent reference.
  • The curvature of the shell lowers the flux by \(\sqrt{\pi \kappa t} / r_\mathrm{out}\), at most 7.6 × 10⁻⁴.
  • The bottom of the shell lies more than 9 cooled-layer depths down, so the shell never feels it.

Why it matters. The cooling of the lid below a fixed surface temperature sets how fast a stagnant-lid planet loses heat.

Surface heat flux against time compared with the half-space solution, and the relative difference Surface heat flux against time compared with the half-space solution, and the relative difference

How to read the plot. Top: the surface flux against time on log axes, from the half-space solution (line) and from Aragog (dots). Bottom: the relative difference, with the tolerance as dashed lines; the points stay between them.

Test details
  • Reference: Turcotte and Schubert (2014), section 4.15, eq. 4.116 (p. 189).
  • Tolerance: relative 10⁻² at every output time (sum of the estimates above: below 5.5 × 10⁻³); the signed error within 5 × 10⁻⁴ of the sum of the grid and curvature estimates.
  • Discrimination: the signed error follows the sum of the grid and curvature estimates to 5 × 10⁻⁴ (6.7 × 10⁻⁵ in the run); a full-cell face misses it by 9.3 × 10⁻³.
  • Test id: tests/test_entropy_bc5_validation.py::test_cooling_below_a_fixed_surface_temperature_follows_the_half_space_flux
  • Command: pytest tests/test_entropy_bc5_validation.py -k half_space (add --validation-plots to write the plot pair)

Grid convergence with convection

Why this check exists. With convection on, the entropy gradient at the surface node also enters the mixing-length flux. This check shows that the steady solution with convection converges at the rate of the scheme and keeps the energy balance. It does not separate the wrong surface rules of the first case, which keep order 2 here too; the first case catches them.

What it tests. The heated shell of the first case, with mixing-length convection at a viscosity of 10²¹ Pa s and the mixing length 0 at both boundaries (nearest_boundary, the profile mode 5 accepts). The test runs it to steady state on 100, 200 and 400 cells. It compares the mean temperature and the temperature at 5 fixed radii between the grids.

How we know the right answer. For a second-order scheme the difference between two grids falls by a factor of 4 each time the cells are halved. From 3 grids, Richardson extrapolation estimates the value on an infinitely fine grid. The surface flux needs no extrapolation: in steady state it equals the total heating divided by the surface area on every grid. Before the check the test asserts that the surface boundary layer (the depth where the temperature reaches 90 % of its rise at mid-mantle) spans at least 8 cells, so that the finest grid resolves it.

Why it matters. Most runs use convection; this check covers the part of the surface flux that conduction alone does not test.

Steady temperature of the convecting shell, and N squared times the error of the mean temperature Steady temperature of the convecting shell, and N squared times the error of the mean temperature

How to read the plot. Top: the steady temperature against radius on 400 cells. Bottom: \(N^2\) times the error of the mean temperature against its Richardson value, divided by the temperature rise; a horizontal line means second-order convergence. The Richardson value comes from the 200- and 400-cell grids, so those 2 points lie at the same height by construction; the 100-cell point tests the order.

Test details
  • Reference: the convergence order of the scheme and Richardson extrapolation; the steady surface flux from the energy balance.
  • Tolerance: order 2.0 ± 0.4 for the mean temperature and the 5 fixed-radius temperatures; the 400-cell values within 10⁻³ of the temperature rise from their extrapolation; surface flux to a relative 10⁻⁸; boundary layer at least 8 cells wide on 400 cells.
  • Discrimination: none for the face rule. The entropy difference over the half cell and \(c_p/T\) of the top cell pass this case (measured); the first case catches them.
  • Test id: tests/test_entropy_bc5_validation.py::test_the_convecting_shell_converges_with_second_order
  • Command: pytest tests/test_entropy_bc5_validation.py -k convecting (add --validation-plots to write the plot pair)

Note: stagnant-lid benchmark states

This comparison is not a test of this repository, so it is not one of the numbered cases above. Stagnant-lid scaling benchmarks hold the surface at 273 K, and the tools that make them set the half-cell conduction \(k (T_{N-1} - T_s) / (\Delta r / 2)\) through the surface outside the solver. A run outside this repository on 8 stored benchmark states (5 of an internal-heating benchmark, 3 of a yield-stress benchmark), with outer_boundary_condition = 5 and the eddy-diffusivity floor off as in the benchmarks, gives the numbers below:

  • the same surface flux on all 8 states, to a relative \(1.3 \times 10^{-16}\);
  • states that are not exactly steady with the surface node at 273 K: largest rate \(3.4 \times 10^{-5}\) J/kg/K/yr, against at most \(3.4 \times 10^{-11}\) with the flux of the tools;
  • steady runs of the internal-heating benchmark whose interior temperature moves by up to \(2.5 \times 10^{-4}\) (relative).

No test in this repository asserts these numbers yet.

References

  • Turcotte, D. L., & Schubert, G. (2014). Geodynamics (3rd ed.). Cambridge University Press. ISBN 978-1-107-00653-9.