Slonczewski#
- class micromagneticmodel.Slonczewski(**kwargs)#
Slonczewski spin transfer torque dynamics term.
\[\frac{\text{d}\mathbf{m}}{\text{d}t} = \gamma\beta\frac{\epsilon + \alpha\epsilon'}{1+\alpha^{2}} \mathbf{m} \times (\mathbf{m}_\text{p} \times \mathbf{m}) -\gamma\beta\frac{\epsilon' - \alpha\epsilon}{1+\alpha^{2}} \mathbf{m} \times \mathbf{m}_\text{p}\]\[\beta = \left| \frac{\hbar}{\mu_{0}e} \right| \frac{J}{tM_\text{s}}\]\[\epsilon = \frac{P\Lambda^{2}}{(\Lambda^{2} + 1) + (\Lambda^{2} - 1)(\mathbf{m}\cdot\mathbf{m}_\text{p})}\]A time-dependent current can be specified by providing a time-dependent pre-factor that is used to multiply
J
. The time-dependence can either be specified by providing a callablefunc
that is evaluated at time stepsdt
or by passing a dictionarytcl_strings
of tcl strings that are written to the mif file.- Parameters:
J (numbers.Real, dict, discretisedfield.Field) – If a single value
numbers.Real
is passed, a spatially constant parameter is defined. For a spatially varying parameter, either a dictionary, e.g.J={'region1': 5e12, 'region2': 3e12}
(if the parameter is defined “per region”) ordiscretisedfield.Field
is passed.mp ((3,) array_like, dict, discretisedfield.Field) – If a single vector value is passed, a spatially constant parameter is defined. For a spatially varying parameter, either a dictionary, e.g.
mp={'region1': (0, 0, 1), 'region2': (0, 1, 0)}
(if the parameter is defined “per region”) ordiscretisedfield.Field
is passed.P (numbers.Real, dict, discretisedfield.Field) – If a single positive value
numbers.Real
is passed, a spatially constant parameter is defined. For a spatially varying parameter, either a dictionary, e.g.P={'region1': 0.4, 'region2': 0.35}
(if the parameter is defined “per region”) ordiscretisedfield.Field
is passed.Lambda (numbers.Real, dict, discretisedfield.Field) – If a single positive value
numbers.Real
is passed, a spatially constant parameter is defined. For a spatially varying parameter, either a dictionary, e.g.Lambda={'region1': 1.5, 'region2': 2}
(if the parameter is defined “per region”) ordiscretisedfield.Field
is passed.eps_prime (numbers.Real, dict, discretisedfield.Field) – If a single value
numbers.Real
is passed, a spatially constant parameter is defined. For a spatially varying parameter, either a dictionary, e.g.eps_prime={'region1': 0.4, 'region2': 0.35}
(if the parameter is defined “per region”) ordiscretisedfield.Field
is passed. Defaults to 0.func (callable, optional) – Callable to define arbitrary time-dependence, multiplies
J
. Called at times that are multiples ofdt
. Must return a single number.dt (numbers.Real, optional (required for
func
)) – Time steps in seconds to evaluate callablefunc
at.tcl_strings (dict, optional) – Dictionary of
tcl
strings to be included into themif
file for more control over specific time-dependencies. Must contain the following keys:script
,script_args
, andscript_name
. Refer to the OOMMF documentation for more details ( https://math.nist.gov/oommf/doc/userguide20a3/userguide/Standard_Oxs_Ext_Child_Clas.html#SX).
Examples
Defining spatially constant Slonczewski dynamics term.
>>> import micromagneticmodel as mm ... >>> slonczewski = mm.Slonczewski(J=7.5e12, mp=(1, 0, 0), P=0.4, Lambda=2)
Defining spatially varying Slonczewski dynamics term.
>>> import discretisedfield as df ... >>> region = df.Region(p1=(0, 0, 0), p2=(5e-9, 5e-9, 5e-9)) >>> mesh = df.Mesh(region=region, n=(5, 5, 5)) >>> J = df.Field(mesh, nvdim=1, value=1e12) >>> slonczewski = mm.Slonczewski(J=J, mp=(1, 0, 0), P=0.4, Lambda=2, ... eps_prime=2)
Defining an exponentially decaying current.
>>> import micromagneticmodel as mm ... >>> def decay(t): ... t_0 = 1e-10 ... return np.exp(-t / t_0) >>> slonczewski = mm.Slonczewski(J=7.5e12, mp=(1, 0, 0), P=0.4, Lambda=2, ... func=decay, dt=1e-13)
An attempt to define the Slonczewski dynamics term using a wrong value (here using a scalar for
mp
where a vector is required).
>>> # scalar value for mp >>> slonczewski = mm.Slonczewski(J=J, mp=5, P=0.4, Lambda=2) Traceback (most recent call last): ... TypeError: ...
Methods
__add__
Binary
+
operator.__dir__
Default dir() implementation.
__eq__
Relational operator
==
.__iter__
Iterator.
__repr__
Representation string.
dmdt
Properties
J
Descriptor allowing setting attributes with a value described as
descriptor
or a dictionary.Lambda
Descriptor allowing setting attributes with a value described as
descriptor
or a dictionary.P
Descriptor allowing setting attributes with a value described as
descriptor
or a dictionary.dt
Descriptor allowing setting attributes only with scalars (
numbers.Real
).eps_prime
Descriptor allowing setting attributes with a value described as
descriptor
or a dictionary.func
Descriptor allowing setting attributes only with values of a certain type.
mp
Descriptor allowing setting attributes with a value described as
descriptor
or a dictionary.name
Name.
tcl_strings
Descriptor allowing setting attributes with a dictionary, which has keys defined by
key_descriptor
and values defined byvalue_descriptor
.