Repository navigation
|
Dear all, For reference, my code is below. I hope it works for you. If anyone has an idea what I am doing wrong, it would be invaluable. I really appreciate any help you can provide. ======================================================================= from mumaxplus import Antiferromagnet, Ferromagnet, Grid, World Fuctions for visualizationdef plot_cube_with_section(ax, out_of_plane='z'): Draw cubeax.add_collection3d(Poly3DCollection(faces, facecolors='white', edgecolors='k', alpha=0.3)) Add cross-section planes = np.linspace(0, 1, 2) Aestheticsax.set_xlim(0, 1) ######################################################### cell sizelength, width, thickness = 3e-9, 3e-9, 3e-9 number of cellsn = 15 grid = Grid((nx, ny, nz)) magnet envirnmentAFM = Antiferromagnet(world, grid, name="Ferromagnet") material parameters - Magnetite Fe3O4AFM.sub1.msat = 0.48e6 material parameters - other sublatticeAFM.sub2.msat = 0 # if set to 0.48e6, the sub2 also minimizes np.random.seed(1983) #np.random.seed(1984) plot_field(AFM.full_magnetization, arrow_size=1, show=True, layer=nz//2, title=False)AFM.relax() show full magnetizationoutofplane_axes = ['z', 'y', 'x'] for i, out_axis in enumerate(outofplane_axes, 1): else: world_help = World(cellsize=(length, width, thickness)) if out_axis == 'y': world_help = World(cellsize=(length, width, thickness)) if out_axis == 'z': world_help = World(cellsize=(length, width, thickness)) if cross_sections: show magnetization of sublattice 1fig = plt.figure(figsize=(12, 3)) else: world_help = World(cellsize=(length, width, thickness)) if out_axis == 'y': world_help = World(cellsize=(length, width, thickness)) if out_axis == 'z': world_help = World(cellsize=(length, width, thickness)) if cross_sections: show magnetization of sublattice 2fig = plt.figure(figsize=(12, 3)) else: world_help = World(cellsize=(length, width, thickness)) if out_axis == 'y': world_help = World(cellsize=(length, width, thickness)) if out_axis == 'z': world_help = World(cellsize=(length, width, thickness)) if cross_sections: print average magnetizationsprint((AFM.sub1.magnetization.average())) |
Replies: 1 comment 5 replies
|
Hi The alignment caused by setting Hope this helps! |
Hi
The alignment caused by setting
sub2.msatis caused by magnetostatic interactions. These can be disabled byAFM.enable_demag = False. It is not possible to disable the demag field for one single sublattice, since mumax+ calculates the sum of magnetization vectors in each cell before calculating the magnetostatic field.Hope this helps!
Lars