Micromagnetism
Basic input
The matlab file DefaultMicroMagProblem.m and similarly the python file micromag.py contains an updated list of all parameters that can be specified in a micromagnetic problem.
The micromagnetic model automatically generates a rectangular grid, if not provided with a grid. See the example files for how to do this.
The common parameters are:
Grid resolution
Grid size
Exchange constant
Saturation magnetization
Anisotropy constant
Damping constant, \(\alpha\)
Precession constant, \(\gamma\)
Anisotropy constants
The anisotropy can be specified as a local uniaxial anisotropy, \(problem.K_0(i)\) at every grid point along with an anisotropy vector, \(problem.u_{ea}(i,:)=[easyX(i),easyY(i),easyZ(i)]\) in matlab notation. The anisotropy can also be specified as a cubic anisotropy with \(problem.K_1(i)\) and \(problem.K_2(i)\) at every grid point along with a local coordinate system:
However, if the anisotropy is not uniaxial, a general matrix formulation with the anisotropy energy density given by [following Eq. (2) in https://doi.org/10.1088/1361-665X/aafff8]:
In this case the anisotropy constants are specified locally at each grid point in a 6x3 matrix as
In the above matrix notation, a uniaxial anisotropy in the z-direction is given by:
and a cubic anisotropy is given by:
For the general anisotropy the crystal axis must also be specified in a format similar to the cubic anisotropy.
Dynamic simulations
An example of how to run a dynamic simulation in Matlab is given here.
Hysteresis loop simulation
An example of how to run a hysteresis loop simulation in Matlab is given here and in python here.