Skip to content

Parameter reference ​

A MILEVA run is configured by three mutable structs that main_SphCon receives together:

StructFileHolds
SimConfigconfig/SimConfig.jlGeometry, resolution, solvers, physics switches, time stepping, output. This page documents every field.
MaterialPropertiesconfig/MaterialProperties.jlLayer radii, creep-law constants, yield parameters, phase-transition slopes and density jumps, composition viscosity factors. Summarised at the end of this page.
TemperatureConditionsconfig/TemperatureConditions.jlBoundary temperatures, initial profile, CMB patches. Summarised at the end of this page.

All three are @kwdef structs, so a configuration is plain Julia: build the defaults, overwrite fields, then call validate! on each before the run.

julia
using Plots   # visualization/plot_panels.jl needs Plots loaded first
include("include/mileva.jl"); include("main_SphCon.jl")

cfg  = SimConfig(Nr = 64, Nt = 512)        # keywords at construction
cfg.geometry   = "spherical_annulus"       # or assignment afterwards
cfg.solverType = "mumps"
mat  = MaterialProperties()
temp = TemperatureConditions()
validate!(cfg); validate!(mat); validate!(temp)

history = main_SphCon(cfg, mat, temp)

A parameter file for run_mileva.jl or bin/run_mpi.jl is a Julia script that assigns to cfg, mat and temp in this way.

How to read the tables ​

The Default column is the value in the @kwdef declaration. Read by names the files that read the field (found by searching the source, excluding tests/ and benchmarks/). The status column flags anything that does not do what its name suggests:

  • live: read by the time loop or a solver it calls.

  • unused: no code outside config/SimConfig.jl reads it.

  • refused: validate!(cfg) raises an error if it is set, because the feature behind it is not implemented on the time loop.

  • inert: read only by code that no entry point includes (the AMR prototype under solvers/amr/), or only by a function nothing calls.

  • helper only: read by a helper function that the standard time loop does not call; a custom driver can call it.

  • experimental: live but not recommended; the trade-off is described.

Set what a run depends on

The struct defaults describe an Earth-sized, ALA, composite-capable shell (R_in = 3481 km, R_out = 6371 km, compressibilityMode = "ALA", solverType = "direct", Nr × Nt = 192 × 512). A benchmark sets every switch it depends on explicitly, as benchmarks/hernlund_tackley_annulus.jl does (it clears all optional flags in a loop, then sets the ones it needs).

Dimension, geometry and grid ​

The 2-D shell as the defaults define it: R_in and R_out from SimConfig, T_cmb and T_surf from TemperatureConditions. The blue sector shows cell faces built by setup_grid on a coarse grid (Nr = 12, Nt = 96) with amrStretchFactor = 2, which narrows the cells toward both walls; the shading from hot to cold is illustrative only.

FieldDefaultUnitsStatusMeaning
dim2live2: spherical (or cylindrical) annulus. 3: Yin-Yang spherical shell.
geometry"spherical_annulus"live2-D radial metric. "spherical_annulus" uses the measure r2dr; "cylindrical_annulus" uses rdr. "Cartesian" is reserved and unused by the annulus path. validate! normalises "sphere"/"spherical" and "cylinder"/"cylindrical" and refuses the bare "annulus" as ambiguous. Read through geometry_exponent(cfg) in utils/geometry.jl.
R_in3481e3mliveInner radius (core-mantle boundary).
R_out6371e3mliveOuter radius (surface).
Nr192liveRadial cells.
Nt512live2-D: azimuthal cells over the full 2π. 3-D: colatitude cells Nth of each Yin-Yang patch; the longitude count is derived as Nph = 3·Nth·(chunkPhiRange/(3π/2)), rounded to a multiple of 3 (_setup_grid_3d in utils/setup_grid.jl).
chunkPhiRange3π/2radlive (3-D)Longitude extent of the Yin patch. Below 3π/2 the domain is a chunk and the Yin-Yang Schwarz coupling must be off.
amrStretchFactor0.0liveStatic tanh stretching of the radial grid toward both boundaries, β in _amr_radial_grid (utils/setup_grid.jl). 0 is uniform. Works in 2-D and 3-D. Despite the name this is not adaptive refinement.
amrStretchTheta0.0live (3-D)Same tanh stretching applied to colatitude.
amrStretchPhi0.0live (3-D)Same tanh stretching applied to longitude.

The geometry exponent m (m=1 cylindrical, m=2 spherical) is the only thing that differs between the two 2-D geometries; the mesh is identical. It enters the radial divergence, the cell measure, the boundary areas and the conductive Nusselt baseline:

∇r⋅f=1rm∂(rmf)∂r,|cell|=Δθ∫ri−1/2ri+1/2rmdr.

For a Venus-sized shell the inner-to-outer boundary area ratio is 0.514 cylindrical against 0.264 spherical (geometry_area_ratio), which is why the cylindrical setting is not used for science runs.

Physical constants ​

