# MIF 2.1
# MIF Example File: exchspring.mif
# Description: Exchange spring example
set pi [expr {4*atan(1.0)}]
set mu0 [expr {4*$pi*1e-7}]

Specify Oxs_MultiAtlas:atlas {
   atlas { Oxs_BoxAtlas {
       xrange {0 300e-9}
       yrange {0 300e-9}
       zrange {49e-9 98e-9}
       name top
   }   }
   atlas { Oxs_BoxAtlas {
       xrange {0 300e-9}
       yrange {0 300e-9}
       zrange {0 49e-9}
       name  bottom
   }   }
}

Specify Oxs_RectangularMesh:mesh {
  cellsize {10e-9 10e-9 7e-9}
  atlas :atlas
}

Specify Oxs_Exchange6Ngbr:NiFe {
  atlas :atlas
  A  {
    top top 13e-12
    top bottom 20e-12
    bottom bottom 30e-12
  }
}

Specify Oxs_UniaxialAnisotropy {
  K1 { Oxs_AtlasScalarField {
    atlas :atlas
    values {
        top 0
	bottom 520e3
    }
  }}
  axis { Oxs_UniformVectorField {
    norm 1
    vector {1 0 0}
  } }
}

Specify Oxs_UZeeman [subst {
  multiplier [expr {0.001/$mu0}]
  Hrange {
     {    0   0  0   500  50  0   10 }
     {  500  50  0  -500 -50  0   20 }
     { -500 -50  0   500  50  0   20 }
  }
}]

Specify Oxs_Demag {}

Specify Oxs_RungeKuttaEvolve:evolver {
  alpha 0.5
}

Specify Oxs_TimeDriver {
 basename exchspring
 evolver :evolver
 comment {1 deg/ns = 17453293 rad/sec; If Ms=8.6e5, and lambda is small,
         then mxh=1e-6 translates into dm/dt = 2e5 rad/sec = 0.01 deg/ns}
 stopping_dm_dt 1
 mesh :mesh
 Ms  { Oxs_AtlasScalarField {
     atlas :atlas
     values {
        top 860e3
        bottom 1400e3
     }
 }}
 m0 { Oxs_AtlasVectorField {
    atlas :atlas
    norm 1
    values {
        top    { -1 10 0 }
	bottom { 10  1 0 }
    }
  }}
}
