/***************************************************************** Description: This mumax3 script computes the total energy of a relaxed vortex and quasi uniform state in a ferromagnetic equilateral square pyramid as a function of its side length. This file is written for the mumax3 workshop organised for the spintronic seminar series in the summer of 2020. For more information go to https://www.mumax.ugent.be/mumax3-workshop Authors: Dr. Jonathan Leliaert (jonathan.leliaert@ugent.be) Dr. Jeroen Mulkers (jeroen.mulkers@ugent.be) ******************************************************************/ Nx := 64 Nz := 32 setgridsize(Nx,Nx,Nz) Msat = 800e3 Aex = 13e-12 Eflower := 0.0 Evortex := 0.0 L := 0.0 tableAddVar(L,"L","m") tableAddVar(Eflower,"Eflower","J") tableAddVar(Evortex,"Evortex","J") for L=50e-9 ; L <= 100e-9; L+=2e-9 { height := L/sqrt(2) // pyramid height angle := atan(sqrt(2)) // dihedral angle setcellsize(L/Nx,L/Nx,height/Nz) s1 := zrange(-inf,0).rotY( angle) s2 := zrange(-inf,0).rotY(-angle) s3 := zrange(-inf,0).rotX( angle) s4 := zrange(-inf,0).rotX(-angle) pyramid := s1.intersect(s2).intersect(s3).intersect(s4) // move the top of the pyramid to the top of the simulation box // and add 10% of the cell size in the z direction to avoid rounding errors dz := height/2 + 0.1*height/Nz pyramid = pyramid.transl(0,0,dz) setgeom(pyramid) m = uniform(1,0,1) minimize() Eflower = E_total.get() m = vortex(1,-1) minimize() Evortex = E_total.get() tablesave() }