/***************************************************************** Description: This mumax3 script demonstrates a for loop to find a low energy state as function of size for a spherical magnetic nanoparticle. This file is written for the LINXS workshop organised in Spring 2021. Author: Dr. Jonathan Leliaert (jonathan.leliaert@ugent.be) ******************************************************************/ N := 64 setgridsize(N,N,N) Dmin := 40e-9 Dmax := 160e-9 Dstep := 5e-9 D := Dmax setcellsize(D/N,D/N,D/N) Msat = 400e3 Aex = 10e-12 Ku1 = 1e4 anisU = vector(0,0,1) m= vortex(1,1) tableadd(E_total) tableaddvar(D,"D","m") for D=Dmax; D>=Dmin; D-=Dstep{ setcellsize(D/N,D/N,D/N) setgeom(ellipsoid(D,D,D)) minimize() save(m) tablesave() }