Problem specification format (MIF)

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**

`#`Material Name:**mmProbEd**; inside the MIF file it is a comment line. It relates a symbolic name (e.g., Iron) to specific values to the next 4 items. Ignored by solvers.**Ms:**Saturation magnetization in A/m.**A:**Exchange stiffness in J/m.**K1:**Crystalline anisotropy constant in J/m^{3}. If*K*1 > 0, then the anisotropy axis (or axes) is an easy axis; if*K*1 < 0 then the anisotropy axis is a hard axis.**Anisotropy Type:**Crystalline anisotropy type; One of < uniaxial | cubic >.**Anisotropy Dir1:**Directional cosines of first crystalline anisotropy axis, taken with respect to the coordinate axes (3 numbers). Optional; Default is 1 0 0 (x-axis).**Anisotropy Dir2:**Directional cosines of second crystalline anisotropy axis, taken with respect to the coordinate axes (3 numbers). Optional; Default is 0 1 0 (y-axis).

For uniaxial materials it suffices to specify only Anisotropy Dir1. For cubic materials one should also specify Anisotropy Dir2; the third axis direction will be calculated as the cross product of the first two. The anisotropy directions will be automatically normalized if necessary, so for example 1 1 1 is valid input (it will be modified to .5774 .5774 .5774). For cubic materials, Dir2 will be adjusted to be perpendicular to Dir1 (by subtracting out the component parallel to Dir1).**Anisotropy Initialization:**Method to use to set up directions of anisotropy axes, as a function of spatial location; This is a generalization of the Anisotropy Dir1/2 records. The value for this record should be one of < Constant | UniformXY | UniformS2 >. Constant uses the values specified for Anisotropy Dir1 and Dir2, with no dispersion. UniformXY ignores the values given for Anisotropy Dir1 and Dir2, and randomly varies the anisotropy directions uniformly in the xy-plane. UniformS2 is similar, but randomly varies the anisotropy directions uniformly on the unit sphere (*S*^{2}). This record is optional; the default value is Constant.**Do Precess:**If 1, then enable the precession term in the Landau-Lifshitz ODE. If 0, then do pure damping only. (Optional; default value is 1.)**Gyratio:**The gyromagnetic ratio, in m/(A.s). This is optional, with default value of 2.21e5. See the discussion of the Landau-Lifshitz ODE under the Damp Coef record identifier description.**Damp Coef:**The ODE solver in OOMMF integrates the Landau-Lifshitz equation, written as

is the gyromagnetic ratio (in m/(A.s)),

The last is specified by the ``Damp Coef'' entry in the MIF file. If not specified, a default value of 0.5 is used, which allows the solver to converge in a reasonable number of iterations. Physical materials will typically have a damping coefficient in the range 0.004 to 0.15.

is the damping coefficient (dimensionless).

**Demag Type:**Specify algorithm used to calculate self-magnetostatic (demagnetization) field. Must be one of**3dSlab:**Calculate the in-plane field components using offset blocks of constant (volume) charge. Details are given in [2]. Field components parallel to the*z*-axis are calculated using squares of constant (surface) charge on the upper and lower surfaces of the sample.**3dCharge:**Calculate the in-plane field component using rectangles of constant (surface) charge on each cell. This is equivalent to assuming constant magnetization in each cell. The*z*-components of the field are calculated in the same manner as for the 3dSlab approach.**FastPipe:**Algorithm suitable for simulations that have infinite extent in the*z*-direction. This is a 2D version of the 3dSlab algorithm.**None:**No demagnetization. Fastest but least accurate method.`:-}`

The 3dSlab and 3dCharge methods require that the Part Thickness (cf. the Part Geometry section) be set. All algorithms use Fast Fourier Transform (FFT) techniques to accelerate the calculations.

**Part Width:**Nominal part width (*x*-dimension) in meters. Will be automatically adjusted to an integral multiple of Cell Size.**Part Height:**Nominal part height (*y*-dimension) in meters. Will be automatically adjusted to an integral multiple of Cell Size.**Part Thickness:**Part thickness (*z*-dimension) in meters. Required for 3D models.**Cell Size:**In-plane (*xy*-plane) edge dimension of base calculation cell. This cell is a rectangular brick, with square in-plane cross-section and thickness given by Part Thickness.**Part Shape:**Optional. Part shape in the*xy*-plane; must be one of the following:**Rectangle**

The sample fills the area specified by Part Width and Part Height. (Default.)**Ellipse**

The sample (or the magnetically active portion thereof) is an ellipse inscribed into the rectangular area specified by Part Width and Part Height.**Oval r**

Shape is a rounded rectangle, where each corner is replaced by a quarter circle with radius*r*, where*r*is the second parameter.**Mask filename**

