Description
The Slonceswski spin torque in MuMax is defined as
tau = (A - alpha B) / (1+alpha^2) m x p x m + (B - alpha A)/(1+alpha^2) p x m
with
A = beta epsilon
B = beta epsilon_prime
I believe the first coefficient should be (A + alpha B). Please allow me to illustrate the issue.
The following python script determines the damping-like and field-like coefficients of the explicit LLGS, commonly called a_j and b_j, for a film thickness of 1 nm, Ms = 1e6, Lambda = 1. It just finds the field that one has to apply to keep the magnetization aligned in the out-of-plane direction.
import numpy as np
import sys
def exec_command(command,verbose=False):
'''
Execute a command on the shell and return the standard output and
the standard error as a result. The function will not return before
the command has been executed and finished.
Paramters
---------
command : string
Command (bash) to be executed
verbose : bool
It True, the command, the standard output and the standard error
are printed to the terminal.
Returns
-------
A tuple (standard output, standard error)
'''
if(verbose):
print(command)
p = subprocess.Popen(
command,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
shell=True)
stdout, stderr = p.communicate()
if ( stdout and verbose):
print('process returned stdout:\n' + stdout)
if ( stderr and verbose):
print('process returned stderr:\n' + stderr)
return stdout,stderr
script = """
SetGridSize(1, 1, 1)
SetCellSize(1e-6, 1e-6, 1e-9)
Msat = 1e6
Aex = 1e-11
alpha = 0.5
m = Uniform(0, 0, 1)
B_ext = vector({Bx}, {By}, 1)
DisableZhangLiTorque = True
EnableDemag = False
lambda = 1.0
Pol = {pol}
EpsilonPrime = {ep}
FixedLayer = vector(0.0, 1.0, 0)
OutputFormat = OVF1_TEXT
J = vector(0, 0, 1e12)
run(1e-9)
save(m)
"""
Bx=0
By=0
dx=0.1
dy=-0.1
signx=-1
signy=1
for i in range(20):
with open("tmp.mx3", "w") as text_file:
text_file.write(script.format(Bx=Bx,By=By,ep=sys.argv[1],pol=sys.argv[2]))
command = "mumax3 tmp.mx3"
exec_command(command)
m = np.genfromtxt("tmp.out/m000000.ovf")
print(Bx,By,m)
if m[0]*signx < 0:
dx /= -2
signx *= -1
if m[1]*signy < 0:
dy /= -2
signy *= -1
if np.abs(m[1]) < 1e-4:
dy = 0
Bx += dx
By += dy
print("SOT fields:")
print("mu_0 a_j = {:.3f} T".format(-Bx))
print("mu_0 b_j = {:.3f} T".format(-By))
The result for epsilon_prime = 0 (first parameter of the script, the second is the polarization)
python determine_mumax_SOT.py 0 1
SOT fields:
mu_0 a_j = -0.329 T
mu_0 b_j = 0.000 T
is exactly what we expect for a film thickness of 1 nm, Ms = 1e6, Lambda = 1. However, changing epsilon_prime to 1/4 decreases the DL torque a_j, which it should not:
python determine_mumax_SOT.py 0.25 1
SOT fields:
mu_0 a_j = -0.197 T
mu_0 b_j = 0.099 T`
This is not correct. We can achieve the correct result by scaling epsilon and epsilon_prime such that (A - alpha B) is actually (A + alpha B). This is achieved at a polarization of 5/3 and epsilon_prime = 5/12. Indeed, using these values, we get the expected result of an unchanged DL torque and a FL torque that is just half the DL torque (epsilon_prime = 1/4 corresponds to b_j = a_j / 2):
python determine_mumax_SOT.py 0.41667 1.6667
SOT fields:
mu_0 a_j = -0.329 T
mu_0 b_j = 0.165 T
Last comment: I believe there is a factor gamma missing in the documentation (should be tau = gamma ...).