MERRILL
Micromagnetic Earth Related Robust Interpreted Language Laboratory

About MERRILL

A finite-element micromagnetic modelling environment for resolving grain-scale magnetization structures and simulating standard rock magnetic measurement protocols

MERRILL is developed and maintained by the Wyn Williams group at the University of Edinburgh. Source code and release history are on Bitbucket. Pre-compiled packages for macOS and Linux are on the Downloads page (Windows users should run the Linux binary via WSL — see the FAQ). For FORC inversion without a local install, FORCINN runs the full CNN pipeline directly in the browser.

What MERRILL is

MERRILL (Micromagnetic Earth Related Robust Interpreted Language Laboratory) solves the micromagnetic energy problem in three dimensions using tetrahedral finite-element meshes. Material parameters are matched to natural magnetic minerals — magnetite, pyrrhotite, titanomagnetite, greigite, haematite, and iron — and custom parameters can be specified for any material. It is designed for reproducible grain-scale simulations that connect directly to commonly measured rock magnetic quantities: hysteresis loops, IRM acquisition curves, DCD curves, and FORC diagrams.

Developed at the University of Edinburgh, MERRILL provides a scripted, command-driven workflow that makes complex micromagnetic calculations accessible to researchers in rock magnetism, palaeomagnetism, and planetary science — without sacrificing physical rigour. Since v2.0.0, the H2Lib boundary-element compression library reduces memory usage from O(K²) to O(K·log K), making larger grain sizes substantially more accessible.

Core capabilities

3D finite-element modelling

Works with PATRAN or TecPlot tetrahedral volume meshes. Supports arbitrary grain shapes, multi-phase assemblages, and subdomain-bearing configurations. Multiple meshes for the same geometry can be loaded simultaneously to enable stepwise mesh-refinement studies.

Efficient energy minimisation

The Hubert multi-axis minimiser alternates between Cartesian and spherical-polar coordinates to escape local traps. H2Lib compression (v2.0.0+) reduces demagnetising energy memory from O(K²) to O(K·log K), enabling simulation of grains previously impractical on standard hardware.

Energy barrier calculations

Nudged-elastic-band (NEB) path searches evaluate minimum-energy transition pathways and energy barriers between local energy minima — essential for understanding thermoviscous overprinting, blocking temperatures, and palaeomagnetic recording fidelity.

Scripted rock magnetic protocols

High-level script commands reproduce standard laboratory workflows: HystLoop, IRM, DCD, IRMDCD, and SimpleFORC. Structured log files and exportable outputs make direct comparison with measured data straightforward.

Typical workflow

  1. Prepare a tetrahedral mesh representing the grain geometry of interest.
  2. Define material constants (exchange, anisotropy, saturation magnetization) and external field conditions.
  3. Write a MERRILL script specifying the minimisation strategy or measurement protocol.
  4. Run the simulation and inspect generated outputs, logs, and summary metrics.
  5. Visualise magnetization structures and field distributions in ParaView, TecPlot, or similar tools.

Citing MERRILL

If you use MERRILL in your research, please cite the primary software paper:

Primary reference

Conbhui, P, Ó., et al. (2018). MERRILL: Micromagnetic Earth Related Robust Interpreted Language Laboratory. Geochemistry, Geophysics, Geosystems, 19, 1080–1106.

DOI: 10.1002/2017GC007279

Get started

  • Follow Tutorial 1 to install MERRILL and run your first model.
  • Try browser-based FORC inversion in FORCINN — no installation required.
  • Download platform packages from Downloads for local use.
  • Explore the scientific background in Publications.