Hi All, I am currently learning MuMax and would like to start with a simple STT-MTJ switching example. My goal is to obtain the M–H and M–V characteristics of the MTJ. Could you please let me know if this code is correct?
// Geometry
SetGridsize(64,64,1)
SetCellsize(2e-9,2e-9,1.5e-9)
// Material parameters
Msat = 1.1e6
Aex = 15e-12
alpha = 0.02
Ku1 = 5e5 // PMA
// STT parameters
Pol = 0.6
SlonczewskiPolarizer = vector(0,0,1)
// M–H loop
tableadd(B_ext) // store applied field
tableadd(mz) // store mz
Hmin := -0.5 // Tesla
Hmax := 0.5 // Tesla
nsteps := 50
for i:=0; i<nsteps; i++ {
H := Hmin + (Hmax-Hmin)*float64(i)/float64(nsteps-1)
B_ext = vector(0,0,H)
m = uniform(0,0,1) // reset to +z before each field step
relax()
tablesave()
}
// 2) Magnetization vs STT Current
jmin := 1e10 // A/m^2
jmax := 1e12 // A/m^2
nstepsJ := 20
pulseDuration := 100e-9
for i:=0; i<nstepsJ; i++ {
m = uniform(0,0,1) // reset to +z before each run
B_ext = vector(0,0,0) // no external field
j = jmin + (jmax-jmin)*float64(i)/float64(nstepsJ-1)
run(pulseDuration) // apply pulse
tablesave()
}
save(m)