Taewoo Park

Research

spinloop

Describe the simulation, get the answer. This is the layer where I was finally willing to put an agent on top, because the simulator underneath it had become fast enough and correct enough to be worth driving.

AI comes third, and the order is the argument

I built this one third on purpose. mumax3-for-mac put the simulation on my laptop and mumax3-ultrafast made running it repeatedly cheap; only after that was there an environment structured and repeatable enough for a model to be worth anything in.

You say what you want to know — find the field where this film switches, is my mesh fine enough to trust, run it like this paper — and it writes the mumax3 script, runs it, reads the output and hands you the answer. What you do not do is what I used to do: write Python, then open a folder of .ovf files and guess.

The engine underneath: mumax3-ultrafast's throughput against mesh size, on the M4 MacBook Air I work on
The engine underneath: mumax3-ultrafast's throughput against mesh size, on the M4 MacBook Air I work on

Micromagnetics is a standard instrument nobody has time to specialise in

Almost nobody in an experimental magnetism group has time to become the simulation person, and the obstacle was never the physics — not for me and not for the people I watched give up on it. The script has to be exactly right. .mx3 has sharp edges: SetGridSize(128e-9, 32, 1) passes mumax3's own syntax check and then crashes at runtime, and an Ms in emu/cm³ where the code wants A/m runs happily and returns a wrong answer with three confident digits.

A number is not an answer. Coercivity computed on an 8 nm mesh and on a 2 nm mesh can differ by twenty per cent, and nothing in the output tells you which one you are holding. Cheap runs are what fix that, and cheap runs are exactly what porting the simulator and then optimising it bought me: when a run takes seconds rather than an overnight queue slot, checking becomes cheap, and a cheap check is one people actually perform.

What you say, and what comes back

Write me a hysteresis script produces an .mx3 file that has already been compiled; you are never shown code that does not run, and unit and mesh mistakes mumax3's own checker cannot see are caught first. Run it and show me returns the curve and the number rather than a directory. Keep adjusting until it works varies a parameter until the target is met or tells you it is out of reach, and hunts thresholds — the field where a sample switches, the anisotropy where a film turns perpendicular. Can I trust this refines the mesh until the answer stops changing, then cross-checks against textbook micromagnetics: the reviewer's convergence question, answered before it is asked.

Match my measurement takes a measured VSM, MOKE or AHE loop and finds parameters that reproduce it, saying which features constrain which parameter. Run it like this paper takes the PDF, extracts and converts the parameters, writes the script, lists which values the paper stated and which had to be assumed, and drafts the methods paragraph. Show me what it looks like renders domains, skyrmion maps, wall profiles and movies. What should I even simulate answers without simulating anything. Simulate our VSM measurement builds the field sequence a real instrument applies, and what did I run last time rebuilds a notebook from the output folders themselves. I put all ten on one library, so coercivity means the same thing in every one of them.

The answer that arrives before the simulation starts

Given a CoFeB film at Ms 1.05×10⁶ A/m, A 1.9×10⁻¹¹ J/m and Ku 1.2×10⁶ J/m³, the planner returns an exchange length of 5.24 nm, a shape anisotropy of 6.927×10⁵ J/m³, an effective anisotropy of +5.073×10⁵ J/m³ with a perpendicular easy axis, and a 19.23 nm domain wall. Then the mesh: cells of 5.24 nm or smaller required, 2.62 nm comfortable — for a 200 nm square film, 5,929 cells.

Then it says something a faster GPU cannot fix. That 77 by 77 mesh sits in the latency-bound regime where a fixed 180 µs per evaluation dominates, so more compute will not help. It closes by proposing an order of work — relax from a uniform state and from a random one and compare energies, because if they differ the ground state is not what you assumed.

The mistake mumax3 runs without complaint

Take that effective anisotropy, +5.073×10⁵ J/m³, and paste it straight into Ku1. It is an extremely easy mistake to make, and mumax3 will execute it without a murmur. Demagnetisation is already switched on, so the shape term of 6.927×10⁵ J/m³ is subtracted a second time, leaving an effective anisotropy of −1.854×10⁵ J/m³ — no perpendicular easy axis at all, in a script that initialises a perpendicular texture.

Your film is in-plane, your skyrmion collapses, and nothing in the log says why. That is the class of failure I wanted caught before a run rather than after one, so the linter names the double subtraction and says what to write instead when a source quotes an effective anisotropy.

The paper is in cgs and the code is in SI

1400 emu/cm³ converts to 1.4×10⁶ A/m. 8.5 kOe converts to 0.85 T, reported alongside the field in A/m so the convention is visible rather than assumed. 1.3×10⁻⁶ erg/cm becomes 1.3×10⁻¹¹ J/m, and 0.9 mJ/m² of DMI becomes 0.0009 J/m².

I convert by dimensional analysis rather than from a table of known cases, so it handles prefixes and combinations it has never seen. Where a unit is genuinely ambiguous — magnetisation in tesla, moments in emu — it refuses to guess and asks which convention the paper meant. I count that refusal as the feature.

A faster GPU runs the wrong simulation faster

A converged answer that is still wrong. Refining the mesh makes a number stop moving even when a boundary-condition setting is wrong for your problem, and papers rarely state such settings because papers are not about mumax3. Convergence testing alone never finds this; only the cross-check against the closed-form answer does.

Parameters that describe an impossible simulation. If a paper's stated exchange stiffness and magnetisation give an exchange length shorter than the material's lattice constant, no valid continuum simulation exists at any cell size — a diagnosis in a second rather than a week of mesh refinement.

A number lost between the PDF and the script. A superscript minus sign dropped by an extractor turns 1.3×10⁻¹¹ into 1.3×10¹¹ — twenty-two orders of magnitude, entirely plausible-looking in a table. Every extracted value is range-checked against what that quantity can physically be.

One loop, with the target coming from your data or from the literature

Authoring writes a script that compiles; running reports the number; checking asks whether it is trustworthy; tuning repeats until the target is met — and that target comes either from your own measured loop or from a paper's figure. Around the loop, planning answers what is worth simulating before anything runs, and the log keeps the record across sessions, so next month's version of me does not re-derive this month's conclusions.

An installer that stays out of places it does not belong

Two lines add the marketplace and install the plugin; a third installs the engine, downloading a verified release of roughly four megabytes, checking its SHA-256, and placing the binary in your own home. I made it touch nothing outside that: never /usr/local, never sudo, never your shell profile.

I leave an existing mumax3 on your PATH alone, and an environment variable decides which binary the plugin uses. The check command does better than compare version strings: it probes the binary for the features the plugin depends on, because a version string does not carry a commit hash.

Every optional dependency has a stated fallback

macOS on Apple Silicon, Claude Code, and Python 3.9 or newer using the standard library alone. Without matplotlib you still get CSV; without numpy, .npy; without ffmpeg, a .gif instead of an .mp4. Nothing there is a hard stop dressed up as a recommendation.

mumax3-convert is not needed: the plugin reads .ovf itself, and I checked that reader against mumax3-convert on the same file, where the arrays agree exactly. Every simulation writes a references.bib naming what else to cite.

The simulation bottleneck was the one solvable in software alone

Everything spinloop fixes lives inside a file system, where my worst mistake costs a rerun. The next bottleneck I hit does not: it is code that moves real equipment. That is where instrument-control-skills and the benchmark that scores it, OSICBench, pick up.

Simulation is also only one part of a day, and MagLab is the harness I built around the rest of mine.