Ejemplo n.º 1
0
def excite_system(mesh):

    sim = Sim(mesh, name='dyn', driver='sllg')
    sim.set_options(dt=1e-14, gamma=const.gamma, k_B=const.k_B)
    sim.driver.alpha = 0.1
    sim.mu_s = const.mu_s_1
    sim.T = temperature_gradient

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

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

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

    Hz = 0.2 * J / const.mu_s_1
    zeeman = Zeeman([0, 0, Hz])
    sim.add(zeeman)

    dt = 2e-14 * 50  # 1e-12
    ts = np.linspace(0, 1000 * dt, 501)
    for t in ts:
        sim.run_until(t)
        sim.save_vtk()
        sim.save_m()
        print 'sim t=%g' % t
Ejemplo n.º 2
0
def excite_system(mesh):

    sim = Sim(mesh, name='dyn', driver='sllg')
    sim.set_options(dt=1e-14, gamma=const.gamma, k_B=const.k_B)
    sim.alpha = 0.1
    sim.mu_s = const.mu_s_1
    sim.T = temperature_gradient

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

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

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

    Hz = 0.2 * J / const.mu_s_1
    zeeman = Zeeman([0, 0, Hz])
    sim.add(zeeman)

    dt = 2e-14 * 50  # 1e-12
    ts = np.linspace(0, 1000 * dt, 501)
    for t in ts:
        sim.run_until(t)
        sim.save_vtk()
        sim.save_m()
        print 'sim t=%g' % t
Ejemplo n.º 3
0
def relax_system_stage2():

    mesh = CuboidMesh(nx=140 , ny=140, nz=1)

    sim = Sim(mesh, name='dyn', driver='llg')
    sim.alpha = 0.1
    sim.do_precession = True
    sim.gamma = const.gamma
    sim.mu_s = spatial_mu

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

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

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

    zeeman = Zeeman(spatial_H)
    sim.add(zeeman)

    ts = np.linspace(0, 2e-9, 201)
    for t in ts:
        sim.run_until(t)
        sim.save_vtk()
        sim.save_m()
        print(t)
Ejemplo n.º 4
0
def excite_system(mesh, Hy=0):

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

    sim.driver.set_tols(rtol=1e-10, atol=1e-12)
    sim.driver.alpha = 0.04
    sim.driver.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.18
    dmi = DMI(D)
    sim.add(dmi)

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

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

    dt = 5
    steps = 2001
    for i in range(steps):
        sim.run_until(i * dt)
        sim.save_m()
        print("step {}/{}".format(i, steps))
Ejemplo n.º 5
0
                            stopping_dm=args.stopping_dmdt,
                            save_data_steps=1000)

    elif args.driver == 'steepest_descent':
        sim.driver.tmax = 1e-2
        sim.driver.tmin = 1e-16

        sim.driver.minimise(max_steps=args.max_steps,
                            stopping_dm=args.stopping_dmdt,
                            save_data_steps=1000,
                            save_m_steps=args.save_files,
                            save_vtk_steps=args.save_files
                            )

    # Save final states
    sim.save_m()
    sim.save_vtk()


# -------------------------------------------------------------------------
# Files -------------------------------------------------------------------
# -------------------------------------------------------------------------

npy_dir = 'npys/'
vtk_dir = 'vtks/'
txt_dir = 'txts/'

if not os.path.exists(npy_dir):
    os.makedirs(npy_dir)
if not os.path.exists(vtk_dir):
    os.makedirs(vtk_dir)