OVF2MFM: Tool for conversion of OOMMF to VTK files for MFM experiment simulation
Table of Contents OVF2MFMWhat does it do?Starting from a OOMMF vector field file OVF 1.0 (has to be binary with 8 byte per number; presumably only OVF1.0 supported), it computes a gray scale image (i.e. scalar data) as would be seen by a MFM measurement, and saves that in VTK format to a file. The data that is computed is the first derivative of the demagnetisation field. See the file demagderivV2.nb or demagderivV2.pdf for details (depreciated old version: demagderiv.tex). The calculation is based on the multipole expansion used currently in OOMMF. Public release of code in 2012November 2012: This program has been written a loooong time ago (~2003), and was never meant to be used by anybody else than the authors. This repository starting with a commit in 2013 does not reflect the full history. The code is neither well written, structured nor documented particularly well. However, there have been repeated requests by the OOMMF and micromagnetic community for access to a tool like this. We thus make it available here, but can not offer any support nor ensurances for correctness, stability, functionality etc (see official disclaimer below). Use at your own risk. We know there is at least one bug in the code. Patches that fix any of these issues are welcome. DownloadThe code is available as Mercurial repository on http://bitbucket.org/fangohr/ovf2mfm and a tar ball of the latest development version can be downloaded (zip, tgz). DocumentationA brief summary and one usage example are available on http://www.southampton.ac.uk/~fangohr/software/ovf2mfm/ The corresponding data files and sources for this are in the doc subdirectory of the downloaded files. Richard Boardman, Kristof M. Lebecki and Hans Fangohr License and DisclaimerThis software (ovf2mfm) was developed at the University of Southampton, United Kingdom. It is released under the GNU General Public License (GPL) as published by the Free Software Foundation; either version 3, or (at your option) any later version. Ovf2mfm is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Ovf2mfm is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with ovf2mfm (in the file license.txt). If not, see <http://www.gnu.org/licenses/>. OVF2MFM is an experimental system. Neither the University of Southampton nor the authors assume any responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic. Copyright: 2003- Richard Boardman, Hans Fangohr, University of Southampton 2012- Kristof M. Lebecki, University of Konstanz. OVF2MFMRichard Boardman, Kristof Lebecki, Hans Fangohr InstallationCompile with C compiler. The Makefile has a number of predefined targets. The default target is 'opt' which stands for OPTimisation for the current architecture and compiles the code: $> make opt gcc -ansi -lm -mtune=native -O2 demagderiv.c -o demagderiv and creates the demagderiv executable. Usage exampleGiven a OVF1.0 data file with a regular grid and double floats (i.e. each double using 8 bytes), the following command can be used: $> ./demagderiv <dropletzf350.omf data 100e-9 31 31 This will read the magnetisation data from the dropletzf350.omf file, and write VTK data to the data.vtk file (.vtk will be added to the given filename automatically) where the fly height of the MFM tip over the sample surface (in z-direction) is 100e-9 (i.e. 100 nm), and the resolution of the MFM scanning data matrix has 31 by 31 pixels. You can specify the input file also in any other (valid in UNIX) fashion, e.g.: $> cat dropletzf350.omf | ./demagderiv data 100e-9 31 31 Since the binary 8-byte format is required, the OOMMF conversion tool can be used if necessary: $> tclsh oommf.tcl avf2ovf -format b8 <dropletzf350.omf | ./demagderiv data 100e-9 31 31 The program should run for a few seconds. We can then visualise the data.vtk file, for example using the Mayavi2 programme (other options are Paraview, Visit, more recent versions of Paraview): $> mayavi2 -d data.vtk -m Surface which creates this image (chose Module of type Surface and grayscale for the colours): To provide some context: the magnetisation data in the dropletzf350.omf OVF file shows a vortex in a geometry of one of the somewhat spherical elements (as was studied in Boardman et al, postprint ) shown here: and the magnetisation pattern resembles that geometry (we only show a subset of the magnetisation vectors) For completeness, we mention that we have used ovf2vtk conversion tool to create the vtk file that shows the magnetisation vectors above. Model usedWe assume that the MFM tip is magnetised in the z-direction. The distance to the MFM tip is also measured in z direction from the sample (that's hard coded; so best to place any thin films in the x-y plane in the MIF file). The calculation is based on the assumption that the MFM signal is proportional to the derivative of the demagnetisation field, so in this case the change of the z component of demagnetisation field with the coordinate z. The file demagderiv.pdf describes this in a little more detail, and also describes how the demagfield derivative is computed. This is based on the demag field originating from a set of uniformly magnetised cuboids, and essentially the same technique as used in OOMMF's demag module. For testing, one can switch to an approximation where every cube is treated as a magnetic dipole (ignoring the high order multipole moments from the cuboids). This page is based on the following revision: changeset: 5:eda3708037fd tag: tip user: Hans Fangohr [MBA] <fangohr@soton.ac.uk> date: Mon Jan 14 14:31:28 2013 +0000 summary: Addition from Kristof in documentation |
|||