Crystal-rotation and flow-field modelling code for amphibole reaction rims (settling, shear, cavity flow + inversion)

Read full text
Authors: Paul A. W. Wallace, Janine Birnbaum
Cited by: 0

Abstract

Project: Amphibole reaction rims record shear during magma ascentProject description:This repository contains MATLAB codes used to simulate rigid-body rotation (reorientation) of elongate rim microlites around amphibole hosts in idealized magma-flow fields (gravitational settling, simple shear, and flow over a cavity/notch). These simulations are used to interpret EBSD-derived misorientation distributions in amphibole reaction rims as quantitative recorders of strain during magma ascent.Authors (manuscript):Paul A. Wallace, Janine Birnbaum, Sarah H. De Angelis, Elisabetta Mariani, Jessica Larsen, Jackie E. Kendrick, Thomas E. Christopher, Paul D. Cole, Anthony Lamur, Yan LavalléeAssociated manuscript (please cite):Wallace, P. A., Birnbaum, J., De Angelis, S. H., Mariani, E., Larsen, J., Kendrick, J. E., Christopher, T. E., Cole, P. D., Lamur, A., & Lavallée, Y. (2026). Amphibole reaction rims record shear during magma ascent. Nature Communications.Corresponding author:Paul A. Wallace — P.Wallace@lmu.deHow to cite the codeIf you use or adapt any of the MATLAB scripts in this deposit, please cite: 1) this Figshare repository (with provided DOI), and (2) the accompanying Nature Communications article listed above.Contents (MATLAB scripts)Flow-field visualisationplot_streamlines.m – Calculates and visualizes analytical velocity fields around crystals under gravitational settling and simple shear.Gravitational settling simulationssettling.m – Calculates rotation of micro-crysts about an amphibole with a specified initial orientation and total strain under gravitational settling.plot_settling.m – Visualizes saved outputs (in settling.mat) from settling.m.settling_through_time.m – Calculates rotation of micro-crysts about randomly-oriented amphiboles at discrete, increasing values of total strain under gravitational settling.Simple shear simulationsshear_rotation.m – Calculates rotation of micro-crysts about an amphibole with a specified initial orientation and total strain under simple shear.plot_shear.m – Visualizes saved outputs (in shear.mat) from shear_rotation.m.plot_shear_SHV.m – Visualizes saved outputs (in shear_SHV.mat) from shear_rotation.m.shear_through_time.m – Calculates rotation of micro-crysts about randomly-oriented amphiboles at discrete, increasing values of total strain under simple shear.Cavity / notch flow simulationscavity_flow.m – Calculates velocity field across a square notch (lid-driven cavity / notch-style flow).getFunctions_dynamic_dimensionless.m – Helper functions for cavity_flow.m.cavity_calc.m – Calculates rotation of micro-crysts with a specified initial orientation and total strain under flow across a square notch (velocity field provided by cavity_solution_thick.mat).plot_cavity.m – Visualizes saved outputs (in cavity.mat from cavity_flow.m) from cavity_calc.m.Monte Carlo inversion / ascent path reconstructionDecompressionpath.m – Monte Carlo simulations for inversion of a given crystal misorientation distribution (from SHV_All_Misorientations.mat) using numerical simulations for simple shear (in shear_through_time_hist.mat from shear_through_time.m) and thermodynamic calculations (SHV_RhyoliteMelts.xlsx, from Rhyolite-MELTS outputs).aggregate_fits.m – Compiles chosen inversion results in (fits.mat, fits2.mat, fits3.mat, fits4.mat, fits5.mat).plot_best_decompresssion.m – Visualizes Monte Carlo simulation results in fits_agg.mat (from aggregate_fits.m) and scales according to rim thickness (from AvgThickness.mat).Data / file dependenciesSome scripts expect one or more of the following files to be present in the working directory (or on the MATLAB path):settling.mat (generated by settling.m)shear.mat, shear_SHV.mat (generated by shear_rotation.m, depending on run mode/settings)cavity_solution_thick.mat (velocity-field solution used by cavity_calc.m)cavity.mat (generated by cavity_flow.m)SHV_All_Misorientations.mat (input misorientation dataset for inversion)shear_through_time_hist.mat (generated by shear_through_time.m)SHV_RhyoliteMelts.xlsx (thermodynamic input; Rhyolite-MELTS derived)AvgThickness.mat (rim thickness scaling for plotting)fits.mat, fits2.mat, fits3.mat, fits4.mat, fits5.mat (generated by Decompressionpath.m)fits_agg.mat (generated by aggregate_fits.m)NotesThese scripts simulate rigid-body rotation of elongate microlites within idealized flow fields intended to reproduce the spread in pyroxene–amphibole misorientation observed in EBSD datasets.Please see the associated manuscript for scientific context, parameter definitions, and interpretation.If you encounter any issues with the code or provided files, please contact the corresponding author.

Fields of Study & Subjects

Geological and Geochemical Analysis High-pressure geophysics and materials Geological and Geophysical Studies

Publication details

Journal / source
Figshare
Publication date
5 March 2026
Language
EN