FieldDefaultUnitsStatusMeaning
g9.81m s⁻²liveGravitational acceleration (uniform).
alpha3e-5K⁻¹liveReference thermal expansivity (Boussinesq buoyancy).
rho03300.0kg m⁻³liveReference density.
kappa1e-6m² s⁻¹liveReference thermal diffusivity. Under ALA and TALA the diffusivity grows with depth as κ(1+fz2), f = kappaDepthFactor (thermal_diffusivity in physics/compressibility.jl).
kappaDepthFactor0.5liveDepth enhancement f of the diffusivity under ALA and TALA, with z the normalised depth. 0 keeps κ constant, as the compressible example does to compare the formulations with Boussinesq.
SEC_PER_MYR3.1557e13sderivedOverwritten to 3.15576e13 by validate!.
R_GAS8.314J mol⁻¹ K⁻¹derivedGas constant; reset by validate!.

Compressibility and the energy equation ​

FieldDefaultUnitsStatusMeaning
compressibilityMode"ALA"live"Boussinesq", "ALA" (anelastic liquid) or "TALA" (truncated ALA, no adiabatic heating). Benchmarks set "Boussinesq".
useCompressibilitytrueunusedLegacy alias. compressibilityMode is the switch that is read.
T_potential_ref1350.0KlivePotential temperature of the ALA reference adiabat; also used by the marker initial profile.
adiabat_gradient0.3e-3K m⁻¹unusedNo reader. The adiabat is integrated from alpha_surf_ref, alpha_cmb_ref and gruneisen.
alpha_surf_ref3e-5K⁻¹liveReference expansivity at the surface (ALA profile).
alpha_cmb_ref1e-5K⁻¹liveReference expansivity at the CMB (ALA profile).
gruneisen1.1liveGrüneisen parameter of the reference state; read only under ALA/TALA.
referenceTable""livePerple_X T-P table whose adiabat from T_potential_ref gives the ALA/TALA reference state (Tad, ρref, α); see Material tables.
useShearHeatingtrueliveCarries viscous dissipation and the adiabatic term of the energy equation together under ALA. The two O(Di) terms cancel in the volume integral of a steady layer, so including one alone injects or removes that whole power.
useCompressibleStokesfalselive (3-D)3-D continuity becomes ∇⋅(ρrefv)=0. Breaks the G=−BT symmetry of the incompressible assembly.

Temperature transport ​

FieldDefaultUnitsStatusMeaning
temperatureOnGridfalselive (2-D)false: temperature rides on the markers; the grid solves diffusion and hands back the increment. true: temperature is a grid field advected by advect_temperature_2d (utils/advect_temperature.jl).
subgridDiffusivity1.0live (2-D)Gerya & Yuen (2003) sub-grid relaxation coefficient d (subgrid_temperature_correction!, markers/subgrid_diffusion.jl). Required for the marker-temperature path; 0 disables.
tempAdvectionScheme"upwind"live"upwind" (first order) or "TVD" (van Leer flux-limited) for grid advection in 2-D when temperatureOnGrid = true. First-order advection is very diffusive: set "TVD" whenever temperature is on the grid. The 3-D Yang patch temperature is advected with advect_temperature_3d_upwind! regardless of this field.
useImplicitTemptrueliveCrank-Nicolson/theta diffusion (false: explicit Euler).
implicitTheta0.5liveTheta weight: 0.5 Crank-Nicolson, 1.0 backward Euler.
deliveryScaleMax2.0liveCap on the conservative marker hand-back factor (cell measure / marker measure, delivery_scale in markers/interp_grid_to_markers.jl). Uncapped, a wall cell with few markers over-delivers the diffusion increment and can blow the run up. Energy the cap withholds appears in budget_resid of diagnostics.csv.

The temperature boundary conditions are Dirichlet values held at the wall faces through a half-cell ghost in diffuse_temperature (solvers/diffuse_temperature.jl); no flow cell is overwritten.

Stokes operator ​

FieldDefaultUnitsStatusMeaning
useDeviatoricStresstruelive (2-D)Assembles ∇⋅(2ηε˙) as the factored product of a constitutive map and a discrete divergence (solvers/stokes_assembly.jl). false selects η∇2v, which equals it only at constant viscosity.
useCurvatureTermstruelive (3-D)Selects the full spherical deviatoric stress in assemble_stokes_3d. false selects the componentwise scalar Laplacian.
useGeometricEtatruelive (3-D)Geometric rather than arithmetic interpolation of viscosity to faces and edges.
velReg1e-9liveDiagonal regularisation of the momentum rows (dimensionless). The operator tests set it to 0.
pPen0.0livePressure penalty on the continuity rows (∇⋅v=−pPenP/(rΔθ)). Keep 0: the staggered grid is inf-sup stable, and a penalty of 1e-6 left a measurable divergence in every cell.
removeNetRotationtruelive (2-D)After each solve, subtract the rigid rotation ωr with ω=∫ρrVtdV/∫ρr2dV, dV=rmdrdθ (ρ=ρref under ALA/TALA, 1 under Boussinesq), so the angular momentum vanishes. Has no effect in 3-D; validate! warns once if it is left on there.
Vmax_limit1.6e-8m s⁻¹liveThreshold for the [VELOCITY WARNING] diagnostic (about 50 cm/yr). Also the hard cap when useVelocityLimit = true.
useVelocityLimitfalseliveLegacy hard cap that rescales the whole (v,P) field. It invalidates the dynamics; leave it off.
picardMax0livePicard sweeps per step for the nonlinear viscosity. 0 = auto: 50 when a yield law is active, 1 otherwise. "Active" means any of mat.maxYieldStress, mat.cohesion_upper, mat.cohesion_lower is finite, which holds for the default material even on the simple viscosity path; set picardMax = 1 when the viscosity does not depend on strain rate.
picardTol1e-4liveRelative change in Vmax that ends the Picard loop.
picardDamping1.0liveLog-space blending weight between sweeps; 1 is undamped.

