In [1]:
import oommf # Access oommf as Python module
Py = oommf.materials.permalloy # Material from database
# Define the geometry:
my_geometry = oommf.geometry.Cuboid((0,0,0), (30, 30, 100), unitlength=1e-9)
# Create a simulation object
sim = oommf.Simulation(my_geometry, cellsize=5e-9, material=Py)
sim.m = [1, 1, 0] # initialise magnetisation uniformly
In [2]:
sim # Show simulation info
Out[2]:
In [3]:
sim.advance_time(1e-9) # Solve LLG for 0.1ns
In [4]:
sim.advance_time(3e-9) # Solve LLG for another 0.2 ns
In [5]:
data = oommf.DataTable() # Open ODT file
data.m_of_t() # and show m(t)
Out[5]:
In [6]:
sim # show simulation state again
Out[6]:
In [ ]: