suffering in a two ellipse problem

30 views
Skip to first unread message

Ankit Saha

unread,
Jun 15, 2026, 1:53:16 AMJun 15
to mumax2
Dear all,
   I have a configuration where two ellipse ( 60nm x 20nm x 1nm) .Whose centers are separated by 150nm.Now I am finding B_demag for different values of minor axis. Suppose for 60nm x 20nm case, the energy is minimum when the magnetization of both ellipse are in same direction. But when for same values of minor axis (ex:- 20nm) it is giving parallel magnetization and for other values of minor axis(ex:- 25nm) it is giving anti-parallel magnetization. Now for case of the circle, how I get the magnetization direction corresponding to minimum energy? please help
My code:-

nx:=384
ny:=256
nz:=64

SetGridSize(nx, ny, nz)
SetCellSize(1e-9, 1e-9, 1e-9)


e1:= ellipse(60e-9,30e-9).transl(75e-9,0,0)
e2 := ellipse(60e-9,30e-9).transl(-75e-9, 0, 0)
shape := e1.Add(e2)
geo:= shape.Intersect(Layer(nz/2-1))
SetGeom(geo)

Msat=0.8e6
Aex=10e-12
alpha=0.1

m=randomMag()
relax()
save(m)
save(B_demag)
  

Josh Lauzier

unread,
Jun 24, 2026, 9:34:23 PM (9 days ago) Jun 24
to mumax2
Hi,

I think this problem is difficult in general, due to the symmetry. The solver is going to have a very hard time determining which state is the minimum. Early on in the relaxation, it won't have a good way to know if parallel or anti-parallel will ultimately be lower energy, and might get stuck in a local minimum. A couple things you can try:

1) Apply a very very weak external field, slightly canted. However, given how degenerate this problem is, this alone might introduce a bias towards parallel or antiparallel. You can also try applying some randomness via say temperature, but that would require to use run() which is rather slow compared to relax()


2) If you know that the end states are supposed to be, you can try starting with a state closer to the final state, instead of random. For instance, you can initialize them in a parallel or anti-parallel state (or close, it does not have to exact. You can do e.g. (1,1,0). Or test both. You can save the total energy or average energy density to verify which is a lower energy. This requires you to have some idea of what the final state should be, however. If you absolutely must start from a random magnetization, I would recommend varying the RNG seed, and run many simulations, and take a statistical approach. (For an example of this, you can look to Standard problem 3, in the mumax paper "the design and verification of mumax3". To verify the flower state, they use ~3000 different random initializations). The final result is likely to be sensitive to the initial distribution of magnetization.

Cheers,
Josh L.
Reply all
Reply to author
Forward
0 new messages