Stokes solver ​

FieldDefaultUnitsStatusMeaning
solverType"direct"live2-D: "direct" (UMFPACK, solve_stokes_v2), "mumps" (solve_stokes_mumps, recommended for 2-D), "amg" (solve_stokes_amg), "multigrid" (2-D V-cycle). 3-D: the time loop always calls multigrid_stokes; set "multigrid" explicitly.
mgLevels4liveMultigrid levels. In 3-D use mgLevels ≥ 2. With one level multigrid_stokes falls back to a direct LU of the full 3-D operator, whose memory grows past a 16 GB machine at modest resolution.
mgVcycles2liveV-cycles per application (2-D multigrid).
mgSmooth2livePre/post SCGS smoothing sweeps.
krylovTol1e-8liveRelative tolerance of the iterative solvers (FGMRES/GMRES).
krylovMaxIter200liveMaximum Krylov iterations.
luCacheTol1e-4live (2-D, MUMPS)Reuse the MUMPS factor while the largest relative change of the viscosity stays below this.
luReuseMaxIter0live (2-D, MUMPS)When the viscosity has moved, precondition GMRES with the stale factor for up to this many iterations before refactorising. 0 disables.
luReuseTol1e-11live (2-D, MUMPS)GMRES tolerance of the stale-factor solve.

Yin-Yang coupling (3-D) ​

FieldDefaultUnitsStatusMeaning
useFullYinYangCouplingtrueliveCouple both the θ-walls and the φ-walls of each patch in the Schwarz iteration (yy_compute_th_bcs, yy_compute_ph_bcs in utils/yy_interp.jl). false couples θ-walls only.
nTSchwarz3liveTemperature Schwarz sweeps per step between Yin and Yang. Read through getfield(cfg, :nTSchwarz) in main_SphCon.jl.
useBicubicYinYangfalseexperimentalCatmull-Rom bicubic sampling of the peer patch. In development tests it gave a larger equatorial seam than bilinear at Nt = 12.
δ_yy0cellsexperimentalWidth of an overlap buffer added outside each patch's natural domain. 0 is the production setting.
useMinOverlapGridfalseexperimentalMinimum-overlap ("baseball border") Yin-Yang grid with redundant cells eliminated. Reduces the equatorial seam but stalls FGMRES at low viscosity contrast. Not a true ragged grid; see the notes in utils/yy_interp.jl.

MPI decomposition (3-D) ​

FieldDefaultUnitsStatusMeaning
useMPIfalselive (3-D driver) / refused in 2-DSelects 3-D domain decomposition through bin/run_mpi.jl and solve_stokes_distributed!. validate! refuses useMPI = true with dim = 2: there is no 2-D decomposition, and the 2-D MUMPS path initialises MPI by itself.
mpiNr, mpiNt, mpiNp1, 1, 1liveRanks per Yin-Yang patch in r, θ, φ. Total ranks = 2 × mpiNr × mpiNt × mpiNp (mpi_init! in parallel/mpi_init.jl).

Viscosity ​

Bounds and simple laws ​

FieldDefaultUnitsStatusMeaning
eta_min1e18Pa sliveLower viscosity clamp.
eta_max1e24Pa sliveUpper viscosity clamp.
useFrankKamenetskiifalseliveFrank-Kamenetskii viscosity (frank_kamenetskii_viscosity!, utils/fk_viscosity.jl).
fkForm"linearized"live"linearized": η=ηrefexp⁡[E/(1+T/Tref)−E/2]. "simple": η=ηrefexp⁡[−θFK(T−Ttop)/ΔT], contrast eθFK across the layer.
fk_E29.95liveNondimensional activation energy (linearized form).
fk_T_ref2500.0KliveReference temperature (linearized form).
fk_theta6.9liveθFK of the simple form. The H&T variable-viscosity cases use ln⁡106=13.8155.
fk_eta_ref4.5e19Pa sliveReference viscosity (simple form: the value at the top temperature).
useArrheniusfalsehelper onlyη=ηrefexp⁡[(E/R)(1/T−1/Tref)], applied by arrhenius_viscosity! (utils/arrhenius_viscosity.jl, 3-D arrays). main_SphCon does not call it, so in the standard time loop this flag and the three arrhenius_* fields change nothing; a driver has to call the helper itself.
arrhenius_E300e3J mol⁻¹helper onlyActivation energy.
arrhenius_T_ref1600.0Khelper onlyTemperature at which η=ηref.
arrhenius_eta_ref1e21Pa shelper onlyReference viscosity.
use660kmJumpfalselive (composite)Lower-mantle viscosity offset by eta660kmFactor below depth660km. Live inside composite_rheology, which evaluates it as a creep prefactor at the interface. On the simple path it needs the helper apply_660km_jump! (utils/viscosity_jumps.jl), which main_SphCon does not call.
eta660kmFactor30.0liveLower-mantle viscosity factor.
depth660km660e3mliveDepth of the jump below R_out.

