Skip to content

Physical test scenario 9 - controlled vortex state simulation #69

Description

@AdamsMP92

Motivation

A vortex state in a spherical nanoparticle provides a controlled full-scale micromagnetic benchmark involving exchange, uniaxial anisotropy, Zeeman energy, magnetostatic interactions, curved geometry, and a genuinely three-dimensional nonuniform magnetisation texture.

The proposed test is based on the hyperbolic vortex ansatz introduced in:

M. P. Adams and A. Michels,
"Minimal model for vortex nucleation and reversal in spherical magnetic nanoparticles",
Phys. Rev. B 113, 224406 (2026).

Unlike the one-dimensional domain-wall tests, this benchmark includes the demagnetising field and a finite three-dimensional sample. To keep the problem well controlled, the benchmark should not be performed at the vortex nucleation or switching field. Instead, the applied field is fixed at a stable intermediate branch value where independent solvers reproduce the same vortex state.

Physical model

Consider a spherical magnetic nanoparticle of radius $R$ with micromagnetic energy

$$E = A \int_V \sum_{i=x,y,z} \left(\nabla m_i\right)^2 \,dV -K_u \int_V m_z^2 \,dV -M_s B_0 \int_V m_z \,dV -\frac{M_s}{2} \int_V \mathbf{m}\cdot\mathbf{B}_d \,dV.$$

Here, $A$ is the exchange stiffness, $K_u$ is the uniaxial anisotropy constant, $M_s$ is the saturation magnetisation, $B_0$ is the applied field, and $\mathbf{B}_d$ is the demagnetising field.

The uniaxial anisotropy axis and the applied field are both parallel to the $z$-axis. The material parameters are those used in the reference paper for iron:

A = 10e-12       # J/m
Ku = 4.8e4      # J/m**3
Ms = 1.7e6      # A/m

The proposed geometry is a sphere with

R = 20e-9       # m
D = 40e-9       # m

and the benchmark field is fixed to

B0 = 0.25       # T

or equivalently

$$H_0 = \frac{B_0}{\mu_0}.$$

For these parameters, the vortex nucleation field is approximately $0.5,\mathrm{T}$. The benchmark field $B_0=0.25,\mathrm{T}$ is therefore chosen away from the switching point, on a stable vortex branch.

Hyperbolic vortex ansatz

In cylindrical coordinates $\rho$, $\phi$, and $z$, the local vortex ansatz is

$$\mathbf{m}'(\rho,\phi,z;\nu) = \begin{bmatrix} -\tanh(\nu\rho/R)\sin\phi\\\ \tanh(\nu\rho/R)\cos\phi\\\ \mathrm{sech}(\nu\rho/R) \end{bmatrix}.$$

The parameter $\nu$ controls the vortex-core width. A characteristic core scale is

$$R_{\mathrm{core}} \sim \frac{R}{\nu}.$$

The ansatz interpolates continuously between a nearly uniform state for small $\nu$ and a well-developed vortex for larger $\nu$.

At the chosen benchmark field $B_0=0.25,\mathrm{T}$, independent calculations indicate an expected vortex parameter

$$\nu_{\mathrm{ref}} \approx 1.95.$$

For comparison, neighbouring fields on the same stable branch give approximately

$$B_0=0.30\,\mathrm{T} \quad\Rightarrow\quad \nu\approx1.5,$$

and

$$B_0=0.20\,\mathrm{T} \quad\Rightarrow\quad \nu\approx2.375.$$

The fitted value of $\nu$ is therefore a sensitive quantitative observable.

A local linearisation around the benchmark field was obtained from both the fitted MuMax3 data and the reduced semi-analytical model. In the interval $B_0=0.25,\mathrm{T}\pm0.05,\mathrm{T}$,

$$\nu_{\mathrm{MuMax3}}(B_0) \approx 1.9591 -7.2176 \left(B_0-0.25\,\mathrm{T}\right),$$

and

$$\nu_{\mathrm{red}}(B_0) \approx 1.9575 -7.9555 \left(B_0-0.25\,\mathrm{T}\right),$$

where $B_0$ is measured in tesla. The two estimates agree very closely at the benchmark field, while the semi-analytical branch is locally slightly steeper.

In a narrower interval $B_0=0.25,\mathrm{T}\pm0.025,\mathrm{T}$, the corresponding estimates are

$$\nu_{\mathrm{MuMax3}}(0.25\,\mathrm{T}) \approx 1.9530, \qquad \frac{d\nu}{dB_0} \approx -7.1896\,\mathrm{T}^{-1},$$

and

$$\nu_{\mathrm{red}}(0.25\,\mathrm{T}) \approx 1.9521, \qquad \frac{d\nu}{dB_0} \approx -7.9316\,\mathrm{T}^{-1}.$$

These slopes provide a useful tolerance scale: an error of $0.1$ in $\nu$ corresponds roughly to a field displacement of $12$ to $14,\mathrm{mT}$ near the working point. A much larger tolerance would start to accept states corresponding to noticeably different applied fields.

