Skip to main content

MagTense - a micromagnetism and magnetostatic framework

Project description


MagTense version 2023

MagTense consists of both a magnetostatic and a micromagnetism calculation framework.

The magnetostatic framework can calculate the magnetic field from objects shaped as cylinders, pieces of cylinders, prisms, circular pieces and tetrahedrons. This is done using a fully analytical calculation of the demagnetization tensor. The framework is fully implemented in Fortran and has both a Matlab MEX interface and a Python interface.

The micromagnetism framework solves the Landau-Lifshitz equation. The framework is fully implemented in Fortran and has a Matlab MEX interface and a Python interface, as well as an older Matlab implementation. The micromagnetism framework utilizes the magnetostatic framework for calculating the demagnetization field.

The webpage of the code is available at https://www.magtense.org.

The TechManual on the code is available at https://cmt-dtu-energy.github.io/MagTense.

Usage with Matlab

MagTense is directly useable in Matlab on Windows by downloading the already compiled MEX-files in Releases. The files are directly useable with no compilation required, although Matlab 2020b or greater is required. Examples of how to calculate magnetostatic and micromagnetic problems using the Matlab interface can be found in matlab/examples.

Compilation with a Visual Studio project file

If you want to compile MagTense with a Visual Studio project file for Windows, MagTense.sln, is available, as well as a Matlab function to build the MEX-files, buildMagTenseMEX.m. MagTense utilizes Intel MKL for the micromagnetic simlations and can also utilize CUDA and CVODE.

Usage with Python interface

Instructions on how to build and use the Python interface are listed in python. Installation is recommended via conda package manager (requires >=Python 3.9). Additionally, binary installers for the Python interface are available at the Python Package Index (PyPI).

  • Installation with CUDA 11.x:

    conda install magtense -c cmt-dtu-energy/label/cuda-11 -c conda-forge
    
  • Installation with CUDA 12.x:

    conda install magtense -c cmt-dtu-energy/label/cuda-12 -c conda-forge
    
  • Installation without CUDA support:

    conda install magtense -c cmt-dtu-energy/label/cpu
    

Current code development

The main features being worked on at the moment are:

  • Proper code documentation
  • Non-uniform grids

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

magtense-2.2.0-2-py311-none-win_amd64.whl (888.5 kB view hashes)

Uploaded Python 3.11 Windows x86-64

magtense-2.2.0-2-py311-none-manylinux1_x86_64.whl (581.4 kB view hashes)

Uploaded Python 3.11

magtense-2.2.0-2-py310-none-win_amd64.whl (888.5 kB view hashes)

Uploaded Python 3.10 Windows x86-64

magtense-2.2.0-2-py310-none-manylinux1_x86_64.whl (581.4 kB view hashes)

Uploaded Python 3.10

magtense-2.2.0-2-py39-none-win_amd64.whl (888.5 kB view hashes)

Uploaded Python 3.9 Windows x86-64

magtense-2.2.0-2-py39-none-manylinux1_x86_64.whl (581.5 kB view hashes)

Uploaded Python 3.9

magtense-2.2.0-1-py311-none-win_amd64.whl (888.5 kB view hashes)

Uploaded Python 3.11 Windows x86-64

magtense-2.2.0-1-py311-none-manylinux1_x86_64.whl (581.1 kB view hashes)

Uploaded Python 3.11

magtense-2.2.0-1-py310-none-win_amd64.whl (888.5 kB view hashes)

Uploaded Python 3.10 Windows x86-64

magtense-2.2.0-1-py310-none-manylinux1_x86_64.whl (581.1 kB view hashes)

Uploaded Python 3.10

magtense-2.2.0-1-py39-none-win_amd64.whl (888.5 kB view hashes)

Uploaded Python 3.9 Windows x86-64

magtense-2.2.0-1-py39-none-manylinux1_x86_64.whl (581.2 kB view hashes)

Uploaded Python 3.9

magtense-2.2.0-0-py311-none-win_amd64.whl (794.5 kB view hashes)

Uploaded Python 3.11 Windows x86-64

magtense-2.2.0-0-py311-none-manylinux1_x86_64.whl (565.4 kB view hashes)

Uploaded Python 3.11

magtense-2.2.0-0-py310-none-win_amd64.whl (794.5 kB view hashes)

Uploaded Python 3.10 Windows x86-64

magtense-2.2.0-0-py310-none-manylinux1_x86_64.whl (565.4 kB view hashes)

Uploaded Python 3.10

magtense-2.2.0-0-py39-none-win_amd64.whl (794.4 kB view hashes)

Uploaded Python 3.9 Windows x86-64

magtense-2.2.0-0-py39-none-manylinux1_x86_64.whl (565.5 kB view hashes)

Uploaded Python 3.9

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page