您好,欢迎访问三七文档
当前位置:首页 > 幼儿/小学教育 > 小学教育 > mumax的初步学习
ThepreliminarylearningofMumax3.92018.11.09目录•Thesoftwareofbeinglearned•Thefourexamples①theclassicmumagstandardproblem②PyRacetrack③Hysteresis④Geometry•ThefollowingworkThesoftwareofbeinglearned•Oringin9.1•OommfOOMMFisaprojectintheAppliedandComputationalMathematicsDivision(ACMD)ofITL/NIST,inclosecooperationwithµMAG,aimedatdevelopingportable,extensiblepublicdomainprogramsandtoolsformicromagnetics.Thiscodeformsacompletelyfunctionalmicromagneticspackage,withtheadditionalcapabilitytobeextendedbyotherprogrammerssothatpeopledevelopingnewcodecanbuildontheOOMMFfoundation.OOMMFiswritteninC++,awidely-available,object-orientedlanguagethatcanproduceprogramswithgoodperformanceaswellasextensibility.Forportableuserinterfaces,wemakeuseofTcl/TksothatOOMMFoperatesacrossawiderangeofUnix,Windows,andMacOSXplatforms.ThemaincontributorstoOOMMFareMikeDonahue,andDonPorter.•Mumax3.9mumax3isaGPU-acceleratedmicromagneticsimulationprogramdevelopedattheDyNaMatgroupofProf.VanWaeyenbergeatGhentUniversity.ThecodeiswrittenandmaintainedbyArneVansteenkiste.Aspeed-upoftheorderof100xcomparedtoCPU-basedsimulationscaneasilybereached,evenwithrelativelyinexpensivegamingGPUs.Additionally,thesoftwareisoptimizedforlowmemoryuseandcanhandleabout16millionFDcellswith2GBofGPURAM.Let‘sstartwiththeclassicµ-mag(Micromagnetic)standardproblem•SetGridsize(128,32,1)//SetsthenumberofcellsforX,Y,Z•SetCellsize(500e-9/128,125e-9/32,3e-9)//SetstheX,Y,Zcellsizeinmeters•Msat=800e3//saturationmagnetization•Aex=13e-12//Exchangestiffness(J/m)•alpha=0.02//Landau-Lifshitzdampingconstant•m=uniform(1,.1,0)//Uniformmagnetizationingivendirection•relax()•//Thisfunctionassumesallexcitationshavebeenturnedoff(temperature,electricalcurrent,time-dependentmagneticfields).•save(m)//relaxedstate•autosave(m,200e-12)//Autosavespace-dependentquantityeveryperiod(s).•tableautosave(10e-12)//Auto-savethedatatableeveryperiod(s).•B_ext=vector(-24.6E-3,4.3E-3,0)//Externallyappliedfield(T)•run(1e-9)//Run(time)runsthesimulationforagiventimeinsecondsxyzcell,基元500nmm=uniform(1,0.1,0)m=uniform(1,1,0)m=uniform(0,0,1)relax()m000000m000001m000002m000003m000004m000005m000006Theconditionofevery200e-12sB_ext=vector(-24.6E-3,4.3E-3,0)//unit(T)m.svg0.00.20.40.60.81.0-1.0-0.50.00.51.0Magnetization(Norm.)t(ns)MxMyMzPyRacetracksetGridSize(256,64,1)//setGridSize(256,64,1)setCellSize(3e-9,3e-9,10e-9)//SetstheX,Y,ZcellsizeinmetersMsat=860e3//saturationmagnetizationAex=13e-12//Exchangestiffness(J/m)Xi=0.1//Non-adiabaticityofspin-transfer-torquealpha=0.02//Landau-Lifshitzdampingconstantm=twodomain(1,0,0,0,1,0,-1,0,0)//Twodomainmagnetizationwithwithgivenmagnetizationinleftdomain,wall,andrightdomainnotch:=rect(15e-9,15e-9).RotZ(45*pi/180).transl(0,32*3e-9,0).inverse()setGeom(notch.Repeat(200e-9,64*3e-9,0))//Setsthegeometrytoagivenshape//Removesurfacechargesfromleft(mx=1)andright(mx=-1)sidestomimicinfinitelylongwire.Wehavetospecifytheregion(0)attheboundaries.BoundaryRegion:=0MagLeft:=1MagRight:=-1ext_rmSurfaceCharge(BoundaryRegion,MagLeft,MagRight)//Compensatemagneticchargesontheleftandrightsidesofanin-planemagnetizedwire.Arguments:region,mxonleftandrightside,resp.relax()ext_centerWall(0)//keepm[0](m_x)closetozero//Scheduleoutputautosave(m,50e-12)tableadd(ext_dwpos)//domainwallpositiontableautosave(10e-12)//Runthesimulationwithcurrentthroughthesamplepol=0.56J=vector(-10e12,0,0)Run(0.5e-9)xyz256*3nmcell,基元notch:=rect(15e-9,15e-9).inverse()setGeom(notch.Repeat(200e-9,64*3e-9,0))notch:=rect(15e-9,15e-9).RotZ(45*pi/180).inverse()setGeom(notch.Repeat(200e-9,64*3e-9,0))notch:=rect(15e-9,15e-9).transl(0,32*3e-9,0).inverse()setGeom(notch.Repeat(200e-9,64*3e-9,0))notch:=rect(15e-9,15e-9).RotZ(45*pi/180).transl(0,32*3e-9,0).inverse()setGeom(notch.Repeat(200e-9,64*3e-9,0))m=twodomain(1,0,0,0,1,0,-1,0,0)m000000m000001m000002m000003m000004m000005m000006m000007m000008m000009m0000010Theconditionofevery50e-12sm.svg0.00.10.20.30.40.5-0.020.000.020.040.060.080.100.120.140.160.18Magnetization(Norm)t(ns)MxMyMz0.00.10.20.30.40.50.00.51.01.52.02.53.0ext_dwpos(*e-7m)t(ns)ext_dwposext_dwpos.svgm000000m000001m000002m000003m000004m000005m000006m000007m000008m000009m0000010Theconditionofevery50e-12sDeleteext_centerWall(0)//keepm[0](m_x)closetozerospin-transfertorque0.00.10.20.30.40.5-0.10.00.10.20.30.40.50.60.70.8Magnetization(Norm)t(ns)MxMyMz0.00.10.20.30.40.5-0.020.000.020.040.060.080.100.120.140.160.18Magnetization(Norm)t(ns)MxMyMzHysteresisSetGridsize(128,32,1)//SetsthenumberofcellsforX,Y,ZSetCellsize(4e-9,4e-9,30e-9)//SetstheX,Y,ZcellsizeinmetersMsat=800e3//saturationmagnetizationAex=13e-12//Exchangestiffness(J/m)m=randomMag()//Randommagnetizationrelax()//high-energystatesbestminimizedbyrelax()Bmax:=100.0e-3Bstep:=1.0e-3MinimizerStop=1e-6//StoppingmaxdMforMinimizeTableAdd(B_ext)forB:=0.0;B=Bmax;B+=Bstep{B_ext=vector(B,0,0)minimize()//smallchangesbestminimizedbyminimize()tablesave()}forB:=Bmax;B=-Bmax;B-=Bstep{B_ext=vector(B,0,0)minimize()//smallchangesbestminimizedbyminimize()tablesave()}forB:=-Bmax;B=Bmax;B+=Bstep{B_ext=vector(B,0,0)minimize
本文标题:mumax的初步学习
链接地址:https://www.777doc.com/doc-4264375 .html