Skyrmion - stand alone demo


In [1]:
import oommfc as oc
import numpy as np
import discretisedfield as df
#%matplotlib inline

In [2]:
mesh = oc.Mesh(p1=(-50e-9, -50e-9, 0), p2=(50e-9, 50e-9, 10e-9), cell=(2.5e-9, 2.5e-9, 10e-9))

def m_initial(pos):
    x, y, z = pos
    if np.sqrt(x**2 + y**2) < 20e-9:
        return (0, 0, -1)
    else:
        return (0, 0, 1)
    
system = oc.System(name="skyrmion")
system.hamiltonian = oc.Exchange(A=8.78e-12) + \
                     oc.DMI(D=1.58e-3) + \
                     oc.Zeeman(H=(0, 0, 1e5)) + \
                     oc.UniaxialAnisotropy(K=1e3, u=(0, 0, 1)) + \
                     oc.Demag()
system.dynamics = oc.Precession(gamma=2.211e5) + oc.Damping(alpha=0.5)
system.m = df.Field(mesh, value=m_initial, norm=384e3)
system.hamiltonian


Out[2]:
$\mathcal{H}=A [(\nabla m_{x})^{2} + (\nabla m_{y})^{2} + (\nabla m_{z})^{2}]+D \mathbf{m} \cdot (\nabla \times \mathbf{m})-\mu_{0}M_\text{s} \mathbf{m} \cdot \mathbf{H}+K (\mathbf{m} \cdot \mathbf{u})^{2}-\frac{1}{2}\mu_{0}M_\text{s}\mathbf{m} \cdot \mathbf{H}_\text{d}$

In [3]:
td = oc.TimeDriver()
td.drive(system, t=1e-9, n=100)


2017/3/19 1:44: Calling OOMMF (skyrmion/skyrmion.mif) ... [8.6s]

In [5]:
import pylab
system.m.plot_slice("z", 0);
fig = pylab.gcf()
fig.savefig('skyrmion.pdf')

In [ ]: