The calculation of the demagnetization field is crucial in various disciplines, including magnetic resonance imaging and micromagnetics. A standard method involves discretizing the spatial domain into finite difference cells and using demagnetization tensors to compute the field. Different demagnetization tensors can result in contributions from adjacent cells that do not approach zero, nor do their differences, even as the cell size decreases. This work demonstrates that in three-dimensional space, a specific set of magnetization tensors produces the same total demagnetization field as the Cauchy principal value when the cell size approaches zero. Additionally, we provide a lower bound for the convergence speed, validated through numerical experiments.
I. INTRODUCTION
Calculation of magnetic fields is important in various fields, including micromagnetics and magnetic resonance imaging (MRI). In the field of micromagnetics, numerical simulations often solve the Landau–Lifshitz–Gilbert equation along with its associated partial differential equations.1 The primary variable is the magnetization vector field, . Given the magnetization field, various fields such as exchange, anisotropy, Zeeman, and demagnetization fields are computed,2 which, in turn, influence magnetization. The most computationally demanding part is calculating the demagnetization field given the magnetization.
In MRI, the strong magnetic fields produced by scanners create varying magnetizations within different tissue types in the body. These magnetizations result in non-uniformly distributed demagnetization fields. The presence of such magnetic fields inhomogeneities is a major challenge in acquiring high-quality images, especially at higher field strengths where demagnetization fields are also of greater amplitude. Accurately computing these fields is essential for understanding how they vary across individuals with different body sizes, shapes, and anatomical structures.
Typically, in micromagnetics, the demagnetization tensor is defined based on the interaction energy between cells, assuming each cubic cell is uniformly magnetized.4–6 This approach is referred to as the uniformly magnetized cube (UMC) method, and the demagnetization tensor of this approach is denoted as . Another approach treats each cell as a point dipole located at its center. This approach is used in both micromagnetics7,8 and MRI9–11 owing to its simplicity of calculation for the demagnetization tensor. This approach is referred to as the dipole method, and the demagnetization tensor of this approach is denoted as . Besides the UMC and dipole methods, the cell at can be treated as a uniformly magnetized cube; however, the cell at is treated as a point dipole.12 This method can benefit from averaging over a cell and keeping the calculation relatively simple. We refer to this method as the uniformly magnetized cube-dipole (UMCD) method and its demagnetization tensor as .
To our knowledge, the relationship between these methods is not sufficiently discussed. Numerous literature implicitly assumed that the UMC, dipole, and UMCD can yield the correct results, i.e., converge to the same result.4–11 However, other works hint that these methods cannot converge to the same result, due to significant discrepancy between the demagnetization tensors for individual cells.13–16 Additionally, some works treat the result of the dipole method as equivalent to that of the Cauchy principal value.9–11
One main goal of this article is to prove that all these methods consistently produce results at the limit of approaching zero in three-dimensional space using cubic cells. The equivalence is not on a cell-by-cell basis but on the total field for sufficiently smooth magnetization.
This article is structured as follows: Sec. II reviews the demagnetization tensors, presents the proof of our statement, provides a lower bound on the convergence speed, and outlines the implementation using FFT. Section III demonstrates the validation of the statement through numerical experiments. Section IV discusses the extension and limitation of the current work. Section V offers concluding remarks.
II. THEORETICAL ANALYSIS
A. Cauchy principal value
B. UMC and UMCD methods
C. Dipole method
Note that Eq. (21) does not explicitly depend on . Therefore, the contribution from a single cell adjacent to the cell at does NOT approach zero as . It is also noteworthy that since the interaction energy between two uniformly magnetized spheres equals that between two dipoles of the same moment,3,22,23 the method can also be referred to as the uniformly magnetized sphere method. must be excluded from the summation because the demagnetization tensor for the dipole method is singular at this point.
D. Asymptotic expansions
E. Near and far field decomposition
F. Near field for uniform magnetization
G. Near field for nonuniform magnetization
In the previous subsection, it has been established that the near demagnetization field is exactly zero for uniform magnetization. Then, we prove that the near demagnetization field at approaches zero as , provided that the magnetization is Hölder continuous at .
By subtracting a constant magnetization, , from , the result remains unaffected. Consequently, with this subtraction, , allowing us to potentially address the challenges arising from the discrepancy of the demagnetization tensor around .
The differences between the dipole method and other methods are bounded by higher-order terms in the asymptotic expansions, possibly multiplied by a factor of order one. For these higher-order corrections, we replace with in Eq. (44), where . After summing over all cells in , the higher-order correction is on the order of , where . Thus, the higher-order correction to the near field is smaller than or on the same order as that for the dipole method.
H. Lower bound on the convergence speed
I. Implementation using FFT
III. NUMERICAL VALIDATION
For problem I, the exact analytical result can be expressed using special functions, as shown in Appendix B, with the aid of symbolic processing software.25 Thus, the result can be effectively calculated to arbitrary precision. We calculate the result to at least 20 digits, although the precision is truncated to about 16 digits when converting from a multi-precision representation to a double-precision floating-point format. For problem II, the exact result is zero for symmetry reasons.
On the numerical side, we employ several methods: the UMC method, the dipole method, and a variant of the dipole method described in Eq. (39) with (where represents the imaginary unit), the asymptotic expansions for the UMC and UMCD methods. In the asymptotic expansion methods, the asymptotic expansions are used for both far and near cells. The coordinate system is set such that the origin is at the center of a cell. The cell size is adjusted so that at , , and , the boundaries of the magnet align with the boundaries of the cells. At , the cells’ centers are on the magnet’s boundary. Thus, we minimize the error fluctuations arising from the discretization of the magnet boundary. Computations are performed using double-precision floating-point arithmetic. The demagnetization tensors for the UMC and UMCD methods are calculated using exact formulas for cells at short distances and asymptotic expansions for cells at long distances. These asymptotic expansions include terms up to . The demagnetization tensor has a maximum error on the order of around the crossover between analytical formulas and asymptotic expansions. The numerical errors observed in this experiment, which are larger than , significantly exceed those of double-precision floating-point arithmetic ( ) and the error of the demagnetization tensors. Therefore, all errors are attributed to discretization errors.
The numerical errors of for of 0.2, 0.6, 1, and 2 at are illustrated in Figs. 3 and 4. The numerical errors of are modeled by . The parameter determines the convergence speed as . as a function of are shown in Fig. 5. We observe that for . Thus, we verify that these methods converge to the same value for , which is consistent with the prediction of our analysis. All convergence speeds slow down as where magnetization becomes more non-smooth. In problem I, the convergence speeds for the UMC method UMCD methods are much faster and have almost identical convergence speeds. These two methods are significantly better than the other methods. This can be explained as follows: for the magnetization relevant to the term , the volume magnetic charge is zero and only surface magnetic charges appear on . For these two methods, the error can be attributed to the discretization error for the magnetic surface charge at the magnet surface of . This surface is far from where the field is under evaluation; thus, the error is suppressed. For the magnetization relevant to , the discretization error from the near field is highly suppressed by the term . Thus, these two methods show an advantage over the other methods. We also note that the variation of the dipole method shows a better convergence speed than the dipole method. The asymptotic expansion does not have an advantage compared to other method. This is as expected since the asymptotic expansions are not good for near cells. The convergence speed is faster than our conservative estimate; thus, our results are not violated. For , the value is close to 2 for all methods, consistent with other studies.26,27 In problem II, all these methods exhibit similarly slow convergence speeds. This issue can be attributed to the discontinuity at , which worsens the results from all methods. Additionally, as approaches zero, for all methods approaches zero, indicating non-convergence. This confirms the assertions of this work.
IV. DISCUSSIONS
One might use a rectangular prism instead of a simple cube. For the uniformly magnetized prism method, the macroscopic demagnetization field can still be correctly calculated.26 However, in the dipole method, using different cell sizes along different directions will disrupt Eqs. (34) and (35), leading to discrepancies between the two methods. They represent different physics in this case. It is worth noting again that this discrepancy cannot be eliminated as cell size approaches zero.
For sufficiently smooth magnetization, the convergence speed estimated by Eqs. (47) and (49) is not faster than . However, numerical experiments indicate a convergence speed of for sufficiently smooth magnetization. Therefore, the lower bound of the convergence speed is much worse than that observed in numerical experiments. To achieve a better lower bound estimate for the convergence speed, one may need methods beyond the simple near and far field splitting, and cell-by-cell analysis. Given the potential for error cancelation among cells, it is crucial to carefully analyze the correlations between errors of different cells.
The section of our proof that demonstrates the near field is zero for uniform magnetization closely resembles the approach described in the literature.17 However, it serves a different purpose: while the literature17 aims to establish the relationship between molecular polarizability and electric susceptibility, our goal is to prove that different magnetization tensors yield consistent results for both non-uniform and uniform magnetization.
The conclusion does not readily extend to two-dimensional materials in three-dimensional space. The magnetization of a two-dimensional thin material that is one cell thick cannot be considered a three-dimensional Hölder continuous function. Specifically, the symmetries between , , and axes are broken for two-dimensional materials.
V. CONCLUSION
The agreement among these demagnetization tensors is significant. In the calculation of the demagnetization tensor for the UMC method, both numerical integrals and lengthy exact analytical formulas introduce complexity in implementation. Additionally, exact analytical formulas can suffer from numerical stability issues, such as catastrophic cancelation.16,21 In contrast, the implementation of the demagnetization tensor in the dipole method is considerably simpler. For numerical calculations, the consistency among these methods allows us to employ the dipole method in situations where convergence speed is not a critical factor.
A comprehensive theoretical analysis is conducted to study the effect of discretization on field errors, offering valuable insights into the relationship between error amplitudes and cell size, addressing the scientific question. The theoretical analysis is presented in detail. The approach used is rigorous, comparing numerical solutions to analytical solutions to determine the errors. The findings in this manuscript are valuable to the micromagnetics and MRI communities, providing a better understanding of different methods for calculating demagnetization fields and how to use those methods more accurately.
We acknowledge that, while the conclusions are applicable to three-dimensional materials, further investigation is required for two-dimensional materials in three-dimensional space.
ACKNOWLEDGMENTS
This work was in part supported by National Institutes of Health (NIH) Grant No.R01 EB 031078. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.
AUTHOR DECLARATIONS
Conflict of Interest
The authors have no conflicts to disclose.
Author Contributions
Hao Liang: Conceptualization (equal); Formal analysis (lead); Investigation (equal); Methodology (lead); Software (lead); Validation (equal); Writing – original draft (lead); Writing – review & editing (equal). Xinqiang Yan: Conceptualization (equal); Funding acquisition (lead); Investigation (equal); Project administration (lead); Resources (lead); Supervision (lead); Validation (equal); Writing – original draft (supporting); Writing – review & editing (equal).
DATA AVAILABILITY
The data that support the findings of this study are available from the corresponding author upon reasonable request.