Dear Mumax community,
I’m currently working on a project using MuMax3 with magnetoelastic extension to study the gyration modes of magnetic vortices under applied stress. My research approach is inspired by the well-known paper “Excitation of the Gyrotropic Mode in a Magnetic Vortex by Time-Varying Strain”. However, I’ve encountered an issue where my simulation code outputs garbled/incorrect results (e.g., unexpected behavior or incorrect data).
// MuMax3 script for CoFeB disk with radius R = 100 nm and thickness t = 20 nm
// Static magnetization simulations
//Specify output format
OutputFormat = OVF2_TEXT
//mesh
R := 100e-9 //
d := 20e-9 //
Nx := 128 //
Ny := 128 //
Nz := 1 //
dx := 2 * R / Nx
dy := 2 * R / Ny
dz := d / Nz
SetMesh(Nx, Ny, Nz, dx, dy, dz, 0, 0, 0)
//set geometry
disk := circle(R)
setgeom(disk)
save(geom)
//Elastic parameters CoFeB
C11 = 283e9 //
C12 = 166e9 //
C44 = 58e9 //
rho = 8e3
//Magnetoelastic parameters CoFeB
B1 = -8.8e6
B2 = -8.8e6
//Magnetic parameters CoFeB
Msat = 1.7e6 //
Aex = 21e-12 //
alpha = 8e-3 //
//initial state
m.loadfile("100mT.ovf")
saveas(m, "100mT")
//B
B_ext = vector(100e-3, 0, 0)
//strain
exx = 1000e-6
SetSolver(9)
minimize()
SaveAs(m,"100mT_exx=1000e-6")

Hi Josh,
Thank you so much for your detailed response and for pointing out these key adjustments!
I didn’t realize that minimize() wouldn’t work with the magnetoelastic module. Switching to run() and setting a fixdt as mandatory makes a lot of sense now. I’ll make sure to implement that.
Thank you again for your previous advice—it was incredibly helpful!I have another question I’d like to ask you regarding the magnetoelastic module. I tried applying stress as input to the system, but it doesn’t seem to have any effect. Is there a specific way to input stress in the magnetoelastic module that I might be missing?
Looking forward to your guidance!
Here is my code:
m.loadfile("100.ovf")
u=uniform(0,0,0)
saveas(m, "initial")
//strain
exx=250e-6
eyy=0
ezz=0
exy=0
exz=0
eyz=0
//Output
save(m)
save(normstrain)
Best,
Han lu.