Shape is determined by a 2-color bitmap file, the name of which is specified as the second parameter. The given filename must be accessible to the solver application. At present the bitmap file must be in either the PPM (portable pixmap) or GIF format. The bitmap will be scaled as necessary to fit the simulation. The magnetically active cells correspond to black pixels in the bitmap.

** Initial magnetization**

**Init Mag:**Name of routine to use to initialize the simulation magnetization directions (as a function of position), and routine parameters, if any. Optional, with default Random. The list of routines is long, and it is easy to add new ones. See the filefor details. A few of the more useful routines are:`maginit.cc`**Random**

Random directions on the unit sphere. This is somewhat like a quenched thermal demagnetized state.**Uniform theta phi**

Uniform magnetization in the direction indicated by the two additional parameters, theta and phi, where the first is the angle from the*z*-axis (in degrees), and the second is the angle from the*x*-axis (in degrees) of the projection onto the*xy*-plane.**Vortex**

Fits an idealized vortex about the center of the sample.**avfFile filename**

The second parameter specifies an OVF/VIO (i.e., ``any'' vector field) file to use to initialize the magnetization. The grid in the input file will be scaled as necessary to fit the grid in the current simulation. The file must be accessible to the intended solver application.

** Experiment parameters
**

The following records specify the applied field schedule:

**Field Range:**Specifies a range of applied fields that are stepped though in a linear manner. The parameter list should be 7 numbers: the starting field Bx By Bz in Tesla, the stopping field Bx By Bz in Tesla, and an integer number of steps (intervals) to take between the starting and stopping fields (inclusive). Use as many Field Range records as necessary--they will be stepped through in order of appearance. This record is optional, with a default value of 0 0 0 0 0 0 1.**Field Type:**External field routine and parameters, if any. This is optional, with default Uniform. At most one record of this type is allowed, but the Multi type may be used to apply a collection of fields. The nominal applied field (NAF) is stepped through the Field Ranges described above, and is made available to the external field routines that use or ignore it as appropriate.

The following Field Type routines are available:**Uniform**

Applied field is uniform with value specified by the NAF.**Ribbon relcharge x0 y0 x1 y1 height**

Charge ``Ribbon,'' lying perpendicular to the*xy*-plane. Here relcharge is the charge strength relative to Ms, and (x0,y0), (x1,y1) are the endpoints of the ribbon (in meters). The ribbon extends height/2 above and below the calculation plane. This routine ignores the NAF.**Tie rfx rfy rfz x0 y0 x1 y1 ribwidth**

The points (x0,y0) and (x1,y1) define (in meters) the endpoints of the center spine of a rectangular ribbon of width ribwidth lying in the*xy*-plane. The cells with sample point inside this rectangle see an applied field of (rfx,rfy,rfz), in units relative to Ms. (If the field is large, then the magnetizations in the rectangle will be ``tied'' to the direction of that field.) This routine ignores the NAF.**OneFile filename multiplier**

Read B field in from a file. Each value in the file is multiplied by the ``multiplier'' value on input. This makes it simple to reverse field direction (use -1 for the multiplier), or to convert H fields to B fields (use 1.256637e-6). The input file may be any of the vector field file types recognized by**mmDisp**. The input dimensions will be scaled as necessary to fit the simulation grid, with zeroth order interpolation as necessary. This routine ignores the NAF.**FileSeq filename procname multiplier**

This is a generalization of the OneFile routine that reads in fields from a sequence of files. Here ``filename'' is the name of a file containing Tcl code to be sourced during problem initialization, and ``procname'' is the name of a Tcl procedure defined in filename, which takes the nominal B field components and field step count values as imports (4 values total), and returns the name of the vector field file that should be used as the applied B field for that field step.**Multi routinecount**`\`

param1count name1 param1 param2 ...`\`

param2count name2 param1 param2 ...`\`

...

Allows a conglomeration of several field type routines. All entries must be on the same logical line, i.e., end physical lines with '`\`

' continuation characters as necessary. Here routinecount is the number of routines, and param1count is the number parameters (including name1) needed by the first routine, etc.

** Output specification**

**Base Output Filename:**Default base name used to construct output filenames.

**Converge**Nominal value to use as a stopping criterion: When**|**mxh**|**Value:**|**(**m**`x`**h**|**= |**)**M**`x`**H**|/*M*_{s}^{2}at all spins in the simulation is smaller than this value, it is assumed that a relaxed (equilibrium) state has been reached for the current applied field. This is a dimensionless value. Optional; default value is 1e-4.

**Randomizer seed:**Value with which to seed random number generator. Optional. Default value is 0, which uses the system clock to generate a semi-random seed.

# 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: 3dSlab # One of <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. ###################### OUTPUT SPECIFICATIONS ########################### Base Output Filename: samplerun ########################## MISCELLANEOUS ############################### Randomizer seed: 1 # Value to seed random number generator with. Converge Torque Value: 1e-5 # Stopping criterion, relative to Ms.

Figure 3:
Example MIF file.
(Description.)

February 23, 2000