Defining micromagnetic system#
A micromagnetic system is the main entity of the micromagnetic model. It consists of three main components: - Energy equation - Dynamics equation - Magnetisation configuration
In this tutorial, we will assemble a micromagnetic system, which can then be “driven” using different drivers.
[1]:
import micromagneticmodel as mm
Firstly, we create a the energy equation:
[2]:
energy = mm.Exchange(A=1e-11) + mm.Zeeman(H=(1e6, 0, 0))
Next, we define the dynamics equation.
[3]:
dynamics = mm.Precession(gamma0=mm.consts.gamma0) + mm.Damping(alpha=0.1)
Finally, magnetisation configuration must be defined as discretisationfield.Field
.
[4]:
import discretisedfield as df
p1 = (0, 0, 0)
p2 = (10e-9, 10e-9, 10e-9)
n = (5, 5, 5)
Ms = 1e6
mesh = df.Mesh(p1=p1, p2=p2, n=n)
m = df.Field(mesh, nvdim=3, value=(0, 0, 1), norm=Ms)
Using these three parameters we can assemble the system object.
[5]:
system = mm.System(energy=energy, dynamics=dynamics, m=m, name="mysystem")
We can now check some basics properties of the assembled system.
[6]:
system
[6]:
System(name='mysystem')
[7]:
system.energy
[7]:
$- A \mathbf{m} \cdot \nabla^{2} \mathbf{m}-\mu_{0}M_\text{s} \mathbf{m} \cdot \mathbf{H}$
[8]:
system.dynamics
[8]:
$-\frac{\gamma_{0}}{1 + \alpha^{2}} \mathbf{m} \times \mathbf{H}_\text{eff}-\frac{\gamma_{0} \alpha}{1 + \alpha^{2}} \mathbf{m} \times (\mathbf{m} \times \mathbf{H}_\text{eff})$
[9]:
system.m.sel("x").mpl()