Seeking assistance regarding spin-wave excitation.

121 views
Skip to first unread message

纪家清

unread,
Dec 12, 2025, 11:16:26 AM12/12/25
to mumax2

Hello everyone,
I am currently attempting to reproduce the phenomena described in the paper "Tuning magnonic devices with on-chip permanent micromagnets." However, I have encountered some issues during the simulation process. Below is my Mumax3 code for reference,along with a comparison of my results with those from the paper.

sizeX := 40e-6

sizeY := 1.8e-6

sizeZ := 25e-9

Nx := 400

Ny := 18

setgridsize(Nx, Ny, 1)

setcellsize(sizeX/Nx, sizeY/Ny, sizeZ)

defregion(1,xrange(-14e-6,-12e-6))

defregion(2,xrange(-20e-6,-14e-6))

defregion(3,xrange(-12e-6,20e-6))

Msat  = 1229e3

Aex   = 14.3e-12

alpha = 5.11e-3

anisU = vector(0, 1, 0)

Ku1   = 12.5e3

m     = uniform(0, 1, 0)

relax()

OutputFormat = OVF2_TEXT

tableAdd(B_ext)

autosave(m, 3e-11)

tableautosave(3e-11)

SetSolver(2)

B_ext = vector(0, 0.06, 0)

B_ext.setRegion(1,vector(2*sin(2*pi*9.25e9*t),0.06,0))

run(90e-9)

图片1.png

As shown in the figure, only the dispersion relation results are in reasonable agreement with those reported in the literature. In contrast, all other results exhibit significant discrepancies compared to the data presented in the paper. What could be the potential issues with my code? Any guidance or suggestions would be greatly appreciated.

Антон Луценко

unread,
Dec 17, 2025, 6:50:31 AM12/17/25
to mumax2
Hi, there's several comments to be made here:
1. SetSolver(2) – is there any specific reason you want to use this one? The default one should have better accuracy.
2. Default error margin is usually too big for spin-wave dynamics. Use MaxErr = 1e-7 for better results.
3. Main culprit is here:  B_ext.setRegion(1,vector(2*sin(2*pi*9.25e9*t),0.06,0)). The amplitude of the excitation field seems to be 2 (in Tesla units), which is gigantic. Try instead with the small field, e.g. 2e-4:
B_ext.setRegion( 1, vector( 2e-4*sin(2*pi*9.25e9*t), 0.06, 0 ) )
Another source of discrepancy would be using uniform field for excitation rather than simulated Oersted field, but that would impact the modes you excite and efficiency of excitation rather than your main issue.
Implementing absorbing boundary conditions is another direction to improve the simulation, but again the excitation field amplitude needs to be fixed first.
Hope this helps!

Josh Lauzier

unread,
Dec 18, 2025, 3:05:45 AM12/18/25
to mumax2
Hi,

I think Anton covered the important parts (especially the amplitude of the excitation). Three other details I would add:

The cellsize is extremely large. Typically for micromagnetics you want cellsizes that are about half the exchange length. For your geometry, this seems like it'll be a lot of cells so it may be difficult/slow, but it is something to be careful about. The paper also seems to use this same large cell size, so I suppose if you're only trying to recreate their result it is ok. I think it may make your simulation sensitive to things like how you initialize m, though. (To be honest, you probably need to be careful how you intialize m regardless. Your system is not fully dominated by the uniaxial anisotropy).

Second, when you relax the film, you probably want the DC part of the external field already applied. Otherwise it will be as if it is just turned on at t=0, and you'll get some transient noise from that.

Last, skimming the paper, it only says the the uniaxial anisotropy is "in-plane". It is not clear to me if this means the y direction. Around Fig S2, they seem to mention that it is 22 degrees off of the (1,1,0) crystal axis.

Best,
Josh L.

纪家清

unread,
Dec 19, 2025, 3:10:24 AM12/19/25
to mumax2

Thank you very much for the guidance from all the seniors. I used setsolver(2) because a previous spin wave simulation code employed this setting, and I built upon that code for my modifications. I tried removing this line, but it didn't produce significant changes. Since I'm not entirely clear about the specific differences between the various solvers, I kept it. I used an amplitude of 2 T because, with a smaller amplitude, I couldn't obtain the dispersion relation shown in the figure—it only excited spin waves corresponding to the input frequency of 9.25 GHz. The specific simulation code and results are as shown in the figure below.

