Skip to content

Core boundary condition modes

The boundary_conditions.core_bc setting selects the formulation used at the core-mantle boundary (CMB) when inner_boundary_condition = 1 (core cooling). Five modes are available; they differ in what is treated as the primary state variable, what is reconstructed, and how strongly the bottom mantle cell is coupled to the core.

core_module

State vector length: \(N + 2\) (with the CMB entropy gradient \(dS/dr|_\text{cmb}\) and \(T_\text{cmb}\) as the extra states; the temperature is driven by the core evolution budget of aragog.core), plus the layer_cells shell temperatures with stratification = true.

Structure of the core_module model Structure of the core_module model

Figure 1. Structure of the core_module model, not to scale. (a) A wedge through the core and the base of the mantle, with the terms of the core energy budget as arrows: the secular cooling \(Q_s\), the latent heat \(Q_L\) released at the inner-core boundary (ICB), the gravitational energy \(Q_g\) of the light elements rejected there, the radiogenic heat \(Q_R\) and the heat flow through the CMB, \(Q_\text{cmb}\). (b) Temperature against radius: the core adiabat \(T_a(r)\), dotted inside the inner core, the melting curve, which meets the adiabat at the ICB radius \(r_\text{icb}\), and the drop \(\Delta T\) from the CMB temperature \(T_\text{cmb}\) to the mantle temperature \(T_m\) across the boundary layer of thickness \(\delta\), with the flux law of a core hotter than the mantle. The dashed parts are the optional resolved shell above \(r_\text{sh}\), whose subadiabatic part is the stable layer; with a shell, the flux law takes the temperature of the top shell cell in place of \(T_\text{cmb}\), and the convecting core loses the heat that crosses the shell base in place of \(Q_\text{cmb}\). The curves are illustrative shapes, not solver output.

