DOI: 10.5281/zenodo.17594946
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 \text{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 ($a_x = a_y = a_z = 2 \; \text{nm}$). The Hamiltonian includes exchange, Zeeman, cubic anisotropy, and demagnetization energies. The material parameters correspond to bulk iron:





Saturation magnetization: $M_s = 1700 \; \text{kA/m}$




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




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



The magnetic energy is defined by the Hamiltonian:

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

where  

$$\mathbf{m} = \frac{\mathbf{M}}{M_s}, \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_s\, \mathbf{H}_\mathrm{ext}\!\cdot\!\mathbf{m}\, dV$$

Cubic anisotropy energy (first order):

$$E_\mathrm{ani} = \int_V K_{c1}\,(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_s\, \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:



$A \text{ — exchange stiffness,} $

$K_{c1} \text{ — cubic anisotropy constant,}$

$\mu_0 \text{ — vacuum permeability,}  $

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

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


Hysteresis loops were simulated from $\mu_0 H_{ext} = +1  \; \text{T}$ to $\mu_0 H_{ext} = 0 \; \text{T}$ in $mu_0 \Delta H_{ext} = 5 \; \text{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) that defines the particle geometry, material parameters, and user specifications for the MuMax3 simulations. It further includes MATLAB scripts for generating a random distribution of field orientations on the unit sphere (based on three Euler angles) and for the post-processing of MuMax3 simulation data. The post-processing script performs a back-rotation such that all applied fields are aligned with the z-direction. In addition, a shell script is included to automate multiple simulation 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.