Exemplo n.º 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)
Exemplo n.º 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.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)
Exemplo n.º 3
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)
Exemplo n.º 4
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)