# MIF 2.1
# Description: Exchange spring
set pi [expr 4*atan(1.0)]
set mu0 [expr 4*$pi*1e-7]

Specify Oxs_MultiAtlas:atlas {
   atlas { Oxs_BoxAtlas {

      xrange {0 1e-09 }
      yrange {0 1e-09 }
      zrange {0 4e-08 }
       name DyFe
   }   }
}


Specify Oxs_RectangularMesh:mesh {
  cellsize {1e-9 1e-9 1e-9}
  atlas :atlas
}

Specify Oxs_Exchange6Ngbr:DyFeYFe {
  atlas :atlas
  A  {
    DyFe DyFe 1.46e-11
  }
}

Specify Southampton_UniaxialAnisotropy4:xAnis {
  K1 { Oxs_AtlasScalarField {
    atlas :atlas
    values {
        DyFe -157500
    }
  }}
  K2 { Oxs_AtlasScalarField {
    atlas :atlas
    values {
        DyFe -15750
    }
  }}
  axis { Oxs_UniformVectorField {
    norm 1
    vector {1 0 0}
  } }
}


Specify Southampton_UniaxialAnisotropy4:yAnis {
  K1 { Oxs_AtlasScalarField {
    atlas :atlas
    values {
        DyFe -315000
    }
  }}
  K2 { Oxs_AtlasScalarField {
    atlas :atlas
    values {
        DyFe -31500
    }
  }}
  axis { Oxs_UniformVectorField {
    norm 1
    vector {0 1 0}
  } }
}



Specify Oxs_UniaxialAnisotropy:neg {
  K1 { Oxs_UniformScalarField { value -500000 } }
  axis { Oxs_UniformVectorField {
    norm 1
    vector { 0 0 1 }
  } }
}

Specify Oxs_UZeeman "
  multiplier [expr 0.001/$mu0]
  Hrange {
     {  2500  10  0  -2500 10  0   250 }
  }
"

Specify Oxs_Demag {}

Specify Oxs_EulerEvolve:evolver {
  alpha 0.5
  start_dm 0.01
}

Specify Oxs_TimeDriver {
 basename DY_fourfould_Corr
 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
 stage_iteration_limit 0
 total_iteration_limit 0
 Ms  { Oxs_AtlasScalarField {
     atlas :atlas
     values {
        DyFe 1183081
     }
 }}
 m0 { Oxs_AtlasVectorField {
    atlas :atlas
    norm 1
    values {
        DyFe    { 1 0 0 }
    }
  }}
}

Destination archive mmArchive

Schedule    DataTable archive                     Stage 1
Schedule    Oxs_TimeDriver::Magnetization archive Stage 1

    