In the time loop (main_SphCon.jl), cfg.useCompositeRheology selects composite_rheology; otherwise the viscosity is compute_viscosity (physics/compute_viscosity.jl), a layered law η=η0layerexp⁡[E(1/T−1/Tref)] with E in kelvin taken from mat.E_act_scale (plus mat.V_act_scale times lithostatic pressure in 2-D) and the *_eta0 layer values of MaterialProperties, after which frank_kamenetskii_viscosity! overwrites it when useFrankKamenetskii is set, and depletion stiffening is applied when useDepletionStiffening is set. mat.E_act_scale = 0 gives an isoviscous layer, which is how the Hernlund & Tackley benchmark pins the viscosity. | radialViscosityFile | "" | | live | Viscosity-against-depth profile; replaces the simple viscosity path (Material tables). | | lateralViscosityFile | "" | | live | H/nR against depth for the lateral temperature factor of the profile viscosity. | | maxLateralViscosityVariation | 1e3 | | live | Cap on that lateral factor, either way. |

Composite rheology and plasticity ​

FieldDefaultUnitsStatusMeaning
useCompositeRheologyfalseliveDiffusion plus dislocation creep with optional Peierls, GBS and Drucker-Prager-type yielding (composite_rheology, physics/composite_rheology.jl). Creep and yield constants come from MaterialProperties.
useDepletionStiffeningfalseliveApply the depletion stiffening mat.harzburgite_eta_factor on the simple viscosity path as well, without switching on the composite branch.
useSimpleYieldfalseliveCap the simple-path viscosity at τy/(2ε˙II) with the Drucker-Prager yield stress from MaterialProperties (simple_yield!, physics/compute_viscosity.jl), iterated within the step; exercised in 2-D only; refused with useCompositeRheology or a radial viscosity file.
usePeierlsCreepfalseliveAdd Peierls (low-temperature plasticity) creep where T<1100 K; the law is mat.flowlaw_peierls (Flow laws).
useGBSfalseliveAdd grain-boundary sliding creep; with a published mantle flow law selected it is the Hirth & Kohlstedt (2003) dry olivine law.
gbs_A, gbs_n, gbs_m6.5e-16, 2.0, 2.0liveGBS prefactor, stress and grain-size exponents.
useLayeredActivationEnergyfalseliveSwitch E, V from upper- to lower-mantle values at the interface.
useFullPlasticityfalseliveStrain-accumulation feedback for yield weakening.
strainWeakeningFactor1.0liveYield-strength factor at full weakening; 1 = no weakening.
strainWeakeningE1, strainWeakeningE20.5, 1.5liveAccumulated strain at onset and saturation of weakening.
yieldMinT0.0KliveYielding disabled below this temperature; 0 = yield law active everywhere.
depletionStiffensYieldfalseliveAlso scale the yield viscosity by the depletion factor (legacy; not Byerlee consistent).
viscosityCombination"min"live"min": η=min(ηduct,ηY). "harmonic": 1/η=1/ηduct+1/ηY.
continentViscosityAveraging"factor"live"factor": continent field thresholded at 0.5, ductile factor mat.continent_eta_factor, yield parameters mixed linearly. "harmonic": mantle and continent viscosities evaluated and bounded separately, 1/η=(1−c)/ηm+c/ηc on the continent fraction c.
smoothViscositytruelivelog-space smoothing of the composite viscosity (step 6).
smoothStrainRatetruelive2-D: the rheology reads the smoothed strain-rate invariant; false reads the raw one.
yieldPressure"lithostatic"live2-D yield-law pressure: the reference profile, or "total": that profile plus the solved Stokes pressure (top-row mean removed, floored at 0). Creep always uses the profile.
initialStrainRate0.01/slivestrain rate of the first viscosity of a fresh run; 0 starts the lid at eta_max, a reference rate starts it on the yield branch.
useViscoelastoplasticfalseliveMaxwell visco-elasto-plastic correction (viscoelastoplastic, physics/viscoelastoplastic.jl).
useAntisqueezefalseliveStrain-rate correction in cells under resolved compression (antisqueeze, physics/antisqueeze.jl). Triggers only where ∇⋅v<−10−3ε˙II.
evolveGrainSizefalseliveMarker grain-size evolution (evolve_grain_size!, physics/evolve_grain_size.jl).
useDamagefalseliveGrid damage field with accumulation and healing (evolve_damage!, apply_damage_to_viscosity!, physics/damage.jl).
damage_acc_rate1e14liveAccumulation rate per unit strain.
damage_heal_time3.15e15sliveHealing time (about 100 Myr).
damage_strain_rate_threshold1e-17s⁻¹liveStrain rate below which damage does not grow.
damage_max_weakening0.99liveη→η(1−0.99D) at full damage.
useDruckerPragerfalserefusedutils/drucker_prager.jl is never called by the time loop; validate! raises an error. The yield law that runs lives in composite_rheology and takes its parameters from MaterialProperties (cohesion_upper, cohesion_lower, friction_upper, friction_lower, maxYieldStress).
dp_cohesion, dp_friction, dp_max_yield_stress, dp_damper_viscosity, dp_ref_strain_rate55e6, 0.0, 55e6, 1e21, 1e-15Pa, 1, Pa, Pa s, s⁻¹inertRead only by apply_drucker_prager!, which nothing calls.

