OOMMF Home next up previous contents index
Next: Data table format (ODT) Up: File Formats Previous: File Formats


Problem specification format (MIF)

Micromagnetic simulations are specified to the OOMMF solver using the OOMMF Micromagnetic Input Format (MIF). This is also the native file type for the OOMMF problem editor, mmProbEd. All values are in SI units.

A sample MIF file is included below. The first line of a MIF file must be of the form ``# MIF x.y'', where x.y represents the format revision number. OOMMF reads and writes the MIF 1.1 format. (There was a MIF 1.0 format, but it was never part of a released version of OOMMF.) It is recommended that MIF files be given names ending in the .mif file extension so that MIF files may be easily identified.

After the format identifier line, any line ending in a backslash, `\', is joined to the succeeding line before any other processing is performed. Lines beginning with a `#' character are comments and are ignored. Blank lines are also ignored.

All other lines must consist of a Record Identifier followed by a parameter list. The Record Identifier is separated from the parameter list by one or more `:' and/or `=' characters. Whitespace and case is ignored in the Record Identifier field.

The parameter list must be a proper Tcl list. The parameters are parsed (broken into separate elements) following normal Tcl rules; in short, items are separated by whitespace, except as grouped by double quotes and curly braces. The grouping characters are removed during parsing. Any `#' character that is found outside of any grouping mechanism is interpreted as a comment start character. The `#' and all following characters on that line are interpreted as a comment.

Order of the records in a MIF file is unimportant, except as explicitly stated below. If two or more lines contain the same Record Identifier, then the last one takes precedence (except for Field Range records, of which there may be several active). All records are required unless listed as optional. Some of these record types are not yet supported by mmProbEd, however your may edit a MIF file by hand and supply it to mmSolve2D using FileSource.

For convenience, the Record Identifier tags are organized into several groups; these groups correspond to the buttons presented by mmProbEd. We follow this convention below.

Material parameters

Demag specification

Part geometry

Initial magnetization

Experiment parameters

The following records specify the applied field schedule:

Output specification

Miscellaneous

NOTE: File accessibility

Several of the parameter values that appear in the MIF 1.1 file format are filenames, and it is noted that these filenames must be accessible to the solver application to work effectively. If the filename is an absolute path to an existing file, there will be no question that the solver application will be able to access the file. However, if you try to move the MIF file from one system to another, or from one area of a file system to another, the absolute path may no longer be correct, and the MIF file may need to be edited.

For the sake of being able to move MIF files from place to place, filenames in MIF files are often expressed as relative paths. In that case, the filename is interpreted by the solver application relative to its current working directory, and it is important when launching the solver application to set the current working directory so that relative paths are correctly resolved. The example MIF files in the OOMMF distribution that contain filenames express them as relative paths relative to the root directory of OOMMF. The interactive solver mmSolve2D starts with the OOMMF root directory as the current working directory by default. Other solvers (for example, batchSolve) should also be started with the OOMMF root directory as the current working directory to make use of these example files, or other files containing relative path names relative to the OOMMF root directory. The standard option -cwd may be useful to accomplish this.

This difficulty dealing with filenames is a known misfeature of the MIF 1.1 file format, and has been corrected in the MIF 2 file format, where any relative path is interpreted relative to the directory containing the MIF 2 file.



# MIF 1.1
#
# All units are SI.
#
####################### MATERIAL PARAMETERS ############################
Ms:  800e3                 # Saturation magnetization in A/m.
A:   13e-12                # Exchange stiffness in J/m.
K1:  0.5e3                 # Anisotropy constant in J/m^3.
Anisotropy Type: uniaxial  # One of <uniaxial|cubic>.
Anisotropy Dir1: 1 0 0     # Directional cosines wrt to coordinate axes

####################### DEMAG SPECIFICATION ############################
Demag Type: ConstMag # One of <ConstMag|3dSlab|2dSlab|3dCharge|FastPipe|None>.

########################## PART GEOMETRY ###############################
Part Width:     0.25e-6    # Nominal part width in m
Part Height:    1.0e-6     # Nominal part height in m
Part Thickness: 1e-9       # Part thickness in m.
Cell Size:      8.1e-9     # Cell size in m.
#Part Shape:    # One of <Rectangle|Ellipse|Oval|Mask>.  Optional.

###################### INITIAL MAGNETIZATION ###########################
Init Mag: Uniform 90 45 # Initial magnetization routine and parameters

###################### EXPERIMENT PARAMETERS ###########################
Field Range: -.05 -.01 0. .05 .01 0. 100 # Start_field Stop_field Steps
Field Range: .05 .01 0. -.05 -.01 0. 100
Field Type: Multi 4 \
 7 Ribbon 1 0 1.0e-6 0.25e-6 1.0e-6 1e-9 \
 7 Ribbon 1 0 0     0.25e-6 0     1e-9 \
 9 Tie 100 0 0 0.12e-6 0.5e-6 0.13e-6 0.5e-6 8.1e-9 \
 1 Uniform
# The above positions ribbons of positive charge along the upper
# and lower edges with strength Ms, applies a large (100 Ms) field
# to the center cell, and also applies a uniform field across the
# sample stepped from (-.05,-.01,0.) to (.05,.01,0.) (Tesla), and
# back, in approximately 0.001 T steps.

Default Control Point Spec: -torque 1e-6 # Assume equilibrium has been
# reached, and step the applied field, when the reduced torque |mxh|
# drops below 1e-6.

###################### OUTPUT SPECIFICATIONS ###########################
Base Output Filename: samplerun
Magnetization Output Format: binary 8 # Save magnetization states
# in binary format with full (8-byte) precision.

########################## MISCELLANEOUS ###############################
Randomizer Seed: 1   # Value to seed random number generator with.
User Comment: This is an example MIF file, with lots of comments.
Figure 4: Example MIF file. (Description.)



OOMMF Home next up previous Contents index

OOMMF Documentation Team
January 15, 2004