Ejemplo n.º 1
0
def setup_macrospin():
    """
    Defines the simulation parameters.
    Creates a Macrospin simulation object
    Assigns the parameters to the Macrospin object
    Return the sim object
    """
    # Define simulation parameters
    Ms = 8.6e5 # saturation magnetisation (A/m)
    alpha = 0.1 # Gilbert damping
    gamma = 2.211e5 # gyromagnetic ratio
    B = 0.1 # External magentic field (T)
    mu0 = 4*np.pi*1e-7 # vacuum permeability
    H = B/mu0
    m_init = [1, 0, 0]
    zeeman = [0, 0, H]
    mesh = FDmesh0D()

    sim = Macrospin(mesh)
    sim.Ms = Ms
    sim.alpha = alpha
    sim.gamma = gamma
    sim.m = m_init
    sim.zeeman = zeeman

    return sim
Ejemplo n.º 2
0
def setup_macrospin():
    """
    Defines the simulation parameters.
    Creates a Macrospin simulation object
    Assigns the parameters to the Macrospin object
    Return the sim object
    """
    # Define simulation parameters
    Ms = 8.6e5  # saturation magnetisation (A/m)
    alpha = 0.1  # Gilbert damping
    gamma = 2.211e5  # gyromagnetic ratio
    B = 0.1  # External magentic field (T)
    mu0 = 4 * np.pi * 1e-7  # vacuum permeability
    H = B / mu0
    m_init = [1, 0, 0]
    zeeman = [0, 0, H]
    mesh = FDmesh0D()

    sim = Macrospin(mesh)
    sim.Ms = Ms
    sim.alpha = alpha
    sim.gamma = gamma
    sim.m = m_init
    sim.zeeman = zeeman

    return sim
Ejemplo n.º 3
0
def setup_macrospin():
    """
    Defines the simulation parameters.
    Creates a Macrospin simulation object
    Assigns the parameters to the Macrospin object
    Return the sim object
    """
    from mpimag import FDmesh1D

    # Define simulation parameters
    Ms = 8.6e5 # saturation magnetisation (A/m)
    alpha = 0.1 # Gilbert damping
    gamma = 2.211e5 # gyromagnetic ratio
    B = 0.1 # External magentic field (T)
    mu0 = 4*np.pi*1e-7 # vacuum permeability
    H = B/mu0
    m_init = [1, 0, 0]
    zeeman = [0, 0, H]

    # mesh parameters
    x0 = 0
    x1 = 10 # nm
    nx = 6 # number of nodes in x-dir
    mesh = FDmesh1D(x0, x1, nx)

    # setup sim object
    sim = Macrospin(mesh)
    sim.Ms = Ms
    sim.alpha = alpha
    sim.gamma = gamma
    sim.m = m_init
    sim.zeeman = zeeman

    return sim
Ejemplo n.º 4
0
def setup_macrospin():
    """
    Defines the simulation parameters.
    Creates a Macrospin simulation object
    Assigns the parameters to the Macrospin object
    Return the sim object
    """
    from mpimag import FDmesh1D

    # Define simulation parameters
    Ms = 8.6e5  # saturation magnetisation (A/m)
    alpha = 0.1  # Gilbert damping
    gamma = 2.211e5  # gyromagnetic ratio
    B = 0.1  # External magentic field (T)
    mu0 = 4 * np.pi * 1e-7  # vacuum permeability
    H = B / mu0
    m_init = [1, 0, 0]
    zeeman = [0, 0, H]

    # mesh parameters
    x0 = 0
    x1 = 10  # nm
    nx = 6  # number of nodes in x-dir
    mesh = FDmesh1D(x0, x1, nx)

    # setup sim object
    sim = Macrospin(mesh)
    sim.Ms = Ms
    sim.alpha = alpha
    sim.gamma = gamma
    sim.m = m_init
    sim.zeeman = zeeman

    return sim