Sticky air, free surface and isostasy ​

FieldDefaultUnitsStatusMeaning
useStickyAirfalseliveOverride viscosity and density in a top layer (apply_sticky_air!, utils/sticky_air.jl).
airThickness80e3mliveSticky-air layer thickness.
airViscosity1e18Pa sliveSticky-air viscosity.
airDensity1.0kg m⁻³liveSticky-air density.
useFreeSurfacefalseliveKinematic surface tracking with theta-method stabilisation (Kaus et al. 2010) and a mesh-velocity correction to the top-boundary temperature advection (free_surface, physics/free_surface.jl).
freeSurfaceStabilization0.5liveTheta of the stabilisation (0 explicit, 1 implicit).
freeSurfaceMaxDrop50e3mliveMaximum surface deflection.
useIsostasyfalseliveApproximate isostatic topography (isostasy, physics/isostasy.jl).
isostaticMode"Airy"live"Airy" or "Flexural".
isostaticDepth_km100.0kmliveCompensation depth.
isostaticTau_yr3000.0yrliveRelaxation time.
flexuralRigidity0.0N mliveFlexural rigidity; 0 = compute from elasticThickness_km.
elasticThickness_km30.0kmliveElastic thickness for the flexural mode.

Phase transitions ​

FieldDefaultUnitsStatusMeaning
useMeltingPhasefalseliveCall melt_phase (physics/melt_phase.jl) each step: melt fraction, phase index, latent heat.
usePostPerovskitefalseliveInclude the post-perovskite transition.
ppvDepth_km2700.0kmlivePost-perovskite reference depth.
ppvClapeyron10e6Pa K⁻¹livePost-perovskite Clapeyron slope.
usePhaseLatentHeatfalseliveLatent heat from the material derivative of a smooth phase fraction, ρLDΓ/Dt. Changes results; start runs fresh.
useClaperonBuoyancyfalseliveSmooth Clapeyron buoyancy for the 410/660 analogues, using gamma_*, drho_*, clap_* from MaterialProperties (compute_buoyancy). The spelling of the field name is as in the code.
usePhaseTransitionDensitytrueliveSmooth (tanh) phase-function density jumps for the 520 km analogue, and for the 410/660 analogues when useClaperonBuoyancy is off, plus post-perovskite if usePostPerovskite. Active only when a phase field exists (useMeltingPhase = true); the integer phase index is not sampled (compute_buoyancy).
useEarthPhaseBoundariestrueliveAssign phase indices at Earth transition pressures (melt_phase).
useEarthDensityProfiletrueunusedNo reader.
compClapeyron_dP_410, compClapeyron_dP_6600.0, 0.0PaliveShift of the transition pressure per unit basalt fraction. 0 disables.

Thermochemical piles ​

FieldDefaultUnitsStatusMeaning
useThermochemicalPilesfalseliveSeed and evolve basal pile material (thermochemical_piles!, physics/thermochemical_piles.jl). Off by default because it adds denser, triple-heated material.
tcPileInitTheta[π-0.4, π+0.4, 2π-0.4, 2π+0.4]radliveInitial pile angles, taken in pairs: edges of each pile in 2-D, (θ, φ) centres in 3-D.
tcPileHeightFrac0.08liveInitial pile height as a fraction of the mantle depth.
tcPileDensityAnomaly150.0kg m⁻³unusedMentioned in a comment only. The pile density excess actually used is mat.tcpile_drho.
tcPileViscMult10.0unusedNo reader. The pile viscosity factor is mat.tcpile_eta_factor.

Composition, melting and crust ​

These fields act only when trackBasalt = true (the melting and basalt bookkeeping in basalt_evolution!, physics/basalt_evolution.jl) unless noted.

