University of Southampton logo


This page contains some general micromagnetics research. You will also find some of the visualisations produced during some of the micromagnetic simulation runs. Please be patient as some of these images may take some time to load.

Here's a quick page index:

Uniaxial anisotropy

Hosted at NIST, the Computational Engineering and Design Group's uniaxial anisotropy add-in for OOMMF provides a generic Oxs extension object, derived from the Oxs_Energy class which provides uniaxial anisotropy with second (K1) and fourth (K2) order terms.


ngtoucd is now part of the magpar distribution and allows the conversion of Netgen neutral finite element mesh files to AVS unstructured mesh format (for use in magpar and other FE tools supporting this format).

ovf2vtk is hosted by Hans Fangohr here and allows the conversion of OOMMF vector file formats (including ovf, omf and ohf) to the VTK file format allowing these to be visualised by VTK-compliant software packages.


The visualisation below is that of a sphere of radius 200nm at zero applied field. The colour scale represents the angle between the x and y components of the magnetisation; the streamlines represent tracers which have been dropped in to highlight the vortex state.


Bubble domains

Below is the second derivative of the demagnetisation field of a thin film (height 50nm) of iron-palladium. From left to right we see the x, y and z components of the demagnetisation field; the upper and lower images highlight the influence different colour maps have on the data. This image clearly shows the bubble domains which form when relaxed from a random initial magnetisation.

Bubble domains


This image depicts nine spherical holes carved out of a block sample in a similar vein to Boolean objects with CSG in 3D modelling. The permalloy sample is of the size order 600nm x 600nm x 150nm in zero applied field. The colour is representative of the angle between the x and y components of the magnetisation.


This image shows a slice through the finite element version of the antispheres.

FE antisphere


This image depicts a 200nm diameter nickel half-sphere in zero field. Note the out-of-plane vortex which is perfectly central. Again, the streamlines serve to highlight the vortex core, as well as the monochrome cones. The coloured cone plane shows the x-y angle of magnetisation.


Sphere vortex core A

This image uses an isosurface to outline the in-plane vortex in a 200nm diameter nickel sphere in zero field.

Sphere vortex core

Sphere vortex core B

This is the same sample as above, however it is in a further reduced magnetic field. Note that the core of the vortex has reversed direction whilst the surrounding magnetisation has remained in the same direction.

Sphere vortex core reversed


This visualisation shows the vortex which forms in a nickel half-sphere with an ellipsoidal cap of size 200nm at zero field. Monochrome streamlines follow the vorticity whilst the coloured streamlines use the magnetisation of the sample as a guide.


Half-sphere series

This image demonstrates the path which a vortex takes as the applied field is swept across the circular plane. Its nucleation point is the third image from the left at the top, its dissipation the second from the left along the bottom. The tracers follow the magnetisation starting from the right-hand side; the colour scheme is representative of the overall curl of the sample.

Half-sphere series

Compiling OOMMF for AMD Opteron and Athlon 64 processors

Making the object-oriented micromagnetic framework compile and run on AMD Opteron, Athlon 64 and FX processors requires a little hacking. After getting the source code from and extracting it:

  1. apply the patches from, paying particular attention to patch 3 ( - CLK_TCK undeclared) and patch 14 (Unknown feature "TCL_PREFIX" in configuration)
  2. add the following code to oommf/config/names/lintel.tcl to accept this configuration for K8:
    # before if {![string match i?86 $tcl_platform(machine)]} { ... 
    if {[string match x86_64 $tcl_platform(machine)]} { 
       return 1 
    this will cause pimake to fall back to the lintel architecture, which is the closest.
  3. make use of the 64-bit features, by editing oommf/config/cache/lintel.tcl and setting the optimisations thus:
    $config SetValue program_compiler_c++_option_opt {format "-O3 \ 
    -march=k8 -m64 -msse2 -mfpmath=sse \ 
    -ffast-math -fomit-frame-pointer"} 
    Note that -O3 might be a little aggressive on some systems, so trim it back to -O2 if you run into any issues here. To summarise, I've made use of these flags without ill effect on my personal system. That's not to say they won't break on another. Here's what the flags do: The jury is out on other optimisation options. They may or may not break OOMMF, but they may make it run more quickly. Perhaps the improvement is marginal. Maybe it's great. Let me know if you discover something.
  4. now it's time for the mother of all horrible hacks. There is certainly an elegant solution to this but I have had neither the time nor the inclination to find it. Edit the file oommf/pkg/oc/config.tcl and hack in the following lines after the line method GetValue {feature} {
    # --- horrible hack for Opteron (temporary) 
    set values(TCL_VERSION) 8.4 
    set values(TCL_MAJOR_VERSION) 8 
    set values(TCL_MINOR_VERSION) 4 
    set values(TCL_LIB_SPEC) "-L/usr/lib -ltcl8.4" 
    # --- end horrible hack 
    Note that this is only valid for Tcl/Tk 8.4 (!) and other versions should set appropriate numbers and library locations.
  5. attempting to build at this point will give:
    pimake CSourceFile panic: 
    Error finding includes in oommf/app/mmdisp/ 
    Error finding includes in oommf/pkg/oc/oc.h: 
    Error finding includes in oommf/pkg/oc/ 
    Error finding includes in oommf/pkg/oc/imports.h: 
    can't read "env(OOMMF_TCL_INCLUDE_DIR)": no such variable 
    To solve this one, find tcl.h and tk.h (usually in /usr/include) and set the variable accordingly (the 'env' here is a dead giveaway ;^). For example, with bash:
    export OOMMF_TCL_INCLUDE_DIR=/usr/include 
    export OOMMF_TK_INCLUDE_DIR=/usr/include 
  6. now the error will change to:
    No Tk configuration file found ( 
    with an indication to set the OOMMF_TK_CONFIG environment variable. Here, use the locate command to find the appropriate, and set the environment variable accordingly. Repeat for
    export OOMMF_TK_CONFIG=/usr/lib64/  
    export OOMMF_TCL_CONFIG=/usr/lib64/ 
  8. that's it. A tclsh oommf.tcl pimake should now build successfully.

Compiling OOMMF on Intel Core 2 Duo processors

Thanks to Dr. Nils Wiese ( of the Department of Physics and Astronomy at the University of Glasgow for the following updates to the above. This will allow you to tune OOMMF for Core 2 Duo platforms.

For GCC 4.1 (lintel.tcl)

$config SetValue program_compiler_c++_option_opt {format "-O3 \ 
-march=nocona -mtune=generic -m64 -msse2 -mfpmath=sse \ 
-ffast-math -fomit-frame-pointer"} 

For GCC 4.3 (lintel.tcl)

$config SetValue program_compiler_c++_option_opt {format "-O3 \ 
-march=core2 -m64 -msse2 -mfpmath=sse \ 
-ffast-math -fomit-frame-pointer"} 

Site contents are copyright © 2003-2010 Dr. Richard Boardman. Please contact me if you would like to reproduce anything on this site at