---
title: "Properties You Can Calculate with MuMax3"
url: "https://ouro.foundation/posts/mmoderwell/properties-you-can-calculate-with-mumax3"
id: "019567a4-a109-75a1-9807-4e62b11b5af6"
type: "post"
---

# Properties You Can Calculate with MuMax3

Post by @mmoderwell in #permanent-magnets (all) · 2025-03-05

- Asset id: `019567a4-a109-75a1-9807-4e62b11b5af6`
- Page: https://ouro.foundation/posts/mmoderwell/properties-you-can-calculate-with-mumax3

# Properties You Can Calculate with MuMax3

MuMax3 is best suited for **mesoscale simulations**, meaning it can model magnetization behavior at the **micro- and nano-scale**, which is crucial for understanding **domain structures, coercivity, and thermal stability**.

### **1. Coercivity (**\(H_c\)**)**

- **What it is:** The field strength required to **reverse magnetization** in a material.
- **Why it matters:** High coercivity prevents unwanted demagnetization.

**How to compute in MuMax3:**

1. Set up a magnetic system (e.g., **NdFeB grains**).
2. Apply an **external field sweep** (e.g., a decreasing field in the opposite direction).
3. Track magnetization reversal (\(M\)) as a function of the field.
4. Find the field strength at which **magnetization crosses zero**.

**Example Code (lua):**

```lua
B_ext = vector(1, 0, 0) * 2e-1  -- Apply an external field (T)
relax()                         -- Let the system reach equilibrium
tablesave()                     -- Save initial state

-- Sweep field to determine coercivity
for B = 0, -1, -0.01 do
    B_ext = vector(1, 0, 0) * B
    minimize()  -- Find new equilibrium
    tablesave()  -- Save data
end

```

**Result:** Plot \(M(H)\) to extract \(H_c\).

---

### **2. Hysteresis Loop & Energy Product (**\(BH_{\max}\)**)**

- **What it is:** The full magnetization curve showing how a magnet responds to an external field.
- **Why it matters:** The area enclosed in the **hysteresis loop** determines the maximum energy stored in a magnet.

**How to compute in MuMax3:**

1. Run a **full field loop** (+H to -H and back).
2. Extract **remanence (**\(M_r\)**) and coercivity (**\(H_c\)**)**.
3. Calculate **energy product** from \(B\) and \(H\).

**Example Code:**

```lua
for B = -1, 1, 0.01 do
    B_ext = vector(B, 0, 0)
    relax()
    tablesave()
end
for B = 1, -1, -0.01 do
    B_ext = vector(B, 0, 0)
    relax()
    tablesave()
end

```

**Result:** Use \(B H\)** plot** to find \(BH_{\max}\).

---

### **3. Domain Structures & Magnetization Dynamics**

- **What it is:** The formation of **magnetic domains** and their evolution under applied fields.
- **Why it matters:** Domain structure impacts **coercivity** and **magnetization reversal**.

**How to compute in MuMax3:**

1. Define **grain sizes** and magnetic parameters.
2. Simulate **relaxation** to find equilibrium states.
3. Apply a **small perturbation** and track domain wall motion.

**Example Code:**

```lua
Aex = 1e-11          -- Exchange stiffness
Ku1 = 1e6           -- Anisotropy constant
Msat = 1.2e6        -- Saturation magnetization
alpha = 0.02        -- Damping parameter

-- Initial magnetization state
m = randomMag()

relax()  -- Find domain equilibrium

-- Apply small external field pulse
B_ext = vector(0.01, 0, 0)
run(1e-9)

```

**Result:** Observe **domain wall motion** in MuMax3’s visualization.

---

### **4. Thermal Stability & Curie Temperature Estimation**

- **What it is:** The ability of a magnet to retain its properties at high temperatures.
- **Why it matters:** High \(T_C\) prevents thermal demagnetization.

**How to compute in MuMax3:**

1. Introduce a **random thermal noise field**.
2. Measure how **magnetization decreases** over time.
3. Extract an **effective Curie temperature** based on changes in \(M_s(T)\).

**Example Code:**

```lua
Temp = 300          -- Set temperature (K)
alpha = 0.02        -- Damping
thermalnoise = true -- Enable thermal fluctuations

run(1e-9)  -- Simulate magnetization decay

tablesave()  -- Save final magnetization state

```

**Result:** Fit the \(M_s(T)\)** curve** to estimate \(T_C\).

---

### **5. Anisotropy Energy & Hard-Axis Switching**

- **What it is:** The energy required to rotate magnetization **out of its easy axis**.
- **Why it matters:** Strong anisotropy prevents unwanted switching.

**How to compute in MuMax3:**

1. Set **uniaxial anisotropy** with **varying field angles**.
2. Measure energy barriers for magnetization switching.

**Example Code:**

```lua
Ku1 = 5e5       -- High anisotropy constant
m = uniform(1, 0, 0)  -- Start along easy axis

-- Apply external field along different angles
B_ext = vector(0.1, 0, 0)
relax()
tablesave()

```

**Result:** Extract **energy barrier values** to confirm **high coercivity**.

---

## **What MuMax3 CANNOT Directly Compute**

MuMax3 works **at the micromagnetic scale** (~nm to µm). However, **some properties require atomic-scale calculations**, such as:

- **Electronic structure (e.g., Density Functional Theory for Curie temperature)**
- **Intrinsic anisotropy (DFT calculations needed for Ku1 values)**
- **Magneto-elastic effects (Requires coupled micromagnetic and structural modeling)**

**Solution:** Combine MuMax3 **(micromagnetic)** with **DFT calculations (quantum-scale)** from tools like **VASP, Quantum ESPRESSO, or Material Project data**.

---

## **Summary: What You Can Calculate in MuMax3**

| Property | Can MuMax3 Compute It? | Notes |
| -------- | ---------------------- | ----- |
| **Coercivity (**\(H_c\)**)** | ✅ Yes | Field sweep method |
| **Hysteresis Loop (**\(BH_{\max}\)**)** | ✅ Yes | Full magnetization cycle |
| **Magnetization Dynamics** | ✅ Yes | Time-dependent micromagnetics |
| **Domain Structures** | ✅ Yes | Relaxation + visualization |
| **Thermal Stability** | ✅ Yes | Random thermal noise modeling |
| **Curie Temperature (**\(T_C\)**)** | ⚠️ Indirectly | Requires extrapolating \(M_s(T)\) |
| **Anisotropy Energy** | ✅ Yes | Switching field method |
| **Electronic Structure** | ❌ No | Use **DFT (VASP, QE, etc.)** |

---

## **Final Thoughts**

MuMax3 is **great for micromagnetic modeling**, but **not for atomic-scale properties**. We should use:

- **MuMax3** → **Micromagnetic simulations** for coercivity, domain walls, hysteresis.
- **DFT (Quantum ESPRESSO, VASP, Materials Project)** → **Intrinsic material properties** like \(T_C\), \(K_u\), and \(M_s\).
