mumax / 3

GPU-accelerated micromagnetic simulator
Other
447 stars 150 forks source link

run a script about stt switch current #304

Closed xzcwchen closed 2 years ago

xzcwchen commented 2 years ago

I am a new student ,when I run a script about switch current , i got the switch current and the could not switch current ,but when i set the could not switch current for the new script current, the current can get though(the new script only change the input current) , i also want get the for loop data and the m of the switch curruent but the table can not list each loop from t=0 ,script: SetGridsize (32,32,7) SetCellsize(2e-9,2e-9,0.4e-9) convfreelayer :=cylinder(50e-9, 2.8e-9) setgeom(cylinder(50e-9,2.8e-9)) saveas(geom, "convfreelayer") defRegion(0,cylinder(50e-9,2.8e-9)) Ku1.setregion(0,0.857e6) Aex.setregion(0,3e-11) fixedlayer=vector(0,1,10) lambda=1 epsilonprime = 0.07 Pol=0.93 alpha=0.01 Msat=1.26e6 m = uniform(1, 0, 0) Temp= 300 relax() saveas(m,"../m0") flush() jxstep:=0.1e11 cutofftime :=2e-8 mz:=m.Comp(2)
tableadd(J) tableadd(E_total) tableadd(E_exch) autosave(m.comp(2),0.01e-8) autosave(m,0.01e-8) tableautosave(0.002e-8)

for jx :=10e11;jx>=0.1e11; jx-= jxstep{ J =vector(0,0,-jx)
print("set current density:",jx , "A/m2") m.loadfile("m0.ovf")
t =0 tablesave() RunWhile(mz.average()<0.9&&mz.average()>-0.9&&t<cutofftime ) if(abs(mz.average())>=0.9 ){print("jx can switch after",t*1e9,"ns") }else{ print("jx can not switch") exit() } }