MERRILL
Micromagnetic Earth Related Robust Interpreted Language Laboratory

Tutorial 1

A four-step walkthrough for macOS — download the example files, install MERRILL, watch the video, and run your first micromagnetic model

Download the example files in Step 1, then follow the video at your own pace.

Overview

This tutorial introduces the core MERRILL workflow: installing the software, loading a pre-built mesh, running a micromagnetic minimisation, and inspecting the output. No prior micromagnetic experience is assumed. By the end you will have run four example models and compared their magnetization structures in an external viewer.

Step 1 — Download the tutorial files

The zip below contains everything needed to follow the video: the prism mesh file, four example MERRILL scripts, and pre-computed solution files so you can check your results. Extract it anywhere on your machine before starting.

📦
Example_files_Tutorial1.zip Mesh · 4 scripts · 4 solution files · README — 3.6 MB
Download example files

The archive contains:

  • prism_example1.pat — tetrahedral mesh for a prism-shaped grain (used by all four scripts)
  • example_script1 — magnetite at 20 °C, random initial guess
  • example_script2 — magnetite at 20 °C, different random seed (explores alternative energy minima)
  • example_script3 — magnetite at 500 °C, shows the effect of elevated temperature
  • example_script4 — TM54 titanomagnetite at 20 °C, uniform +Z initial guess
  • Matching .tec solution files for each script and a README.txt

Step 2 — Install MERRILL

Download the MERRILL package for your operating system from the Downloads page. The package includes the executable, which you should be able to call from a terminal as merrill once installed.

Step 3 — Watch the walkthrough video

The video below covers macOS installation and walks through all four example scripts step by step. Open a terminal, navigate to the extracted folder, and follow along. A typical run takes a few seconds per script.

Step 4 — Run the examples

Open a terminal, navigate to the extracted folder, and run each script in order:

cd Example_files_Tutorial1
merrill example_script1
merrill example_script2
merrill example_script3
merrill example_script4

Each run produces a .tec output file. Compare it with the provided solution file (e.g. prism_example1_solution_mult.tec) using ParaView or TecPlot to visualise the magnetization structure.

What you will learn

  • How to install MERRILL and verify it runs from the terminal.
  • How MERRILL input scripts specify material, temperature, and minimisation settings.
  • How to run a three-dimensional micromagnetic model on a realistic grain geometry.
  • How the magnetization structure changes with temperature and composition (scripts 1–4).
  • How to load and inspect TecPlot output files in ParaView.

Next steps

  • Return to Tutorials for upcoming platform-specific guides and FORC scripting walkthroughs.
  • Try FORCINN to run FORC preprocessing and inversion directly from the browser.
  • Read About MERRILL for a full description of modelling capabilities.