Parameter reference
A MILEVA run is configured by three mutable structs that main_SphCon receives together:
| Struct | File | Holds |
|---|---|---|
SimConfig | config/SimConfig.jl | Geometry, resolution, solvers, physics switches, time stepping, output. This page documents every field. |
MaterialProperties | config/MaterialProperties.jl | Layer radii, creep-law constants, yield parameters, phase-transition slopes and density jumps, composition viscosity factors. Summarised at the end of this page. |
TemperatureConditions | config/TemperatureConditions.jl | Boundary 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.
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.jlreads 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.
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
dim | 2 | live | 2: spherical (or cylindrical) annulus. 3: Yin-Yang spherical shell. | |
geometry | "spherical_annulus" | live | 2-D radial metric. "spherical_annulus" uses the measure "cylindrical_annulus" uses "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_in | 3481e3 | m | live | Inner radius (core-mantle boundary). |
R_out | 6371e3 | m | live | Outer radius (surface). |
Nr | 192 | live | Radial cells. | |
Nt | 512 | live | 2-D: azimuthal cells over the full 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). | |
chunkPhiRange | 3π/2 | rad | live (3-D) | Longitude extent of the Yin patch. Below |
amrStretchFactor | 0.0 | live | Static tanh stretching of the radial grid toward both boundaries, _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. | |
amrStretchTheta | 0.0 | live (3-D) | Same tanh stretching applied to colatitude. | |
amrStretchPhi | 0.0 | live (3-D) | Same tanh stretching applied to longitude. |
The geometry exponent
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
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
g | 9.81 | m s⁻² | live | Gravitational acceleration (uniform). |
alpha | 3e-5 | K⁻¹ | live | Reference thermal expansivity (Boussinesq buoyancy). |
rho0 | 3300.0 | kg m⁻³ | live | Reference density. |
kappa | 1e-6 | m² s⁻¹ | live | Reference thermal diffusivity. Under ALA and TALA the diffusivity grows with depth as kappaDepthFactor (thermal_diffusivity in physics/compressibility.jl). |
kappaDepthFactor | 0.5 | live | Depth enhancement | |
SEC_PER_MYR | 3.1557e13 | s | derived | Overwritten to 3.15576e13 by validate!. |
R_GAS | 8.314 | J mol⁻¹ K⁻¹ | derived | Gas constant; reset by validate!. |
Compressibility and the energy equation
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
compressibilityMode | "ALA" | live | "Boussinesq", "ALA" (anelastic liquid) or "TALA" (truncated ALA, no adiabatic heating). Benchmarks set "Boussinesq". | |
useCompressibility | true | unused | Legacy alias. compressibilityMode is the switch that is read. | |
T_potential_ref | 1350.0 | K | live | Potential temperature of the ALA reference adiabat; also used by the marker initial profile. |
adiabat_gradient | 0.3e-3 | K m⁻¹ | unused | No reader. The adiabat is integrated from alpha_surf_ref, alpha_cmb_ref and gruneisen. |
alpha_surf_ref | 3e-5 | K⁻¹ | live | Reference expansivity at the surface (ALA profile). |
alpha_cmb_ref | 1e-5 | K⁻¹ | live | Reference expansivity at the CMB (ALA profile). |
gruneisen | 1.1 | live | Grüneisen parameter of the reference state; read only under ALA/TALA. | |
referenceTable | "" | live | Perple_X T-P table whose adiabat from T_potential_ref gives the ALA/TALA reference state ( | |
useShearHeating | true | live | Carries 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. | |
useCompressibleStokes | false | live (3-D) | 3-D continuity becomes |
Temperature transport
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
temperatureOnGrid | false | live (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). | |
subgridDiffusivity | 1.0 | live (2-D) | Gerya & Yuen (2003) sub-grid relaxation coefficient 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. | |
useImplicitTemp | true | live | Crank-Nicolson/theta diffusion (false: explicit Euler). | |
implicitTheta | 0.5 | live | Theta weight: 0.5 Crank-Nicolson, 1.0 backward Euler. | |
deliveryScaleMax | 2.0 | live | Cap 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
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
useDeviatoricStress | true | live (2-D) | Assembles solvers/stokes_assembly.jl). false selects | |
useCurvatureTerms | true | live (3-D) | Selects the full spherical deviatoric stress in assemble_stokes_3d. false selects the componentwise scalar Laplacian. | |
useGeometricEta | true | live (3-D) | Geometric rather than arithmetic interpolation of viscosity to faces and edges. | |
velReg | 1e-9 | live | Diagonal regularisation of the momentum rows (dimensionless). The operator tests set it to 0. | |
pPen | 0.0 | live | Pressure penalty on the continuity rows ( | |
removeNetRotation | true | live (2-D) | After each solve, subtract the rigid rotation validate! warns once if it is left on there. | |
Vmax_limit | 1.6e-8 | m s⁻¹ | live | Threshold for the [VELOCITY WARNING] diagnostic (about 50 cm/yr). Also the hard cap when useVelocityLimit = true. |
useVelocityLimit | false | live | Legacy hard cap that rescales the whole | |
picardMax | 0 | live | Picard 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. | |
picardTol | 1e-4 | live | Relative change in | |
picardDamping | 1.0 | live | Log-space blending weight between sweeps; 1 is undamped. |
Stokes solver
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
solverType | "direct" | live | 2-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. | |
mgLevels | 4 | live | Multigrid 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. | |
mgVcycles | 2 | live | V-cycles per application (2-D multigrid). | |
mgSmooth | 2 | live | Pre/post SCGS smoothing sweeps. | |
krylovTol | 1e-8 | live | Relative tolerance of the iterative solvers (FGMRES/GMRES). | |
krylovMaxIter | 200 | live | Maximum Krylov iterations. | |
luCacheTol | 1e-4 | live (2-D, MUMPS) | Reuse the MUMPS factor while the largest relative change of the viscosity stays below this. | |
luReuseMaxIter | 0 | live (2-D, MUMPS) | When the viscosity has moved, precondition GMRES with the stale factor for up to this many iterations before refactorising. 0 disables. | |
luReuseTol | 1e-11 | live (2-D, MUMPS) | GMRES tolerance of the stale-factor solve. |
Yin-Yang coupling (3-D)
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
useFullYinYangCoupling | true | live | Couple 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. | |
nTSchwarz | 3 | live | Temperature Schwarz sweeps per step between Yin and Yang. Read through getfield(cfg, :nTSchwarz) in main_SphCon.jl. | |
useBicubicYinYang | false | experimental | Catmull-Rom bicubic sampling of the peer patch. In development tests it gave a larger equatorial seam than bilinear at Nt = 12. | |
δ_yy | 0 | cells | experimental | Width of an overlap buffer added outside each patch's natural domain. 0 is the production setting. |
useMinOverlapGrid | false | experimental | Minimum-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)
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
useMPI | false | live (3-D driver) / refused in 2-D | Selects 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, mpiNp | 1, 1, 1 | live | Ranks per Yin-Yang patch in r, θ, φ. Total ranks = 2 × mpiNr × mpiNt × mpiNp (mpi_init! in parallel/mpi_init.jl). |
Viscosity
Bounds and simple laws
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
eta_min | 1e18 | Pa s | live | Lower viscosity clamp. |
eta_max | 1e24 | Pa s | live | Upper viscosity clamp. |
useFrankKamenetskii | false | live | Frank-Kamenetskii viscosity (frank_kamenetskii_viscosity!, utils/fk_viscosity.jl). | |
fkForm | "linearized" | live | "linearized": "simple": | |
fk_E | 29.95 | live | Nondimensional activation energy (linearized form). | |
fk_T_ref | 2500.0 | K | live | Reference temperature (linearized form). |
fk_theta | 6.9 | live | ||
fk_eta_ref | 4.5e19 | Pa s | live | Reference viscosity (simple form: the value at the top temperature). |
useArrhenius | false | helper only | 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_E | 300e3 | J mol⁻¹ | helper only | Activation energy. |
arrhenius_T_ref | 1600.0 | K | helper only | Temperature at which |
arrhenius_eta_ref | 1e21 | Pa s | helper only | Reference viscosity. |
use660kmJump | false | live (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. | |
eta660kmFactor | 30.0 | live | Lower-mantle viscosity factor. | |
depth660km | 660e3 | m | live | Depth 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 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 | maxLateralViscosityVariation | 1e3 | | live | Cap on that lateral factor, either way. |
Composite rheology and plasticity
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
useCompositeRheology | false | live | Diffusion 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. | |
useDepletionStiffening | false | live | Apply the depletion stiffening mat.harzburgite_eta_factor on the simple viscosity path as well, without switching on the composite branch. | |
useSimpleYield | false | live | Cap the simple-path viscosity at MaterialProperties (simple_yield!, physics/compute_viscosity.jl), iterated within the step; exercised in 2-D only; refused with useCompositeRheology or a radial viscosity file. | |
usePeierlsCreep | false | live | Add Peierls (low-temperature plasticity) creep where mat.flowlaw_peierls (Flow laws). | |
useGBS | false | live | Add 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_m | 6.5e-16, 2.0, 2.0 | live | GBS prefactor, stress and grain-size exponents. | |
useLayeredActivationEnergy | false | live | Switch | |
useFullPlasticity | false | live | Strain-accumulation feedback for yield weakening. | |
strainWeakeningFactor | 1.0 | live | Yield-strength factor at full weakening; 1 = no weakening. | |
strainWeakeningE1, strainWeakeningE2 | 0.5, 1.5 | live | Accumulated strain at onset and saturation of weakening. | |
yieldMinT | 0.0 | K | live | Yielding disabled below this temperature; 0 = yield law active everywhere. |
depletionStiffensYield | false | live | Also scale the yield viscosity by the depletion factor (legacy; not Byerlee consistent). | |
viscosityCombination | "min" | live | "min": "harmonic": | |
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, | |
smoothViscosity | true | live | log-space smoothing of the composite viscosity (step 6). | |
smoothStrainRate | true | live | 2-D: the rheology reads the smoothed strain-rate invariant; false reads the raw one. | |
yieldPressure | "lithostatic" | live | 2-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. | |
initialStrainRate | 0.0 | 1/s | live | strain 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. |
useViscoelastoplastic | false | live | Maxwell visco-elasto-plastic correction (viscoelastoplastic, physics/viscoelastoplastic.jl). | |
useAntisqueeze | false | live | Strain-rate correction in cells under resolved compression (antisqueeze, physics/antisqueeze.jl). Triggers only where | |
evolveGrainSize | false | live | Marker grain-size evolution (evolve_grain_size!, physics/evolve_grain_size.jl). | |
useDamage | false | live | Grid damage field with accumulation and healing (evolve_damage!, apply_damage_to_viscosity!, physics/damage.jl). | |
damage_acc_rate | 1e14 | live | Accumulation rate per unit strain. | |
damage_heal_time | 3.15e15 | s | live | Healing time (about 100 Myr). |
damage_strain_rate_threshold | 1e-17 | s⁻¹ | live | Strain rate below which damage does not grow. |
damage_max_weakening | 0.99 | live | ||
useDruckerPrager | false | refused | utils/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_rate | 55e6, 0.0, 55e6, 1e21, 1e-15 | Pa, 1, Pa, Pa s, s⁻¹ | inert | Read only by apply_drucker_prager!, which nothing calls. |
Sticky air, free surface and isostasy
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
useStickyAir | false | live | Override viscosity and density in a top layer (apply_sticky_air!, utils/sticky_air.jl). | |
airThickness | 80e3 | m | live | Sticky-air layer thickness. |
airViscosity | 1e18 | Pa s | live | Sticky-air viscosity. |
airDensity | 1.0 | kg m⁻³ | live | Sticky-air density. |
useFreeSurface | false | live | Kinematic 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). | |
freeSurfaceStabilization | 0.5 | live | Theta of the stabilisation (0 explicit, 1 implicit). | |
freeSurfaceMaxDrop | 50e3 | m | live | Maximum surface deflection. |
useIsostasy | false | live | Approximate isostatic topography (isostasy, physics/isostasy.jl). | |
isostaticMode | "Airy" | live | "Airy" or "Flexural". | |
isostaticDepth_km | 100.0 | km | live | Compensation depth. |
isostaticTau_yr | 3000.0 | yr | live | Relaxation time. |
flexuralRigidity | 0.0 | N m | live | Flexural rigidity; 0 = compute from elasticThickness_km. |
elasticThickness_km | 30.0 | km | live | Elastic thickness for the flexural mode. |
Phase transitions
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
useMeltingPhase | false | live | Call melt_phase (physics/melt_phase.jl) each step: melt fraction, phase index, latent heat. | |
usePostPerovskite | false | live | Include the post-perovskite transition. | |
ppvDepth_km | 2700.0 | km | live | Post-perovskite reference depth. |
ppvClapeyron | 10e6 | Pa K⁻¹ | live | Post-perovskite Clapeyron slope. |
usePhaseLatentHeat | false | live | Latent heat from the material derivative of a smooth phase fraction, | |
useClaperonBuoyancy | false | live | Smooth 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. | |
usePhaseTransitionDensity | true | live | Smooth (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). | |
useEarthPhaseBoundaries | true | live | Assign phase indices at Earth transition pressures (melt_phase). | |
useEarthDensityProfile | true | unused | No reader. | |
compClapeyron_dP_410, compClapeyron_dP_660 | 0.0, 0.0 | Pa | live | Shift of the transition pressure per unit basalt fraction. 0 disables. |
Thermochemical piles
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
useThermochemicalPiles | false | live | Seed 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] | rad | live | Initial pile angles, taken in pairs: edges of each pile in 2-D, (θ, φ) centres in 3-D. |
tcPileHeightFrac | 0.08 | live | Initial pile height as a fraction of the mantle depth. | |
tcPileDensityAnomaly | 150.0 | kg m⁻³ | unused | Mentioned in a comment only. The pile density excess actually used is mat.tcpile_drho. |
tcPileViscMult | 10.0 | unused | No 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.
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
trackBasalt | false | live | Melt production, extraction, eruption and intrusion, basalt and depletion on markers, melt ledger. | |
initial_basalt_fraction | 0.0 | live | Basalt fraction of every marker at start (0.2 gives a pyrolite-like start). | |
eclogiteTransitionDepth | 60e3 | m | live | Depth below which basalt carries the eclogite density excess. |
basaltDensityAnomaly | 200.0 | kg m⁻³ | live | Eclogite density excess. |
useEclogiteKinetics | false | live | Rising eclogite reverts only when shallower than the transition and warmer than eclogiteBackT_K. | |
eclogiteBackT_K | 1000.0 | K | live | Back-transformation temperature. |
eclogiteBackWidth_K | 100.0 | K | live | Smoothing width of that threshold. |
crustDensityAnomaly | 0.0 | kg m⁻³ | live | Crust lighter than the mantle reference by this amount (positive = lighter). 0 = off. |
crustViscosityFactor | 1.0 | live | Crust viscosity multiplier on the simple viscosity path. 1 = off. | |
fertileFraction | 0.30 | live | Maximum extractable melt fraction; depletion is capped here. | |
depletionDensityAnomaly | 50.0 | kg m⁻³ | live | Density deficit of fully depleted residue, applied as |
depletionSolidusRise | 150.0 | K | live | Solidus rise of fully depleted residue, scaled the same way. |
useMagmaOceanFreezing | true | live | Legacy per-step surface-freezing basalt source. It is a per-step quantum, not a rate; set false unless reproducing old reference runs. | |
eruptionEfficiency | 0.20 | live | Fraction of extracted melt erupted; the rest is intruded. | |
intrusionDepth_km | 60.0 | km | live | Top of the depth band in which intruded melt is deposited (basalt_evolution!). Not read with twoPhaseFlow. |
meltExtractionTime_yr | 1.0e6 | yr | live | Segregation timescale; extraction relaxes the melt fraction as twoPhaseFlow. |
meltExtractMaxDepth_km | 330.0 | km | live | Melt is extracted only above this depth. |
meltTemperatureIsPotential | false | live | In a Boussinesq run, compare the solidus with the real temperature on the adiabat through | |
meltSegregationMovesMarkers | false | live | Legacy: displace melting markers upward. Off. | |
useHeatPipe | true | live | Magmatic heat transport by eruption and intrusion. | |
latentHeatMelt | 4.0e5 | J kg⁻¹ | live | Latent heat of melting. |
radioHeatPartitionD | 0.0 | live | Partition coefficient of heat-producing elements into melt; 0 = uniform heating. | |
pressureCMB_target_GPa | 0.0 | GPa | live | If 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.
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
twoPhaseFlow | false | live | Solve for solid velocity, fluid pressure and compaction pressure with a porosity field; with trackBasalt, melt_two_phase! replaces basalt_evolution!. | |
meltDensityContrast | 500.0 | kg m⁻³ | live | |
meltViscosity | 1.0 | Pa s | live | Melt viscosity |
permeabilityK0 | 1e-9 | m² | live | |
permeabilityExponent | 3.0 | live | ||
meltWeakeningAlpha | 27.0 | live | ||
bulkViscosityFactor | 1.0 | live | ||
bulkViscosityExponent | 1.0 | live | ||
twoPhasePorosityThreshold | 1e-5 | live | Cells at or below this porosity carry | |
twoPhaseCFL | 0.5 | live | Courant number of the melt, Darcy-heat and compaction time-step limits. | |
initialPorosity | 0.0 | live | Uniform porosity at a fresh start. |
Core-mantle boundary and core
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
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!. | |
cmbHeatflux | 0.0 | W m⁻² | live | Flux for "fixed_flux". |
coreDensity | 12000.0 | kg m⁻³ | live | Mean core density (parameterized mode). |
coreCp | 800.0 | J kg⁻¹ K⁻¹ | live | Core heat capacity. |
coreLatentFactor | 1.0 | live | Multiplier on the effective core heat capacity. |
Internal heating
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
useInternalHeating | false | live | Uniform internal heating rate internalHeating_H (diffuse_temperature). | |
internalHeating_H | 0.0 | W kg⁻¹ | live | Internal heating rate. |
useRadiogenicHeating | false | live | Radiogenic heating with optional decay. | |
radioHeatingH0 | 5e-12 | W kg⁻¹ | live | Bulk rate at |
radioHeatingTau | 0.0 | yr | live | Half-life; 0 = constant. |
radioHeatMantleFactor | 1.0 | live | Multiplier for background mantle. | |
radioHeatContFactor | 10.0 | live | Multiplier in continental material. | |
radioHeatPileFactor | 3.0 | live | Multiplier in pile material. | |
useFourElementRadiogenic | false | live | U, Th, K-40 and Al-26 with their own decay (radiogenic_H, utils/radiogenic.jl); replaces radioHeatingH0/radioHeatingTau. | |
radio_U_ppb, radio_Th_ppb | 21.0, 80.0 | ppb | live | Uranium and thorium concentration. |
radio_K_ppm | 250.0 | ppm | live | Potassium concentration. |
radio_Al26_kgkg | 0.0 | kg kg⁻¹ | live | Al-26 (early solar system only). |
Initial conditions
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
rng_seed | 42 | live | Seed of the marker and noise generator. | |
m_wavenumber | 4 | live | Wavenumber of the initial perturbation. It selects the planform the run settles into; quote it with any benchmark result. | |
dT_anomaly | 20.0 | K | live | Amplitude of the harmonic perturbation. |
noise_amp | 5.0 | K | live | Random noise amplitude. |
r_anomaly | 100e3 | m | live | Radial extent of the anomaly. |
plume_n_min, plume_n_max | 0, 0 | unused | No reader. | |
sigma_r | 100e3 | m | unused | No reader. |
The initial temperature profile and boundary temperatures live in TemperatureConditions (below).
Time stepping
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
cflSafety | 0.35 | live | Courant safety factor (compute_timestep, utils/compute_timestep.jl). Must lie in (0, 1]. | |
dtMax | 2e13 | s | live | Largest step. |
dtMin | 1e6 | s | live | Smallest step. If CFL asks for less, the floor is applied and counted (cfl_floor_hits()); a run that hits it has abandoned CFL. |
maxSteps | 10000 | live | Step budget. | |
maxTimeMyr | 0.0 | Myr | live | Stop at this model time; 0 = no time cap. |
advectionScheme | "RK4" | live | Marker advection: "RK4" or "RK2" (advect_markers!). |
Markers
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
markersPerCell | 9 | live | Initial markers per cell (init_markers). | |
useAdaptiveRemesh | true | live | Conservative reseeding of under- and over-populated cells. | |
remeshEvery | 5 | steps | live | Reseeding interval. |
reseedNmin | 4 | live | Cells below this get new markers. | |
reseedNmax | 36 | live | Cells above this are culled. |
Adaptive mesh refinement
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
useAMR | false | refused | Dynamic refinement is not implemented. validate! raises an error and points to amrStretchFactor. | |
amrRefineThreshold, amrCoarsenThreshold | 0.75, 0.10 | inert | Read only by solvers/amr/indicators.jl, which no entry point includes. | |
amrMaxLevel, amrMinLevel | 3, 0 | inert | As above. | |
amrWeight_gradT, amrWeight_strainII, amrWeight_etaContrast, amrWeight_gradV | 1.0, 0.5, 0.3, 0.0 | inert | As above. |
Driver hooks
| Field | Default | Status | Meaning |
|---|---|---|---|
initialMarkerHook | nothing | live | Called once after init_markers as hook(M, grid, cfg, mat, temp). Use it to paint a compositional initial state. |
markerStepHook | nothing | live | Called every step after marker advection, before reseeding, as hook(M, r_prev, grid, cfg, step, time_s, dt). |
restartHook | nothing | live | Called once after a checkpoint is restored, as hook(M, Tg, grid, cfg, time_myr), for runs that branch from another run's state. |
Output
| Field | Default | Units | Status | Meaning |
|---|---|---|---|---|
outputDir | "output/default" | live | Run directory: log, diagnostics.csv, figures. | |
bigOutputDir | ENV["MILEVA_BIGOUT"] or "" | live | Where 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. | |
diagCSV | true | live | Write diagnostics.csv (velocities, mobility, lid thickness, mean T, heat flows, Nusselt numbers, melt ledger, energy budget). | |
diagEvery | 0 | steps | live | CSV interval; 0 = logEvery. |
logEvery | 50 | steps | live | Log line interval. |
saveVTK | true | live | Write VTK frames (save_vtu). | |
vtkEvery | 500 | steps | live | VTK interval. |
vtkMinimal | false | unused | No reader. | |
saveFigures | false | live (2-D) | Six-panel figures (plot_panels, visualization/plot_panels.jl). | |
framesEvery | 500 | steps | live | Figure interval. |
showFigures | false | unused | No reader. | |
showTiming | true | unused | No reader; the timing summary is always printed. | |
saveCheckpoint | false | live | Write JLD2 checkpoints. | |
checkpointEvery | 2000 | steps | live | Checkpoint interval. |
resumeFrom | "" | live | Checkpoint path to resume from; empty = fresh run. | |
saveMarkers | false | unused | No reader. |
TemperatureConditions
| Field | Default | Units | Meaning |
|---|---|---|---|
T_cmb | 4000.0 | K | CMB temperature (Dirichlet value at the inner face). |
T_surf | 300.0 | K | Surface 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_thickness | 0.0, 0.0 | m | Pre-seeded thermal boundary layers of the adiabatic profile. |
useLayeredHeating, H_upper, H_lower | false, 5e-12, 1e-12 | W kg⁻¹ | Depth-layered radiogenic rates. |
cmb_cooling, cmb_cooling_rate | false, 100.0 | K Gyr⁻¹ | Prescribed secular CMB cooling (with cmbHeatfluxMode = "fixed_T"). |
T_ref | 3000.0 | K | Floor on an evolving T_cmb. |
T_cmb_patches | empty | Gaussian 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:
| Group | Fields | Used by |
|---|---|---|
| Layer radii | R_cmb, R_Dprime, R_lower, R_trans, R_upper, R_asth, R_surf | get_layer, compute_viscosity. Set R_cmb/R_surf to match cfg.R_in/cfg.R_out. |
| Layer reference viscosities | Dprime_eta0, lower_eta0, trans_eta0, upper_eta0, asth_eta0, lith_eta0, E_act_scale, V_act_scale, T_ref | compute_viscosity (simple path). E_act_scale = 0 makes it isoviscous per layer. |
| Diffusion creep | diff_eta0, diff_m, diff_d_ref, diff_E_upper, diff_V_upper, diff_E_lower, diff_V_lower | composite_rheology |
| Dislocation creep | disl_eta0, disl_n, disl_eII_ref, disl_E_upper, disl_V_upper, disl_E_lower, disl_V_lower | composite_rheology |
| GBS activation | gbs_E_upper, gbs_E_lower | composite_rheology |
| Yield | maxYieldStress, cohesion_upper, cohesion_lower, friction_upper, friction_lower | composite_rheology (the yield law that runs) |
| Grain size | grain_k_g, grain_p, grain_E_g, grain_d_min, grain_d_max, grain_C_W, grain_A_pz, grain_q_pz | evolve_grain_size! |
| Phase transitions | gamma_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_cells | compute_buoyancy, melt_phase. clap_width_Pa = 0 sizes the transition to clap_width_cells radial cells. |
| Continents | useContinents, continent_theta, continent_thickness, continent_eta_factor, continent_cohesion, continent_friction | marker 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 |
| Piles | tcpile_drho, tcpile_eta_factor, tcpile_C_min | compute_buoyancy, viscosity |
| Composition factors | harzburgite_eta_factor, basalt_eta_factor | viscosity (depletion stiffening, basalt softening) |
| Published flow laws | flowlaw_diffusion, flowlaw_dislocation, flowlaw_peierls, flowlaw_water, flowlaw_grain_size, flowlaw_crust_diffusion, flowlaw_crust_dislocation, flowlaw_crust_water | composite_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_660 | No 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.