Two-phase flow in Aragog
A magma ocean is rarely fully molten or fully solid. Across most of its evolution, the silicate mantle sits in a mushy regime where solid grains and silicate melt coexist over a finite depth range. Aragog represents this regime as a two-phase mixture of melt and solid that coevolves at every radial node, rather than as a single-phase fluid with a depth-cutoff between molten and solid layers. This page explains the conceptual difference between one-phase and two-phase formulations, lists the additional physics terms the two-phase representation enables, and points to the source files that implement them.
One-phase versus two-phase formulations
In a one-phase magma-ocean model, the mantle is treated as a single homogeneous fluid that is either entirely above the liquidus or entirely below the solidus. A solidification front (a depth or a single state variable) tracks where the transition lives, and the mantle on each side of the front is closed by its own equation of state. The bulk fluid evolves through a global energy balance, and the latent heat of fusion either appears as an effective heat-capacity spike at the phase boundary or as a global solidification term subtracted from the surface flux. Most of the boundary-layer-theory (BLT) lineage of magma-ocean codes (Elkins-Tanton (2008)4, Hamano et al. (2013)5, Schaefer et al. (2016)8) is one-phase by construction: the well-mixed assumption that defines BLT is a one-phase assumption.
In a two-phase model, both the melt and the solid coexist on the same spatial element, with a melt fraction \(\phi(r,t) \in [0,1]\) describing how much of each is present. Solid and melt have independent equations of state, blended by the lever rule into composite material properties. Solid grains and melt droplets can move with respect to each other in response to gravity (gravitational separation) and chemical diffusion (chemical mixing of melt fraction). Phase-change latent heat enters the energy budget as a continuous function of \(\phi\), not as a delta function at the solidus or liquidus. Aragog and SPIDER (Bower et al. (2018)2) are two-phase magma-ocean codes; this is the second defining feature, alongside mixing-length theory, that distinguishes them from the BLT lineage.
The trade-off is the usual one: the two-phase representation is necessary to capture the partial-melt physics that controls the rheological transition and the late-stage solidification window, but it costs an extra state variable per cell, two phase-boundary lookups per cell per call, and three additional flux contributions on the right-hand side.
How Aragog defines the two-phase state
The two-phase state at each radial node is defined by the local pressure \(P\) and specific entropy \(S\). The phase-boundary entropies \(S_\mathrm{sol}(P)\) (solidus) and \(S_\mathrm{liq}(P)\) (liquidus) are tabulated as functions of pressure in the EOS file. The melt fraction is computed from the un-truncated lever rule
The clipped \(\phi\) is the physical melt fraction; the un-truncated \(g\phi\) is retained for the smoothing functions that gate the two-phase fluxes (see below). This single ratio determines how all the other material properties are blended.
| Property | Two-phase blending rule |
|---|---|
| \(T\) | \(T = \phi\,T_\mathrm{liq}(P) + (1-\phi)\,T_\mathrm{sol}(P)\) (linear lever rule) |
| \(\rho\) | \(1/\rho = \phi/\rho_\mathrm{liq}(P) + (1-\phi)/\rho_\mathrm{sol}(P)\) (harmonic mean) |
| \(\alpha\) | composite expression \((\rho_\mathrm{sol}-\rho_\mathrm{liq})/(\Delta T_\mathrm{phase}\,\rho_\mathrm{mix})\) in latent Cp mode |
| \(c_p\) | latent-heat-augmented in mushy regions, returning to the per-phase EOS values at \(\phi=0\) and \(\phi=1\) |
| \(\eta\) (viscosity) | \(\log_{10}\eta = z\,\log_{10}\eta_\mathrm{liq} + (1-z)\,\log_{10}\eta_\mathrm{sol}\), with the rheological-transition weight \(z(\phi)\) from Costa et al. (2009)3 |
| \(L(P)\) (latent heat) | \(L(P) = T_\mathrm{fus}(P)\,(S_\mathrm{liq}(P) - S_\mathrm{sol}(P))\), EOS-tabulated |
The single-pass evaluation lives in EntropyPhaseEvaluator._update_eos (file src/aragog/eos/entropy_phase.py), which mirrors SPIDER's EOSEval_Composite_TwoPhase (eos_composite.c:177-290) so the same blending rules are used in both codes.
The phase-boundary lookups happen exactly once per call, and all derived quantities are computed from the cached intermediates rather than via repeated table calls.
The viscosity blend deserves special note.
Costa et al. (2009) Figure 2 shows the relative viscosity of crystal-bearing magmas rising by \(\sim 10^{10}\) through the rheological transition near the critical melt fraction \(\phi_c\), while Aragog's solid/liquid end-member viscosities are \(\eta_\mathrm{sol} \sim 10^{21}\) Pa s and \(\eta_\mathrm{liq} \sim 10^{-1}\) Pa s by default, giving an end-member contrast of \(\sim 10^{22}\) over \(\phi\).
This is what makes the partial-melt regime numerically stiff and motivates Aragog's smooth tanh blend over a hard if/else.
When solid mantle rheology is enabled ([phase_solid.rheology]), \(\eta_\mathrm{sol}\) varies with temperature, pressure, and stress rather than staying constant. See Solid-state convection for the variable solid viscosity laws and melt-fraction blending.
Two-phase flow contributions
In a one-phase formulation, the heat flux is conduction plus convection only. Two-phase flow adds two additional flux components and one additional source term in the partial-melt regime:
Gravitational separation of melt and solid
Solid and melt have different densities, so they separate vertically by gravity. The mass flux of melt is positive upward:
with \(g > 0\) the gravity magnitude. Bower et al. (2018)2 Eq. 12 and SPIDER write the contrast as \(\rho_\mathrm{liq} - \rho_\mathrm{sol}\) with a negative \(g\), which gives the same sign. A lighter melt rises and the solid settles; where the melt is denser the velocity is negative but about 0, since the porosity is floored there (below). The tabulated densities can cross so that the melt is locally the denser phase in a shallow region. Aragog floors the porosity denominator \(\rho_\mathrm{sol} - \rho_\mathrm{liq}\) at about 1 kg m⁻³ in that region, so the porosity there is \((\rho_\mathrm{sol} - \rho)/(1\ \mathrm{kg\,m^{-3}})\) clipped to \([0, 1]\): about 0 where the node density is at or above \(\rho_\mathrm{sol}\), and up to 1 below it. The flux \(j_\mathrm{grav}\) carries the factor \(\phi(1-\phi)\) of the melt fraction, so it vanishes in solid and fully molten nodes whatever the porosity.
\(\eta_\mathrm{mix}\) is the drag viscosity selected by separation_viscosity.
The default, "melt", is the fixed liquid viscosity \(\eta_\mathrm{liq}\), matching SPIDER's GetGravitationalHeatFlux.
The alternative, "mixture", is the rheological-transition-blended mixture viscosity: it ramps from the liquid value near and above phi_rheo to the solid value below it, so settling locks up through the same transition that sets the bulk rheology.
In a coupled caps-off simulation, "melt" keeps the drag viscosity fixed at its low liquid value below phi_rheo, so gravitational separation keeps moving melt out of the deepest cells (melt rises, solid settles; the core-mantle boundary itself carries no mass flux) and the CMB temperature collapses; "mixture" ties the drag viscosity to the same solid-fraction rise that stiffens the bulk rheology, so separation locks up at the same melt fraction and the collapse does not occur.
PROTEUS defaults separation_viscosity to "mixture" for this reason; Aragog's own default stays "melt" for SPIDER parity.
The mobility factor \(F(\phi)\) (the permeability \(K(\phi)\) divided by porosity) spans three asymptotic regimes (Bower et al. (2018) §2.1):
- Stokes settling at high \(\phi\): melt is the matrix and solid grains settle as isolated spheres, derived from Stokes' law (Bower et al. (2018) Eq. 13a).
- Rumpf-Gupte at intermediate \(\phi\): power-law permeability fit to particle-bed measurements (Rumpf & Gupte, 1971, Chem. Ing. Tech. 43, 367)7.
- Blake-Kozeny-Carman at low \(\phi\): melt as a percolating fluid through a near-rigid solid matrix.
The two regime boundaries, \(\zeta_1 = 0.0769452\) and \(\zeta_2 = 0.771462\), are the porosities at which Aragog switches between adjacent permeability laws, placed at their crossings: Blake-Kozeny-Carman with Rumpf-Gupte at \(\zeta_1\), Rumpf-Gupte with Stokes settling at \(\zeta_2\) (Bower et al. (2018)2 §2.1, Eqs. 13a to 13c). For the coded forms, \(\zeta_2\) is the exact crossing and \(\zeta_1\) sits \(1.7 \times 10^{-5}\) below it in porosity (0.02 percent; exact value 0.0769618), far inside the blend width of 0.02. The boundaries follow from the functional forms of the three laws.
The three-regime \(\zeta_\mathrm{grav}(\phi)\) formulation that Aragog and SPIDER use is consolidated in Abe (1995)1 and reviewed in Bower et al. (2018) §2.1 Eqs. 13a-c, where the general regime transitions are density-ratio-dependent: \(\rho_\mathrm{liq}/(11.993\,\rho_\mathrm{sol} + \rho_\mathrm{liq})\) for BKC-to-RG and \(\rho_\mathrm{liq}/(0.29624\,\rho_\mathrm{sol} + \rho_\mathrm{liq})\) for RG-to-Stokes.
Aragog hard-codes fixed porosity thresholds, \(\zeta_1 = 0.0769452\) (BKC to RG) and \(\zeta_2 = 0.771462\) (RG to Stokes), close to the equal-density-ratio limits of these expressions (0.0769645 and 0.7714621), and blends through them with a tanh switch rather than recomputing per radial node.
separation_buoyancy sets the buoyancy that drives the separation.
The default, "mixture", takes it against the mixture as McKenzie (1984)6 Eq. 3.7 does, \(w_0 = (k_\phi/\mu)\,((1-\phi)/\phi)\,(\rho_\mathrm{sol} - \rho_\mathrm{liq})\,g\), which puts a factor \(1-\phi\) on the Blake-Kozeny-Carman and Rumpf-Gupte terms of \(F\).
The Stokes term keeps the plain contrast, as under "solid": the dilute limit of a grain settling alone, so it has no factor; McKenzie's derivation is for a matrix of touching grains, which the Stokes regime is not.
His matrix solution holds below a porosity of about 0.2 (McKenzie 1984, p. 722); above it, through most of the Rumpf-Gupte range, the factor is an extrapolation of that solution.
Under "mixture" the Rumpf-Gupte term never reaches the Stokes value: \((1-\phi)\,F_\mathrm{RG}\) peaks at \(0.0526\,a^2\) near \(\phi = 0.818\), while \(F_\mathrm{Stokes} = 0.2222\,a^2\), so \(\zeta_2\) is no longer a crossing and the mobility rises by a factor of about 3 between porosities 0.72 and 0.82.
The tanh blend keeps \(F\) smooth through that step.
The alternative, "solid", takes the buoyancy against the solid as Abe (1995)1 Eq. 40 and SPIDER do; the bundled Abe benchmark abe_mixed.cfg sets it.
The resulting mobility-vs-porosity curve (Figure 1 of Heat transport) is JAX-differentiable and shifts the transition location by a few percent in \(\phi\) relative to the density-ratio-dependent form.
The corresponding heat flux is
with \(L(P)\) the EOS-tabulated, pressure-dependent latent heat of fusion.
bottom_up_grav_sep = true adds a SPIDER-parity gate that disables \(j_\mathrm{grav}\) below the rheological transition until the solid fraction is interconnected, reflecting the physical fact that melt cannot drain through a fully molten lower mantle.
Chemical mixing of melt fraction
How much latent heat does convection move when it mixes melt-rich and melt-poor parcels in a mush?
Convection moves parcels with their melt fraction \(\phi\). A parcel that arrives where \(\phi\) is different melts or freezes, and takes up or gives off latent heat. Aragog treats this as a diffusion of \(\phi\) down its gradient, Eq. 9 of Bower et al. (2018):
- \(\kappa_c\) is the chemical eddy diffusivity (m\(^2\) s\(^{-1}\)): the mixing-length \(\kappa_h\) before the floor and before the factor
eddy_diffusivity_thermal, timeseddy_diffusivity_chemical. Where that setting is negative, \(\kappa_c\) is its magnitude on every node. - \(\rho\) is the density (kg m\(^{-3}\)) and \(\Delta S_\mathrm{fus} = S_\mathrm{liq} - S_\mathrm{sol}\) the entropy of fusion (J kg\(^{-1}\) K\(^{-1}\)) at the local pressure.
- \(T_\mathrm{fus}\) is the fusion temperature (K), the mean of the solidus and liquidus temperatures at the pressure of the face. The EOS defines the latent heat as \(L = T_\mathrm{fus}\,\Delta S_\mathrm{fus}\), so \(\rho\,T_\mathrm{fus}\,\Delta S_\mathrm{fus} = \rho L\), the latent heat per volume.
Bower et al. (2018) Eq. 9 has the temperature \(T\) and \(\kappa_h\) in place of \(T_\mathrm{fus}\) and \(\kappa_c\). The flux is zero where \(\phi\) does not change with radius, and it is zero at the CMB face and at the surface face.
The flux at a face
At each face between 2 cells, \(\partial\phi/\partial r\) is the difference of the melt fractions of the 2 cells divided by their distance in the mesh coordinate \(\xi\), then converted to radius, the same way as \(\partial S/\partial r\) (Spatial discretisation). The melt fraction of a cell is computed by aragog.utilities.mixing_melt_fraction from \(g = (S - S_\mathrm{sol})/\Delta S_\mathrm{fus}\), the un-truncated ratio \(g\phi\) of the two-phase state:
- \(g \le -0.02\): exactly 0;
- \(-0.02 < g < -0.01\): a cubic join from 0 to the clipped value;
- \(-0.01 \le g \le 1.01\): \(g\) smoothly clipped to \([0, 1]\), with a clip width of \(10^{-3}\) (
MIX_CLIP_EPS); - \(1.01 < g < 1.02\): a cubic join from the clipped value to 1;
- \(g \ge 1.02\): exactly 1.
Each join starts at a distance MIX_TAIL_START = 0.01 beyond its phase boundary and ends at MIX_TAIL_END = 0.02, with a continuous value and slope at both ends. So 2 cells of pure melt (\(g \ge 1.02\)) or of pure solid (\(g \le -0.02\)) exchange no mixing heat. The smooth clip alone differs from 1 by about \(2.5 \times 10^{-7}/(g - 1)\) just above the liquidus and from 0 by about \(2.5 \times 10^{-7}/|g|\) just below the solidus, which would give a small flux between cells of one phase.
Why the flux uses the cell melt fractions
The cell melt fractions give a flux that is exactly 0 between 2 cells of pure melt and that follows the melt fraction of each cell. The bracket form of SPIDER is continuous too, because its weight at the face is a tanh, but it carries a flux between 2 cells of pure melt, and it rises steeply at the face below a cell that is still melt. In the continuum the 2 forms are equal, because \(\partial\phi/\partial r = [\partial S/\partial r - (\phi\,\partial S_\mathrm{liq}/\partial r + (1-\phi)\,\partial S_\mathrm{sol}/\partial r)]/\Delta S_\mathrm{fus}\). The bracket form takes \(\phi\) at the face and multiplies the flux by the phase-boundary weight \(\mathrm{smth}\) of the face. At the face between the top mush cell (\(g = 0.5\)) and the melt cell above it, that weight turns the flux on as the face value of \(g\) falls to 1, while the cell above is still melt. The first case of the Validation page gives the size of that rise and the flux of the cell form at the same face on 19 cells. The size depends on the mesh; the tutorial shows the same face on a mesh with a refined cell at the core-mantle boundary.
Limits
- The cell melt fraction lies in \([0, 1]\) and never falls when \(g\) grows.
- The second derivative of the cell melt fraction jumps at \(g = -0.02\), \(-0.01\), \(1.01\) and \(1.02\).
- For a positive
eddy_diffusivity_chemicaland a convective threshold \(D > 0\), the flux of a mush jumps where \(\partial S/\partial r\) changes sign: on the unstable side the minimum drive keeps \(\kappa_c\) at its value for \(D\) as \(\partial S/\partial r \to 0\), while on the stable side \(\kappa_c\) is 0 (Convection). A Known limit of the Validation page gives the size of the jump on a test state. - In one run with the PALEOS MgSiO\(_3\) tables, whose liquidus entropy falls above 164.8 GPa, the solve slowed down near the liquidus. The Known limit gives the numbers; the cause is open (aragog#133).
Where this is checked. Mixing flux.
Phase-boundary smoothing
The smoothing function \(\mathrm{smth}(\phi)\) keeps the gravitational-separation flux \(F_\mathrm{grav}\) differentiable at the solidus and liquidus. It does not act on \(F_\mathrm{mix}\). Aragog supports two forms:
phase_smoothing |
Formula |
|---|---|
"tanh" (default, SPIDER parity) |
Two-branch \(\mathrm{get\_smoothing}\) with width matprop_smooth_width = 0.01; \(\mathrm{smth} \approx 1\) in the mushy interior except for tanh skirts of width \(\sim 0.01\) in \(g\phi\) at \(g\phi = 0\) and \(g\phi = 1\) |
"cubic_hermite" |
\(\mathrm{smth}(g\phi) = 16\,g\phi^2(1-g\phi)^2\) for \(g\phi \in [0, 1]\); intermediate-\(\phi\) damping, slightly more conservative for residual EOS mismatch |
Without smoothing, the raw \(\rho\phi(1-\phi)\,v_\mathrm{rel}\) flux drains the CMB cell off the EOS table edge in a single coupling step at first crystallisation; with smoothing, the flux ramps continuously and the JAX Jacobian remains finite across the transition. TestJgravSmoothing in tests/test_entropy_pytest.py runs 15 cells that start 10 J kg\(^{-1}\) K\(^{-1}\) below the liquidus entropy of the CMB cell for 500 yr with the mixing flux on: with either form the solve succeeds, every cell stays more than 500 J kg\(^{-1}\) K\(^{-1}\) above the table minimum and the CMB temperature stays above 1500 K, and without smoothing (bottom_up_grav_sep = false) one of these fails (on the SPIDER test tables the CMB cell ends at \(-7156\) J kg\(^{-1}\) K\(^{-1}\), below the table minimum of \(-1606\)).
Why this matters: where one-phase models lose physics
A one-phase magma-ocean model can be tuned to give a reasonable bulk cooling rate during the fully-molten phase, where the well-mixed assumption is well justified and a single Nu-Ra closure captures the surface flux. The lossy regime is the partial-melt phase: the time window between first crystallisation and final solidification, which for an Earth-mass mantle is several hundred kyr to tens of Myr. In that window:
- Gravitational separation moves melt up and solid down at speeds comparable to the convective velocity in the lowest-permeability regime, transporting both mass and latent heat that a one-phase model cannot represent.
- Chemical mixing carries entropy in the opposite direction to convection in parts of the mushy band, partially cancelling the convective flux on either side of the rheological transition; this is what produces the multi-component flux structure shown in Figure 2 of Heat transport.
- The relative viscosity rises by \(\sim 10^{10}\) across the rheological transition (Costa et al. (2009) Figure 2), well outside any single Ra-Nu fit, so the BLT closure that worked at fully-molten state is no longer accurate.
- The latent heat of solidification, encoded in Aragog as a continuous function of \(\phi\) via the lever rule, becomes a c\(_p\) delta function in a one-phase model, which is either ignored (incorrect) or imposed as a global term that misrepresents its spatial distribution.
In a coupled atmosphere-interior simulation, this is the regime where atmospheric H\(_2\)O outgassing, surface volatile budgets, and the timing of solidification are decided. The one-phase formulation can give the right qualitative answer but will miss the resolved time-dependence and the radial structure that controls the coupling to the atmosphere.
See also
For the algebraic forms of the four heat-flux components Aragog assembles, see Heat transport. For the closure that determines \(\kappa_h\) in the convective flux, see Mixing-length theory. For the SPIDER cross-check, see Aragog vs SPIDER.
-
Yutaka Abe, Basic equations for evolution of partially molten mantle and core, in Yukutake, T. (ed.), The Earth's Central Part: Its Structure and Dynamics, Terra Sci. Pub. Com., 215–230, 1995. ↩↩
-
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. ↩↩↩
-
A. Costa, L. Caricchi, N. Bagdassarov, A model for the rheology of particle-bearing suspensions and partially molten rocks, Geochemistry, Geophysics, Geosystems, 10, Q03010, 2009. SciX. ↩
-
L. T. Elkins-Tanton, Linked magma ocean solidification and atmospheric growth for Earth and Mars, Earth and Planetary Science Letters, 271, 181–191, 2008. SciX. ↩
-
K. Hamano, Y. Abe, H. Genda, Emergence of two types of terrestrial planet on solidification of magma ocean, Nature, 497, 607–610, 2013. SciX. ↩
-
Dan McKenzie, The generation and compaction of partially molten rock, Journal of Petrology, 25, 713–765, 1984. ↩
-
H. C. H. Rumpf; A. R. Gupte, Einflüsse der Porosität und Korngrößenverteilung im Widerstandsgesetz der Porenströmung, Chemie Ingenieur Technik, 43, 367–375, 1971. ↩
-
L. Schaefer, et al., Predictions of the atmospheric composition of GJ 1132b, The Astrophysical Journal, 829, 63, 2016. SciX. ↩