图片1.png

Recently, I've begun to suspect that my initial magnetization results might be incorrect. This is because, in the latest article by the paper's author, he reported his initial magnetization results, as shown in the figure. I don't understand why his magnetization results indicate that the magnetic moment is perpendicular to the waveguide boundary, whereas in other related simulations I've found, due to the demagnetizing field, the magnetic moment tends to align parallel to the boundary. Could someone please advise under what circumstances such a result might occur?

图片1.png

Regarding the anisotropy axis, the simulation device layout at the end of the paper indicates that his anisotropy axis points in the y-direction. I've tried changing the direction of the anisotropy axis to achieve a result where the magnetic moment is perpendicular to the waveguide boundary, but it still wasn't correct. At present, I am also studying how to use COMSOL to simulate the magnetic field distribution of the coplanar waveguide described in the article, but I am still in the learning process.

Once again, thank you very much to all the seniors for your guidance. I am truly grateful for any further suggestions you may have.



Антон Луценко

unread,
Dec 19, 2025, 8:21:51 AM12/19/25
to mumax2
Naturally, harmonic excitation doesn't produce a dispersion, because it's supposed to only excite one frequency. The reason why you are seeing the dispersion in your simulation is because the gigantic 2T field completely remagnetizes your local region. 

To see the dispersion, people here usually employ a broadband sinc pulse. I suggest you try the same: replace 2 * sin(...) with 2e-4 * sinc(2*pi*15e9*(t-1e-9)) and repeat the simulation. 

纪家清

unread,
Dec 21, 2025, 3:53:02 AM12/21/25
to mumax2

Thank you for your reply. I have proceeded with the excitation function you suggested: 2e-4 * sinc(2pi15e9*(t-1e-9)). Attached are the calculation results.

图片1.png

The results show a primary spin wave excitation peak at 15 GHz. However, similar dispersion curves were also obtained at other frequency components. Is this behavior typical for this type of excitation function, or might it indicate an area for refinement in the setup?

I would greatly appreciate your insights or suggestions on how to interpret these results or improve the simulation.

Best regards,

Ji jiaqing

Антон Луценко

unread,
Dec 23, 2025, 9:53:43 AM12/23/25
to mumax2
Hi,
If you'd post your modified scripts, it would be easier to locate the issue. The post-processing is important as well (i.e. how exactly you obtain the spectrum and the dispersion), but the main issues would arise from the simulation.
Usually, sinc pulse does not produce a peak at its cut-off frequency. The dispersion curves you see are kind of expected from the sinc pulse having all frequencies below the cut-off frequency.
A way to further improve the simulation is to increase the length of the simulation area along X dimension, increasing the number of cells while keeping the cellsize. That should increase the resolution in kx-space. 
Ideally, you would have fairly long waveguide in X and use absorbing boundary conditions (to combat reflections) together with the PBC in X (to improve simulation speed and to remove the artifacts from demagnetization at the edges); with long enough length, even PBC of 1 would be enough. 

纪家清

unread,
Jan 6, 2026, 10:09:23 PM (5 days ago) Jan 6
to mumax2

Thank you for the insightful guidance from all three professors. Your suggestions proved extremely valuable and directly contributed to the significant improvement in my results. By employing sinc and sin functions in the simulation, I derived the spin wave dispersion relations and visualized the corresponding spin wave excitations across various modes. Below are the computational results I obtained. Attached is my code.

图片1.png

However, certain discrepancies remain when comparing my results with those reported in the literature. These differences may be attributed to the static magnetization profile within the waveguide. As Josh Lauzier pointed out, particular attention must be paid to the initialization of m. In the authors related work, Standalone Integrated Magnonic Devices, the initialization results are provided; yet it is unclear why, in his case, the magnetic moments at the boundaries remain perpendicular to the surface. This contrasts with most simulation outcomes I have observed, wheredue to the demagnetizing fieldmagnetic moments at boundaries typically align parallel to them.

I appreciate all group members for reading this, and I would be very grateful if someone could explain the reason behind the initialization distribution shown in the figure below.图片2.png

practice1.txt
Reply all
Reply to author
Forward
0 new messages