MIDAS

MIDAS_Params.m is organized into six sections; this page walks through the mode switches in each - the fields whose meaning changes depending on another field’s value, or whose choice changes which other fields matter. For a flat list of every field, see API Reference; for six ready-made combinations of all of these, see Examples.

Three combinations come up often enough that the project’s own technical documentation gives them names, used below:

Flags and general input

Whether to record a movie (make_movie), whether/what to plot (doPlot, plot_kind), whether to save results (save_data, store_history), the output base name (data_name), and cosmetic figure settings (FSS, LWW). None of these affect the physics - safe to change freely, including mid-experimentation.

P-T path shape: PTmode

checkmaxT_Eq and checkFinT_Eq then modify how much of that path gets run: checkmaxT_Eq = 1 truncates the run at the thermal peak (case 1, above); checkFinT_Eq > 1 (e.g. 4.5) instead extends the run to checkFinT_Eq * t_tot at constant final P-T, letting the system relax toward equilibrium after nominal peak conditions are reached. The two can combine: peak-truncate the prograde path, then relax for a bit at that peak. Caveat: setting checkFinT_Eq to exactly 1 currently errors (griddedInterpolant: Sample points must be unique) since the appended relaxation-tail timestamp duplicates the path’s own last time sample - use 0 (no extension) or a value > 1 instead.

Major-element equilibrium source: eqMode

If eqMode = 'PD' but params.PD isn’t found, MIDAS falls back to 'poly' automatically (and does the equivalent fallback for MnMode/ MniBMode below) - useful for keeping an example runnable even without the phase-diagram file present, but worth knowing about if a run behaves unexpectedly different from what you configured.

Mn partitioning: MnMode and MniBMode

These two interact: if MniBMode = 'manual' while MnMode = 'PD', MIDAS overrides MnMode to 'fixed' automatically (a user-specified matrix reservoir combined with a phase-diagram-derived $K_D$ would be internally inconsistent) and prints a note explaining why.

Geometry: ndim

1 planar, 2 cylindrical, 3 spherical - the exponent in the geometry-dependent diffusion equation (see Equations). Purely geometric; doesn’t otherwise change any other switch’s meaning, except its interaction with NBC below.

Outer boundary condition: NBC

1: Neumann (no-flux), appropriate for a closed system. 0: Dirichlet, fixing the outer boundary composition at its initial value - simulating an open system backed by an infinite reservoir. The domain has two boundaries, handled independently (implicitDiffusionSolver.m):

So for ndim = 2/3, NBC only controls the outer edge - the center is always closed. For ndim = 1, NBC controls both boundaries together.

Isochron reference point: isoRefMode

Which “second mineral” phase A’s isochron age is regressed against: 'bulk' (phase B’s volume-weighted average), 'core' (phase B’s node farthest from the interface - least diffusively disturbed), or 'wholerock' (volume-weighted average of phase A + phase B together, a whole-rock-style comparison). isoNskip/isoShowProfile add extra profile-point isochrons on top of the always-computed core/rim/bulk/max set

Recording cadence: recordMode

'iteration': record every nout iterations - simple, but since dt is adaptive, this is not evenly spaced in time. 'time': record every recordDT Myr instead - evenly spaced in model time, at the cost of occasionally recording sub-steps more or less often depending on how dt happens to align. Most example configurations use 'time'.

Plotting: plot_kind

1: MgO profile + phase diagram with P-T path + apparent ages + isochrons.2: all concentration profiles + apparent ages + isochrons (no phase diagram panel). 3: everything. Purely cosmetic - doesn’t affect the computed result, only what doPlot = true draws each recorded step.