FieldDefaultUnitsStatusMeaning
trackBasaltfalseliveMelt production, extraction, eruption and intrusion, basalt and depletion on markers, melt ledger.
initial_basalt_fraction0.0liveBasalt fraction of every marker at start (0.2 gives a pyrolite-like start).
eclogiteTransitionDepth60e3mliveDepth below which basalt carries the eclogite density excess.
basaltDensityAnomaly200.0kg m⁻³liveEclogite density excess.
useEclogiteKineticsfalseliveRising eclogite reverts only when shallower than the transition and warmer than eclogiteBackT_K.
eclogiteBackT_K1000.0KliveBack-transformation temperature.
eclogiteBackWidth_K100.0KliveSmoothing width of that threshold.
crustDensityAnomaly0.0kg m⁻³liveCrust lighter than the mantle reference by this amount (positive = lighter). 0 = off.
crustViscosityFactor1.0liveCrust viscosity multiplier on the simple viscosity path. 1 = off.
fertileFraction0.30liveMaximum extractable melt fraction; depletion is capped here.
depletionDensityAnomaly50.0kg m⁻³liveDensity deficit of fully depleted residue, applied as Δρmin(Cdep/Fmax,1).
depletionSolidusRise150.0KliveSolidus rise of fully depleted residue, scaled the same way.
useMagmaOceanFreezingtrueliveLegacy per-step surface-freezing basalt source. It is a per-step quantum, not a rate; set false unless reproducing old reference runs.
eruptionEfficiency0.20liveFraction of extracted melt erupted; the rest is intruded.
intrusionDepth_km60.0kmliveTop of the depth band in which intruded melt is deposited (basalt_evolution!). Not read with twoPhaseFlow.
meltExtractionTime_yr1.0e6yrliveSegregation timescale; extraction relaxes the melt fraction as 1−e−Δt/τ, independent of the step. 0 = instantaneous. Not read with twoPhaseFlow.
meltExtractMaxDepth_km330.0kmliveMelt is extracted only above this depth.
meltTemperatureIsPotentialfalseliveIn a Boussinesq run, compare the solidus with the real temperature on the adiabat through T.
meltSegregationMovesMarkersfalseliveLegacy: displace melting markers upward. Off.
useHeatPipetrueliveMagmatic heat transport by eruption and intrusion.
latentHeatMelt4.0e5J kg⁻¹liveLatent heat of melting.
radioHeatPartitionD0.0livePartition coefficient of heat-producing elements into melt; 0 = uniform heating.
pressureCMB_target_GPa0.0GPaliveIf positive, a linearly depth-increasing density is used so the CMB pressure matches this target in the melting laws (mantle_pressure, physics/melt_phase.jl).

Two-phase flow ​

Darcy flow of melt through a compacting matrix, 2-D spherical annulus only (physics/two_phase.jl, solvers/two_phase_assembly.jl; see Two-phase flow of melt and solid). Every field except the switch is read only when twoPhaseFlow = true; with the switch off a run is unchanged. validate! refuses the switch with 3-D, a non-spherical geometry, solverType other than "direct" or "mumps", compressibilityMode other than "Boussinesq", radioHeatPartitionD > 0, meltSegregationMovesMarkers, useStickyAir, useDeviatoricStress = false, useVelocityLimit = true, pPen other than 0, useAntisqueeze, and, with trackBasalt, useHeatPipe = false or useMagmaOceanFreezing = true.

FieldDefaultUnitsStatusMeaning
twoPhaseFlowfalseliveSolve for solid velocity, fluid pressure and compaction pressure with a porosity field; with trackBasalt, melt_two_phase! replaces basalt_evolution!.
meltDensityContrast500.0kg m⁻³liveΔρ=ρs−ρf, melt buoyancy and Darcy driving density.
meltViscosity1.0Pa sliveMelt viscosity μ.
permeabilityK01e-9m²livek0 in k=k0ϕn; sets the melt speed and so the cost.
permeabilityExponent3.0liven in k=k0ϕn.
meltWeakeningAlpha27.0liveαϕ in η=ηse−αϕϕ.
bulkViscosityFactor1.0liveζ0 in ζ=ζ0ηϕ−mζ.
bulkViscosityExponent1.0livemζ; with the defaults ζ=η/ϕ.
twoPhasePorosityThreshold1e-5liveCells at or below this porosity carry pc=0 and are dry for the face mobility.
twoPhaseCFL0.5liveCourant number of the melt, Darcy-heat and compaction time-step limits.
initialPorosity0.0liveUniform porosity at a fresh start.

Core-mantle boundary and core ​

FieldDefaultUnitsStatusMeaning
cmbHeatfluxMode"fixed_T"live"fixed_T" (isothermal CMB), "fixed_flux", or "parameterized" (the core cools by the heat it delivers, cmb_heat_flux, physics/cmb_heat_flux.jl). Any other string is refused by validate!.
cmbHeatflux0.0W m⁻²liveFlux for "fixed_flux".
coreDensity12000.0kg m⁻³liveMean core density (parameterized mode).
coreCp800.0J kg⁻¹ K⁻¹liveCore heat capacity.
coreLatentFactor1.0liveMultiplier on the effective core heat capacity.

