Skip to content

Magnetic models: Jiles-Atherton hysteresis

Pulsim has one Jiles-Atherton (JA) law, used in two places:

entry point what it does
pulsim.add_hysteretic_inductor(builder, name=, from_node=, to_node=, params=, N_turns=, l_m=, A_core=, l_gap=0, M0=0) a hysteretic-core inductor solved inside the Newton loop: M is integrated from the committed (H, M) to the field the trial current sets, and the Jacobian carries the exact L = dλ/di
HystereticInductor.bh_loop(res, period=) replays that device's own integrator on the simulated current: the H, M, B the solver used, and the loop area
pulsim.compute_bh_loop(current, times, params=, N_turns=, l_m=, A_core=, period=) post-processing: runs the same law on any current trace (a linear inductor's, a measurement)
pulsim.JilesAthertonModel(params).update(H, dt) the law one step at a time

The tutorial Magnetic networks puts a JA segment in a reluctance network (add_hysteretic_permeance).

The law

With He = H + α·M and M_an = Ms·L(He/a) (L the Langevin function):

dM/dH = (1 − c)·dM_irr/dH + c·(dM_an/dHe) / (1 − c·α·dM_an/dHe)
dM_irr/dH = (M_an − M) / (k·δ − α·(M_an − M)),  δ = sign(dH)

with Jiles' guard: the irreversible part only moves M toward the anhysteretic curve (it is zero when (M_an − M)·δ ≤ 0), and dM/dH ≥ 0. M is integrated by RK4 in sub-steps of at most a/4, at least eight per step, and clamped to ±Ms. B = μ0·(H + M).

Parameters (pulsim.JilesAthertonParams(Ms, a, alpha, c, k)): Ms saturation magnetisation (A/m), a anhysteretic shape (A/m), alpha mean-field coupling, c reversibility (0–1), k pinning (A/m, wider loop = more loss). alpha·Ms must stay below 3a. Four illustrative sets ship: pulsim.list_reference_materials().

Accuracy

Against a fine-step reference of the guarded ODE above (sub-steps of a/2000, probes/ja_integrator_convergence.py), at 400 samples per cycle the loop area, remanence and coercivity agree to 0.05 % on a 10a major loop and a 0.5a minor loop (si_steel_m19, ferrite_n87); at 100 samples per cycle to 0.6 %. Until 2026-11 JilesAthertonModel and compute_bh_loop used forward Euler without the guard, which gave a loop area 24–64 % low on the major loop (step error), 19–73 % high on the minor loop (the missing guard: a different law), and a negative area on some permalloy loops.

A loop family

The loop area is the hysteresis loss per cycle and unit volume (J/m³). It grows with the drive and saturates:

import numpy as np
import pulsim as p

f = 100e3
t = np.linspace(0, 5 / f, 5 * 400 + 1)
params = p.reference_material("ferrite_n87")
for H_pk in (30, 100, 300, 1000):
    r = p.compute_bh_loop(H_pk * np.sin(2 * np.pi * f * t), t, params=params,
                          N_turns=1, l_m=1.0, A_core=1.0, period=1 / f)
    print(f"H_pk {H_pk:5d} A/m: B_pk {abs(r.B).max():.3f} T, "
          f"loss {r.energy_per_cycle_per_m3:6.2f} J/m3 per cycle")

Expected output:

H_pk    30 A/m: B_pk 0.048 T, loss   1.32 J/m3 per cycle
H_pk   100 A/m: B_pk 0.222 T, loss  21.50 J/m3 per cycle
H_pk   300 A/m: B_pk 0.413 T, loss  49.46 J/m3 per cycle
H_pk  1000 A/m: B_pk 0.478 T, loss  57.96 J/m3 per cycle

Limits

  • H, M, B of the in-loop device are not result channels: read them with HystereticInductor.bh_loop(res). dM/dH is not exposed.
  • The in-loop device holds the step's direction δ from the previous step (a Newton iterate on a loop reversal would otherwise bounce between the two branches), so a step that reverses moves M along the old branch for that one step: an O(dH) error at the loop tips (0.02–0.6 % of the loop area at 100 steps per cycle). JilesAthertonModel uses each step's own direction.
  • There is no separate backward-Euler path near saturation.