# Xf_STT

The Xf_STT class was created to enable simulation of the injection of multiple spin currents into a ferromagnet in OOMMF.

The spin torque equation derived by Slonczewski [1] and modified by Xiao [2] is written as (as implemented in OOMMF):

$\frac{\partial\textbf{m}}{\partial t} = -|\gamma|\textbf{m}\times\textbf{H}_\text{EFF}+\alpha\textbf{m}\times\frac{\partial\textbf{m}}{\partial t}+\textbf{m}\times\textbf{STT}$
$\textbf{m}\times\textbf{STT} = \left|\gamma\right|\beta \left( \epsilon \left( \textbf{m}\times \textbf{m}_{p} \times \textbf{m} \right) - \epsilon'\left(\textbf{m}\times\textbf{m}_{p}\right) \right)$
$\textbf{STT} = \left|\gamma\right|\beta \left( \epsilon \left( \textbf{m}_{p} \times \textbf{m} \right) - \epsilon'\textbf{m}_{p} \right)$
$\textbf{H}_\text{STT} = \beta \left( \epsilon \left( \textbf{m} \times \textbf{m}_{p} \right) + \epsilon'\textbf{m}_{p} \right)$

According to the OOMMF user guide:

$\textbf{m}=\text{reduced magnetization,} \frac{\textbf{M}}{M_{sat}}$
$\gamma=\text{Gilbert gyromagnetic ratio}$
$\beta=\left|\frac{\hbar}{\mu_{0}e}\right|\frac{J}{tM_{sat}}$
$\textbf{m}_{p}=\text{(unit) electron polarization direction}$

$\gamma$ has a default value of $-2.211\times{}10^{5}~\text{m/A}\cdot\text{s}$. In the definition of $\beta$, $\hbar$ is the reduced Planck’s constant, $e$ is the electronic charge in C, $J$ is the current density exerting spin-torque in $\text{A/m}^{2}$, $t$ is the thickness of the free layer in meters in the direction which the current density is flowing, and $M_{sat}$ is the saturation magnetization in $\text{A/m}$. Note that $\beta$ may be rewritten as,

$\beta=\left|\frac{\hbar}{\mu_{0}e}\right|\frac{I}{M_{sat}Vol}$

where $I$ is the current flowing homogeneously into the magnetic cell in A, and $Vol$ is the volume of the magnetic cell in $\text{m}^{3}$.

$\epsilon$ and $\epsilon'$ gives the in-plane and out-of-plane spin-torque terms, respectively. As implemented in OOMMF,

$\epsilon=\frac{q_{+}}{A_{+}+A_{-}\left(\textbf{m}\cdot\textbf{m}_{p}\right)}+\frac{q_{-}}{A_{+}-A_{-}\left(\textbf{m}\cdot\textbf{m}_{p}\right)}$
$q_{\pm}=P_{fixed}\Lambda_{fixed}^2\sqrt{\frac{\Lambda_{free}^2+1}{\Lambda_{fixed}^2+1}}\pm P_{free}\Lambda_{free}^2\sqrt{\frac{\Lambda_{fixed}^2-1}{\Lambda_{free}^2-1}}$
$A_{\pm}=\sqrt{\left(\Lambda_{fixed}^2\pm 1\right)\left(\Lambda_{free}^2\pm 1\right)}$

In the case where $P_{fixed}=P_{free}$ and $\Lambda_{fixed}=\Lambda_{free}$, $\epsilon$ reduces to

$\epsilon=\frac{P\Lambda^2}{\left(\Lambda^2+1\right)+\left(\Lambda^2-1\right)\left(\textbf{m}\cdot\textbf{m}_{p}\right)}$

The Specify block for the Xf_STT class has the form

$\text{Specify Xf\_STT:}\textit{name}~\{$
$\text{P}~~~~\textit{polarization}$
$\text{P\_fixed}~~~~\textit{p\_fixed\_layer}$
$\text{P\_free}~~~~\textit{p\_free\_layer}$
$\text{Lambda}~~~~\Lambda$
$\text{Lambda\_fixed}~~~~\Lambda\textit{\_fixed\_layer}$
$\text{Lambda\_free}~~~~\Lambda\textit{\_free\_layer}$
$\text{eps\_prime}~~~~\textit{ep}$
$\text{J}~~~~\textit{current\_density}$
$\text{J\_direction}~~~~\textit{current\_flow\_direction}$
$\text{J\_profile}~~~~\textit{Jprofile\_script}$
$\text{J\_profile\_args}~~~~\textit{Jprofile\_script\_args}$
$\text{mp}~~~~\textit{p\_direction}$
$\text{propagate\_mp}~~~~\textit{prop\_mp}$
$\}$

The spin-transfer torque term does not actually change the energy in this implementation in OOMMF, and its implementation as a derivation from Oxs_Energy class is technically illegal. However, the spin-transfer torque term as an equivalent H-field in OOMMF using the Oxs_Energy class gives the flexibility to model the injection of multiple spin currents into one region in the ferromagnet.

The default values for P and Lambda are 0.4 and 2, respectively. If preferred, values for the fixed and free layers may be instead specified separately, through P_fixed, P_free, Lambda_fixed, and Lambda_free. Otherwise P_fixed = P_free = P and
Lambda_fixed = Lambda_free = Lambda. Lambda must be larger than or equal to 1; set Lambda=1 to remove the dependence of $\epsilon$ on $\textbf{m}\cdot\textbf{m}_{p}$. If you want non-zero $\epsilon'$, it is set directly as eps_prime.

Current density J and unit polarization direction mp are required. The units on J are $\text{A/m}^{2}$. Positive J produces torque that tends to align $\textbf{m}$ towards $\textbf{m}_p$.

Simulation of domain-wall dynamics under current-induced spin-torque is enabled by setting propogate_mp to 1. The setting propogate_mp is 0 (disabled) by default. When propogate_mp is enabled, mp is actually $\Delta_{x}\times\frac{\partial\textbf{m}}{\partial x}$ , where $x$ is the flow direction and $\Delta_{x}$ is the cell dimension in that direction. The flow direction may be set by setting J_direction as one of six options:
-z, +z, -y, +y, -x, +x. The default is -z. The direction changes the mp used to calculate the spin torque at each cell site.

Parameters J, mp, P, Lambda, and eps_prime may all be varied pointwise (by specifying them as Oxs_ScalarField objects), but are fixed with respect to time. However, J can be multiplied by a time varying “profile,” to model current rise times, pulses, etc. Use the J_profile and J_profile_args options to enable this feature. The Jprofile_script should be a Tcl script that returns a single scalar. Jprofile_script_args should be a subset of {stage stage_time total_time }, to specify arguments appended to Jprofile_script on each time step. Default is the entire set, in the order as listed.

The Xf_STT module provides the scalar output “average J,” and the vector field outputs “Field” (which is $|\gamma|\beta\left[\epsilon\left(\textbf{m}_{p}\times\textbf{m}\right)-\epsilon'\textbf{m}_{p}\right]$) and “J*mp.”