feeLLGood – Tips and tricks
Here is a random collection of tips that can help you make better use of feeLLGood.
Usual workflow
The usual way to use feellgood
to do some simulations is to follow the following workflow:
-
First, prepare you mesh, using
gmsh
or any other mesh generation software that can provide a mesh in gmsh format. Optionally, use the rev_CMK tool if you have to reduce index spectrum. -
Once your mesh is ready, you have to create a YAML file with the input parameters needed by the
feellgood
executable. You can create the file with a text editor, or use the Python helper scriptsettingsMaker.py
to create the file in JSON format. As JSON is a subset of YAML, it is acceptable as feeLLGood's input. -
Run your simulation, either from a script, or with the command line using your YAML file as an input for the executable
feellgood
. -
You will need to visualize your data and/or perform some calculations on them. A tool to convert
feellgood
output files is provided in the tools directory. It converts the magnetization distribution in the output text files .sol in a format paraview can read directly. Some more information about theconvert2vtk
script is available in the section tools.
Creating a good mesh
FeeLLGood expects the mesh to be made of first order tetrahedrons and triangles, and stored in a file in the “.msh” file format. Such a mesh can be built by Gmsh. It is strongly recommended to use a constant density of tetrahedrons in the material, since it is well known that domain-walls would be strongly affected in their motion if non-uniform meshing was used. Usual other recommendations while meshing also apply while solving LLG with finite element method:
- no flat tetrahedrons
- avoid sharp angles
- take care of the indices of the nodes: be sure to apply an algorithm to reduce the node index bandwidth, such as Cuthill-McKee algorithm. We provide the source code of a simple tool to apply the reverse Cuthill-McKee algorithm on a mesh file in the sub directory
/tools/rev_CMK
. - average size of the tetrahedrons should be smaller than the exchange length
- curved geometries must be properly meshed to avoid eventual artificial surface charges
Generally speaking, a micromagnetic simulation should not depend on the mesh, so it is recommended to check the results with different meshes, and/or various meshing techniques: extrusion, 3D meshing, or others.
In a separate YAML file, you will provide all the parameters that describe your material in accordance with the region numbering system of gmsh. \( M_s \) , \( \alpha \) , and other parameters such as anisotropy constants are provided here.
Since feellgood needs regions to define boundary conditions, it is necessary to use a .geo script to generate numbered surface and volume regions. Once the mesh is done, the user just have to write a YAML file to give each material parameters for each regions.
See user documentation for more information on all the possible parameters.
Validating the simulation results
In order to qualify the simulation results, it is recommended to slightly vary:
- the element size in the mesh
- the min and max values on both \(du\) and \(dt\) and check that the output results do not change.
This does definitely not prove that the calculation is correct, but at least you are sure feeLLGood converged towards a possible solution of the micromagnetic problem.