Seeking Help with Magnetoelectric Coupling Simulation in Mumax3

121 views
Skip to first unread message

juan li

unread,
Sep 17, 2025, 9:21:37 AMSep 17
to mumax2
Dear everyone,

 I am currently working on simulating ferromagnetic resonance (FMR) in thin films under tensile-bending or compressive-bending strains using the magnetoelastic coupling module in Mumax3. The displacement field of the bent film, which resembles the attached figure, is imported from COMSOL software.

After performing a field-swept frequency simulation in Mumax3, I process mx(t) with FFT to obtain the FMR frequency. I expect the FMR frequency to change monotonically with continuously varying strain. However, the results I have obtained do not meet this expectation.

Attached are the simulation script and a figure showing the relationship between the obtained FMR frequency and the film's curvature.

I am unsure whether the issue lies with the magnetoelastic coupling module or my simulation script. I would greatly appreciate any insights or suggestions you may have.

Thank you in advance for your time and assistance.

Best regards,

Juan L
fmrTr.pngthin film .pngfr-R^-1.png

Josh Lauzier

unread,
Sep 19, 2025, 3:30:37 AMSep 19
to mumax2
Hi,

The main issue I see is that you never set the solver. To use the ME solver, you need to set it explicitly using setsolver(9), this is not set by default.

Otherwise, it mostly looks ok. I don't totally follow what you are trying to do with region 2, and why you're freezing the displacement to be 0 there? This is carving out a cuboid of 500e-9 nm by 50 nm by 50 nm that will be unstrained. It seems like you might want frozendisploc instead?

Last, two minor details- unfortunately, relax() and minimize() were not updated with the ME module. If you want to relax the system you need to do it with run(). ( If you plan to run this script multiple times, what i would recommend is to do a single sufficiently long run(), save the result, and then load it in using m.loadfile and u.loadfile as your initial state).

Also, lambda refers to the lambda Slonczewski parameter, it is not a magnetostrictive coefficient. You can only set those via B1 and B2 (you can convert lambda to B1/B2, see here)

Best,
Josh L.

juan li

unread,
Sep 25, 2025, 3:21:46 AMSep 25
to mumax2
Dear Josh,
Thank you very much for your response. I tried the solver settings you mentioned and after running it separately for a while, I imported m and u as the initial state for recalculation. But the ferromagnetic resonance frequencies under different displacement fields became the same.
The bending method I set is to fix the middle of the film, stretching or compressing both ends of the film to achieve a certain radius of curvature.
And I want the bent state to remain unchanged during the operation in mumax3. How can I keep the displacement field in its initial state without changing during the operation in mumax3?
FrozenDispVal can only be set as a vector field, is there any other way?
Sincerely,
Juan L.

Josh Lauzier

unread,
Oct 15, 2025, 5:57:33 AMOct 15
to mumax2
Hi,

I believe you need to use frozendisploc instead of FrozenDispVal. The former locks the displacement, the latter sets it to a value. See this section of the magnetoelasic paper:

The parameter frozenDispLoc defines a region with fixed displacement, and the parameter FrozenDispVal defines the fixed displacement value. This works in the same way as the regular frozenspins function in MuMax3, which fixes the spins in a specific region. However, spin (magnetic moment) has always the same norm, whereas the norm can vary for the displacement. Therefore, the additional function FrozenDispVal has been defined paper

You should be able to import your displacement, and lock the region that way.

Best regards,
Josh L.

juan li

unread,
Oct 21, 2025, 6:12:58 AMOct 21
to mumax2
Dear Josh,
Thank you for your patient response. I tried importing the displacement field u and then fixing it, but the results show that FrozenDispLoc did not hold it in place. The displacement field u did not remain consistent with the initial value; instead, it became very small, almost zero. It seems that the use of FrozenDispLoc defaults frozenDispVal to zero. I attempted placing FrozenDispLoc in different positions, but the results were the same. Below are screenshots of my code and the imported "Tr=1.5mm.ovf" file, as well as the "u000005.ovf" file after running for 10 ns. I am unsure where the issue lies—could it be due to the imported displacement being too large? I hope to receive your guidance once again.
Best wish,
Juan L.
u000005.ovf.png
Tr=1.5mm.ovf.png
log.txt
Reply all
Reply to author
Forward
0 new messages