Proposed test setup

A finite-difference mesh can be used to represent a spherical particle embedded in a rectangular simulation region. The magnetisation should be initialised only inside the sphere.

import numpy as np
import discretisedfield as df
import micromagneticmodel as mm
import oommfc as oc

mu0 = 4 * np.pi * 1e-7

A = 10e-12
Ku = 4.8e4
Ms = 1.7e6

R = 20e-9
cell = 2e-9

B0 = 0.25
H0 = B0 / mu0

region = df.Region(
    p1=(-R, -R, -R),
    p2=(R, R, R),
)

mesh = df.Mesh(
    region=region,
    cell=(cell, cell, cell),
)

system = mm.System(name="spherical_vortex_branch")

system.energy = (
    mm.Exchange(A=A)
    + mm.UniaxialAnisotropy(K=Ku, u=(0, 0, 1))
    + mm.Zeeman(H=(0, 0, H0))
    + mm.Demag()
)

The initial condition should be a hyperbolic vortex with a slightly smaller core parameter than the expected relaxed value, but still within the same stable vortex branch. The local slope above suggests that values such as $\nu_{\mathrm{init}}=1.5$ to $1.7$ correspond to a controlled underdeveloped vortex state rather than a qualitatively different texture. For example,

nu_init = 1.5


def vortex_initial_state(pos):
    x, y, z = pos
    rho = np.sqrt(x**2 + y**2)

    if rho == 0:
        return (0, 0, 1)

    phi = np.arctan2(y, x)
    arg = nu_init * rho / R

    mx = -np.tanh(arg) * np.sin(phi)
    my = np.tanh(arg) * np.cos(phi)
    mz = 1 / np.cosh(arg)

    return (mx, my, mz)

The system can then be relaxed using an energy-minimisation driver or strongly damped time evolution.

Fit procedure

After relaxation, the vortex-core parameter $\nu$ should be extracted from the simulated magnetisation. A practical fit can use the cylindrical components

$$m_\rho = m_x\cos\phi + m_y\sin\phi,$$ $$m_\phi = -m_x\sin\phi + m_y\cos\phi,$$

and compare them with

$$m_\phi(\rho) \approx \tanh(\nu\rho/R),$$ $$m_z(\rho) \approx \mathrm{sech}(\nu\rho/R).$$

The fit may be performed using all cells inside the sphere, excluding cells very close to the surface if staircasing of the spherical boundary produces excessive scatter. A combined least-squares fit to $m_\phi$ and $m_z$ is preferable to fitting only one component.

For example,

def vortex_fit_residual(nu, rho, mphi, mz, R):
    arg = nu * rho / R
    mphi_ref = np.tanh(arg)
    mz_ref = 1 / np.cosh(arg)

    return np.mean(
        (mphi - mphi_ref) ** 2
        + (mz - mz_ref) ** 2
    )

If the vortex core is slightly displaced by the Cartesian grid or by numerical relaxation, the fit can be generalised to include a centre offset $(x_c,y_c)$. In that case, the fitted centre should also be checked to remain close to the particle centre.

Primary assertion

The primary benchmark quantity is the fitted vortex-core parameter:

np.testing.assert_allclose(
    nu_fit,
    1.95,
    atol=0.1,
)

The tolerance should be narrow enough that states corresponding to neighbouring fields, such as $B_0=0.20,\mathrm{T}$ or $B_0=0.30,\mathrm{T}$, would not be accepted as passing this test. The local estimates above suggest that an initial tolerance of $0.1$ in $\nu$ is already physically meaningful; if the discretisation and fit procedure are sufficiently stable, this can be tightened further.

Additional checks

The following quantities should be checked to guard against false positives:

$$\lVert\mathbf{m}(\mathbf{r})\rVert \approx 1$$

inside the sphere,

$$\langle m_z\rangle > 0,$$

consistent with the chosen branch and field direction, and

$$\mathrm{fit\ residual} \lt \varepsilon.$$

If the fit includes a vortex-centre offset, then

$$\sqrt{x_c^2+y_c^2} \ll R$$

should also be asserted.

Visual checks can additionally compare radial averages of $m_\phi(\rho)$ and $m_z(\rho)$ against the fitted hyperbolic profiles.

Expected value

This test would validate:

  • exchange energy in a fully three-dimensional nonuniform state;
  • uniaxial anisotropy parallel to the applied field;
  • Zeeman energy at a finite applied field;
  • magnetostatic interactions;
  • spherical sample geometry on a finite-difference mesh;
  • vortex-state relaxation away from a switching instability;
  • and quantitative recovery of the vortex-core parameter from a relaxed micromagnetic state.

Compared with the one-dimensional domain-wall tests, this is a more complete micromagnetic benchmark. It is nevertheless controlled because the applied field is chosen on a stable vortex branch, not near the nucleation or reversal field.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions