SpinWaveToolkit: Python package for (semi-)analytical calculations in the field of spin-wave physics

SpinWaveToolkit: Python package for (semi-)analytical calculations in the field of spin-wave physics
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

We present an open-source Python package, SpinWaveToolkit (SWT), for (semi-)analytical modeling of spin-wave dynamics in thin ferromagnetic films and exchange-coupled magnetic bilayers. SWT combines analytical models based on the Kalinikos-Slavin theory with a semi-analytical dynamic-matrix approach, enabling the calculation of dispersion relations, group velocities, decay lengths, mode profiles, and static equilibrium magnetization states. In addition, SWT implements a quantitative model of micro-focused Brillouin light scattering (BLS) that incorporates vectorial optical focusing, spin-wave Bloch functions, magneto-optical coupling, and Green-function propagation to simulate experimentally measured BLS spectra. The package is validated against finite-element dynamic-matrix simulations performed with TetraX for Damon-Eshbach, backward-volume, forward-volume, and oblique-field geometries, showing excellent agreement while reducing computation times by nearly two orders of magnitude in comparison to the numerical simulations. Thanks to the easiness of the use and fast calculation times, SWT can be used not only for exploratory mapping of the parameter space, but also for the fitting of the measured dispersion relations and related parameters. Thus, it provides a versatile and efficient framework for experiment design, interpretation, and parameter optimization for magnonics research.


💡 Research Summary

SpinWaveToolkit (SWT) is presented as an open‑source Python library that brings together analytical and semi‑analytical models for fast, accurate calculation of spin‑wave properties in thin ferromagnetic films and exchange‑coupled bilayers. The authors begin by highlighting the limitations of purely analytical solutions of the Landau‑Lifshitz‑Gilbert (LLG) equation, which are confined to a few high‑symmetry geometries, and the computational burden of full micromagnetic simulations. To bridge this gap, SWT implements two complementary engines. The first, based on the Kalinikos‑Slavin theory, provides a closed‑form dispersion relation (class SingleLayer) that works for arbitrary in‑plane and out‑of‑plane field orientations, arbitrary demagnetizing and uniaxial anisotropy tensors, and several boundary conditions (pinned, unpinned, symmetric). Equilibrium magnetization directions are obtained via a macro‑spin energy minimization (MacrospinEquilibrium) that minimizes the total free energy ϵ_tot = –μ₀M_s m·H_ext + ½μ₀M_s² m·N_d·m + ½μ₀M_s² m·N_uni·m using scipy.optimize.minimize. The equilibrium angles (θ_M, φ_M) and the effective internal field H_eff are then fed directly into the analytical dispersion formula ω² = (ω_H + ω_M l_ex²k²)(ω_H + ω_M l_ex²k² + ω_M F_n), where ω_H = μ₀γH_ext, ω_M = μ₀γM_s, and l_ex² = 2A_ex/(μ₀M_s²). The second engine, class SingleLayerNumeric, follows the dynamic‑matrix approach: the linearized LLG equation is cast as ω m_k = C(k) m_k, where C(k) contains exchange and dipolar couplings among a user‑specified number N of perpendicular standing spin‑wave (PSSW) modes. Solving the 2N × 2N eigenvalue problem yields all eigenfrequencies and eigenvectors, thus capturing mode hybridization, avoided crossings, and degeneracies that the zeroth‑order analytical model cannot handle. For bilayer systems, a two‑macrospin model (DoubleLayerNumeric) incorporates Ruderman‑Kittel‑Kasuya‑Yosida (RKKY) interlayer exchange, solves the equilibrium energy, and then diagonalizes the combined dynamic matrix to obtain coupled and anti‑coupled modes. A further module simulates micro‑focused Brillouin light scattering (BLS) spectra. It integrates vectorial optical focusing (numerical aperture, wavelength, polarization), spin‑wave Bloch functions, magneto‑optical coupling tensors, and Green‑function propagation to compute the BLS intensity I(k, ω) ∝ |E·M(k, ω)|², thereby providing a quantitative link between theory and experiment. Validation is performed against TetraX, a finite‑element dynamic‑matrix solver. The authors compare SWT and TetraX for Damon‑Eshbach (DE), backward‑volume (BV), forward‑volume (FV), and oblique‑field geometries, using NiFe parameters (M_s = 800 kA m⁻¹, A_ex = 16 pJ m⁻¹, γ/2π = 28.8 GHz T⁻¹) and film thicknesses of 30–50 nm. For fundamental (n = 0) and higher (n = 9) modes, the semi‑analytical SWT results match TetraX within the numerical precision, while the pure analytical model deviates near mode crossings. Computationally, TetraX’s runtime scales linearly with the number of discretization cells (e.g., 100 cells → several seconds), whereas SWT’s runtime remains essentially constant (≈0.01 s) regardless of the number of PSSW modes, delivering a speed‑up of nearly two orders of magnitude. The authors also demonstrate that SWT can be used for rapid multi‑dimensional parameter sweeps and for fitting experimental dispersion data, thanks to its built‑in material database (NiFe, YIG, CoFeB, FeNi) and straightforward API (e.g., import SpinWaveToolkit as SWT; mat = SWT.NiFe; sl = SWT.SingleLayerNumeric(…)). In summary, SpinWaveToolkit provides a versatile, user‑friendly, and highly efficient computational framework that bridges analytical theory, semi‑analytical dynamic‑matrix methods, and experimental BLS spectroscopy. It enables both exploratory mapping of large parameter spaces and precise fitting of measured spin‑wave spectra, thereby accelerating research and device design in magnonics.


Comments & Academic Discussion

Loading comments...

Leave a Comment