コード例 #1
0
def relax_system(mesh):

    sim = Sim(mesh, name='relax')
    sim.set_default_options(mu_s=1e-23, gamma=1.76e11)
    sim.driver.alpha = 1.0

    J = 1e-22
    exch = UniformExchange(J)
    sim.add(exch)

    demag = Demag()
    sim.add(demag)

    sim.set_m(init_m)

    ts = np.linspace(0, 5e-10, 101)
    for t in ts:
        sim.run_until(t)
        print t
        sim.save_vtk()

    np.save('m0.npy', sim.spin)
コード例 #2
0
def relax_system():

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

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

    sim.driver.alpha = 1.0

    sim.mu_s = mu_s

    sim.set_m(init_m)

    demag = Demag()

    sim.add(demag)

    field = demag.compute_field()

    print field

    vtk = SaveVTK(mesh, name='demag')
    vtk.save_vtk(field)

    sim.save_vtk()

    plot_f(mesh, field, sim._mu_s_inv)
コード例 #3
0
def relax_system(mesh):

    sim = Sim(mesh, name='relax')
    sim.set_default_options(mu_s=1e-23, gamma=1.76e11)
    sim.driver.alpha = 1.0

    J = 1e-22
    exch = UniformExchange(J)
    sim.add(exch)

    demag = Demag()
    sim.add(demag)

    sim.set_m(init_m)

    ts = np.linspace(0, 5e-10, 101)
    for t in ts:
        sim.run_until(t)
        print t
        sim.save_vtk()

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