Micromagnetic energy¶
This section defines the micromagnetic free energy functional and derives the two
quantities it determines: the effective field \(\mathbf{H}_\text{eff}\), which drives
the LLG dynamics introduced in Magnetization dynamics, and Brown’s equations, which
characterize static energy-minimizing states. It then presents the non-dimensional
form \(\mathcal{E}^\ast\) used by Z-mag internally, and the stored energy
\(\mathcal{E}_\text{sol}\) assembled at each time step. The demagnetizing contribution
involves a scalar magnetostatic potential \(\varphi\) whose computation is described
in Magnetostatics; the full weak form coupling energy and dynamics is
developed in Stereographic formulation.
The magnetization \(\mathbf{m}:\Omega_\mathrm{m}\to\mathcal{S}^2\) is the unit-vector field introduced in Magnetization dynamics, defined on the ferromagnetic domain \(\Omega_\mathrm{m}\subset\mathbb{R}^3\). The physical magnetization is \(\mathbf{M}=M_\mathrm{s}\mathbf{m}\), with saturation magnetization \(M_\mathrm{s}(\mathbf{x})\) [A/m].
Dimensional energy \(\mathcal{E}_\mathrm{SI}\)¶
The total micromagnetic free energy is the sum of four terms [Abert, 2019, Brown, 1963]:
The subscript SI indicates that this energy is expressed in physical, dimensioned (SI) units. This dimensional form is the starting point from which the non-dimensional energy \(\mathcal{E}^\ast\) is derived below. Each term is an integral over \(\Omega_\mathrm{m}\); all material coefficients may vary piecewise over cell tags, allowing modeling of heterogeneous media.
Exchange energy¶
The quantum-mechanical exchange interaction penalizes spatial variations of the magnetization orientation. In the micromagnetic continuum limit [Brown, 1963], this is expressed as a penalty on the spatial gradient of \(\mathbf{m}\):
where \(A\) [J/m] is the exchange stiffness. The ratio of exchange to magnetostatic energy defines a material length scale, the exchange length
where \(\mu_0 = 4\pi\times10^{-7}\) [T·m/A] is the vacuum permeability. On length scales below \(\ell_\mathrm{ex}\), the exchange interaction dominates over magnetocrystalline anisotropy and demagnetization.
Anisotropy energy¶
Magnetocrystalline anisotropy arises from the coupling between the electron spin and the crystal lattice, which makes certain crystallographic directions energetically preferred for the magnetization (easy axes) and others unfavorable (hard axes).
For a material with uniaxial symmetry, a single easy-axis unit vector \(\mathbf{e}_\text{ua}\) characterizes the preferred orientation. The energy density is minimal when \(\mathbf{m}\parallel\mathbf{e}_\text{ua}\) and maximal when \(\mathbf{m}\perp\mathbf{e}_\text{ua}\), and takes the form
where \(K_1\) [J/m³] is the first-order uniaxial anisotropy constant. It is convenient to introduce the scalar shape function
so that \(\mathcal{E}_\text{ani}^\text{uni}=\int_{\Omega_\mathrm{m}} K_1 f_\mathrm{ani}\,dV\).
For a material with cubic symmetry, there is no single preferred axis. Denoting by \((m_1,m_2,m_3)\) the direction cosines of \(\mathbf{m}\) with respect to the three orthogonal cubic axes, the anisotropy energy density to second order in these cosines is
where \(K_1\) and \(K_2\) [J/m³] are the first- and second-order cubic
anisotropy constants. Z-mag supports both symmetry classes. The remainder of this
documentation employs the uniaxial form; the cubic case follows an analogous derivation.
Zeeman energy¶
The Zeeman energy quantifies the interaction between the magnetization and an externally applied field \(\mathbf{H}_\text{zee}\) [A/m]. It equals the negative of the work done by the field on the magnetic moment as the magnetization rotates from a reference state, and is given by [Brown, 1963]
The negative sign ensures that configurations with \(\mathbf{m}\) aligned with \(\mathbf{H}_\text{zee}\) have lower energy.
Demagnetization energy¶
A magnetized body produces a magnetic field that extends throughout all of space, including the interior of the body itself. This internal field, called the demagnetizing field \(\mathbf{H}_\text{d}\) [A/m], is generated by the divergence of \(\mathbf{M}\) in the bulk and by the distribution of magnetic surface charges at \(\partial\Omega_\mathrm{m}\), the boundary of the magnetic domain. It is related to a scalar magnetostatic potential \(\varphi\) [A] by
The determination of \(\varphi\) from \(\mathbf{m}\) constitutes the magnetostatic subproblem described in Magnetostatics. Because \(\mathbf{H}_\text{d}\) is itself determined by the magnetization distribution, the demagnetization energy represents a self-interaction, penalizing configurations that generate a large stray field. The energy of this self-interaction is
The factor \(\tfrac{1}{2}\) prevents double-counting: the magnetostatic interaction between every pair of volume elements is counted once in \(\mathcal{E}_\text{d}\), whereas the integrand \(\mathbf{m}\cdot\mathbf{H}_\text{d}\) accumulated over \(\Omega_\mathrm{m}\) would otherwise count each pair twice.
Effective field and Brown’s equations¶
The effective field \(\mathbf{H}_\text{eff}\) [A/m] is defined as the negative variational derivative of the total energy with respect to \(\mathbf{m}\), normalized by \(\mu_0 M_\mathrm{s}\):
This definition collects all torques acting on \(\mathbf{m}\) into a single field with units of A/m, providing a common driving term for both static equilibrium and dynamic evolution. Term-by-term variation of (9) yields [Abert, 2019, Brown, 1963]:
This is the quantity that enters the LLG equation (5); its role in time evolution is developed in Stereographic formulation.
At static equilibrium, the torque exerted by \(\mathbf{H}_\text{eff}\) on \(\mathbf{m}\) must vanish everywhere. Minimizing \(\mathcal{E}_\mathrm{SI}\) subject to \(|\mathbf{m}|=1\) yields Brown’s equations [Brown, 1963, Di Fratta et al., 2020]:
where \(\mathbf{n}\) is the outward unit normal to \(\partial\Omega_\mathrm{m}\). Equation (20) states that \(\mathbf{H}_\text{eff}\) and \(\mathbf{m}\) are parallel at every interior point; (21) is the natural Neumann boundary condition that arises from the exchange energy term upon integration by parts.
Non-dimensional energy \(\mathcal{E}^\ast\)¶
Z-mag works internally with non-dimensional quantities. The reference material
(cell tag 1) has saturation magnetization \(M_\mathrm{s1}\), exchange stiffness
\(A_1\), and uniaxial anisotropy constant \(K_{11}\). Two derived quantities
characterize the reference material: the exchange length \(\ell_\mathrm{ex1}\) and
the anisotropy quality factor \(Q_1\), defined by
so that \(K_{11}=\tfrac{1}{2}\mu_0 M_\mathrm{s1}^2 Q_1\). Lengths are scaled by \(\ell_\mathrm{ex1}\), fields by \(M_\mathrm{s1}\), and volumes by \(\ell_\mathrm{ex1}^3\):
For heterogeneous domains, the material coefficients of each region are expressed as dimensionless ratios relative to the reference material:
The non-dimensional energy is defined by dividing the physical energy by the reference energy scale \(A_1\ell_\mathrm{ex1}\):
This choice ensures that exchange gradients enter \(\mathcal{E}^\ast\) with \(\mathcal{O}(1)\) coefficients when \(|\nabla^\ast\mathbf{m}|\sim 1\). Combining the definition of \(\ell_\mathrm{ex1}\) with the scaling relations (23) produces the useful identity
which is used in the term-by-term rescaling below to cancel factors of \(\tfrac{1}{2}\) that appear in the anisotropy and demagnetization prefactors.
Exchange energy¶
Substituting the scaling relations (23) into (10) and dividing by \(A_1\ell_\mathrm{ex1}\) gives
Anisotropy energy¶
Writing \(K_1 = K^\ast K_{11}\) and substituting \(K_{11}=\tfrac{1}{2}\mu_0 M_\mathrm{s1}^2 Q_1\) together with the identity (26) cancels the factor \(\tfrac{1}{2}\), yielding
Zeeman energy¶
Writing \(\mathbf{H}_\text{zee} = M_\mathrm{s1}\mathbf{H}_\text{zee}^\ast\) and applying (26) gives
Demagnetization energy¶
The SI prefactor \(\tfrac{\mu_0}{2}\) in (17), combined with the identity (26) applied to the volume element and \(\mathbf{H}_\text{d} = M_\mathrm{s1}\mathbf{H}_\text{d}^\ast\), yields a unit prefactor:
Total non-dimensional energy¶
Summing the four non-dimensional contributions gives
For the homogeneous reference material (\(M_\mathrm{s}^\ast=A^\ast=K^\ast=1\)), this reduces to
Stored energy \(\mathcal{E}_\text{sol}\)¶
The non-dimensional energy \(\mathcal{E}^\ast\) is the thermodynamically correct
measure of the system energy: its variational derivative with respect to \(\mathbf{m}\)
yields \(\mathbf{H}_\text{eff}\) via (18), and its decrease
characterizes relaxation toward equilibrium. The implicit time integrator in Z-mag,
however, does not assemble \(\mathcal{E}^\ast\) as its primary working quantity.
Instead, the weak form of the LLG equation (derived in Stereographic formulation) is built
from the Gateaux derivative of an auxiliary functional, the stored energy
where \(W\) is a non-dimensional volume density. The density \(W\) is determined by the requirement that
where \(\mathcal{G}[\mathbf{v}]\) is the energy torque functional entering the chart residual (see Stereographic formulation).
The notation \(\delta f[\mathbf{v}]\) denotes the Gateaux derivative of a functional \(f\) at the current state \(\mathbf{m}\) in the direction \(\mathbf{v}\), defined as
The test directions \(\mathbf{v}\) belong to the Sobolev space \(H^1(\Omega_\mathrm{m})^3\), the space of vector fields on \(\Omega_\mathrm{m}\) whose components and their first-order partial derivatives are square-integrable. This regularity is the minimal requirement for the exchange energy \(\int A|\nabla\mathbf{m}|^2\,dV\) to be finite.
The following subsections compute \(\delta e_i[\mathbf{v}]\) for each energy contribution \(e_i\) and identify the stored density \(W_i\) such that \(\delta W_i[\mathbf{v}] = \delta e_i[\mathbf{v}]\).
Exchange energy¶
The non-dimensional exchange integrand from (27) is \(e_\text{ex} = A^\ast|\nabla^\ast\mathbf{m}|^2\). Applying the definition (35) with \(f(\mathbf{m}) = A^\ast|\nabla^\ast\mathbf{m}|^2\):
The stored density \(W_\text{ex}\) satisfying \(\delta W_\text{ex}[\mathbf{v}] = \delta e_\text{ex}[\mathbf{v}]\) is
Verification: \(\delta W_\text{ex}[\mathbf{v}] = \left.\tfrac{d}{d\varepsilon}\tfrac{1}{2}A^\ast|\nabla^\ast(\mathbf{m} +\varepsilon\mathbf{v})|^2\right|_{\varepsilon=0} = A^\ast\nabla^\ast\mathbf{m}:\nabla^\ast\mathbf{v} = \delta e_\text{ex}[\mathbf{v}]\). \(\checkmark\)
Anisotropy energy¶
The non-dimensional anisotropy integrand from (28) is \(e_\text{ani} = K^\ast Q_1 f_\mathrm{ani}\), where \(f_\mathrm{ani} = 1-(\mathbf{m}\cdot\mathbf{e}_\text{ua})^2\). Applying (35):
The stored density satisfying \(\delta W_\text{ani}[\mathbf{v}] = \delta e_\text{ani}[\mathbf{v}]\) is
Verification: \(\delta W_\text{ani}[\mathbf{v}] = \left.\tfrac{d}{d\varepsilon}\tfrac{1}{2}K^\ast Q_1 [1-((\mathbf{m}+\varepsilon\mathbf{v})\cdot\mathbf{e}_\text{ua})^2] \right|_{\varepsilon=0} = -K^\ast Q_1(\mathbf{m}\cdot\mathbf{e}_\text{ua})(\mathbf{v}\cdot\mathbf{e}_\text{ua}) = \delta e_\text{ani}[\mathbf{v}]\). \(\checkmark\)
Zeeman energy¶
The non-dimensional Zeeman integrand from (29) is \(e_\text{zee} = -2M_\mathrm{s}^\ast\,\mathbf{m}\cdot\mathbf{H}_\text{zee}^\ast\), with \(\mathbf{H}_\text{zee}^\ast\) a prescribed, \(\mathbf{m}\)-independent field. Applying (35):
The stored density satisfying \(\delta W_\text{zee}[\mathbf{v}] = \delta e_\text{zee}[\mathbf{v}]\) is
Verification: \(\delta W_\text{zee}[\mathbf{v}] = \left.\tfrac{d}{d\varepsilon}[-M_\mathrm{s}^\ast (\mathbf{m}+\varepsilon\mathbf{v})\cdot\mathbf{H}_\text{zee}^\ast] \right|_{\varepsilon=0} = -M_\mathrm{s}^\ast\,\mathbf{v}\cdot\mathbf{H}_\text{zee}^\ast = \delta e_\text{zee}[\mathbf{v}]\). \(\checkmark\)
The factor of two in (29) originates from the non-dimensionalization scaling (26), not from a quadratic structure; the Zeeman functional is linear in \(\mathbf{m}\) and its Gateaux derivative yields the correct Zeeman torque \(-M_\mathrm{s}^\ast\mathbf{H}_\text{zee}^\ast\), consistent with (19).
Demagnetization energy¶
The non-dimensional demagnetization integrand from (30) is
\(e_\text{d} = -M_\mathrm{s}^\ast\,\mathbf{m}\cdot\mathbf{H}_\text{d}^\ast\). In
the operator-splitting scheme implemented in Z-mag, the scalar potential \(\varphi\)
is treated as a field separate from \(\mathbf{m}\) and held fixed during the
variation of the magnetization; accordingly, \(\mathbf{H}_\text{d}^\ast\) is treated
as \(\mathbf{m}\)-independent in this derivative. Applying (35):
The stored density satisfying \(\delta W_\text{d}[\mathbf{v}] = \delta e_\text{d}[\mathbf{v}]\) is
Verification: \(\delta W_\text{d}[\mathbf{v}] = \left.\tfrac{d}{d\varepsilon}[-\tfrac{1}{2}M_\mathrm{s}^\ast (\mathbf{m}+\varepsilon\mathbf{v})\cdot\mathbf{H}_\text{d}^\ast] \right|_{\varepsilon=0} = -\tfrac{1}{2}M_\mathrm{s}^\ast\,\mathbf{v}\cdot\mathbf{H}_\text{d}^\ast = \delta e_\text{d}[\mathbf{v}]\). \(\checkmark\)
The factor \(\tfrac{1}{2}\) in \(W_\text{d}\) reflects the variational structure of the operator-splitting scheme; it is distinct from the self-interaction factor \(\tfrac{1}{2}\) in the dimensional energy (17), which accounts for double-counting.
Relation between \(\mathcal{E}_\text{sol}\) and \(\mathcal{E}^\ast\)¶
Comparing the four stored densities \(W = W_\mathrm{ex}+W_\mathrm{ani}+W_\mathrm{zee}+W_\mathrm{d}\) with the corresponding integrands of \(\mathcal{E}^\ast\), each component satisfies
where \(e_i\) denotes the \(i\)-th integrand of \(\mathcal{E}^\ast\). For the homogeneous reference material (\(M_\mathrm{s}^\ast=A^\ast=K^\ast=1\)) this yields
This identity holds exactly at every configuration; it is a direct consequence of the quadratic and bilinear structure of all four energy contributions and of the linear relationship \(\delta W_i[\mathbf{v}] = \tfrac{1}{2}\delta e_i[\mathbf{v}]\) established term by term above.
In practice, Z-mag monitors
\(\mathcal{E}_\text{sol}\) at each accepted time step, so the reported value must be
multiplied by two to recover the physical non-dimensional energy \(\mathcal{E}^\ast\).
The complete derivation of the weak form, the definition of the chart residual
\(\mathcal{G}\), and the role of \(\mathcal{E}_\text{sol}\) in the two-chart
atlas are developed in Stereographic formulation.