# MuMax3-How-To **Repository Path**: wang-tx_1_0/MuMax3-How-To ## Basic Information - **Project Name**: MuMax3-How-To - **Description**: No description available - **Primary Language**: Unknown - **License**: GPL-3.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-17 - **Last Updated**: 2026-01-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # MuMax3-How-To [![License](https://img.shields.io/badge/GNU-General_Public_License_v3.0-green)](https://choosealicense.com/licenses/gpl-3.0/) Installation, scripting, & data generation demo of computational micro and nanomagnetism in MuMax3. Formed & written by Onri Jay Benally. --- ![image](https://github.com/OJB-Quantum/MuMax3-How-To/assets/88035770/4decf8c2-2a28-45b6-8d8d-220401dbfc4f) --- Main MuMax3 website: (https://mumax.github.io/index.html) Uses code heavily-modified for clarity, inspired from: (https://github.com/mumax/3) & (https://mumax.github.io/examples.html) ### Some examples computed in this repository were performed on an Nvidia (RTX 4070 Ti Super) GPU, connected externally (via a Thunderbolt 4 to PCIe x16 adapter) to a Microsoft Surface Pro 8, later upgraded to a Surface Pro 10. If you are curious about this kind of GPU-accelerated computing setup, then it is best to make sure your Windows machine is Thunderbolt 4 compatible or greater. Other examples were computed directly in the Google Colab environment using available GPU resources in Colab (T4 [free], L40, A100, etc.) --- ### To use MuMax3 in Google Colab, simply change the runtime type to one of the GPU accelerators and enter this into the first code cell: ``` #@title Check GPU + driver !nvidia-smi --query-gpu="name,driver_version,compute_cap" --format=csv ``` ### Then, enter this into the second code cell: ``` #@title Install MuMax³ (MuMax³ 3.10 CUDA 10.1) # Download the mumax3 binary !wget -q https://mumax.ugent.be/mumax3-binaries/mumax3.10_linux_cuda10.1.tar.gz !tar -xvf mumax3.10_linux_cuda10.1.tar.gz !rm mumax3.10_linux_cuda10.1.tar.gz !rm -rf mumax3.10 && mv mumax3.10_linux_cuda10.1 mumax3.10 # Update the PATH environment variable import os os.environ["PATH"] += ":/content/mumax3.10" ``` ### Now you can write the MuMax3 code and Python visualization scripts in the remaining cells. See the Google Colab notebook examples for more information. --- | Some Google Colab Notebooks | | | ----------- | ----------------- | | Run MuMax3 on the Cloud | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/JeroenMulkers/mumax3-tutorial/blob/master/mumax3.ipynb) | | Example of Hysteresis Loop Data Imported from a Local MuMax3 Installation | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/OJB-Quantum/MuMax3-How-To/blob/main/Python%20Code_MuMax3%20Data%20Plots/Hysteresis_Loop_Example_2_by_MuMax_Locally_Run.ipynb) | | Hysteresis Loop for Dy and Tb Micromagnets, Computed on the GPU Using MuMax3 Installed in Google Colab | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/OJB-Quantum/MuMax3-How-To/blob/main/Python%20Code_MuMax3%20Data%20Plots/Dy_and_Tb_Prediction_of_Hysteresis_at_Low_Temp.ipynb) | | Prediction of Temperature Dependence for Dy and Tb, Computed on the GPU Using MuMax3 Installed in Google Colab | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/OJB-Quantum/MuMax3-How-To/blob/main/Python%20Code_MuMax3%20Data%20Plots/Dy_and_Tb_Prediction_of_Temperature_Dependence.ipynb) | --- | | |-----------| | [How to Install & Run MuMax3 Locally by Onri](https://github.com/OJB-Quantum/MuMax3-How-To/blob/main/Installing%20and%20Running%20MuMax3%20by%20Onri%20Jay%20Benally.pdf) | | [Video Tutorial on How to Install MuMax3 Locally Step-by-Step](https://youtu.be/ziGTDgMdPJw) | | [The Official MuMax3 Tutorials](https://mumax.github.io/plus/tutorial.html) | | [Standard Problems from the Center for Theoretical and Computational Materials Science (CTCMS)](https://www.ctcms.nist.gov/~rdm/mumag.org.html) | | [Video Example of Onri's MuMax3 Hysteresis Plots in Python](https://youtu.be/YCUwEaX9SrI?si=I_m6b0n1USWKunFJ) | | [Example MuMax3 Script in TXT Format](https://github.com/OJB-Quantum/MuMax3-How-To/blob/main/MuMax3_Hysteresis_Loop_Example.txt) | | [Video Animation of Magnetic Orders](https://youtu.be/X4hEEzAGyhM?si=5Lpkqnvpjs6UKjUY) | | [Explanation of Hysteresis Curves & Coercivity](https://youtu.be/rGgKK3-wep4?si=bQ1aQ5gz3IZlJ2Qt) | | [Micromagnetism Overview](http://micromagnetics.org/micromagnetism/) | --- ## If MuMax3 is installed already, start the GUI by typing the following 2 lines into a non-admin command prompt or non-admin PowerShell: ```bash cd ``` ```bash mumax3 -i ``` Note: MuMax3 scripts can be written as TXT file types. The above script will load and automatically run the script into a browser. Online OVF file type visualization: (https://mumax.ugent.be/mumax-view). While using the viewer, you can load multiple OVF files to play an animation of the magnetization frame capture. --- ### Magnetic Conversion Table | Quantity | Symbol | Conversion | |----------------------------------|---------------------------|-------------------------------------------------------------------------------------------------------| | Field | $H$ | $\dfrac{\mathrm{Oe}}{\mathrm{A}\cdot\mathrm{m}^{-1}}=\dfrac{10^{3}}{4\pi}=79.6$ | | Flux | $\Phi$ | $\dfrac{\mathrm{Mx}}{\mathrm{Wb}}=\dfrac{\mathrm{Mx}}{\mathrm{V}\cdot\mathrm{s}}=10^{-8}$ | | Flux density | $B$ | $\dfrac{\mathrm{G}}{\mathrm{T}}=\dfrac{\mathrm{G}}{\mathrm{Wb}\cdot\mathrm{m}^{-2}}=10^{-4}$ | | Magnetic moment | $m$ | $\dfrac{\mathrm{emu}}{\mathrm{A}\cdot\mathrm{m}^{2}}=\dfrac{\mathrm{erg}\cdot\mathrm{Oe}^{-1}}{\mathrm{A}\cdot\mathrm{m}^{2}}=\dfrac{10\,\mathrm{A}\cdot\mathrm{cm}^{2}}{\mathrm{A}\cdot\mathrm{m}^{2}}=\dfrac{\mathrm{emu}}{\mathrm{J}\cdot\mathrm{T}^{-1}}=10^{-3}$ | | Magnetization per unit volume | $M$ | $\dfrac{\mathrm{emu}\cdot\mathrm{cm}^{-3}}{\mathrm{A}\cdot\mathrm{m}^{-1}}=\dfrac{\left(\mathrm{erg}\cdot\mathrm{Oe}^{-1}\right)\cdot\mathrm{cm}^{-3}}{\mathrm{A}\cdot\mathrm{m}^{-1}}=10^{3}$ | | Magnetization per unit mass | $\sigma$ | $\dfrac{\mathrm{emu}\cdot\mathrm{g}^{-1}}{\left(\mathrm{A}\cdot\mathrm{m}^{2}\right)\cdot\mathrm{kg}^{-1}}=\dfrac{\left(\mathrm{erg}\cdot\mathrm{Oe}^{-1}\right)\cdot\mathrm{g}^{-1}}{\left(\mathrm{A}\cdot\mathrm{m}^{2}\right)\cdot\mathrm{kg}^{-1}}=1$ | | Magnetic polarization | $J$ | $\dfrac{\mathrm{emu}\cdot\mathrm{cm}^{-3}}{\mathrm{T}}=\dfrac{\left(\mathrm{erg}\cdot\mathrm{Oe}^{-1}\right)\cdot\mathrm{cm}^{-3}}{\mathrm{T}}=10^{3}\mu_{0}=4\pi\cdot10^{-4}$ | | Volume susceptibility | $\chi_{\mathrm{v}}$ | $\dfrac{\left(\mathrm{emu}\cdot\mathrm{Oe}^{-1}\right)\cdot\mathrm{cm}^{-3}}{\left(\mathrm{A}\cdot\mathrm{m}^{2}\right)\cdot\left(\mathrm{A}\cdot\mathrm{m}^{-1}\right)^{-1}\cdot\mathrm{m}^{-3}}=4\pi$ | | Mass susceptibility | $\chi_{\mathrm{m}}$ | $\dfrac{\left(\mathrm{emu}\cdot\mathrm{Oe}^{-1}\right)\cdot\mathrm{g}^{-1}}{\left(\mathrm{A}\cdot\mathrm{m}^{2}\right)\cdot\left(\mathrm{A}\cdot\mathrm{m}^{-1}\right)^{-1}\cdot\mathrm{kg}^{-1}}=4\pi\cdot10^{-3}$ | | Permeability | $\mu=\dfrac{B}{H}$ | $\dfrac{\mathrm{G}\cdot\mathrm{Oe}^{-1}}{\mathrm{T}\cdot\left(\mathrm{A}\cdot\mathrm{m}^{-1}\right)^{-1}}=\mu_{0}=4\pi\cdot10^{-7}$ | | Relative permeability (SI) | $\mu_{\mathrm{r}}$ | $\dfrac{\mu_{\mathrm{SI}}}{\mu_{0}}=\mu_{\mathrm{r}}=\mu_{\mathrm{cgs}}$ | | Energy density | $W$ | $\dfrac{\mathrm{erg}\cdot\mathrm{cm}^{-3}}{\mathrm{J}\cdot\mathrm{m}^{-3}}=0.1$ | | Demagnetizing factor | $N$ | $\dfrac{N_{\mathrm{cgs}}}{N_{\mathrm{SI}}}=4\pi$ | | Energy product | $(BH)$ | $\dfrac{\mathrm{G}\cdot\mathrm{Oe}}{\mathrm{T}\cdot\left(\mathrm{A}\cdot\mathrm{m}^{-1}\right)}=\dfrac{\mathrm{G}\cdot\mathrm{Oe}}{\mathrm{J}\cdot\mathrm{m}^{-3}}=4\pi\cdot10^{1}=126$
$\dfrac{\mathrm{MG}\cdot\mathrm{Oe}}{\mathrm{kJ}\cdot\mathrm{m}^{-3}}=4\pi\cdot10^{-2}=0.126$ | Mx = maxwell, G = gauss, Oe = oersted, Wb = weber, V = volt, s = second, T = tesla, m = meter, A = ampere, J = joule, kg = kilogram, g = gram, cm = centimeter, with $\mu_0=4\pi\times10^{-7}$. --- ### Hysteresis loop, from the local MuMax3 computation data: ![Hysteresis Plot_Python_Blue](https://github.com/OJB-Quantum/MuMax3-How-To/assets/88035770/9df5d4aa-7bf2-439f-a7d6-d9862b5a283f) --- ### Hysteresis loops for dysprosium at various low temperatures, from the MuMax3 Colab computation: image --- ### Ferromagnetic response for dysprosium and terbium at various low temperatures, from the MuMax3 Colab computation: image --- ### Magnetic material visualization example ran in MuMax3: ![Vector field after 2 minutes](https://github.com/OJB-Quantum/MuMax3-How-To/assets/88035770/30d1d710-f5a2-48e2-9b01-9162b3aedf91) ![Vector field after a couple more minutes](https://github.com/OJB-Quantum/MuMax3-How-To/assets/88035770/5eb4bf8a-cb1b-48c6-a422-6b3b72010f8f) --- ### Magnetic geometry (300 nm x 100 nm x 3 nm) visualization in 3D using [MuMax View](https://mumax.ugent.be/mumax-view) in the browser: ![ezgif-2-ce10ab426e](https://github.com/OJB-Quantum/MuMax3-How-To/assets/88035770/40d7ff7a-e8bb-4438-9cd8-eeff2aa36a89) --- ### More examples: ![Screenshot 2024-03-13 124721](https://github.com/OJB-Quantum/MuMax3-How-To/assets/88035770/4f6f514b-a03d-4e99-861a-53e36d6196f9) ![Screenshot 2024-03-13 125101](https://github.com/OJB-Quantum/MuMax3-How-To/assets/88035770/a583f8b5-8fa5-4ee7-8e5c-7163c567cb28) --- | Related Animated Videos for Your Reference: | |-| | [Tunnel Effect](https://youtu.be/K64Tv2mK5h4?si=9P3WnPEtGvCPyy1s) | | [Quantum Difference Between Metals & Insulators](https://youtu.be/LNsSS6Id6bM?si=rk0qwzyc2x036CXy) | | [Magnetic Orders](https://youtu.be/X4hEEzAGyhM?si=9Lt-4U0Z2nVeSGp7) | | [Frustrated Magnets](https://youtu.be/HTzFYQCOCx0?si=UB9GK19gj967gb5U) | | [Bose-Einstein Condensation](https://youtu.be/shdLjIkRaS8?si=uKuxmS7PEBuRptUd) | | [Nuclear Magnetic Resonance (NMR)](https://youtu.be/4p2BH5DxUiM?si=wW2u7YFqoVFIfMSJ) | | [Transmission Electron Microscopy](https://youtu.be/fQJYuTpK8Fs?si=aTpBlV4WxlvRcKhf) | | [Scanning Tunneling Microscopy](https://youtu.be/HE2yE8SvHmA?si=CzMbPtEAd0B_mjR4) | | [Scanning Electron Microscopy](https://youtu.be/uQ1gCIkCbIQ?si=2sQTR0ysf4g0Db6i) | | [Atomic Force Microscopy](https://youtu.be/8gCf1sEn0UU?si=qyQy7vogkqV6WotF) | ![image](https://github.com/user-attachments/assets/9f594b41-d9a4-485e-a60b-5aed81b28257) ![image](https://github.com/user-attachments/assets/590586b3-3b3d-45dc-8a68-e5fd83b2119e)