예제 #1
0
def relax_system(mesh):

    sim = Sim(mesh, name='relax')
    # sim.set_options(rtol=1e-10,atol=1e-14)
    sim.alpha = 1.0
    sim.gamma = 1.0
    sim.mu_s = 1.0

    sim.set_m(init_m)
    # sim.set_m(random_m)
    # sim.set_m(np.load('m_10000.npy'))

    J = 1.0
    exch = UniformExchange(J)
    sim.add(exch)

    D = 0.09
    dmi = DMI(D)
    sim.add(dmi)

    zeeman = Zeeman([0, 0, 3.75e-3])
    sim.add(zeeman)

    sim.relax(dt=2.0, stopping_dmdt=1e-6, max_steps=1000,
              save_m_steps=100, save_vtk_steps=50)

    np.save('m0.npy', sim.spin)
예제 #2
0
def relax_system():

    mesh = CuboidMesh(nx=121, ny=121, dx=0.5, dy=0.5, unit_length=1e-9)

    sim = Sim(mesh, name='relax_skx')
    sim.set_options(gamma=const.gamma, k_B=const.k_B)

    sim.driver.alpha = 1.0

    sim.mu_s = mu_s

    sim.set_m(init_m)
    # sim.set_m(random_m)

    J = 50.0 * const.k_B
    exch = UniformExchange(J)
    sim.add(exch)

    D = 0.09 * J
    dmi = DMI(D)
    sim.add(dmi)

    K = 5e-3 * J
    anis = Anisotropy(K, direction=(0, 0, 1), name='Ku')
    sim.add(anis)

    sim.add(Demag())

    ONE_DEGREE_PER_NS = 17453292.52

    sim.relax(dt=1e-12,
              stopping_dmdt=0.1 * ONE_DEGREE_PER_NS,
              max_steps=5000,
              save_m_steps=100,
              save_vtk_steps=100)
예제 #3
0
def excite_system(mesh):

    sim = Sim(mesh, name='dyn')

    # sim.set_options(rtol=1e-10,atol=1e-14)
    sim.alpha = 0.04
    sim.gamma = 1.0
    sim.mu_s = 1.0

    sim.set_m(np.load('m0.npy'))

    J = 1.0
    exch = UniformExchange(J)
    sim.add(exch)

    D = 0.09
    dmi = DMI(D)
    sim.add(dmi)

    zeeman = Zeeman([0, 0, 3.75e-3], name='H')
    sim.add(zeeman)

    w0 = 0.02

    def time_fun(t):
        return np.exp(-w0 * t)

    hx = TimeZeeman([0, 0, 1e-5], sinc_fun, name='h')
    sim.add(hx, save_field=True)

    ts = np.linspace(0, 20000, 5001)
    for t in ts:
        sim.run_until(t)
        print 'sim t=%g' % t
예제 #4
0
def relax_system():

    mesh = CuboidMesh(nx=121, ny=121, dx=0.5, dy=0.5, unit_length=1e-9)

    sim = Sim(mesh, name="relax_skx")
    sim.set_options(gamma=const.gamma, k_B=const.k_B)

    sim.alpha = 1.0

    sim.mu_s = mu_s

    sim.set_m(init_m)
    # sim.set_m(random_m)

    J = 50.0 * const.k_B
    exch = UniformExchange(J)
    sim.add(exch)

    D = 0.09 * J
    dmi = DMI(D)
    sim.add(dmi)

    K = 5e-3 * J
    anis = Anisotropy(K, direction=(0, 0, 1), name="Ku")
    sim.add(anis)

    sim.add(Demag())

    ONE_DEGREE_PER_NS = 17453292.52

    sim.relax(dt=1e-12, stopping_dmdt=0.1 * ONE_DEGREE_PER_NS, max_steps=5000, save_m_steps=100, save_vtk_steps=100)
예제 #5
0
def relax_system(mesh):

    sim = Sim(mesh, name='relax')
    # sim.set_options(rtol=1e-10,atol=1e-14)
    sim.alpha = 1.0
    sim.gamma = 1.0
    sim.mu_s = 1.0

    sim.set_m(init_m)
    # sim.set_m(random_m)
    # sim.set_m(np.load('m_10000.npy'))

    J = 1.0
    exch = UniformExchange(J)
    sim.add(exch)

    D = 0.09
    dmi = DMI(D)
    sim.add(dmi)

    zeeman = Zeeman([0, 0, 3.75e-3])
    sim.add(zeeman)

    sim.relax(dt=2.0,
              stopping_dmdt=1e-6,
              max_steps=1000,
              save_m_steps=100,
              save_vtk_steps=50)

    np.save('m0.npy', sim.spin)