computer programs
MuMag2022: a software tool for analyzing magnetic field dependent unpolarized small-angle neutron scattering data of bulk ferromagnets
aDepartment of Physics and Materials Science, University of Luxembourg, 162A Avenue de la Faïencerie, L-1511 Luxembourg, Grand Duchy of Luxembourg, and bDepartamento CITIMAC, Facultad de Ciencias, Universidad de Cantabria, 39005 Santander, Spain
*Correspondence e-mail: adamsmp1992@gmail.com, mathias.bersweiler@uni.lu, elizabeth.m.jefremovas@unican.es, andreas.michels@uni.lu
The MATLAB-based software tool MuMag2022 is presented for the analysis of magnetic-field-dependent unpolarized small-angle neutron scattering (SANS) data of bulk such as elemental nanocrystalline magnetic nanocomposites or magnetic steels. On the basis of the micromagnetic theory for the magnetic SANS the program analyzes unpolarized total (nuclear and magnetic) SANS data within the approach-to-saturation regime. The main features of MuMag2022 are the estimation of the exchange-stiffness constant, and of the strength and spatial structure of the magnetic anisotropy field and the magnetostatic field due to longitudinal magnetization fluctuations. MuMag2022 is open source and available as a standalone executable for Windows at https://mumag.uni.lu.
1. Introduction
Magnetic small-angle neutron scattering (SANS) is in many respects different from nonmagnetic nuclear SANS or small-angle X-ray scattering (SAXS). This is mainly related to the following points: (i) the quantity of interest in magnetic SANS is the three-dimensional magnetization vector field of the sample, , while it is the scalar nuclear density that is of relevance in nonmagnetic SANS. Therefore, besides changes in the magnitude of , spatial variations in the orientation of are of special importance for magnetic SANS. (ii) The method for obtaining , a continuum micromagnetic variational ansatz aiming to minimize the total magnetic energy of the system, is conceptually different from that used to obtain – mostly concepts based on particle form factors and structure factors. (iii) As a consequence of the quantum-mechanical exchange interaction, magnetization profiles are smoothly varying continuous functions of the position, which entails the absence of sharp (discontinuous) features in the magnetic microstructure. Although models with a smoothly varying have also been developed for nonmagnetic SANS (e.g. Schmidt et al., 1991; Heinemann et al., 2000), the most widespread approach in particle scattering is to fit a certain form-factor model, implying the presence of a sharp interface, to a set of experimental data. These differences have fundamental consequences regarding the scattering behavior; e.g. magnetic SANS on bulk does generally not exhibit an asymptotic Porod law, but may reveal larger power-law exponents (e.g. Bersweiler et al., 2021). Related to the previous statement is the fact that the correlation function of magnetic systems exhibits a different functional dependency from the density–density autocorrelation function of nonmagnetic particle systems.
A theoretical framework for magnetic SANS has been developed in recent years (Michels, 2021), which allows one to analyze the momentum-transfer and applied-field dependence of the total unpolarized SANS within the approach-to-saturation regime of the macroscopic magnetization. This approach provides information on the magnetic interaction parameters such as the exchange-stiffness constant, and the strength and spatial structure of the magnetic anisotropy and magnetostatic field. The software tool MuMag2022 presented here encodes the relevant expressions and allows for the analysis of ( azimuthally averaged) magnetic-field-dependent unpolarized SANS data of bulk examples are elemental nanocrystalline magnetic nanocomposites or magnetic steels.
The article is organized as follows: Section 2 summarizes, for the two most often employed scattering geometries, the main theoretical expressions for the unpolarized nuclear and magnetic SANS and explains the data analysis procedure. Section 3 provides some details on the operation of the MuMag2022 software and Section 4 presents some selected example cases.
2. Magnetic SANS theory – unpolarized neutrons
The magnetic-field-dependent SANS of bulk i.e. the part of the magnetic SANS that is related to the transverse magnetization Fourier coefficients. Since the spin-misalignment SANS is independent of the polarization of the incident neutron beam, half-polarized (`spin-up' and `spin-down') SANSPOL1 experiments, which additionally provide access to nuclear–magnetic interference terms, do not provide significantly more information regarding spin misalignment than can already be learned from the analysis of the unpolarized scattering. Chiral correlations are also ignored in our treatment. Therefore, the first version of our software package MuMag2022 considers only the case of unpolarized SANS. In the following, we summarize the main equations for the nuclear and magnetic SANS of bulk focusing on the two most often used scattering geometries which have the externally applied magnetic field either perpendicular or parallel to the incoming beam.
is typically dominated by the spin-misalignment scattering,2.1. k0 ⊥ H0
For the scattering geometry where the applied magnetic field is perpendicular to the wavevector of the incoming neutron beam [see Fig. 1(a)], the elastic (unpolarized) SANS at scattering vector can be written as (Michels, 2021)
where V is the scattering volume, = 2.91 × 108 A−1 m−1 is the magnetic scattering length, and denote, respectively, the Fourier transforms of the nuclear scattering length density and of the magnetization , and θ represents the angle between and ; the asterisks * mark the complex-conjugated quantity.
As shown by Honecker & Michels (2013), near magnetic saturation, can be evaluated by means of micromagnetic theory. In particular,
where
represents the nuclear and magnetic residual SANS
which is measured at complete magnetic saturation (infinite field), andis the spin-misalignment SANS ). Spatial variations in the magnitude of the saturation magnetization are explicitly taken into account via the function (see below). Moreover, in the approach-to-saturation regime it is assumed that , where denotes the Fourier transform of the saturation magnetization profile .
The magnetic scattering due to transverse spin components, with related Fourier amplitudes and , is contained in , which decomposes into a contribution due to perturbing magnetic anisotropy fields and a part related to magnetostatic fields. The micromagnetic SANS theory considers a uniform exchange interaction and a random distribution of the magnetic easy axes, as is appropriate for a statistically isotropic polycrystalline ferromagnet (Michels, 2021Regarding the decomposition of the SANS )], we emphasize that it is that depends on the magnetic interactions (exchange, anisotropy, magnetostatics), while is determined by the geometry of the underlying grain microstructure (e.g. the particle shape or the particle-size distribution). If in a SANS experiment the approach-to-saturation regime can be reached for a particular magnetic material (as is assumed here), then the residual SANS can be obtained by an analysis of field-dependent data via the extrapolation to infinite field (see Section 2.4). In a sense, for a bulk ferromagnet, the scattering at saturation resembles the topographical background in Kerr-microscopy experiments, which needs to be subtracted in order to access the magnetic domain structure of the sample (McCord & Hubert, 1999).
[equation (2The anisotropy-field scattering function (in units of cm−1)
depends on , which represents the Fourier transform of the spatial structure of the magnetic anisotropy field of the sample, whereas the scattering function of the longitudinal magnetization (in units of cm−1)
provides information on the spatial variation of the saturation magnetization ; for instance, in a multiphase magnetic nanocomposite, , where denotes the jump of the magnetization magnitude at internal (particle–matrix) interfaces. Note that the volume average of equals the macroscopic saturation magnetization of the sample, which can be measured with a magnetometer. The corresponding dimensionless micromagnetic response functions can be expressed as (Michels, 2021)
and
where
is a dimensionless function and θ represents the angle between and . The effective magnetic field
depends on the internal magnetic field
and on the micromagnetic exchange length of the field
( M0 saturation magnetization; A exchange-stiffness parameter; demagnetizing field; demagnetizing factor; Tm A−1). Note that in the approach-to-saturation regime. The θ dependence of and arises essentially as a consequence of the magnetodipolar interaction. Depending on the values of q and , a variety of angular anisotropies may be seen on a two-dimensional position-sensitive detector (Michels, 2021).
The effective magnetic field [equation (10)] consists of a contribution due to the internal field and the exchange field . An increase of increases the effective field only at the smallest q values, whereas at larger q is always very large (∼10–100 T) and independent of (Michels, 2021). The latter statement may be seen as a manifestation of the fact that exchange forces tend to dominate on small length scales (Aharoni, 2000). Since appears predominantly in the denominators of the final expressions for and [compare equations (3.68) and (3.69) of Michels (2021)], its role is to suppress the high-q Fourier components of the magnetization, which correspond to sharp real-space fluctuations. On the other hand, long-range magnetization fluctuations, at small q, are effectively suppressed when is increased.
By assuming that the functions , and depend only on the magnitude of the scattering vector, one can perform an azimuthal average of equation (2), i.e. . The resulting expressions for the response functions then read
and
so that the azimuthally averaged total nuclear and magnetic SANS
can be written aswhere
For materials exhibiting a uniform saturation magnetization (e.g. single-phase materials), the magnetostatic scattering contribution [to , compare equation (4)] is expected to be much smaller than the anisotropy-field-related term [compare e.g. Fig. 23 of Michels (2014)].
We emphasize that the micromagnetic theory behind the MuMag2022 software results in an analytical expression for the two-dimensional SANS as a function of the magnitude q and the orientation θ of the scattering vector . These analytical expressions can be azimuthally averaged over the full angular detector range (or any other range) and compared with correspondingly averaged experimental SANS data; in other words, it is not required that the experimental input SANS data are isotropic.
2.2. k0 ∥ H0
For the scattering geometry where the external magnetic field is parallel to the incident-beam direction [see Fig. 1(b)], the total azimuthally averaged SANS can be written as (Michels, 2021)
where the residual SANS
explicitly readsand the response function is isotropic (i.e. θ independent),
is given by equation (5), and we note that in this geometry does not depend on fluctuations and equals the expression for the single-phase material case (Michels, 2021). In other words, the possible two-phase (particle–matrix-type) nature of the underlying microstructure is (for ) only contained in , and not in .
2.3. Mean-square anisotropy and magnetostatic field
Numerical integration of and over the whole space, i.e.
yields, respectively, the mean-square anisotropy field and the mean-square longitudinal magnetization fluctuation (Michels, 2021). These quantities are, respectively, defined as
and
Equation (20) follows from equations (21) and (22) by using Parseval's theorem of Fourier theory and the definitions of and [equations (5) and (6)]. Since experimental data for and are only available within a finite range of momentum transfers between qmin and qmax (see Fig. 5 below), one can only obtain rough lower bounds for these quantities. Therefore, the numerical integration of equation (20) is carried out for ; qmin denotes the first experimental data point, while qmax is defined by equation (24) below.
Knowledge of and of the residual SANS ) and (18)] allows one to obtain the nuclear scattering
[equations (16without using sector-averaging procedures (in unpolarized scattering) or polarization analysis (Honecker et al., 2010).
2.4. Neutron data analysis procedure
Equation (15) is linear in both and , with a priori unknown functions , and . For given values of the materials parameters A and M0, the numerical values of both response functions are known at each value of q and . By plotting at a particular the values of measured at several versus and , one can obtain the values of (intercept) and and (slopes) at by a weighted non-negative linear least-squares plane fit (i.e. the parameters , and are assumed to be ). The function `lsqnonneg' of MATLAB has been used for carrying out these fits. Starting from q = qmin, the non-negative least-squares fitting routine is successively performed up to a maximum value of q = qmax [see equation (24) below]. Fig. 2 illustrates the data analysis procedure. By treating the exchange-stiffness constant A in the expression for as an adjustable parameter, one can obtain information on this quantity. We emphasize that in order to obtain a best-fit value for A from experimental field-dependent SANS data, it is not necessary that the data are available in absolute units. This is because A only appears in the dimensionless response functions and , while the dimension of the experimental (in cm−1 or in arbitrary units) is absorbed in the other fitting parameters , and .
As mentioned earlier, the effective magnetic field [equation (10)] is the sum of the internal magnetic field and the exchange field . When , the effective field and, hence, the magnetic SANS become independent of the externally applied magnetic field . This condition defines a characteristic maximum q value,
where Hmax is the maximum applied magnetic field. For , the reliable separation of the spin-misalignment () and residual scattering () is difficult (since then one attempts to fit a straight line to a constant), and the micromagnetic analysis should therefore be restricted to .
The global fitting procedure consists essentially of many straight-plane fits (one at each q value for ). As the experimental best-fit parameter we take the value of A that minimizes the function
where the indices m and n count, respectively, the scattering vectors and applied-field values, L is the number of data points (number of q values times the number of internal fields), is the uncertainty in the experimental SANS , and denotes the fit to equation (15) or (17).
The uncertainty in A is estimated from the curvature of the data, according to (Bevington & Robinson, 2003)
The numerical derivative in equation (26) has been computed via (Fornberg, 1988)
where is the step size on the A axis (typically ), represents the global minimum of the function , and .
3. Description of the software
The least-squares fitting routine has been written in MATLAB code and implemented into a Windows- and macOS-compatible standalone executable file using the MATLAB app designer. The user has to provide the following data and take the following points into account:
(i) The total (nuclear and magnetic) unpolarized SANS q in nm−1, in cm−1 and the uncertainty in in cm−1. The input data files must be of the .csv, .dat or .txt type and must have the name structure that is explained in Fig. 3.
measured at several applied magnetic fields within the approach-to-saturation regime ( azimuthally averaged data). Data format: three columns with(ii) If the data are not available in absolute units, then the mean-square magnetic anisotropy field and magnetostatic field [equations (20)–(22)] cannot be determined. It is then only possible to estimate an average value for the exchange-stiffness constant A.
(iii) The values of the applied magnetic fields (in mT), where the SANS measurements have been carried out [see point (i) above]. Note that the quantities , M0 and have the SI unit A m−1, which on multiplication with turns into Tesla (T).
(iv) The value of the saturation magnetization (in mT) of the sample [see point (i) above].
(v) The values of the demagnetizing fields (in mT) [see point (i) above]. Note that in equation (11) the demagnetizing field was specified as with M0 the saturation magnetization. The user may, however, take a different value of the demagnetizing field at each value of the externally applied magnetic field H0 with corresponding magnetization value M(H0). The demagnetizing factor can be calculated using e.g. the well known formulas for the general ellipsoid by Osborn (1945) or for rectangular prisms by Aharoni (1998).
(vi) The data analysis should be restricted to internal magnetic fields within the approach-to-saturation regime. This information can be taken from an experimental magnetization curve , which also allows for the determination of M0. We suggest defining `approach-to-saturation' for values for which the reduced magnetization is .
(vii) An estimate for qmax using equation (24). Typical A values are of the order of 10 pJ m−1 (1 pJ m−1 = 10−12 J m−1). The data analysis should be restricted to .
(viii) The following output files are generated (in .csv format). For the perpendicular scattering geometry (): best-fit results (using ) for the discrete functions , , , , , = and = . For the parallel scattering geometry (): best-fit results (using ) for the discrete functions , , , = and = . Data format: three columns with q in nm−1, the respective quantity in cm−1 (if the input data are in absolute units) and the uncertainty in the respective quantity in cm−1. Note that are dimensionless, while and may be in cm−1. Moreover, for each scattering geometry, we specify the data set [equation (25)], the best-fit value for the exchange-stiffness constant (in pJ m−1) [equation (26)], the root-mean-square anisotropy field (in mT) and the root-mean-square magnetostatic field (in mT, only for ). The provided data give the user the possibility to generate their own graphical representations.
4. Example cases
The following example data on the two-phase iron-based alloy Nanoperm are taken from the work of Honecker et al. (2013), and the data on the Nd–Fe–B nanocomposite are those of Bick et al. (2013). Further examples in the literature where this type of SANS data analysis has been employed can be found in the work of Bersweiler et al. (2022) on another type of Nanoperm sample, and Weissmüller et al. (2001) and Michels et al. (2003) on nanocrystalline cobalt and nickel. Fig. 4 displays the user interface of the MuMag2022 software, which is structured into five panels: (i) The top panel controls import and graphical representation of the experimental SANS data. (ii) For the selected scattering geometry ( or ), minimum applied field H0min and maximum scattering vector qmax, the `SimpleFit' tool determines the best-fit value for the exchange-stiffness constant. (iii) The `SweepFit' tool allows one to analyze the convergence of the fitting routine depending on the qmax and H0min values. (iv) In case the demagnetizing field of the sample is unknown, the `DemagFit' tool allows for the estimation of this quantity by additionally varying in the function [equation (25)]. The obtained best-fit values for A and have then to be used in the `SimpleFit' tool to generate the final fit results for , and . (v) Finally, by specifying the scattering geometry, materials parameters, applied fields and q range, the MuMag2022 software allows for the generation of synthetic data. We refer to the MuMag2022–Toolbox: User Guide for further details (https://files.uni.lu/mumag/MuMag2022_UserGuide.pdf).
Figs. 5, 6, 7 have been exported from the MuMag2022 software and show, respectively, the experimental field-dependent input data, the results of the data analysis, and the comparison between the experimental data and the fit based on the micromagnetic theory. Note that in Figs. 5 and 7 the values of the applied magnetic fields H0 are displayed in the legends, while the internal magnetic fields (using the values for H0 and specified in the input data files) have been used for internal computations. The best-fit value for the exchange-stiffness constant of Nanoperm, = 4.7 × 10−12 J m−1, is found from the minimum of the function in Fig. 6(a), while the q dependence of , and is featured in Figs. 6(b)–(d), respectively. The results for the average anisotropy () and magnetostatic () fields [Figs. 6(c) and 6(d), respectively] demonstrate that the strongest perturbations in the spin structure are related to the jumps in the saturation magnetization at internal particle–matrix interfaces, in agreement with the two-phase microstructure of the material.
The MuMag2022 software also allows for treating the demagnetizing field [in the expression for , compare equation (11)] as an adjustable parameter, e.g. in situations where the sample shape is not well defined. This is achieved by varying , in addition to A, within the limits and in the function [equation 25)]. Fig. 8 shows the output of the `DemagFit' tool for the case of an Nd–Fe–B nanocomposite measured in the parallel scattering geometry ().
The micromagnetic SANS theory on which MuMag2022 is based assumes a statistically isotropic ferromagnetic material with random nanoscale variations in the magnitude and orientation of the magnetic anisotropy field as well as nanoscale spatial variations in the saturation magnetization. Recently, an extended SANS theory which takes into account a global uniaxial anisotropy (magnetic texture) has been developed (Zaporozhets et al., 2022). The corresponding equations for the SANS cross sections will be implemented in a future version of MuMag2022.
5. Conclusion
The MATLAB-based software tool MuMag2022 allows for the analysis of magnetic-field-dependent small-angle neutron scattering (SANS) data of bulk Examples of such systems are elemental nanocrystalline magnetic nanocomposites and magnetic steels. The software is based on the micromagnetic theory for the magnetic SANS and analyzes unpolarized total (nuclear and magnetic) SANS data within the approach-to-saturation regime of the macroscopic magnetization. The main features of MuMag2022 are the estimation of the exchange-stiffness constant, and of the strength and spatial structure of the magnetic anisotropy field and the magnetostatic field due to longitudinal magnetization fluctuations. MuMag2022 comes with a user-friendly interface and is available along with the example data as a standalone executable for Windows operating systems. It can be downloaded at https://mumag.uni.lu. Additionally, we provide a MuMag2022–Toolbox: User Guide that should enable the operation of the software.
Footnotes
1The acronym SANSPOL refers to a polarized SANS experiment without analysis of the polarization of the scattered neutrons.
Acknowledgements
We thank Sergey Erokhin, Dmitry Berkov (General Numerics Research Laboratory, Jena, Germany) and Luis F. Barquín (Universidad de Cantabria, Santander, Spain) for fruitful discussions.
Funding information
EMJ acknowledges the support of a Beca Concepción Arenal fellowship (BDNS: 406333, Gobierno de Cantabria, Spain). MPA and AM thank the National Research Fund of Luxembourg for financial support (AFR grant No. 15639149).
References
Aharoni, A. (1998). J. Appl. Phys. 83, 3432–3434. Web of Science CrossRef CAS Google Scholar
Aharoni, A. (2000). Introduction to the Theory of Ferromagnetism, 2nd ed. Oxford University Press. Google Scholar
Bersweiler, M., Adams, M. P., Peral, I., Kohlbrecher, J., Suzuki, K. & Michels, A. (2022). IUCrJ, 9, 65–72. Web of Science CrossRef CAS PubMed IUCr Journals Google Scholar
Bersweiler, M., Pratami Sinaga, E., Peral, I., Adachi, N., Bender, P., Steinke, N.-J., Gilbert, E. P., Todaka, Y., Michels, A. & Oba, Y. (2021). Phys. Rev. Mater. 5, 044409. Web of Science CrossRef Google Scholar
Bevington, P. R. & Robinson, D. K. (2003). Data Reduction and Error Analysis for the Physical Sciences, ch. 8, 3rd ed. Boston: McGraw-Hill. Google Scholar
Bick, J.-P., Suzuki, K., Gilbert, E. P., Forgan, E. M., Schweins, R., Lindner, P., Kübel, C. & Michels, A. (2013). Appl. Phys. Lett. 103, 122402. Web of Science CrossRef Google Scholar
Fornberg, B. (1988). Math. C, 51, 699–706. CrossRef Google Scholar
Heinemann, A., Hermann, H., Wiedenmann, A., Mattern, N. & Wetzig, K. (2000). J. Appl. Cryst. 33, 1386–1392. Web of Science CrossRef CAS IUCr Journals Google Scholar
Honecker, D., Dewhurst, C. D., Suzuki, K., Erokhin, S. & Michels, A. (2013). Phys. Rev. B, 88, 094428. Web of Science CrossRef Google Scholar
Honecker, D., Ferdinand, A., Döbrich, F., Dewhurst, C. D., Wiedenmann, A., Gómez-Polo, C., Suzuki, K. & Michels, A. (2010). Eur. Phys. J. B, 76, 209–213. Web of Science CrossRef CAS Google Scholar
Honecker, D. & Michels, A. (2013). Phys. Rev. B, 87, 224426. Web of Science CrossRef Google Scholar
McCord, J. & Hubert, A. (1999). Phys. Status Solidi A, 171, 555–562. CrossRef CAS Google Scholar
Michels, A. (2014). J. Phys. Condens. Matter, 26, 383201. Web of Science CrossRef PubMed Google Scholar
Michels, A. (2021). Magnetic Small-Angle Neutron Scattering. A Probe for Mesoscale Magnetism Analysis. Oxford University Press. Google Scholar
Michels, A., Viswanath, R. N., Barker, J. G., Birringer, R. & Weissmüller, J. (2003). Phys. Rev. Lett. 91, 267204. Web of Science CrossRef PubMed Google Scholar
Osborn, J. A. (1945). Phys. Rev. 67, 351–357. CrossRef Web of Science Google Scholar
Schmidt, P. W., Avnir, D., Levy, D., Höhr, A., Steiner, M. & Röll, A. (1991). J. Chem. Phys. 94, 1474–1479. CrossRef CAS Web of Science Google Scholar
Weissmüller, J., Michels, A., Barker, J. G., Wiedenmann, A., Erb, U. & Shull, R. D. (2001). Phys. Rev. B, 63, 214414. Google Scholar
Zaporozhets, V. D., Oba, Y., Michels, A. & Metlov, K. L. (2022). J. Appl. Cryst. 55, 592–600. CrossRef CAS IUCr Journals Google Scholar
This is an open-access article distributed under the terms of the Creative Commons Attribution (CC-BY) Licence, which permits unrestricted use, distribution, and reproduction in any medium, provided the original authors and source are cited.