Internal heating ​

FieldDefaultUnitsStatusMeaning
useInternalHeatingfalseliveUniform internal heating rate internalHeating_H (diffuse_temperature).
internalHeating_H0.0W kg⁻¹liveInternal heating rate.
useRadiogenicHeatingfalseliveRadiogenic heating with optional decay.
radioHeatingH05e-12W kg⁻¹liveBulk rate at t=0.
radioHeatingTau0.0yrliveHalf-life; 0 = constant.
radioHeatMantleFactor1.0liveMultiplier for background mantle.
radioHeatContFactor10.0liveMultiplier in continental material.
radioHeatPileFactor3.0liveMultiplier in pile material.
useFourElementRadiogenicfalseliveU, Th, K-40 and Al-26 with their own decay (radiogenic_H, utils/radiogenic.jl); replaces radioHeatingH0/radioHeatingTau.
radio_U_ppb, radio_Th_ppb21.0, 80.0ppbliveUranium and thorium concentration.
radio_K_ppm250.0ppmlivePotassium concentration.
radio_Al26_kgkg0.0kg kg⁻¹liveAl-26 (early solar system only).

Initial conditions ​

FieldDefaultUnitsStatusMeaning
rng_seed42liveSeed of the marker and noise generator.
m_wavenumber4liveWavenumber of the initial perturbation. It selects the planform the run settles into; quote it with any benchmark result.
dT_anomaly20.0KliveAmplitude of the harmonic perturbation.
noise_amp5.0KliveRandom noise amplitude.
r_anomaly100e3mliveRadial extent of the anomaly.
plume_n_min, plume_n_max0, 0unusedNo reader.
sigma_r100e3munusedNo reader.

The initial temperature profile and boundary temperatures live in TemperatureConditions (below).

Time stepping ​

FieldDefaultUnitsStatusMeaning
cflSafety0.35liveCourant safety factor (compute_timestep, utils/compute_timestep.jl). Must lie in (0, 1].
dtMax2e13sliveLargest step.
dtMin1e6sliveSmallest step. If CFL asks for less, the floor is applied and counted (cfl_floor_hits()); a run that hits it has abandoned CFL.
maxSteps10000liveStep budget.
maxTimeMyr0.0MyrliveStop at this model time; 0 = no time cap.
advectionScheme"RK4"liveMarker advection: "RK4" or "RK2" (advect_markers!).

Markers ​

FieldDefaultUnitsStatusMeaning
markersPerCell9liveInitial markers per cell (init_markers).
useAdaptiveRemeshtrueliveConservative reseeding of under- and over-populated cells.
remeshEvery5stepsliveReseeding interval.
reseedNmin4liveCells below this get new markers.
reseedNmax36liveCells above this are culled.

Adaptive mesh refinement ​

FieldDefaultUnitsStatusMeaning
useAMRfalserefusedDynamic refinement is not implemented. validate! raises an error and points to amrStretchFactor.
amrRefineThreshold, amrCoarsenThreshold0.75, 0.10inertRead only by solvers/amr/indicators.jl, which no entry point includes.
amrMaxLevel, amrMinLevel3, 0inertAs above.
amrWeight_gradT, amrWeight_strainII, amrWeight_etaContrast, amrWeight_gradV1.0, 0.5, 0.3, 0.0inertAs above.

Driver hooks ​

FieldDefaultStatusMeaning
initialMarkerHooknothingliveCalled once after init_markers as hook(M, grid, cfg, mat, temp). Use it to paint a compositional initial state.
markerStepHooknothingliveCalled every step after marker advection, before reseeding, as hook(M, r_prev, grid, cfg, step, time_s, dt).
restartHooknothingliveCalled once after a checkpoint is restored, as hook(M, Tg, grid, cfg, time_myr), for runs that branch from another run's state.

Output ​

FieldDefaultUnitsStatusMeaning
outputDir"output/default"liveRun directory: log, diagnostics.csv, figures.
bigOutputDirENV["MILEVA_BIGOUT"] or ""liveWhere VTK frames and checkpoints go. Empty = outputDir. Resolved by big_output_dir(cfg) (utils/geometry.jl), which falls back to outputDir with a warning if the volume is unreachable.
diagCSVtrueliveWrite diagnostics.csv (velocities, mobility, lid thickness, mean T, heat flows, Nusselt numbers, melt ledger, energy budget).
diagEvery0stepsliveCSV interval; 0 = logEvery.
logEvery50stepsliveLog line interval.
saveVTKtrueliveWrite VTK frames (save_vtu).
vtkEvery500stepsliveVTK interval.
vtkMinimalfalseunusedNo reader.
saveFiguresfalselive (2-D)Six-panel figures (plot_panels, visualization/plot_panels.jl).
framesEvery500stepsliveFigure interval.
showFiguresfalseunusedNo reader.
showTimingtrueunusedNo reader; the timing summary is always printed.
saveCheckpointfalseliveWrite JLD2 checkpoints.
checkpointEvery2000stepsliveCheckpoint interval.
resumeFrom""liveCheckpoint path to resume from; empty = fresh run.
saveMarkersfalseunusedNo reader.

