Feellgood
Feellgood Documentation

FeeLLGood is a micromagnetic solver using finite element method (FEM) to solve Landau Lifschitz Gilbert equation in a magnetic material.

\( \frac{\partial \mathbf{m}}{\partial t} = - |\gamma_0| \mathbf{m} \times \mathbf{H}_{eff} + \alpha \mathbf{m} \times \frac{\partial \mathbf{m}}{\partial t} \)
With \( \gamma_0 \) the electron gyromagnetic ratio and \( \alpha \) the Gilbert phenomenological damping parameter. This non-linear partial derivative equation is solved using finite element method, using a weak formulation. The effective field \( \mathbf{H}_{eff} \) is:

\( \mathbf{H}_{eff} = \frac{2 A}{\mu_0 M_s} \nabla^2 \mathbf{m} - \frac{1}{\mu_0 M_s} \frac{\partial E_{an}}{\partial \mathbf{m} } + \mathbf{H}_a + \mathbf{H}_d \)

\( A \) is the exchange energy constant, \( M_s \) is the magnetization at saturation of the considered material. \( E_{an} \) is the anisotropy energy contribution. \( \mathbf{H}_a \) is the external applied field. The demagnetizing field \( \mathbf{H}_d = -\frac{1}{4 \pi} \int_V \nabla \cdot \mathbf{m} \frac{\mathbf{r}}{r^3} dV \) is computed using fast multipole algorithm, implemented in the external library scalfmm. See online documentation for more details about all parameters required for a complete simulation.

FeeLLGood synopsis

FeeLLGood solves a micromagnetic problem the following way:

dot_inline_dotgraph_1.png

Within the settings, a mesh and all the micromagnetic parameters are provided. The mesh must be a tetraedron first order mesh, it is read once to prepare element matrices, related to each element objects, namely triangular facettes and the tetraedrons. FeeLLGood does not handle any other kind of mesh. At time t=0, the initial magnetization field values are set, either from .sol file or using a math expression. The external applied field \( \mathbf{H}_a \) might be time dependant. All material parameters defining exchange and anisotropy are used as inputs for the computation of the corresponding fields (arrow dismissed here for readability). The various field contributions are computed in each tetraedron object, except demagnetization field computed in class scal_fmm::fmm. The small dense element matrices are used to build a 2NĂ—2N sparse set of equations. It is solved using a stabilized bi-conjugate gradient algorithm, embedded in class LinAlgebra. Time integration of the whole micromagnetic problem is using an adaptative time step procedure, handled by function time_integration and class TimeStepper.

Input and output files

Input settings should be written in a json or yaml text file, following the online documentation. They feed the class Settings. The mesh must be first order tetrahedrons in .msh format, either text or binary, from version 2.2 to the latest 4.1. The software gmsh or its python API can build such a mesh file. The class Mesh::mesh is handling the reading of the mesh file, and various members fonctions to access inner objects. An optional initial magnetization configuration might be provided, it must be a .sol file.

output files

The output .evol file is a convenient way to monitor a simulation, it is a tab separated value file with variable columns defined in the settings. The output .sol files are text files, tab separated value. Each column is a magnetization component, each line is refering to a node of the mesh. It is also possible to convert outputs text files in vtk file format, usefull to visualize datas in paraview, with some external scripts provided in feellgood/tools sub directory.

Dependances, installation & configuration

see online documentation for the installation procedures, and all the prerequisites.