Object Oriented Micromagnetic Framework (OOMMF) is free, portable, extensible public domain micromagnetic program and associated tools, which was developed at the National Institute of Standards and Technology (NIST). OOMMF is very powerful and useful tool which can be thinly configured for different micromagnetic studies, but at the same time, it has one drawback — the multiformat output. This situation arose from a huge history of the project and different problems that have appeared before it, but it required a global solution.
For this goal our group created an additional package to the Wolfram Mathematica framework which was called “oommfUtilities” and can get micromagnetic data from each OOMMF-snapshot (.ovf or .omf-files) and it does not matter what the format of this file was: text or binary. Also our package can read the tabular text data which is hold on in .odr-files.
In this archive one can find the main package, documentation, several OOMMF-snapshots and example-file for fun. Enjoy!
If you have any questions or suggestions, write to me: [encode_email email=”” display=””]
How to execute mathematica files in oommf using oommf Utilities?
1) Put the file “Reader.m” to the Mathematica folder “ExtraPackages” (if it necessary you should use search);
2) Create Mathematica file in a folder, where are situated oommf files that you try to scan;
2) Put next lines to your Mathematica file:
<< oommfUtilities`Reader`
getStage[file_String] := StringSplit[file, "-"][[-2]] // ToExpression;
files = Sort[FileNames["*.omf", NotebookDirectory[]]]
data = OVFReader[files[[1]], Normalized -> False, OutputFormat -> "automatic", LengthUnit -> "nm"];
3) After running this code you will get a magnetization distribution in a first file. If you want to get magnetization distribution from the other files just change the number in double square brackets in the last line.