Symbol Meaning Configuration key (default)
\(T_\text{cmb}\) CMB temperature, a solver state start value from set_initial_core_temperature; without one, \(T_m\) at a first start
\(T_m\) bottom mantle cell at the CMB pressure from the mantle state
\(q\), \(k\), \(\Delta r_{1/2}\) CMB heat flux, conductivity of the boundary layer, half cell above the CMB from the mantle phase model and the mesh
\(\delta\), \(\mathrm{Ra}_\text{crit}\) boundary-layer thickness, critical Rayleigh number from the mantle state (Thiriet et al. (2019)10 eq. 16), 450 and eq. 16 blended by the phase of the bottom cell, or a fixed number: ra_crit_cmb
\(T_a(r)\) core adiabat alpha (\(1.35\times 10^{-5}\) K\(^{-1}\)), c_p (840 J kg\(^{-1}\) K\(^{-1}\)), adiabat_mode ("exact")
core structure Gaussian core density and its pressure, or the core arrays of a Zalmoxis structure rho_cen (12500 kg m\(^{-3}\)), length_scale (\(7.272\times 10^6\) m), or the fit to m_core, p_cen; p_cmb (the solver's CMB pressure), pressure_mode ("quadrature"); profile_source ("gaussian"), core_profile_file
melting curve iron alloy or quadratic melting_curve ("iron"), light_element_fraction (0), depression (0), or t_m0, t_m1, t_m2
\(Q_s\), \(C_s\) secular cooling capacity_mode ("profile")
\(Q_L\), \(C_L\) latent heat at the ICB ds_fusion (172.8 J kg\(^{-1}\) K\(^{-1}\)) or latent_heat
\(Q_g\), \(C_g\) gravitational energy of the rejected light elements alpha_c (0), c_light (0); zero with either default
\(Q_R\) radiogenic heat q_radio (0 W)
\(r_\text{sh}\), stable layer resolved shell stratification (false), layer_base_fraction (0.4), k_core (no default), layer_cells (64), layer_top_cell (2000 m), layer_k_mix (\(10^7\) m\(^2\) s\(^{-1}\)), layer_g_mix (\(10^{-3}\))

The keys are described under Parameters.

Core energy budget

The core carries its own physics instead of an isothermal reservoir: the CMB temperature evolves through an effective heat capacity

\[ Q_\text{cmb} = -\tilde{C}(T_\text{cmb})\, \frac{dT_\text{cmb}}{dt} + Q_R, \qquad \tilde{C} = C_s + C_L + C_g, \]

where \(Q_\text{cmb}\) is the heat flow out of the core at the CMB, \(Q_R\) the radiogenic power of the core, and \(C_s\), \(C_L\) and \(C_g\) the secular, latent and gravitational terms of the capacity. Each term times the cooling rate \(-dT_\text{cmb}/dt\) is the heat flow \(Q_s\), \(Q_L\) or \(Q_g\) of the figure. The secular term integrates the mass-weighted adiabat over the closed-form Gaussian core profiles, or, with profile_source = "paleos", over the isentrope of the PALEOS liquid iron table on a Zalmoxis core (a core on the PALEOS isentrope); the latent and gravitational terms follow inner-core growth through the implicit-function sensitivity of the adiabat-liquidus crossing.

All terms are cross-validated against the Leeds thermal_history implementation and pinned against Nimmo (2015)9, ch. 9.08, Table 2; the entropy side (CoreEntropyBudget) adds the dynamo criterion and field-strength scaling.

Inner-core growth and the melting curve

At nucleation onset, the latent capacity rises from zero as

\[ C_L \propto (T_\text{onset} - T_\text{cmb})^{1/2}, \]

with \(T_\text{onset}\) the CMB temperature at the onset: the inner-core radius grows as the square root of the undercooling at the centre.

At freeze-out completion, latent heat release ceases abruptly once the entire core has solidified, causing a discontinuous drop in \(\tilde{C}\). On an Earth-like core profile (length scale 7200 km, CMB radius 3480 km, \(\Delta s_\text{fusion} = 170\) J/kg/K) the drop is:

  • a factor of \(\approx 3.14\) for the quadratic melting curve;
  • \(\approx 50\%\) for the iron alloy curve.

The size of the drop depends on the core geometry and \(\Delta s_\text{fusion}\).

The melting curve is the PALEOS iron prescription (Anzellini et al., 20131) with a light-element depression, or the quadratic of Nimmo (2015)9, ch. 9.08, Eq. 6. The liquidus of iron with S, C and O is AlloyLiquidus (core alloy liquidus). It comes from the eutectic points and liquidus curves of the source papers. melting_curve takes only iron or quadratic, so AlloyLiquidus is used through the Python API. The piecewise Anzellini fit has a jump of about 0.73 K at the 98.5 GPa triple point. A \(C^2\) smootherstep over a 3.0 GPa half-width blends the 2 branches. The blend changes the temperature by at most 0.363 K and gives the exact branch values outside 95.5 to 101.5 GPa. This adjustment is far below the experimental uncertainty of the measured curve.

Coupling to the mantle solver

Two properties matter for coupled stability.

  • The reported core temperature is the integrated boundary state, not the lowermost mantle node's EOS read-off, so it does not inherit the node's phase-branch snaps at crystallisation onset.
  • The boundary solve carries a custom JVP, so reverse-mode autodiff sees the implicit-function sensitivities through inner-core growth. The CVODE analytic-Jacobian factory covers the mode through dSdt_core_module (the budget rides inside the JAX trace), so the production path runs the analytic Jacobian, and a solver without the factory registered falls back to a finite-difference Jacobian.

CMB heat flux law

The CMB heat flux is a boundary-layer law in the core-mantle temperature contrast

\[ \Delta T = T_\text{cmb} - T_m, \]

where \(T_m\) is the bottom mantle cell's entropy evaluated at the CMB pressure (the cell carried adiabatically to the boundary). Following the parameterised-convection closure of Foley & Driscoll (2016)4, eq. 20, with the boundary-layer thickness set by a critical Rayleigh number (Thiriet et al. (2019) eqs. 13 and 14, with exponent 1/3),

\[ q_\text{conv} = \frac{k\,\Delta T}{\delta}, \qquad \delta = \left(\frac{\mathrm{Ra}_\text{crit}\, \kappa\, \eta}{\alpha \rho g\, \Delta T}\right)^{1/3}, \qquad \kappa = \frac{k}{\rho c_p}, \]

with the layer's conductivity \(k\), density \(\rho\), heat capacity \(c_p\), expansivity \(\alpha\) and viscosity \(\eta\), the thermal diffusivity \(\kappa\) and the CMB gravity \(g\).

Critical Rayleigh number of the layer

How thick is the boundary layer above a hot core? By default Aragog takes the lower-layer law of Thiriet et al. (2019) eq. 16, p. 141, a fit of Deschamps & Sotin (2000)3 eq. 33:

\[ \mathrm{Ra}_\text{crit} = 0.28\, \mathrm{Ra}_i^{0.21}, \qquad \mathrm{Ra}_i = \frac{\alpha \rho g\, \Delta T_\text{sh}\, D^3}{\kappa\, \eta_i}. \]

Here \(\mathrm{Ra}_i\) is the internal Rayleigh number of the mantle (their eq. 3), \(D\) the mantle thickness and \(\Delta T_\text{sh}\) the temperature difference across the shell (their eq. 3, p. 139), from the core to the surface temperature \(T_s\), at least \(\Delta T\). \(T_s\) is the surface temperature of outer_boundary_condition = 5, else the surface_temperature boundary setting, which a caller can change before each call.

A standalone run without either takes the temperature of the top mantle cell in place of \(T_s\); that cell lies below the surface, so a fault of the top cell then also moves the CMB flux. In a coupled run \(T_s\) is that of the last atmosphere step and stays fixed over the interior step. Since \(\mathrm{Ra}_\text{crit}\) goes as \(\Delta T_\text{sh}^{0.21}\), the flux goes as \(\Delta T_\text{sh}^{-0.07}\), so this lag is small: in a 1 Earth-mass run to 10 Myr it changes the CMB flux by at most \(1.8 \times 10^{-3}\) after 0.1 Myr (median \(1.6 \times 10^{-5}\)), for a step of \(T_s\) of up to 79 K.

The viscosity \(\eta_i\) of \(\mathrm{Ra}_i\) is that of the interior: the bottom mantle cell at the CMB pressure and \(T_m\), as Deschamps & Sotin (2000), p. 204, take the temperature of the well-mixed interior. The other properties are those of the layer at \(\bar{T}\), and the layer law above keeps the layer viscosity \(\eta\).

Against a fixed number at the same state, a less viscous interior has a larger \(\mathrm{Ra}_i\) and \(\mathrm{Ra}_\text{crit}\), so a thicker layer and a smaller flux; a more viscous interior has a thinner layer and a larger flux. The tutorial gives the numbers of a 1 Earth-mass coupled run: \(\mathrm{Ra}_i\), \(\mathrm{Ra}_\text{crit}\), the layer thickness and the flux against a fixed 450.

A positive ra_crit_cmb fixes the number instead; 450 is the value Thiriet et al. (2019), Table 2, take for the upper boundary layer.

Known limit. Deschamps & Sotin (2000) fit the law on \(2.4 \times 10^5 \le \mathrm{Ra}_i \le 2.2 \times 10^7\) (Table 3a, p. 210; Fig. 10, p. 215) in a 2-D box heated from below, without internal heat sources (p. 206); radiogenic or tidal heating of the mantle is outside that setting. In the same 1 Earth-mass run:

  • from 2.5 to 7 Myr (\(\eta_i\) of \(5 \times 10^{22}\) to \(10^{23}\) Pa s), \(\mathrm{Ra}_i\) falls from \(2.1 \times 10^{7}\) to \(9.2 \times 10^{6}\), inside the fit range, with \(\mathrm{Ra}_\text{crit}\) of 9.6 to 8.1;
  • at 0.5 to 1 Myr (\(\eta_i\) of \(3 \times 10^{17}\) to \(3 \times 10^{21}\) Pa s), \(\mathrm{Ra}_i\) is \(5 \times 10^{12}\) to \(4 \times 10^{8}\), above the range;
  • at 0.1 Myr (\(\eta_i = 10^{4}\) Pa s), \(\mathrm{Ra}_i\) is \(2 \times 10^{26}\) and \(\mathrm{Ra}_\text{crit}\) about \(9 \times 10^4\), a flux 0.17 times that of 450.

The interior viscosity in \(\mathrm{Ra}_i\) gives 1.8 to 2.4 times the flux of the layer viscosity in that run from 0.5 Myr on, and 1.04 times at 0.1 Myr.

Critical Rayleigh number by phase

Which critical Rayleigh number holds while the mantle above the core is still liquid? Eq. 16 is a fit to the convection of a solid. With ra_crit_cmb = "phase" Aragog takes it only where the bottom cell is solid, and takes 450 while that cell is liquid. Miyazaki & Korenaga (2019b)7 also switch the core flux at the critical melt fraction 0.4 of the lowest mantle layer (p. 3400; eq. 4, p. 3401): a boundary-layer flux above it, zero below it.

A hard switch makes the flux jump. In a 1 Earth-mass run the bottom cell reaches melt fraction 0.4 at about 300 kyr, where eq. 16 gives \(\mathrm{Ra}_\text{crit} \approx 1800\); the flux would fall to 0.63 of its value. Aragog therefore blends the two numbers in the logarithm:

\[ \ln \mathrm{Ra}_\text{crit} = s \ln 450 + (1 - s) \ln \mathrm{Ra}_{\text{crit},16}, \qquad s = \tfrac{1}{2}\left[1 + \tanh\!\left(\frac{\phi_0 - \phi_\text{rheo}}{w_s}\right)\right], \qquad w_s = \frac{w/2}{\operatorname{artanh} 0.9}. \]

Here \(\phi_0\) is the melt fraction of the bottom cell at the CMB pressure, the state that also gives \(\eta_i\). \(\phi_\text{rheo}\) and \(w\) are the centre and the width of the rheological transition (rheological_transition_melt_fraction, rheological_transition_width; in PROTEUS rfront_loc and rfront_wid, 0.4 and 0.2 by default). The weight \(s\) is 1/2 at \(\phi_\text{rheo}\) and 0.05 and 0.95 at the band edges \(\phi_\text{rheo} \mp w/2\), so the law changes inside the band of the rheological transition. The weight of the viscosity blend is wider: 0.27 and 0.73 at the same edges. Since the flux goes as \(\mathrm{Ra}_\text{crit}^{-1/3}\), it is the weighted geometric mean \(q = q_{450}^{\,s}\, q_{16}^{\,1-s}\), a continuous function of the mantle state.

Limits:

  • The band \([\phi_\text{rheo} - w/2,\ \phi_\text{rheo} + w/2]\) must lie inside [0, 1]; the solver raises a ValueError at setup otherwise.
  • The weight never reaches 0 or 1, so each law keeps a small share far from the band; its validation gives that share at the ends of the range.
  • Conduction (a core colder than the mantle, or no buoyancy) does not depend on \(\mathrm{Ra}_\text{crit}\).

Where this is checked. Critical Rayleigh number by phase on the core Validation page.

Properties of the boundary layer

The layer's conductivity, density, heat capacity, expansivity and viscosity are evaluated at the CMB pressure and the layer's mean temperature

\[ \bar{T} = \frac{T_\text{cmb} + T_m}{2}, \]

the temperature at which Thiriet et al. (2019), p. 140, take the viscosity of the lower boundary layer; Foley & Driscoll (2016) leave that temperature to the model. With a resolved shell the temperature of the top shell cell takes the place of \(T_\text{cmb}\) in \(\bar{T}\) and in \(\Delta T\) (Resolved stable layer).

The solver finds the entropy of that state by inverting the EOS temperature at the CMB pressure and evaluates the mantle phase model there. The layer's viscosity is then the rheological blend of the mantle model at the layer's melt fraction: past the rheological transition its \(\log_{10}\eta\) is closer to that of the melt than to that of the solid, and it approaches the melt viscosity toward the liquidus.

When solid mantle rheology is enabled ([phase_solid.rheology]), temperature-dependent and stress-dependent solid viscosity laws govern the mantle above the core-mantle boundary layer, and the bottom mixing-length slope factor \(s_\mathrm{bottom}\) scales the lower convective boundary. See Solid-state convection for solid rheology formulations and boundary layer dynamics.

In a partly molten layer \(c_p\) and \(\alpha\) are those of the two phases, without the latent heat or the density change of melting, each phase evaluated at its end-member entropy. The heat capacity is weighted by the Lever-rule mass fractions \(x_i\) and the expansivity by the volume fractions:

\[ c_p = \sum_i x_i\, c_{p,i}, \qquad \alpha = \rho \sum_i \frac{x_i\, \alpha_i}{\rho_i}, \qquad \frac{1}{\rho} = \sum_i \frac{x_i}{\rho_i}, \]

with \(c_{p,i}\), \(\alpha_i\) and \(\rho_i\) the heat capacity, expansivity and density of phase \(i\), and \(\rho\) the harmonic mean density of the two phases. This volume weighting applies to the boundary layer only; the mantle cells take the composite expansivity, or the mass-weighted one with cp_blend = "linear".

Flux at the phase boundaries

The heat capacity and the expansivity of the layer are continuous at the solidus and the liquidus. The viscosity is continuous in entropy too when matprop_smooth_width is positive (the default is \(10^{-2}\), in Aragog and in PROTEUS).

With a width of 0 it is not: the rheological blend of the mantle model gives the melt viscosity a weight of 0.5 % in \(\log_{10}\eta\) already at zero melt fraction (transition at a melt fraction of 0.4, width 0.15). This takes the solid viscosity of the tests, \(10^{21}\) Pa s, to \(8.0\times10^{20}\) Pa s, so the flux steps up by the cube root of that ratio where the mean temperature crosses the solidus. At the liquidus the viscosity steps from 10.16 Pa s to the melt viscosity of 10 Pa s, and the flux steps with it.

The flux steps at a positive width too, because the tables hold the temperature constant over a band of entropy next to each phase boundary, so the layer's entropy jumps across that band where its mean temperature crosses the boundary. The widths of that band, in J kg\(^{-1}\) K\(^{-1}\), are:

Tables CMB pressure Band at the solidus Band at the liquidus
Test tables 145.7 GPa, the CMB pressure of the tests 76 63
PALEOS tables of the coupled runs, 1 Earth-mass run 103 GPa 30 59
PALEOS tables of the coupled runs, 3 and 5 Earth-mass runs the CMB of those runs 80 to 83 none

The steps of the flux, by matprop_smooth_width, are:

Width Step from Step at the solidus Step at the liquidus
0 the viscosity 7.7 % 0.5 %
\(10^{-2}\) the temperature band, test configuration 2.7 % 0.16 %
\(10^{-2}\) the temperature band, 1 Earth-mass run (PALEOS, 103 GPa) 6.3 % 1.3 %

Known limit. These steps come from the mantle viscosity model, not from the flux law. In the 1 Earth-mass run at \(\Delta T = 100\) K the layer viscosity steps by a factor 0.833 at the solidus and 0.962 at the liquidus, and \(q\,\eta^{1/3}\) is continuous to \(10^{-10}\).

Closure choices of Aragog

Three closure choices are Aragog's own, not the papers':

  1. A core hotter than a buoyant layer above it (\(\alpha \rho g > 0\)) loses the boundary-layer flux \(q_\text{conv}\) at any thickness \(\delta\), also where \(\delta\) is wider than the bottom cell.
  2. A core colder than the mantle above it (a stably stratified layer), or a layer without buoyancy, exchanges heat by conduction across the half cell between the CMB and the bottom staggered node.
  3. A partly molten layer has no buoyancy from melting.

The first two give the applied flux

\[ q = \begin{cases} q_\text{conv}, & \Delta T > 0 \text{ and } \alpha \rho g > 0, \\ q_\text{cond}, & \text{otherwise}, \end{cases} \qquad q_\text{cond} = \frac{k\,\Delta T}{\Delta r_{1/2}}, \]

with \(q_\text{cond}\) the conduction across the half cell of width \(\Delta r_{1/2}\). The flux has the sign of \(\Delta T\) and is continuous through zero, and for a hot core it does not depend on the mesh.

Known limit. At \(\Delta T = 0\) the slope of the flux changes from \(k/\Delta r_{1/2}\) to 0, since \(q_\text{conv}\) grows as \(\Delta T^{4/3}\). A call that starts there has a larger integration error, which the solver tolerance controls: a core that starts at the mantle temperature closes its first call to \(5.2 \times 10^{-4}\) of its CMB heat, and 121 times closer at tolerances 1000 times tighter.

The composite expansivity of the mantle model, which holds the density change of melting, is larger in the mush by a factor whose cube root, the factor on the flux, is 1.35 at the liquidus to 2.15 at the solidus at the CMB pressure of the test tables and a matprop_smooth_width of 0.

NumPy and JAX right-hand sides

NumPy and JAX both take

\[ \alpha_i = \frac{\rho_i\, c_{p,i}}{T} \left|\frac{\partial T}{\partial P}\right|_S \]

of each phase, also when the table directory carries thermal_exp files (see thermal expansivity of a single phase).

The NumPy and JAX right-hand sides apply the same flux law. At a mean temperature within rounding of a phase-boundary temperature they can differ by the entropy that each temperature inversion picks in the flat band, which changes the flux by up to the step above.

CVODE integrates the JAX one when use_jax_jacobian is set (the default) and a JAX CVODE factory is registered, as PROTEUS does, and the NumPy one otherwise; the NumPy one also gives the output flux, and the per-call energy terms where the JAX batch evaluation fails. In each, the bottom cell and the core see the same flux, so the CMB exchange conserves energy.

Response of the core

The core temperature feeds the flux back, and the core cools at the rate its heat capacity allows, which without a resolved shell is

\[ \frac{dT_\text{cmb}}{dt} = -\frac{A_\text{cmb}\, q - Q_R}{\tilde{C}}, \]

with \(A_\text{cmb}\) the area of the CMB, so that \(Q_\text{cmb} = A_\text{cmb}\, q\); the contrast itself also follows the mantle base, which can cool much faster. The case with a shell is under Resolved stable layer.

In the 10-node test of a 300 K contrast over a partly molten base (melt fraction 0.67 to 0.65 over 4 yr), the flux is about \(1.5 \times 10^4\) W m\(^{-2}\) and the core cools by about 0.039 K per year, while the base cools faster and the contrast grows to about 330 K.

The flux follows the layer's mean temperature rather than the base: a 1000 K contrast over a base at melt fraction 0.19 puts the layer at melt fraction 0.51, past the rheological transition, and carries about \(7.8 \times 10^4\) W m\(^{-2}\) under eq. 16, while a layer whose mean temperature stays below the transition has a solid-like viscosity and a far smaller flux.

State, output node and initial temperature

The CMB entropy gradient stays in the state so the layout matches energy_balance, and it evolves by the same balance with \(\tilde{C}(T_\text{cmb})\) in place of the reservoir factor, but no other rate, no flux and no output reads it; it enters only the integrator's error control, and --initial-dsdr-cmb sets no flux for this mode.

The output's CMB node is the bottom cell carried to the CMB pressure: T_basic[0] is \(T_m\), so \(T_\text{cmb} - T_m\) is the contrast the flux acts on (with a shell, the top shell cell in place of \(T_\text{cmb}\)), its entropy gradient (dSdr_b[0]) is zero, and its flux components carry the applied flux as conduction.

The default initial core temperature is \(T_m\), so a run without a shell and without a set core temperature has no CMB flux at first. With a shell the flux law takes the top shell cell, which starts on the core adiabat half a cell below the CMB, slightly above \(T_m\). The solver warns once when a core temperature set with set_initial_core_temperature differs from \(T_m\) by more than 20 percent at a start. The set value applies to every later start until it is cleared with None; a start without a set value (the default, or a hot start from the previous solution) does not warn.

Resolved stable layer (experimental)

With stratification = true in the module parameters, the outer core above the radius layer_base_fraction \(\times\, r_\text{cmb}\) is a resolved shell of finite volumes, finest at the CMB, whose temperatures are part of the solver state after T_core; the state indices up to T_core are those of the unstratified mode. With a shell the state \(T_\text{cmb}\) is the convecting adiabat carried to the CMB, and the top shell cell holds the temperature at the top of the core.

In the shell heat moves by conduction (Greenwood et al., 20215, eq. 20),

\[ \rho c_p\, \frac{\partial T}{\partial t} = \nabla \cdot (k \nabla T), \]

with \(T\) the temperature of the shell and \(\rho\), \(c_p\) and \(k\) the density, specific heat and conductivity of the core. Where the temperature falls outward faster than the adiabat, heat also moves by convective mixing. The mixing closure is a mixing-length flux

\[ F_\text{mix} = \rho c_p\, K_\text{mix}\, \frac{(-a)^{3/2}}{\sqrt{g_\text{mix}}}, \qquad a = \frac{\partial (T - T_a)}{\partial r}, \]

with \(a\) the gradient of the departure from the convecting adiabat \(T_a\); it is zero for \(a \ge 0\) and continuous with its derivative at \(a = 0\). Its two constants are layer_k_mix (\(K_\text{mix}\)), the eddy diffusivity at the reference superadiabatic gradient \(g_\text{mix}\), and layer_g_mix, that reference gradient as a fraction of the adiabatic gradient at the CMB; with the defaults a shell under a CMB flux of \(10^5\) W m\(^{-2}\) mixes within about 40 days.

The subadiabatic part conducts only and is the stable layer. Its base, reported as core_layer_base, is the shell base plus the width of every cell whose lower face is not stably stratified (anomaly gradient below the reference), weighted smoothly. Onset, growth, erosion and re-formation follow from the profile without events; the scheme of Greenwood et al. (2021)5, eq. 25, p. 6, the leeds_thermal model of thermal_history, instead moves the layer base by a stability check after each step and mixes an unstable part instantly.

The CMB flux law sees the top shell cell, so a core heated from above warms its layer first and its convecting part only when the heat reaches the layer base. The shell base sits on the convecting adiabat, and the heat crossing it is what the convecting core loses: its capacity integrals run to the shell base, the gravitational term to the layer base, and the shell carries its own sensible heat.

Radiogenic heat is spread uniformly over the core mass,

\[ h = \frac{Q_R}{M_\text{core}}: \]

the convecting core keeps \(h M(r_\text{sh})\), with \(M(r_\text{sh})\) the mass below the shell base, and each shell cell \(h\, m_j\) of its mass \(m_j\), so a layer stores the heat of its own mass.

The entropy margin is the sum over the convecting core and the shell of the balance of Greenwood et al. (2021)5, eq. 4: every source is delivered at the temperature of the top shell cell, and each part has the conduction sink of its own gradient. The CMB heat flow reaches the margin only through the state, since the top cell is the reference temperature.

The shell must hold the layer and lie above the inner core. The solver refuses an inner core that reaches the shell base and warns once when the layer base comes within three cells of it; a lower layer_base_fraction gives a deeper shell. A stratified core runs on CVODE or SciPy BDF, which the solver also falls back to without CVODE; Radau is refused, since the stiff mixing of the shell takes it minutes per call.

Limits and energy closure with a layer

The resolved layer is experimental, and the solver warns once when stratification = true.

Against the leeds_thermal model, integrated alone with SciPy BDF, it reproduces a layer under a CMB flow below the conducted adiabatic flow, with heat removed, added or neither at the CMB; when the flow rises above that value the two models erode the layer differently (aragog mixes it from the CMB down, leeds_thermal removes it in one step of its stability check), and when the flow falls back both form a new layer of similar depth (verification, section 13); it meets its analytic limits and resumes where it stopped, and its NumPy and JAX right-hand sides match (section 12).

In the solver, an eroding layer stalls CVODE at the default tolerances: the step size collapses where the mixing switches on in the eroding cells. In the SciPy BDF comparison the centre temperature and the inner-core onset have not converged at a relative tolerance of 1e-8, and the comparison runs at 1e-11; the solver.rtol that CVODE needs for them is not measured.

With a layer, the core heat of a 5 yr CVODE call that heats the core from above closes against the CMB heat to \(2 \times 10^{-8}\) of it. This value is measured, and it holds under a relative change of \(10^{-15}\) in the core conductivity. test_a_core_heated_from_above_warms_its_top_and_closes_its_heat holds that call to \(10^{-7}\). The core rate of a stratified state is ill-conditioned: a relative change of \(10^{-14}\) in the shell temperatures moves it by \(1.5 \times 10^{-6}\). This sets the agreement of its NumPy and JAX evaluations, not the closure of the ledger.

Without a layer the smoke tests hold \(10^{-6}\):

  • with Radau at an rtol of \(10^{-6}\);
  • with CVODE at the default rtol for a hot core above the onset;
  • with CVODE at an rtol of \(10^{-10}\) across the inner-core onset, which closes to \(1.5 \times 10^{-6}\) at the default rtol (verification, section 9).

quasi_steady

State vector length: \(N\) (entropy at staggered nodes only).

The CMB heat flux is computed from a quasi-steady balance using an \(\alpha\)-factor partition between the bottom mantle cell and the core, weighted by the heat-capacity ratio. The core temperature is reconstructed from the bottom-cell entropy and pressure via the EOS at every output time.

This mode is fast, stable, and conservative in the sense that it does not require an extra ODE state. It underestimates the true CMB heat loss relative to the SPIDER reference by 5-10 % over the first solidification cycle of a 1 M\(_\oplus\) run, which is the right trade-off for quick standalone exploration where SPIDER parity is not the goal.

energy_balance (default)

State vector length: \(N + 1\) (entropy at staggered nodes plus the entropy gradient at the CMB basic node, \(dS/dr |_\text{cmb}\)).

The core is a reservoir that loses the heat crossing the core-mantle boundary (CMB). Its mean temperature is \(\text{tfac}\, T_\text{cmb}\), with \(\text{tfac} = 1.147\) for an isentropic Earth core, as in Bower et al. (2018)2 Eqs. 19-21:

\[ M_\text{core}\, c_p^\text{core}\, \text{tfac}\, \frac{dT_\text{cmb}}{dt} = -F_\text{cmb} A_\text{cmb} \]

Here \(T_\text{cmb}\) is the temperature of the CMB basic node, read from its entropy at the CMB pressure. The entropy gradient at the CMB is the extra state variable. It is integrated with the formula of SPIDER's bc.c:76-131:

\[ \frac{d}{dt}\left(\frac{dS}{dr}\bigg|_\text{cmb}\right) = \frac{2}{\Delta r}\left( \frac{dS}{dt}\bigg|_0 + F_\text{cmb} A_\text{cmb} \cdot \text{fac}_\text{cmb}\right), \qquad \text{fac}_\text{cmb} = \frac{1}{c_p^\text{core} \, \text{tfac} \, M_\text{core}\, (\partial T/\partial S)_P} \]

Here \(\Delta r > 0\) is the spacing of the 2 lowest basic nodes, \(dS/dt|_0\) the entropy rate of the bottom cell, and \(F_\text{cmb} > 0\) a heat flux out of the core (W m\(^{-2}\)), so that \(F_\text{cmb} A_\text{cmb}\) is the heat flow. SPIDER takes the difference across the bottom cell the other way (it divides by \(\xi_\text{cmb} - \xi_\text{above} < 0\)), so its form has the opposite sign. The factor \(\text{fac}_\text{cmb}\) turns the core cooling rate into the entropy rate of the CMB node; the next section explains the slope \((\partial T/\partial S)_P\). SPIDER uses \(c_p/T_\text{cmb}\) of the node in its place. The 2 agree while the node is in a single phase outside the melt band and its smoothing bands, and differ inside them. State vector size and Jacobian sparsity are slightly larger than quasi_steady, but the integrator overhead is small.

The entropy slope at the CMB node

How does the closure make the node temperature follow the core? Between structure updates the node keeps its pressure, so \(dT = (\partial T/\partial S)_P\, dS\). The closure divides the core cooling rate by this slope of the code's own \(T(P, S)\), so the core loses exactly the heat that crosses the CMB.

The node temperature is the blend \(T = s_b\, T_\text{mix} + (1 - s_b)\, T_\text{single}\) of the phase transitions. Here \(T_\text{mix}\) is the temperature of the mush, linear in \(S\) from the solidus (\(S_\text{sol}\), \(T_\text{sol}\)) to the liquidus (\(S_\text{liq}\), \(T_\text{liq}\)) at the node pressure. \(T_\text{single}\) is the temperature of a pure-phase table (melt above the middle of the band, solid below), with heat capacity \(c_p^\text{single}\), and \(s_b\) is the blend weight. The slope is

\[ \left(\frac{\partial T}{\partial S}\right)_P = s_b\, \frac{T_\text{liq} - T_\text{sol}}{S_\text{liq} - S_\text{sol}} + (1 - s_b)\, \frac{T_\text{single}}{c_p^\text{single}} + (T_\text{mix} - T_\text{single})\, \frac{\partial s_b}{\partial S} \]

The first term acts only from the solidus to the liquidus and the second, the pure-phase slope \(T/c_p\), only outside them. The last, the change of the weight, acts only in the smoothing bands, a few matprop_smooth_width wide on both sides of the solidus and the liquidus. On the test tables at the CMB pressure of 145.7 GPa with the default width 0.01, the slope is the mush slope from \(g = 0.1\) to \(0.9\) and \(T/c_p\) at \(g \le -0.1\) and \(g \ge 1.1\) (\(g\) the melt coordinate, 0 at the solidus and 1 at the liquidus).

The heat capacity of the blend does not give this slope in the mush. There it is \(c_p = T_\text{avg} (S_\text{liq} - S_\text{sol})/(T_\text{liq} - T_\text{sol})\), with \(T_\text{avg}\) the mean of the solidus and liquidus temperatures. With \(c_p/T\) the node would cool at \(T_\text{avg}/T\) of the core rate. For \(T_\text{sol} = 4000\) K, \(T_\text{liq} = 5600\) K and a melt coordinate of 0.85 (0 at the solidus, 1 at the liquidus; the melt fraction in the mush), \(T = 5360\) K, and the node cools at 0.90 of the core rate.

Runs whose CMB node starts in the smoothing band above the liquidus (melt fraction 1) change too. In the 1 Earth-mass PALEOS run the node starts at \(g = 1.028\), where \(T/c_p\) lies 1.025 to 1.37 times below the slope up to 988 yr, and with energy_balance the CMB heat flux is 2.6 % higher at 2 yr and 33 % higher at 988 yr than with \(c_p/T\) (gradient changes as well, core_module does not).

Limits of the slope closure

  • A table cell where \(T\) does not rise with \(S\) holds the node temperature (on the test tables at 145.7 GPa: \(g = 1\) to \(1.0075\) next to the liquidus, \(g = -0.009\) to \(0\) next to the solidus, and \(g \le -0.34\) in the solid), while the closure uses the pure-phase slope \(T/c_p\). The ledger check skips such a call with a warning.
  • Outside the mush, where \(T/c_p\) of the tables differs from the slope of the tabulated \(T\), the ledger misses by that difference. On the PALEOS:MgSiO3 tables of a 1 Earth-mass run it is \(1.3 \times 10^{-3}\) to \(4.8 \times 10^{-3}\) next to the liquidus. On the test tables of the CI, at a CMB node pressure of 145.7 GPa, it reaches 6.2 % in the solid just below the flat cell next to the solidus (\(g = -0.009\)) and 4.1 % below \(g = -0.05\), and in the melt 0.66 % up to \(g = 1.1\) and 0.79 % up to \(g = 2\); the term \(\epsilon_\text{tab}\) of the ledger check widens its bound by that amount.
  • A slope that is not finite and positive stops the call with a CMBClosureError from the NumPy right-hand side, with CVODE and with Radau. The JAX right-hand side has no such guard; the ledger check refuses such a slope over the accepted states of a call that finishes.
  • With the default matprop_smooth_width the slope jumps where the pure-phase term starts: by a factor 18.9 at the solidus and 4.1 at the liquidus on the test tables at 145.7 GPa. With matprop_smooth_width = 0 the slope at the solidus and at the liquidus is the mush slope.

Where this is checked. The CMB closure ledger across the melt band, the CMB closure on the states of 2 coupled runs and the CMB node rate of each closure.

Ledger check of the CMB closure

How does a run notice a CMB closure that loses heat? After each call of energy_balance, gradient and core_module, the solver checks the CMB node over the accepted states of the call. In energy_balance and gradient it compares the core heat change with the CMB heat of the call, \(\Delta E_\text{cmb} = \int E\, dt\) (J), with \(E = A_\text{cmb} F_\text{cmb}\) the CMB heat flow (W):

\[ r = C\, \Delta T_\text{cmb} + \Delta E_\text{cmb}, \qquad C = M_\text{core}\, c_p^\text{core}\, \text{tfac} \]

In core_module it compares the change of the node temperature with that of the core top, so \(r\) and its bound are in K. This check tests that the CMB node follows the core; the core ledger of core_module tests the energy balance of the core itself.

The miss \(r\) must stay within a bound \(B\) set by the solver tolerances:

\[ B = \epsilon_\text{tab} \int |E|\, dt + E_\text{trap} + C\, \sqrt{n_y}\, n_\text{st} \max_k \left[\left(\frac{\partial T}{\partial S}\right)_P w\right]_k \]
  • \(\epsilon_\text{tab}\) is the largest relative difference of the tabulated \(T\) slope from the closure slope over the accepted states; in the mush it is the round-off of the central difference. It multiplies the integral of \(|E|\), as \(E\) can change sign.
  • \(E_\text{trap}\) is the error of the trapezoid sum of \(\Delta E_\text{cmb}\) over the energy trace of the call, which with CVODE holds the nodes listed in diagnostic outputs. It is estimated from every other trace node.
  • \(w\) is the error weight of the node entropy (J kg\(^{-1}\) K\(^{-1}\)): the weights of the states it depends on, each times its coefficient. These states are the bottom-cell entropy and the gradient, and in gradient all gradient states and the surface entropy.
  • The integrator accepts a step when the root mean square of the \(n_y\) weighted errors (\(n_y\) the length of the state vector) is at most 1, so one state errs by at most \(\sqrt{n_y}\) times its weight. \(n_\text{st}\) is the number of intervals of the energy trace; the maximum runs over its nodes \(k\).
  • In core_module the bound has no \(C\) and no \(E_\text{trap}\). The integral of \(|E|\) becomes the sum of the absolute core-top temperature changes between trace nodes, plus a term for the error weight of that temperature.

What happens after a miss

What does the solver do with a call that misses its bound? That depends on the size of the miss and on solver.rtol:

  • A miss above \(B\) logs a warning and is counted. The run keeps the call.
  • The solver refuses a call whose miss is above \(10\,B\). At an rtol of \(10^{-8}\) or above, it solves the call once more from its start at rtol = 1e-10 and then sets rtol back. At an rtol below \(10^{-8}\), such as \(10^{-9}\), there is no repeat.
  • The run keeps the repeat only when its check ran and did not skip the call, and its miss \(r'\) is at most \(10\,B\) and at most \(10\,B'\), with \(B\) the bound of the refused call and \(B'\) the bound of the repeat.

Why repeat a refused call? The bound \(B\) adds up the error test of each step on the CMB node only. It does not count how the errors of the other states change the CMB heat. So with the CMB node in the mush, a call at rtol = 1e-8 can miss by more than \(10\,B\) while the closure is right. That solver error shrinks at the tighter tolerance of the repeat. A closure error keeps its size, so a call refused for one is refused again. A closure error below \(10\,B\) under a larger solver error is kept with a warning, as it is on a call that is not repeated. The repeat does not tighten atol and takes more steps, so \(B'\) can be larger than \(B\); the test at \(B\) keeps the repeat from passing a miss that the refused call's own bound refuses (the repeat of a refused call).

The error after a refused call

What does a caller see when the solver refuses a call? The solver raises a CMBLedgerMissError in 2 cases: a miss above \(10\,B\) with no repeat, and a repeat that is not kept. A repeat is not kept when it misses the test above, stops early, or raises a CMBClosureError, a CMBEddyFluxError or an AcceptedStateRangeError. Any other error of the repeat propagates as it is. CMBLedgerMissError is a kind of CMBClosureError (a RuntimeError, from aragog.solver.entropy_solver).

After any of these errors the solver drops the refused call and puts back the solution it held at the start of the call (none before the first call). A caller that goes on starts from that solution and takes the CMB gradient from it. A coupled PROTEUS run also puts the solver back to the call start in its own code. It skips the interior step without a retry, and the third failed step in a row stops the run. EntropySolver.cmb_ledger holds the terms of the last call (API reference for its keys, also after a repeat).

What the ledger check detects

\(B\) is a worst case for the error of the CMB node itself, not for the effect of the other states on the CMB heat (what happens after a miss). So the check sees a closure error only where it is large against the error weight of the node. At rtol = atol = 1e-8, with \(c_p/T\) in place of the slope, and with the node at a melt coordinate (0 at the solidus, 1 at the liquidus) of 0.9 or 0.3:

  • a 2-yr core_module call (CVODE, node at 0.9) misses by 0.0033 K, against a bound of 1.2 K for a core-top change of 0.032 K;
  • a 20-yr energy_balance call (CVODE) misses by 0.16 \(B\) with the node at 0.3, and raises with the node at 0.9;
  • a 20-yr gradient call (Radau) warns with the node at 0.9 (2.8 \(B\)) and passes with the node at 0.3, where \(B\) is 20 times the CMB heat.

The tests of the slope closure run at rtol \(10^{-10}\) to \(10^{-12}\) for this reason. With Radau at rtol = atol = 1e-8, in 2-yr and 20-yr energy_balance calls with the node at 0.5 to 0.99 on the test tables, the miss of the slope closure reaches 0.77 to 0.82 \(B\). That miss is mostly the trapezoid error \(E_\text{trap}\) of the CMB heat over the accepted steps, not an error of the closure: in a 2-yr call with the node at 0.7, Simpson's rule on the same steps lowers it from \(5.7 \times 10^{-4}\) to \(5.6 \times 10^{-6}\) of the CMB heat at rtol = 1e-8, and from \(6.3 \times 10^{-5}\) to \(8.6 \times 10^{-8}\) at rtol = 1e-10.

gradient

State vector length: \(N + 2\) (the entropy gradient is the primary field; entropy is reconstructed by cumulative integration from the surface).

Treats \(dS/dr\) as the integrated quantity rather than \(S\) itself, with two extra boundary states (one for each surface). Produces the same physics as energy_balance but with a different conditioning that is more stable in regimes where \(S\) has a sharp kink at the rheological transition. Has not been validated against SPIDER as thoroughly as energy_balance; treat as experimental.

The CMB closure is that of energy_balance, with one difference: the reconstruction places the CMB node entropy at \(S_0 + (r_\text{cmb} - r_0)\, dS/dr|_\text{cmb}\), with \(r_0\) the radius of the first staggered node, and the closure divides by that same distance \(r_0 - r_\text{cmb}\) in place of \(\Delta r/2\).

The entropy slope changes the results of gradient as it changes those of energy_balance: on the test tables at 145.7 GPa the CMB heat flux at the end of a 2 yr call differs from that with \(c_p/T\) by up to 11 % (10 % and 11 % lower at \(g = 0.99\) and \(1.02\), 1.4 % higher at \(g = 0.5\)). In core_module the mantle entropy, the core temperature and the CMB heat flux of such a call agree with those of \(c_p/T\) to \(10^{-11}\) (relative); only the CMB entropy gradient in the solver state moves, by up to \(2.3 \times 10^{-5}\).

bower2018

State vector length: \(N + 1\) (with \(T_\text{core}\) as the extra state).

Treats the core temperature as an ODE state variable, with the CMB heat flux computed from conduction across the bottom half-cell. The conduction-only flux underestimates the true CMB heat loss by orders of magnitude for any planet with active mantle convection; this mode is retained for parity testing only and is not recommended for production.

How to choose

Need Recommended core_bc
Core evolution with inner-core growth, or a core temperature decoupled from basal-node phase snaps core_module
Production PROTEUS runs; SPIDER parity while the CMB node is in a single phase outside the melt band and its smoothing bands energy_balance (default)
Quick standalone exploration where SPIDER parity is not required quasi_steady
Very steep mushy-band gradient that destabilises energy_balance gradient (experimental)
Parity tests with a conduction-only CMB flux bower2018 (legacy)

The state-vector layout for each mode is documented in solver/entropy_solver.py at the _build_jac_sparsity and set_initial_entropy methods; the test class TestEnergyBalanceCoreBC in tests/test_entropy_pytest.py exercises the energy_balance mode directly.

Configuration parameters and diagnostics for core_module

Parameters

The mode needs JAX (pip install 'fwl-aragog[jax]'); without it the solver refuses the mode when it is built.

The mode does not use boundary_conditions.core_heat_capacity or mesh.core_density. With the Gaussian profile, the core takes its heat capacity from c_p and its density from the profile keys below, or from legacy_rho_core with capacity_mode = "legacy". With profile_source = "paleos", it takes its heat capacity from core_cp_override and its density from the core arrays of core_profile_file. On both paths each solver logs one INFO message that names the 2 unused values, core_heat_capacity and core_density.

When core_bc = "core_module", which needs inner_boundary_condition = 1, the module options are specified under [boundary_conditions.core_module_params]; any other key is refused when the configuration is read, so aragog validate reports it:

  • fit_profile, m_core, p_cen: the core mass (kg) and central pressure (Pa) the Gaussian profile is fitted to. With both given the profile is fitted (unless fit_profile = false); one of them alone, or fit_profile = true without them, is refused, and fit_profile must be true or false (1 or 0 accepted). PROTEUS fills both from its structure solve. With profile_source = "paleos" no profile is fitted: m_core alone is accepted and checks the mass of the core arrays, and p_cen and fit_profile are unused.
  • rho_cen: Core central density (kg m\(^{-3}\)), used when no fit is made. Default \(12500.0\). The fit does not start from it.
  • length_scale: Core Gaussian density length scale (m), used when no fit is made. Default \(7.272\times 10^6\). The fit searches it in \([r_\text{cmb}/3, 100\, r_\text{cmb}]\) and does not start from this value.
  • p_cmb: CMB pressure (Pa) for the profile. Default: the solver's CMB pressure.
  • pressure_mode: How the profile's pressure is computed, "quadrature" (default) or "labrosse".
  • adiabat_mode: How the core adiabat is computed, "exact" (default), which integrates \(d \ln T / dr = -\alpha g / c_p\) with the exact gravity of the Gaussian density, or "small_radius", the closed form \(T_\text{cmb} \exp((r_\text{cmb}^2 - r^2)/D^2)\) of gravity linear in \(r\) that Labrosse et al. (2001)6 and Nimmo (2015)9 use. The closed form gives a 2 % larger \(T_\text{cen}/T_\text{cmb}\) for the Earth's core and a larger one for larger cores.
  • alpha: Thermal expansivity (K\(^{-1}\)). Default \(1.35\times 10^{-5}\).
  • c_p: Specific heat capacity (J kg\(^{-1}\) K\(^{-1}\)). Default \(840.0\).
  • melting_curve: Iron melting curve parameterisation, "iron" (PALEOS / Anzellini et al., 20131) or "quadratic" (Nimmo, 20159, ch. 9.08, Eq. 6). Default "iron"; the triple-point blend of the iron curve is described above.
  • light_element_fraction: Mole fraction of light elements depressing the iron melting curve. Default \(0.0\).
  • depression: Melting-point depression per unit mole fraction (dimensionless). Default \(0.0\).
  • t_m0, t_m1, t_m2: Coefficients of the quadratic melting curve (K, Pa\(^{-1}\), Pa\(^{-2}\)), all three required with melting_curve = "quadratic". (PROTEUS defaults: \(2677.0\), \(2.95\times 10^{-12}\), \(8.37\times 10^{-25}\).)
  • ds_fusion: Entropy of fusion at the inner-core boundary (J kg\(^{-1}\) K\(^{-1}\)). Default \(172.8\).
  • latent_heat: Constant latent heat of fusion (J kg\(^{-1}\)), in place of \(T_\text{icb}\,\Delta s\) from ds_fusion (750 kJ kg\(^{-1}\) in Nimmo, 20158, ch. 8.02, Table 2, and in the note to Table 2 of Nimmo, 20159, ch. 9.08).
  • icn_width: Temperature width of the inner-core nucleation diagnostic sigmoid (K). Diagnostic only; does not affect the effective heat capacity. Default \(10.0\).
  • alpha_c: Compositional expansivity of the outer-core alloy (dimensionless). Default \(0.0\).
  • c_light: Light-element mass fraction of the outer core (dimensionless). Default \(0.0\).
  • capacity_mode, legacy_rho_core, legacy_tfac: "profile" (default) integrates the Gaussian profile; "legacy" uses the isothermal reservoir \(\rho_\text{core} V c_p \,\mathrm{tfac}\) with the two legacy values.
  • stratification: Boolean flag enabling the resolved stable layer (experimental, see above). Default false.
  • k_core: Core thermal conductivity (W m\(^{-1}\) K\(^{-1}\)), required with stratification = true (no default here; PROTEUS uses \(130.0\)).
  • layer_base_fraction: Base of the resolved shell as a fraction of the CMB radius. Default \(0.4\).
  • layer_cells: Number of shell cells. Default \(64\).
  • layer_top_cell: Width of the shell cell at the CMB (m); the cells widen geometrically downward. Default \(2000\).
  • layer_k_mix: Eddy diffusivity of convective mixing at the reference superadiabatic gradient (m\(^2\) s\(^{-1}\)). Default \(10^7\).
  • layer_g_mix: Reference superadiabatic gradient, as a fraction of the adiabatic gradient at the CMB. Default \(10^{-3}\).
  • profile_source: "gaussian" (default) or "paleos". "paleos" takes the core structure from core_profile_file and puts the convecting core on one isentrope of the PALEOS liquid iron table core_liquid_table (explanation); the Gaussian profile keys (alpha, c_p, adiabat_mode, pressure_mode, rho_cen, length_scale) are then unused, and stratification = true and capacity_mode = "legacy" are refused.
  • core_liquid_table: Path of the PALEOS liquid iron table that Zalmoxis writes (2phase_iron_liquid_<sha>_<build>_<grid>.dat) or of an .npz cut of it; its # Kind: line must name liquid. Read only with profile_source = "paleos".
  • core_profile_file: Path of an .npz with the core arrays of a Zalmoxis structure, r (m), m (kg), P (Pa), rho (kg m\(^{-3}\)) and g (m s\(^{-2}\)) from the centre to the CMB; the other keys of the Zalmoxis core arrays are accepted and unused. Read only with profile_source = "paleos". The solver builds the budget again when the content of either file changes.
  • core_cp_override: Heat capacity of the secular term on the PALEOS path (J kg\(^{-1}\) K\(^{-1}\)), or "table" for the value of the table at the CMB. Default \(840.0\), because the PALEOS liquid sets \(C_V = 3nR\) with no electronic heat capacity.
  • core_t_cmb_step: Spacing of the CMB temperatures at which the PALEOS isentropes are tabulated (K). Default \(10.0\).
  • q_radio: Core radiogenic power (W). Default \(0.0\).
  • ra_crit_cmb: Critical Rayleigh number of the mantle-side CMB boundary layer (dimensionless). Not set by default, which selects Thiriet et al. (2019) eq. 16 (Critical Rayleigh number of the layer); "phase" blends 450 and eq. 16 by the melt fraction of the bottom cell (Critical Rayleigh number by phase); a number must be positive and finite.

The dynamo field-strength options f_ohm and flux_geometry belong to PROTEUS, which builds the entropy budget itself; they are not accepted here.

Diagnostic outputs

PROTEUS writes seven diagnostics of this budget to its output helpfile on every core_module row:

  • core_r_icb: the inner-core radius;
  • core_C_eff: the effective heat capacity \(\tilde{C}(T_\text{cmb})\);
  • core_dynamo_margin: the entropy margin available to a dynamo;
  • core_B_rms: the rms field strength;
  • core_regime: the crystallisation regime code (0 fully liquid, 1 bottom-up, 4 fully frozen; the codes 2 top-down and 3 snow mark states the solver refuses, below);
  • core_strat_depth: the stable layer thickness below the CMB;
  • core_T_top: the temperature at the top of the core (the top shell cell with a shell, else \(T_\text{cmb}\)).

With profile_source = "paleos", CoreModule.diagnostics() also returns core_eos_outside_calibration. It is the core mass fraction outside the calibration window of the PALEOS liquid: 8000 to 14,000 K and 50 to 1300 GPa. On this path Aragog does not compute the entropy budget behind core_dynamo_margin and core_B_rms (limits).

The budget books latent and gravitational heat only for an inner core that grows from the centre and for its freeze-out. A call whose core enters the top-down or snow regime, or freezes completely without growing from the centre, raises an error at the end of the call, checked at every accepted step; the energetics of those regimes are not modelled. A call that fails is not checked: it stops early and books no energy.

The light-element fraction of the outer core is fixed: the gravitational term uses a constant c_light and the iron curve a constant depression, where complete rejection of light elements by the growing inner core would raise the outer-core fraction as \(c_0 M_\text{core} / M_\text{oc}\). With a gravitational term or a light-element depression in use, a call whose inner core holds more than a tenth of the core mass (\(M_\text{oc} / M_\text{core} < 0.9\), where the gravitational term would be low by up to 10 percent) raises an error. The enrichment of the outer core is not modelled.

In aragog SolverOutput, the per-call core energy change is recorded in step_dE_core_J (J), evaluating \(\int \tilde{C} dT_\text{cmb}\) over the call, plus the shell's heat change with stratification = true; the shell temperatures (core_T_shell), the layer base (core_layer_base) and the temperature of the top shell cell (core_T_top) are in the output, the last two NaN without a shell, and a resumed run passes the shell back with set_initial_shell_temperature.

step_core_tol_J (J) is a diagnostic scale of the error of step_dE_core_J: the error that the error control of the core temperature allows. It is an order-of-magnitude scale, not a limit.

  • How it is computed. The core temperature is integrated as its change within the call. CVODE therefore holds the local error of a step to about \(\mathrm{atol} + \mathrm{rtol}\,|T_\text{cmb} - T_{\text{cmb},0}|\) (K). The scale sums this error times \(\tilde{C}\) over the energy quadrature nodes after the call start, summed while CVODE steps. These nodes are every accepted step, every output point and, on a fired root, the root-search points.
  • Size. The scale grows with the number of nodes. A tighter rtol adds steps, so it can raise the scale.
  • Why it is not a limit. CVODE controls a norm over all states, and the CMB heat it is compared with is a trapezoid over the same nodes. The residual can therefore come near the scale or exceed it. The convergence tests bound each of the first 3 calls of a zero-flux start, and a call that crosses the inner-core onset, by twice the scale. For a stratified core, whose scale leaves out the shell, this bound is measured, not derived.
  • Start-temperature rounding. The per-call ledger does not book the rounding of the start temperature of the next call to the float spacing of \(T_\text{cmb}\). This is at most \(0.5\,\mathrm{ulp}(T_\text{cmb})\,\tilde{C}\) per call: \(8.4 \times 10^{14}\) J at 4862 K for the core of the low-flux test, 0.21 of the CMB heat of its 5 yr call. It does not average out over calls that change \(T_\text{cmb}\) by less than half its float spacing, because each of them starts the next call at the same temperature.
  • Freeze-out. The ledger splits a call at \(T_\text{fr}\), but the capacity that the solver integrates jumps 1 or 2 float spacings above it. A call that crosses freeze-out therefore books that length with the liquid capacity, up to \(1.7 \times 10^{15}\) J for the test cores.
  • What it covers. The scale covers the core temperature only, not the shell with stratification = true. It takes the tolerances of the call, not the tighter ones of sub-solidus rate-cap segments.
  • When it is NaN. It is NaN for every core_bc except core_module, after a failed call and after a call that does not advance.
  • Floor of atol. A requested atol below \(10^{-8}\), 0 included, is raised to \(10^{-8}\) before the scale factors of the call. The solver logs this once. A floor above 0 is needed: the change of the core temperature starts at 0, and CVODE needs a positive weight for it.

Energy conservation and core closure

How does Aragog check that the core conserves energy in each call? The core ledger checks one balance per call: the heat the core loses, plus its radiogenic heat, equals the heat that crosses the core-mantle boundary (CMB). From SolverOutput, the core closure residual of a call compares the heat change of the core with the CMB heat transport:

\[ r_\text{core} = \frac{|\Delta E_\text{core} + \Delta E_\text{cmb} - Q_R\, \Delta t|}{\max(|\Delta E_\text{core}|, |\Delta E_\text{cmb}|)} \]

where \(\Delta E_\text{cmb} = \int A_\text{cmb}\, q\, dt\) and \(\Delta E_\text{core} = \int \tilde{C}\, dT_\text{cmb}\). The convergence tests of core ledger closure use the signed form \((\Delta E_\text{core} + \Delta E_\text{cmb}) / \Delta E_\text{cmb}\) with \(Q_R = 0\); its size agrees with \(r_\text{core}\) to a relative \(r_\text{core}\).

The solver books the core heat change of a call in 2 steps:

  1. It integrates the core temperature as its change over the call. The state is offset by its value at the start of the call, so the solver tolerance acts on that change, not on the absolute temperature. The shell temperatures of a stratified core are integrated in the same way.
  2. It books the core heat change of a call, \(\int \tilde{C}\, dT_\text{cmb}\), from this integrated change of the core temperature. It does not book it as the difference of 2 heat contents or 2 temperatures (see the note below).

The integral takes one of 2 forms:

  • Without stratification, it is the closed form of the integral (CoreEnergyBudget.heat_change). It uses 48-point Gauss-Legendre quadrature in \(u = \sqrt{T_\text{onset} - T_\text{cmb}}\) on each side of freeze-out. This substitution removes the square-root cusp at nucleation.
  • With stratification = true, the capacity also depends on the layer base. The integral is then a trapezoid rule over the energy quadrature nodes (every accepted step). The shell adds \(c_p \sum_j m_j\, \Delta T_j\) of its cells (CoreShell.heat_change). A limit: where nucleation falls inside a call, this rule does not resolve the square-root cusp of the latent and gravitational terms as the closed form does.
Why not the difference of 2 heat contents

A heat content near \(10^{31}\) J has a float spacing near \(10^{15}\) J. A temperature near 5000 K has a float spacing of \(9 \times 10^{-13}\) K. Times \(\tilde{C}\), that spacing is about \(8 \times 10^{14}\) to \(7 \times 10^{15}\) J. Here \(\tilde{C}\) is \(9 \times 10^{26}\) to \(8 \times 10^{27}\) J/K for the core profiles of the tests, with the upper end for an Earth-size core near freeze-out. Either rounding can exceed the CMB heat of a short call.

Two smoke tests hold the residual:

  • test_a_hot_core_call_closes_its_heat_to_1e_minus_6 holds a 10-yr call, in which the core cools by about \(10^{-5}\) K, to a residual below \(10^{-6}\).
  • test_core_module_core_cools_through_the_boundary_layer_and_closes_its_energy has a core that cools by about 1.3 K over a partly molten base. It holds the residual below \(10^{-6}\) and the core heat change equal to the heat_content difference to \(10^{-6}\).

The mantle heat change (step_dE_state_heat_J) integrates \(\rho T\, dS\) along the entropy path of each cell. It uses a trapezoid rule, in one EOS call for all points and cells. In core_module the rule has 512 points, because \(\rho T\) has a kink at the solidus and a coarse uniform rule aliases over it on fine meshes. The other modes use 16 points.

Where this is checked. Core ledger closure and a CVODE solve across the inner-core onset.


  1. Anzellini, S., Dewaele, A., Mezouar, M. et al., Melting of Iron at Earth's Inner Core Boundary Based on Fast X-ray Diffraction, Science, 340, 464-466, 2013. SciX. ↩↩

  2. D. J. Bower, P. Sanan, A. S. Wolf, Numerical solution of a non-linear conservation law applicable to the interior dynamics of partially molten planets, Physics of the Earth and Planetary Interiors, 274, 49-62, 2018. SciX. ↩

  3. Deschamps, F. & Sotin, C., Inversion of two-dimensional numerical convection experiments for a fluid with a strongly temperature-dependent viscosity, Geophysical Journal International, 143, 204-218, 2000. SciX. ↩

  4. Foley, B.J. & Driscoll, P.E., Whole planet coupling between climate, mantle, and core: Implications for rocky planet evolution, Geochemistry, Geophysics, Geosystems, 17, 1885-1914, 2016. SciX. ↩

  5. Greenwood, S., Davies, C.J. & Mound, J.E., On the evolution of thermally stratified layers at the top of Earth's core, Physics of the Earth and Planetary Interiors, 318, 106763, 2021. SciX. ↩↩↩

  6. Labrosse, S., Poirier, J.-P. & Le MouĂ«l, J.-L., The age of the inner core, Earth and Planetary Science Letters, 190, 111-123, 2001. SciX. ↩

  7. Y. Miyazaki, J. Korenaga, On the timescale of magma ocean solidification and its chemical consequences: 2. Compositional differentiation under crystal accumulation and matrix compaction, Journal of Geophysical Research: Solid Earth, 124, 3399-3419, 2019. SciX. ↩

  8. Nimmo, F., Energetics of the Core, in Schubert, G. (ed.), Treatise on Geophysics, 2nd edition, Elsevier, 8, ch. 8.02, 27-55, 2015. ↩

  9. Nimmo, F., Thermal and Compositional Evolution of the Core, in Schubert, G. (ed.), Treatise on Geophysics, 2nd edition, Elsevier, 9, ch. 9.08, 201-219, 2015. ↩↩↩↩↩

  10. M. Thiriet, D. Breuer, C. Michaut, A.-C. Plesa, Scaling laws of convection for cooling planets in a stagnant lid regime, Physics of the Earth and Planetary Interiors, 286, 138-153, 2019. SciX. ↩