Problem in applying a radial current under SOT to an annular ring

19 views
Skip to first unread message

Payal Bhattacharjee

unread,
Jan 13, 2026, 12:59:23 AM (4 days ago) Jan 13
to mumax2
Hi everyone,
I wanted to apply a radial current in an annular region with the outer diameter of 300 nm and an inner diameter of 100 nm, and move the skyrmion along that track. Can someone help me determine whether the current has been applied correctly? I am trying to apply the snippet below for the motion of the skyrmion, but the skyrmion is not moving.

Thank you in advance.

*****CODE*****
// Spin-orbit torque parameters
SOTxi := -2
AlphaH := 0.15
Pol = AlphaH
Lambda = 1
Epsilonprime = AlphaH * SOTxi / 2

// Mask for the fixed layer (tangential polarization)
mask := newVectorMask(Nx, Ny, 1)
for i := 0; i < Nx; i++ {
    for j := 0; j < Ny; j++ {
        r := index2coord(i, j, 0)
        x := r.X()
        y := r.Y()
        phi := atan2(y, x)
        Rval := sqrt(x*x + y*y)
       
        // Only in the annular region
        if Rval > Ri && Rval < Rc {
            mask.setVector(i, j, 0, vector(-sin(phi), cos(phi), 0))
        }
    }
}
fixedlayer.Add(mask, 1)

Jmask := newVectorMask(Nx, Ny, 1)

for i := 0; i < Nx; i++ {
    for j := 0; j < Ny; j++ {
        r := index2coord(i, j, 0)
        x := r.X()
        y := r.Y()
        phi := atan2(y, x)
        Rval := sqrt(x*x + y*y)
       
        // Only in the annular region
        if Rval > Ri && Rval < Rc {
            Jmask.setVector(i, j, 0, vector(cos(phi), sin(phi), 0))
        }
    }
}

J.Add(Jmask, -1e11)

// Output
autosave(m, 10e-12)  
tableAutosave(10e-12)

run(10e-9)

Josh Lauzier

unread,
Jan 13, 2026, 1:23:01 AM (4 days ago) Jan 13
to mumax2
Hi,

J is being applied. You can view it from the GUI (it will show values even for J.Add()):

mmhelp.jpg
However- the rest of your code mentions SOT. One thing to keep in mind if you are reusing the built-in Slonczewksi STT to model SOT, it is only sensitive to J_z. J_x and J_y will have no effect. This is a limitation with how Slonczewski STT is implemented in mumax. You will either need to refactor the expression to be in terms of an equivalent J_z, or use custom fields instead of the built-in Slonczewski STT.

Cheers,
Josh L.

Payal Bhattacharjee

unread,
Jan 13, 2026, 2:25:34 AM (4 days ago) Jan 13
to mum...@googlegroups.com
Dear Josh,
Is the code below the correct snippet for applying a radial current to an annular region?
Thank you in advance.

****CODE****
// STT-as-SOT parameters

SOTxi := -2
AlphaH := 0.15
Pol = AlphaH
Lambda = 1
Epsilonprime = AlphaH * SOTxi / 2

// Jz defines the STT magnitude (acts as effective SOT)
J = vector(0, 0, AlphaH * 2e11)   // torque magnitude

// Fixed layer mask (tangential polarization in annulus)

mask := newVectorMask(Nx, Ny, 1)
for i := 0; i < Nx; i++ {
    for j := 0; j < Ny; j++ {
        r := index2coord(i, j, 0)
        x := r.X()
        y := r.Y()
        Rval := sqrt(x*x + y*y)

        if Rval > Ri && Rval < Rc {
            phi := atan2(y, x)

            // Tangential polarization

            mask.setVector(i, j, 0, vector(-sin(phi), cos(phi), 0))
        } else {
            // Outside the ring → zero polarization → no torque
            mask.setVector(i, j, 0, vector(0,0,0))
        }
    }
}
fixedlayer.Add(mask, 1)

// Initial magnetization
m = uniform(0, 0, 1)


// Output
autosave(m, 10e-12)
tableAutosave(10e-12)

// Run simulation
run(10e-9)

--
You received this message because you are subscribed to the Google Groups "mumax2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mumax2+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/mumax2/344dbf18-0609-417b-b7fb-0463af11e2f0n%40googlegroups.com.

Josh Lauzier

unread,
Jan 14, 2026, 2:20:32 AM (3 days ago) Jan 14
to mumax2
Hi,

That looks ok to me. The signs will depend on your material (whether alpha_H is positive or negative) and definition of n_hat (whether the HM is above or below the FM layer). This should be correct for a material with positive alphaH, and the HM is above the FM (so n_hat=(0,0,-1)). If your HM is below the FM, the signs should be flipped to +sin(phi), -cos(phi)

Best regards,
Josh L.

Payal Bhattacharjee

unread,
Jan 14, 2026, 2:23:46 AM (3 days ago) Jan 14
to mum...@googlegroups.com
Thank you, Josh, for the confirmation and clarification. 

Reply all
Reply to author
Forward
0 new messages