# 微磁学模拟

微磁学模拟是一种数值方法，通过求解微磁学的连续介质方程——主要是朗道-栗弗席兹-吉尔伯特（Landau–Lifshitz–Gilbert，LLG）方程——来计算铁磁材料的磁化强度在空间和时间中如何演化。模拟输出的结果包括磁化位形、准静态磁滞回线以及场驱动动力学，适用于那些关键特征（如畴壁和涡旋）尺寸在几纳米到几微米之间的结构。<sup>[1](https://link.springer.com/article/10.1140/epjb/e2019-90599-6)</sup><sup> • </sup><sup>[2](https://math.nist.gov/oommf/doc/userguide20/userguide/Overview_OOMMF.html)</sup> 同一个LLG方程——一个关于时间的常微分方程——是广泛用于微磁学问题的有限差分和有限元求解器的基础。<sup>[3](https://iopscience.iop.org/article/10.1088/1361-6463/aa7c04/meta)</sup>

| 关键事实 | 数值 |
|---|---|
| 控制方程 | LLG：\( \dot{\mathbf{m}} = -\gamma_{0}\, \mathbf{m} \times \mathbf{H}_{\mathrm{eff}} + \alpha\, \mathbf{m} \times \dot{\mathbf{m}} \)，其中 \( \gamma_{0} = 2.21 \times 10^{5} \) m A\(^{-1}\) s\(^{-1} \)<sup>[4](https://pubs.aip.org/aip/jap/article/134/17/171101/2919250/Tutorial-Simulating-modern-magnetic-material)</sup> |
| 有效场 | \( \mathbf{H}_{\mathrm{eff}} = -(1/\mu_{0})\, \delta E/\delta \mathbf{M} \)，即微磁学能量的泛函导数<sup>[5](https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=50910)</sup><sup> • </sup><sup>[4](https://pubs.aip.org/aip/jap/article/134/17/171101/2919250/Tutorial-Simulating-modern-magnetic-material)</sup> |
| 能量项 | 交换、静磁（退磁）、塞曼和各向异性<sup>[5](https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=50910)</sup> |
| 网格要求 | 网格尺寸远小于交换长度以保证充分收敛<sup>[5](https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=50910)</sup> |
| 主要开销 | 基于FFT的退磁场计算，\( \mathcal{O}(N \log N) \)，约占总计算时间的80–90%<sup>[6](https://arxiv.org/pdf/2308.08447)</sup> |
| GPU加速 | 据mumax3文档约为CPU代码的100倍；在约5,000个网格以上的受控基准测试中为7–10倍<sup>[7](https://mumax.ugent.be/mumax3/)</sup><sup> • </sup><sup>[8](https://ar5iv.labs.arxiv.org/html/1505.01207)</sup> |
| 基准参数（μMAG标准问题4） | 500 nm × 125 nm × 3 nm薄膜，\( A = 1.3 \times 10^{-11} \) J/m，\( M_{s} = 8 \times 10^{5} \) A/m，\( \gamma_{0} = 2.211 \times 10^{5} \) m A\(^{-1}\) s\(^{-1} \)，\( \alpha = 0.02 \)<sup>[9](https://fidimag.readthedocs.io/en/latest/user_guide/ipynb/standard_problem_4.html)</sup> |

## 工作原理

微磁学建立在交换相互作用的连续介质近似之上，并结合静态、非传播极限下的麦克斯韦方程组来处理退磁场；能量被限制为交换、静磁、塞曼和各向异性项。<sup>[5](https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=50910)</sup> 该方法所处理的长度尺度足够大，使得原子自旋被替换为具有单位模长的连续磁化强度\( \mathbf{m} \)，但又足够小以分辨畴壁；其关键假设是自旋方向从一个晶格点到下一个晶格点只变化一个小角度。<sup>[10](https://homepage.univie.ac.at/lukas.exl/files/mic_intro.pdf)</sup>

根据布朗（Brown）理论，采用此处使用的国际单位制约定，有效场等于能量对磁化强度的泛函导数（对于局域项则为能量密度的泛函导数）乘以\( -(1/\mu_{0}) \)，动力学遵循带有无量纲吉尔伯特阻尼\( \alpha \)的LLG方程。<sup>[5](https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=50910)</sup> LL方程是磁化强度的运动方程，吉尔伯特（T. L. Gilbert）通过对磁化强度场作拉格朗日处理，推导出了带有阻尼项的等价形式；组合后的形式即为朗道-栗弗席兹-吉尔伯特方程。<sup>[1](https://link.springer.com/article/10.1140/epjb/e2019-90599-6)</sup> LLG方程也可以通过经典拉格朗日力学经由哈密顿原理推导，使用单位球面约束\( |\mathbf{m}| = 1 \)。<sup>[1](https://link.springer.com/article/10.1140/epjb/e2019-90599-6)</sup> 温度通过朗之万动力学或朗道-栗弗席兹-布洛赫方程引入。<sup>[1](https://link.springer.com/article/10.1140/epjb/e2019-90599-6)</sup>

## 实现方法

模拟分为四个阶段。首先，对样品进行离散化，通常采用均匀矩形网格上的有限差分方法或非结构网格上的有限元方法；这是数值微磁学中两种主要的离散化策略。<sup>[1](https://link.springer.com/article/10.1140/epjb/e2019-90599-6)</sup> 网格尺寸必须远小于交换长度才能达到充分收敛。<sup>[5](https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=50910)</sup>

其次，计算退磁场。直接求和的代价为\( \mathcal{O}(N^{2}) \)；在规则网格上，相互作用系数的平移不变性允许使用快速傅里叶变换进行计算，将代价降低到\( \mathcal{O}(N \log N) \)。<sup>[11](https://web.math.ucsb.edu/~cgarcia/Papers/Garcia-Cervera_ReviewSEMA.pdf)</sup><sup> • </sup><sup>[5](https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=50910)</sup> 由于磁化强度分布不是周期性的，需要进行零填充，这一步约占总计算时间的80–90%。<sup>[5](https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=50910)</sup><sup> • </sup><sup>[6](https://arxiv.org/pdf/2308.08447)</sup> FFT效率强烈依赖于各方向的网格点数，因此代码会将这些点数调整为仅含小素因子的数。<sup>[12](https://arxiv.org/html/1102.3069)</sup>

第三，对LLG方程进行时间积分。mumax3的run命令使用显式龙格-库塔格式，默认采用Dormand–Prince（五阶嵌入四阶）方法；relax命令将系统阻尼至能量极小值点，另有更快的共轭梯度minimize命令可用。<sup>[13](https://mumax.ugent.be/mumax3-workshop/tutorial1.pdf)</sup><sup> • </sup><sup>[4](https://pubs.aip.org/aip/jap/article/134/17/171101/2919250/Tutorial-Simulating-modern-magnetic-material)</sup> 显式积分是刚性的：对于网格尺寸为0.004 µm的坡莫合金，使用四阶龙格-库塔法需要约0.25皮秒的时间步长才能保持稳定，<sup>[11](https://web.math.ucsb.edu/~cgarcia/Papers/Garcia-Cervera_ReviewSEMA.pdf)</sup> 这促使人们采用无条件收敛的积分器，如切平面格式和中点格式，它们无需CFL型条件\( \Delta t \le C h^{\beta} \)即可收敛。<sup>[14](https://www.sciencedirect.com/science/article/abs/pii/S0010465519303145)</sup>

第四，将结果与社区基准进行验证。μMAG标准问题4的工作流程是在零场下弛豫一个500 nm × 125 nm × 3 nm的薄膜，然后模拟在施加场\( \mu_{0}\mathbf{H}_{1} = (-24.6, 4.3, 0.0) \) mT和\( \mu_{0}\mathbf{H}_{2} = (-35.5, -6.3, 0.0) \) mT下的动力学。<sup>[9](https://fidimag.readthedocs.io/en/latest/user_guide/ipynb/standard_problem_4.html)</sup> 所需的材料输入为交换常数\( A \)、饱和磁化强度\( M_{s} \)、阻尼\( \alpha \)和旋磁比\( \gamma_{0} \)；温度相关的交换常数可估算为\( A(T) = A(300\,\mathrm{K}) \cdot [M_{s}(T)/M_{s}(300\,\mathrm{K})]^{2} \)。<sup>[10](https://homepage.univie.ac.at/lukas.exl/files/mic_intro.pdf)</sup>

## 起源

威廉·富勒·布朗（William Fuller Brown）从1940年在《物理评论》上发表的《论趋近磁饱和的理论》开始，陆续发表了微磁学方程。<sup>[15](https://doi.org/10.1103/physrev.58.736)</sup> 吉尔伯特（T. L. Gilbert）于1955年通过对磁化强度方程的拉格朗日处理推导出了带有阻尼项的等价形式，组合后的形式即为朗道-栗弗席兹-吉尔伯特方程。<sup>[1](https://link.springer.com/article/10.1140/epjb/e2019-90599-6)</sup> 布朗的专著《微磁学》（*Micromagnetics*），由纽约John Wiley出版，至今仍是该领域的基础参考文献。<sup>[16](https://doi.org/10.1002/pssa.2211370118)</sup>

在计算方面，标量磁势的FFT计算是杂散场能量的关键加速技术，使用类朗道-栗弗席兹运动方程将系统弛豫至平衡态。<sup>[16](https://doi.org/10.1002/pssa.2211370118)</sup> OOMMF是最早的开源微磁学代码之一，在CPU上实现有限差分微磁学，<sup>[6](https://arxiv.org/pdf/2308.08447)</sup> 而MuMax由范斯滕基斯特（A. Vansteenkiste）和范德维勒（B. Van de Wiele）于2011年在《磁学与磁性材料杂志》上报道，是首个以开源软件形式公开发布的基于GPU的微磁学求解器。<sup>[12](https://arxiv.org/html/1102.3069)</sup> MuMax3由范斯滕基斯特及其同事于2014年在《AIP Advances》上设计并验证。<sup>[17](https://doi.org/10.1063/1.4899186)</sup>

## 变体

知名的有限差分代码包括OOMMF、MuMax3、MicroMagnum、magnum.fd和Fidimag；有限元代码包括MagPar、TetraMag/tetmag2、Nmag/Finmag、FastMag、FEMME和magnum.fe。<sup>[14](https://www.sciencedirect.com/science/article/abs/pii/S0010465519303145)</sup> OOMMF用C++编写，配有Tcl/Tk界面，可在Unix、Windows和macOS上运行，并通过OOMMF可扩展求解器进行扩展，其扩展功能包括自旋力矩、热效应和DMI效应。<sup>[2](https://math.nist.gov/oommf/doc/userguide20/userguide/Overview_OOMMF.html)</sup> MuMax3是一个开源的GPU加速有限差分程序，适用于纳米到微米尺度的磁体，已通过解析值和微磁学标准问题验证。<sup>[17](https://doi.org/10.1063/1.4899186)</sup>

有限元代码以速度换取几何灵活性。Nmag为有限元微磁学的多物理场扩展提供了系统化方法，<sup>[18](https://doi.org/10.1109/tmag.2007.893843)</sup> magnum.fe则构建在FEniCS有限元库之上。<sup>[19](https://doi.org/10.1016/j.jmmm.2013.05.051)</sup> 有限差分代码由于采用均匀网格和FFT处理长程场，在内存和计算上都很高效，而有限元方法则能处理曲面边界而不产生阶梯误差。<sup>[14](https://www.sciencedirect.com/science/article/abs/pii/S0010465519303145)</sup><sup> • </sup><sup>[5](https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=50910)</sup>

工作流层位于求解器之上。Ubermag定义了一种Python领域特定语言，由Jupyter笔记本驱动，与OOMMF（通过oommfc）和mumax3（通过mumax3c）等后端通信。<sup>[20](https://doi.org/10.1109/tmag.2021.3078896)</sup><sup> • </sup><sup>[21](https://ubermag.github.io/)</sup> Fidimag基于LLG方程同时提供原子尺度和有限差分微磁学模拟，是允许在两种范式之间切换的若干软件包之一，与magnum.af和MicroMagnetic.jl并列；它实现了随机LLG、自旋转移力矩变体以及微扰弹性带能量势垒计算。<sup>[22](https://openresearchsoftware.metajnl.com/articles/10.5334/jors.223)</sup>

## 应用

微磁学模拟量化了微观结构如何控制磁性能：在成核控制的钕铁硼永磁体中，晶间区域的磁性能控制着矫顽场。<sup>[23](https://iopscience.iop.org/article/10.1088/0022-3727/33/15/201)</sup> 连续介质理论使得永磁体、MRAM以及读头和角度传感器的磁滞计算成为可能。<sup>[1](https://link.springer.com/article/10.1140/epjb/e2019-90599-6)</sup>

在自旋电子学中，自旋转移力矩作为有效场贡献\( \mathbf{H}_{\mathrm{ST}} = a_{J} \cdot \mathbf{m} \times \mathbf{p} + b_{J} \cdot \mathbf{p} \)加入，而自旋轨道力矩驱动的斯格明子推进比STT更稳健，可在赛道型器件中实现更高的电流和斯格明子速度。<sup>[4](https://pubs.aip.org/aip/jap/article/134/17/171101/2919250/Tutorial-Simulating-modern-magnetic-material)</sup> 模拟还能解析共振谱，例如涡旋盘的旋磁模式。<sup>[24](https://backoffice.biblio.ugent.be/download/3099972/3100005)</sup>

## 局限与替代方案

当结构带有有限网格无法分辨的梯度时，连续介质模型的可靠性下降；布洛赫点（Bloch point）是教科书中的典型例子。<sup>[25](https://ar5iv.labs.arxiv.org/html/1609.09295)</sup> 小颗粒中的热激活反转表现出三种情形（各向异性场以下的相干翻转、各向异性场附近的单液滴成核以及各向异性场以上的多液滴成核），标志着确定性模型的热极限。<sup>[23](https://iopscience.iop.org/article/10.1088/0022-3727/33/15/201)</sup> 有限温度模拟代价高昂：使用Heun方法计算77 K下的热场，相对于零温度龙格-库塔运行，执行时间增加了近两个数量级。<sup>[8](https://ar5iv.labs.arxiv.org/html/1505.01207)</sup>

GPU加速数据因基准而异。mumax3文档指出，即使使用廉价的游戏GPU，也很容易达到相对于CPU模拟约100倍的加速，<sup>[7](https://mumax.ugent.be/mumax3/)</sup> 而MuMax报道对于大规模模拟相对于OOMMF的加速超过100倍。<sup>[12](https://arxiv.org/html/1102.3069)</sup> 然而，在一项受控的场反转基准测试中，CPU模拟在约5,000个网格以下表现更好，超过该规模后GPU加速为7到10倍，且CPU和GPU都呈现\( \mathcal{O}(N \log N) \)复杂度，因此优势趋于饱和。<sup>[8](https://ar5iv.labs.arxiv.org/html/1505.01207)</sup>

当原子尺度细节很重要时，原子自旋动力学对单个自旋求解LLG型方程，<sup>[26](https://doi.org/10.1088/0953-8984/20/31/315203)</sup> 多尺度方法则将两者耦合：粗粒化微磁学模型覆盖整个样品，而原子海森堡模型在微磁学失效的区域运行，两者之间的界面在频率阈值以下对自旋波透明。<sup>[25](https://ar5iv.labs.arxiv.org/html/1609.09295)</sup> 这种耦合的原子-连续介质方案捕捉了晶体晶格缺陷对磁化动力学的强烈影响，并允许真实尺寸的斯格明子与材料缺陷相互作用。<sup>[27](https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.2.013092)</sup> 长程偶极-偶极相互作用是多尺度模型的关键困难；一种方法仅在连续介质层面处理退磁场并将其与两个尺度耦合，其中分区域方案适用于孤立异质结构，而升尺度方案适用于连续介质模型定义不明确的高温或高频场情形。<sup>[28](https://link.springer.com/content/pdf/10.1007/s10444-020-09747-5.pdf)</sup>

## References

1. [Micromagnetics and spintronics: models and numerical methods (European Physical Journal B)](https://link.springer.com/article/10.1140/epjb/e2019-90599-6)
2. [Overview of OOMMF (NIST user guide)](https://math.nist.gov/oommf/doc/userguide20/userguide/Overview_OOMMF.html)
3. [Techniques in micromagnetic simulation and analysis (Kumar & Adeyeye, J. Phys. D 50, 343001, 2017)](https://iopscience.iop.org/article/10.1088/1361-6463/aa7c04/meta)
4. [Tutorial: Simulating modern magnetic material systems in mumax3 (J. Appl. Phys. 134, 171101, 2024)](https://pubs.aip.org/aip/jap/article/134/17/171101/2919250/Tutorial-Simulating-modern-magnetic-material)
5. [Numerical Micromagnetics: Finite Difference Methods (Miltat & Donahue, Handbook of Magnetism and Advanced Magnetic Materials)](https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=50910)
6. [Accelerating micromagnetic and atomistic simulations using multiple GPUs (BORIS)](https://arxiv.org/pdf/2308.08447)
7. [mumax3 official website (DyNaMat group, Ghent University)](https://mumax.ugent.be/mumax3/)
8. [GPU-accelerated micromagnetic simulations using cloud computing](https://ar5iv.labs.arxiv.org/html/1505.01207)
9. [Fidimag documentation: Micromagnetic standard problem 4](https://fidimag.readthedocs.io/en/latest/user_guide/ipynb/standard_problem_4.html)
10. [Micromagnetism (book chapter / lecture text, Univ. Vienna)](https://homepage.univie.ac.at/lukas.exl/files/mic_intro.pdf)
11. [Numerical Micromagnetics: A Review (García-Cervera, SEMA)](https://web.math.ucsb.edu/~cgarcia/Papers/Garcia-Cervera_ReviewSEMA.pdf)
12. [MuMax: a new high-performance micromagnetic simulation tool (Vansteenkiste & Van de Wiele, 2011)](https://arxiv.org/html/1102.3069)
13. [mumax3 workshop tutorial 1](https://mumax.ugent.be/mumax3-workshop/tutorial1.pdf)
14. [Computational micromagnetics with Commics (Computer Physics Communications)](https://www.sciencedirect.com/science/article/abs/pii/S0010465519303145)
15. [William Fuller Brown (1940). Theory of the Approach to Magnetic Saturation. Physical Review.](https://doi.org/10.1103/physrev.58.736)
16. [D. V. Berkov, K. Ramstöcck, A. Hubert (1993). Solving Micromagnetic Problems. Towards an Optimal Numerical Method. physica status solidi (a).](https://doi.org/10.1002/pssa.2211370118)
17. [Arne Vansteenkiste and colleagues (2014). The design and verification of MuMax3. AIP Advances.](https://doi.org/10.1063/1.4899186)
18. [Thomas Fischbacher and colleagues (2007). A Systematic Approach to Multiphysics Extensions of Finite-Element-Based Micromagnetic Simulations: Nmag. IEEE Transactions on Magnetics.](https://doi.org/10.1109/tmag.2007.893843)
19. [Claas Abert and colleagues (2013). magnum.fe: A micromagnetic finite-element simulation code based on FEniCS. Journal of Magnetism and Magnetic Materials.](https://doi.org/10.1016/j.jmmm.2013.05.051)
20. [Marijan Beg, Martin Lang, Hans Fangohr (2021). Ubermag: Toward More Effective Micromagnetic Workflows. IEEE Transactions on Magnetics.](https://doi.org/10.1109/tmag.2021.3078896)
21. [Ubermag documentation](https://ubermag.github.io/)
22. [Fidimag – A Finite Difference Atomistic and Micromagnetic Simulation Package (Journal of Open Research Software)](https://openresearchsoftware.metajnl.com/articles/10.5334/jors.223)
23. [Micromagnetic modelling - the current state of the art (Fidler & Schrefl, J. Phys. D 33, R135, 2000)](https://iopscience.iop.org/article/10.1088/0022-3727/33/15/201)
24. [GPU-accelerated vortex-core switching study using MUMAX (Vansteenkiste et al., conference paper)](https://backoffice.biblio.ugent.be/download/3099972/3100005)
25. [Multiscale Model Approach for Magnetization Dynamics Simulations (De Lucia, Krüger, Tretiakov, Kläui; Phys. Rev. B 94, 184415 (2016))](https://ar5iv.labs.arxiv.org/html/1609.09295)
26. [B Skubic and colleagues (2008). A method for atomistic spin dynamics simulations: implementation and examples. Journal of Physics Condensed Matter.](https://doi.org/10.1088/0953-8984/20/31/315203)
27. [Multiscale approach for magnetization dynamics: unraveling exotic magnetic states of matter (Méndez et al., Phys. Rev. Research 2, 013092, 2020)](https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.2.013092)
28. [Modelling long-range interactions in multiscale simulations of ferromagnetic materials (Poluektov et al., Numerical Algorithms)](https://link.springer.com/content/pdf/10.1007/s10444-020-09747-5.pdf)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026; Oct 25, 2026*

Topic: 物质世界与数学 › 物理学 › 物质与辐射物理学 › Condensed matter physics › Electronic and magnetic properties › Magnetism in condensed matter › Domains, magnetization reversal, and micromagnetics

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/micromagnetic-simulation

English original: https://www.edgepedia.org/micromagnetic-simulation
