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]:
In [3]:
td = oc.TimeDriver()
td.drive(system, t=1e-9, n=100)
In [5]:
import pylab
system.m.plot_slice("z", 0);
fig = pylab.gcf()
fig.savefig('skyrmion.pdf')
In [ ]: