/***************************************************************** Description: This mumax3 script computes the hysteresis curve of a 2D system with a complex geometry. 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) ******************************************************************/ //square thin-film mesh with 1600 nm side length SetMesh(512, 512, 1, 3.125e-09, 3.125e-09, 20e-09, 0, 0, 0) //permalloy like material parameters Msat = 800e3 Aex = 1e-11 alpha = 0.01 //add drawing of real sample real:= imageShape("drawing.png").scale(1, 0.5, 1.).transl(0, -400e-9, 0) //define 6 perfect circles perfect := circle(350e-9).repeat(600e-9, 400e-9, 0).transl(0, 200e-9, 0).intersect(yrange(0, inf)) //set the geometry setgeom(perfect.add(real)) //define 2 regions, default region =0 defregion(1, yrange(0,inf)) defregion(2, circle(400e-9).transl(550e-9, -600e-9, 0)) //set material parameters in regions Ku1.setregion(1,2e4) anisu.setregion(1,vector(1,0.1,0)) Aex.setregion(2,2e-11) msat.setregion(2,400e3) //set initial magnetization in regions or shapes //default = randommag m.setinshape(real, uniform(1, 0, 0)) m.setregion(2, vortex(1, 1).transl(550e-9, -600e-9, 0)) //relax the magnetization in saturated state B_ext=vector(0.1,0,0) tableadd(B_ext) relax() H_min := -0.1 H_max := 0.1 H_step := 0.002 //ramp the field down for H:=H_max;H>=H_min;H-=H_step{ B_ext=vector(H,0,0) minimize() tablesave() snapshot(m) } //ramp the field up again for H:=H_min;H<=H_max;H+=H_step{ B_ext=vector(H,0,0) minimize() tablesave() snapshot(m) }