# Core equations¶

Fidimag can simulate systems using either a discrete spin formalism or a continuum approximation of the material, i.e. micromagnetism. Spins are described at a semi-classical level.

Atomistic

We describe the material by a lattice of magnetic moments \(\vec{\mu}_i=\mu_{s}\vec{S}_{i}\), with \(\vec{S}\) as the spin direction (unit vector). The ordering of the atoms or molecules is given by the crystal structure of the magnetic solid. Currently, it is possible to specify a 2D/3D square lattice or a 2D hexagonal lattice. The magnetic moment is defined as \(\mu_{s}=g \mu_{B} S\), where g is the Landé g-factor, \(\mu_{B}\) is the Bohr magneton and \(S\) is the average spin (angular momentum) magnitude.

Interactions between magnetic moments are specified using the Heisenberg formalism.

Micromagnetics

In the continuum limit, we discretise the material as a mesh whose nodes are arranged in a cubic lattice and we use finite differences to evaluate the interactions. Instead of discrete spins, now we have a coordinate dependent magnetisation field whose magnitude is the magnetic moment per unit volume \(\vec{M}(\vec{r})=\mu_{s}\vec{m}/V\) (\(\vec{m}\) as a unit vector). Accordingly, every mesh node has assigned a magnetisation vector, which is the magnetisation field evaluated at that point. Because we are considering systems at zero temperature, it is more common to use the saturation magnetisation \(M_{s}\) to describe the magnetisation field magnitude, i.e. \(\vec{M}=M_{s}\vec{m}\), where \(M_{s}\) has units of A/m.

The interactions under this approximation can be computed by taking the continuum limit of the interactions from the Heisenberg Hamiltonian.

## Interactions¶

At the atomic level, the magnetic moment originates from the total angular momentum of electrons in the atoms of the magnetic material. In ferromagnets, most of the angular momentum comes from the spin, thus we normally just refer to this quantity. There are multiple interactions between electrons that we can describe using a semi-classical approximation, where the spin is treated as a pseudo vector per every lattice site of the material. In this approximation, magnetic interactions can be described using Heisenberg’s formalism for the exchange interaction. The total Hamiltonian for a magnetic system is the sum of all these magnetic interactions:

where we have *exchange*, *anisotropy*, *dipolar interactions*,
*Dzyaloshinskii-Moriya interactions* and *Zeeman interaction*.

### Exchange interaction¶

The classical Heisenberg Hamiltonian with the nearest-neighbor exchange interaction reads

where the summation is performed only once for every pair of spins. The effective field is

In the continuum limit the exchange energy can be written as

with \(V\) as the volume of the system and \(A\) the anisotropy constant in \(\text{J m}^{-1}\). Correspondingly, the effective field is

The effective field in the continuum approximation can be computed as

Note that we need the \(\mu_0\) factor to convert units from T to A/m.

### Anisotropy¶

The Hamiltonian for uniaxial anisotropy with easy axis along the unitary \(\hat{u}\) direction is expressed as,

with \(\mathcal{K}_{u}\) as the anisotropy constant in eV. The corresponding field is

The Hamiltonian for the cubic anisotropy is given by

which is equivalent to the popular form

The effective fields thus can be computed as

In micromagnetics, the uniaxial anisotropy energy of the system is defined as

with \(K_{u}\) as the anisotropy constant in \(\text{J m}^{-3}\). The effective field reads

### Dipolar interaction¶

The Hamiltonian for dipolar interactions is defined as

with \(\vec{r}_{ij}\) the spatial vector pointing from the \(i\)-th to the \(j\)-th lattice site. The effective field is

### Dzyaloshinskii-Moriya interaction (DMI)¶

DMI is an antisymmetric, anisotropic exchange coupling between spins (magnetic moments),

Noting that \(\vec{a}\cdot(\vec{b}\times\vec{c})=(\vec{a}\times\vec{b})\cdot\vec{c}\), the effective field can be computed as

For bulk materials \(\vec{D}_{ij} = D \vec{r}_{ij}\) and for interfacial DMI one has \(\vec{D}_{ij} = D \vec{r}_{ij} \times \vec{e}_z\), in both cases the vector \(\vec{D}_{ij}\) such that \(\vec{D}_{ij}=-\vec{D}_{ji}\).

In the continuum limit the bulk DMI energy is written as

where \(V\) is the volume of the sample and \(D_a = -D/a^2\). The corresponding effective field is

For the interfacial case, the effective field becomes,

Compared with the effective field [PRB 88 184422]

where \(D_a = D/a^2\). Notice that there is no negative sign for the interfacial case.

In the micromagnetic code, it is also implemented the DMI for materials with \(D_{2d}\) symmetry. The energy of this interaction reads

where \(D_a\) is the DMI constant.

### Zeeman energy¶

The Zeeman energy is,

## Landau-Lifshitz-Gilbert (LLG) equation¶

- Atomistic

For the discrete theory, the dynamics of the magnetic moments is governed by the LLG equation,

where \(\vec{\mu}_s = |\vec{\mu}_i|\), \(0\leq\alpha\leq 1\) is the Gilbert damping constant, \(\gamma\) is the Gilbert gyromagnetic ratio (which sets the time scale) and the effective field \(\vec{H}_i\) is defined using the Hamiltonian \(\mathcal{H}\) as

The gyromagnetic ratio of a free electron is \(\gamma = 1.76\times10^{11}\,\text{rad Hz T}^{-1}\).

- Micromagnetics

In the micromagnetic limit, the equation has a similar structure

where \(0\leq\alpha\leq 1\) is the Gilbert damping constant and \(\gamma\) is the Gilbert gyromagnetic ratio (which sets the time scale). The effective field \(\vec{H}\) for this case is defined as

The Gilbert gyromagnetic ratio of a free electron is \(\gamma = 2.21\times10^{5}\,\text{Hz T}^{-1}\).