DOI: 10.5281/zenodo.17594945
title: NuMagSANS – Example 3: MuMax3-Based Simulation Pipeline for an Ensemble of Iron Nanoparticles with Vortex Spin Textures

description: This repository provides the simulation and post-processing pipeline for modeling a dilute ensemble of spherical iron nanoparticles with cubic magnetocrystalline anisotropy using MuMax3 and the NuMagSANS framework.The code automates hysteresis-loop simulations over a set of random magnetic-field orientations and applies a back-rotation procedure to emulate random anisotropy axes.Each simulation represents a single, decoupled nanoparticle; the ensemble behavior is reconstructed statistically by averaging over all orientations.This approach suppresses artificial anisotropies caused by discretization effects and provides reproducible reference data for benchmarking NuMagSANS and related magnetic small-angle neutron scattering (SANS) analyses.All scripts and input files required to reproduce the simulations are included.

Note: The MuMax3 binaries are not included and must be downloaded from the official distribution site:https://mumax.github.io/

Note: The NuMagSANS binaries are not included and must bed downloaded from the official distribution site: https://github.com/AdamsMP92/NuMagSANS.git
description: This dataset provides the simulation and post-processing workflow for modeling a dilute ensemble of spherical iron nanoparticles (diameter $D = 40 \; \mathrm{nm}$) with cubic magnetocrystalline anisotropy, using MuMax3 and the NuMagSANS framework.

Each nanoparticle is simulated as an independent system (no dipolar coupling) on a cubic grid with $2\; \text{nm}$ cell size. The Hamiltonian includes exchange, Zeeman, cubic anisotropy, and demagnetization energies. The material parameters correspond to bulk iron:





Saturation magnetization: $M_0 = 1700 \; \mathrm{kA/m}$




Exchange stiffness: $A = 1 \times 10^{-11} \; \mathrm{J/m}$




Cubic anisotropy constant: $K_{\mathrm{c}1}= 4.7 \times 10^{4} \; \mathrm{J/m}^3 $ 



The magnetic energy is defined by the Hamiltonian:

$$\mathcal{H} =\int_V \Big[A\,|\nabla \mathbf{m}|^2- \mu_0 M_0\, \mathbf{H}_\mathrm{ext}\!\cdot\!\mathbf{m}+ K_{\mathrm{c}1}\,(m_x^2 m_y^2 + m_y^2 m_z^2 + m_z^2 m_x^2)- \tfrac{1}{2}\,\mu_0 M_0\, \mathbf{H}_\mathrm{d}\!\cdot\!\mathbf{m}\Big]\, dV$$

where  

$$\mathbf{m} = \frac{\mathbf{M}}{M_0}, \qquad |\mathbf{m}| = 1,$$  

and the individual contributions are defined as follows:

Exchange energy:

$$E_\mathrm{ex} = \int_V A\,|\nabla \mathbf{m}|^2\, dV,\qquad |\nabla \mathbf{m}|^2 = (\nabla m_x)^2 + (\nabla m_y)^2 + (\nabla m_z)^2$$

Zeeman energy:

$$E_Z = - \int_V \mu_0 M_0\, \mathbf{H}_\mathrm{ext}\!\cdot\!\mathbf{m}\, dV$$

Cubic anisotropy energy (first order):

$$E_\mathrm{ani} = \int_V K_{\mathrm{c}1}\,(m_x^2 m_y^2 + m_y^2 m_z^2 + m_z^2 m_x^2)\, dV$$

Demagnetization energy:

$$E_\mathrm{demag} = - \frac{1}{2} \int_V \mu_0 M_0\, \mathbf{H}_\mathrm{d}\!\cdot\!\mathbf{m}\, dV$$

The demagnetizing field satisfies

$$\nabla \cdot (\mathbf{H}_\mathrm{d} + \mathbf{M}) = 0, \qquad \nabla \times \mathbf{H}_\mathrm{d} = 0$$

with the symbols:



$\mathbf{H}_\mathrm{ext} \text{ — external field,} $

$\mathbf{H}_\mathrm{d} \text{ — demagnetizing field.}$


Hysteresis loops were simulated from $\mu_0 H_{\mathrm{ext}} = +1  \; \text{T}$ to $\mu_0 H_{\mathrm{ext}} = 0 \; \mathrm{T}$ in $\mu_0 \Delta H_{\mathrm{ext}} = 5 \; \mathrm{mT}$ steps for 800 randomly oriented field directions uniformly distributed over the unit sphere. The cubic anisotropy axes were fixed along the canonical $x$, $y$ and $z$ directions.

During post-processing, all magnetization configurations were back-rotated such that the applied field aligns with the $z$-axis, effectively emulating an ensemble with random anisotropy orientations while maintaining a uniform external field. This procedure eliminates artificial shape anisotropies and yields statistically isotropic reference data for benchmarking NuMagSANS and related magnetic small-angle neutron scattering (SANS) simulations.

 

File Description:

MuMax3SetUp.zip contains the MuMax3 input file (.mx3) defining geometry and material parameters, Python scripts for SO(3)-consistent generation of random field orientations and back-rotation of simulation data into a common reference frame, and a shell script for automated batch execution of multiple MuMax3 runs.

IronVortexRemanence.zip contains the resulting post-processed real-space magnetization data and additional uniform nuclear scattering-length density data. The magnetization data corresponds to the remanent state only (not the full hysteresis loop). The archive also includes several StructData.csv files specifying different volume-fraction concentrations of nanoparticles, corresponding to random (non-ordered) packings within a super-sphere and to ordered arrangements in a simple cubic lattice.

NuMagSANS_IVR40.zip contains the resulting SANS data generated using the NuMagSANS framework, along with the corresponding NuMagSANSInput.conf configuration files that define the simulation parameters for running NuMagSANS on the IronVortexRemanence dataset.

EnsembleSANS_cross_sections.png is a figure showing representative snapshots of the particle ensemble configuration and the corresponding 2D spin-flip SANS cross sections.