TemperatureConditions ​

FieldDefaultUnitsMeaning
T_cmb4000.0KCMB temperature (Dirichlet value at the inner face).
T_surf300.0KSurface temperature (Dirichlet value at the outer face).
initial_profile"adiabatic""adiabatic", "conductive" or "uniform". With both TBL thicknesses 0 the adiabatic branch in init_markers falls back to a linear ramp, which is the benchmark initial condition.
tbl_top_thickness, tbl_bottom_thickness0.0, 0.0mPre-seeded thermal boundary layers of the adiabatic profile.
useLayeredHeating, H_upper, H_lowerfalse, 5e-12, 1e-12W kg⁻¹Depth-layered radiogenic rates.
cmb_cooling, cmb_cooling_ratefalse, 100.0K Gyr⁻¹Prescribed secular CMB cooling (with cmbHeatfluxMode = "fixed_T").
T_ref3000.0KFloor on an evolving T_cmb.
T_cmb_patchesemptyGaussian hot or cold patches added to T_cmb (cmb_temperature).

MaterialProperties (summary) ​

config/MaterialProperties.jl groups the material constants that the viscosity, buoyancy and phase routines read. validate!(mat) computes derived radii. The groups are:

GroupFieldsUsed by
Layer radiiR_cmb, R_Dprime, R_lower, R_trans, R_upper, R_asth, R_surfget_layer, compute_viscosity. Set R_cmb/R_surf to match cfg.R_in/cfg.R_out.
Layer reference viscositiesDprime_eta0, lower_eta0, trans_eta0, upper_eta0, asth_eta0, lith_eta0, E_act_scale, V_act_scale, T_refcompute_viscosity (simple path). E_act_scale = 0 makes it isoviscous per layer.
Diffusion creepdiff_eta0, diff_m, diff_d_ref, diff_E_upper, diff_V_upper, diff_E_lower, diff_V_lowercomposite_rheology
Dislocation creepdisl_eta0, disl_n, disl_eII_ref, disl_E_upper, disl_V_upper, disl_E_lower, disl_V_lowercomposite_rheology
GBS activationgbs_E_upper, gbs_E_lowercomposite_rheology
YieldmaxYieldStress, cohesion_upper, cohesion_lower, friction_upper, friction_lowercomposite_rheology (the yield law that runs)
Grain sizegrain_k_g, grain_p, grain_E_g, grain_d_min, grain_d_max, grain_C_W, grain_A_pz, grain_q_pzevolve_grain_size!
Phase transitionsgamma_410, gamma_520, gamma_660, drho_410, drho_520, drho_660, clap_depth_410, clap_depth_520, clap_depth_660, clap_T_ref_410, clap_T_ref_520, clap_T_ref_660, clap_T_ref_ppv, ppv_drho, clap_width_Pa, clap_width_cellscompute_buoyancy, melt_phase. clap_width_Pa = 0 sizes the transition to clap_width_cells radial cells.
ContinentsuseContinents, continent_theta, continent_thickness, continent_eta_factor, continent_cohesion, continent_frictionmarker initialisation (rafts from the surface to continent_thickness); composite_rheology (viscosity factor; Drucker-Prager cohesion and friction of continent material, mixed with the layer values linearly in the continent fraction, NaN keeps the layer values); density through cfg.crustDensityAnomaly
Pilestcpile_drho, tcpile_eta_factor, tcpile_C_mincompute_buoyancy, viscosity
Composition factorsharzburgite_eta_factor, basalt_eta_factorviscosity (depletion stiffening, basalt softening)
Published flow lawsflowlaw_diffusion, flowlaw_dislocation, flowlaw_peierls, flowlaw_water, flowlaw_grain_size, flowlaw_crust_diffusion, flowlaw_crust_dislocation, flowlaw_crust_watercomposite_rheology; keys and parameters on the Flow laws page. :none keeps the reference-viscosity laws.
Not read (inert)ppv_eta_factor, R_410, R_520, R_660No source file outside config/MaterialProperties.jl reads them.

Checking a configuration ​

validate!(cfg) (config/SimConfig.jl) asserts R_out > R_in, Nr ≥ 4, Nt ≥ 8, a known geometry, cmbHeatfluxMode, compressibilityMode and solverType, 0 < dtMin < dtMax and 0 < cflSafety ≤ 1, and refuses the three flags that cannot do what they promise (useAMR, useDruckerPrager, useMPI in 2-D). disp_summary(cfg) prints a one-screen summary. tests/test_config_matrix.jl exercises every geometry, mode and advertised flag; tests/test_config_timeloop.jl runs each advertised configuration through the real time loop.