Skip to main content

FEM Magnetics Toolbox

Project description

FEM Magnetics Toolbox (FEMMT)

Python toolbox to generate preconfigured figures for FEM simulation tools in power electronics.

The toolbox contains two parts, a reluctance module and a FEM module.

  • The reluctance module is for pre-calculations
  • The FEM module is for detailed calculations

The toolbox is accessible via python code or a graphical user interface (GUI), which current development status is experimental.

|image0|

Functionality examples

  • work with pre-defined standard core structures
  • work with pre-defined litz wires
  • use python to perform parametersweeps, e.g. perform several automated simulations of different air gap sizes
  • read the results automated with python from the FEM simulation tool
  • run a thermal simulation to see the temperatures, once the magnetoquasistatic simulation has finished

Note: Alpha Version!

  • GUI is experimental,
  • reluctance module is currently working for a single optimization example and not fully implemented yet.

Detailed Documentation

Can be found here <https://upb-lea.github.io/FEM_Magnetics_Toolbox/main/intro.html>__.

Installation

ONELAB installation


-  Go to https://onelab.info/
-  Download the Desktop Version for your OS (Windows, Linux or macOS)
-  Unpack the software and remember the file path. This will be needed
   later when installing FEMMT.

Install FEMMT
~~~~~~~~~~~~~~~~~

Chose to install the development version of FEMMT or the release
version.

FEMMT release version (recommended)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is the stable release version.

::

   pip install femmt

FEMMT development version (for developers only)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is the latest development version with the latest features. Note:
You may need to install `git <https://git-scm.com/downloads>`__.
Also have a look at the . `developers notes </developers_notes.md>`__.


::

   cd /Documents/Folder/of/Interest   
   git clone git@github.com:upb-lea/FEM_Magnetics_Toolbox.git
   pip install -e .

Minimal example and first run

Run the example from here: basic_example.py </femmt/examples/basic_example.py>__. FEMMT will ask you for the installation path of ONELAB during first use.

Examples

This toolbox is able to build a complete FEM simulation from simple Python code. The following figure shows the Python code on the left and the corresponding FEM simulation on the right. |image1|

Basics


Code examples can be found in this `example
file </femmt/examples/basic_example.py>`__. This file is updated
regulary.

The magnetic component can be an inductor, a transformer, or a
transformer with integrated stray path. The parameterization process is
divided into the following steps: 

1. Chose simulation type, 
2. set core parameters (geometry, material), 
3. set air gap parameters (position, height), 
4. set conductor parameters (litz/solid wire), 
5. start simulation with given frequencies and currents and phases.

Find an example here, and check out the `example
file </femmt/examples/basic_example.py>`__ for more examples!

The examples contain among other things: 

* Geometries: Coil, transformer, transformer with integrated stray path, 
* wire and stranded wire definition, 
* air gaps definition, 
* excitation with different frequencies, amplitudes and phases.

The simulation results can be found in the file
/python-side-packages-path/femmt/femmt/results/result_log_electro_magnetic.json.
In it you can find 

* power loss in the core: hysteresis losses and eddy current losses, 
* losses per winding and for each individual winding,
* self- and mutual inductances.

For more information about the possible winding types, please
have a look `here <winding_overview.md>`__.

Counting arrow system

Defined as depicted here:

|image3|

GUI (Experimental)

There is a first preview for a GUI. Installing this is a bit cumbersome at first, but will be simplified in the future:

  • Download the complete repository via Code -> Download ZIP and unpack it.
  • install the development version of femmt as described above
  • run python downloads/path-to_femmt/femmt/gui/femmt_gui.py

Please note, the GUI is experimental.

|image2|

Roadmap

Planned features in 2022:

  • Software stability and general improvements,
  • add more Functionality to the GUI,

Bug Reports

Please use the issues report button within github to report bugs.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. For contributing, please refer to this section <Contributing.rst>__.

Changelog

Find the changelog here <CHANGELOG.md>__

License

GPLv3 <https://choosealicense.com/licenses/gpl-3.0/>__

History and project status

This project was initially written in matlab using FEMM simulation tool. It became clear that the project was no longer a small project. The project should be completely rewritten, because many new complex levels have been added. To place the project in the open source world, the programming language python is used.

.. |image0| image:: https://github.com/upb-lea/FEM_Magnetics_Toolbox/blob/main/documentation/femmt.png?raw=true .. |image1| image:: https://github.com/upb-lea/FEM_Magnetics_Toolbox/blob/main/documentation/FEMMT_Screenshot.png?raw=true .. |image2| image:: https://github.com/upb-lea/FEM_Magnetics_Toolbox/blob/main/documentation/femmt_gui_definition.png?raw=true .. |image3| image:: https://github.com/upb-lea/FEM_Magnetics_Toolbox/blob/main/documentation/counting_arrow_system.png?raw=true

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

Added

  • Add color dictionaries for individual geometry visualization
  • Added output json file for thermal simulation
  • Add Parser to read and visualize the result.json-files
  • Add first version of reluctance model including an example file
  • Added dynamic mesh density algorithm for the winding window
  • Simulation settings are now stored in the log file. A simulation can be started using given log-file.
  • Added a new interface for femmt

Fixed

  • fix #13: improve reading the onelab filepath
  • fix #16: Wrong Mesh is simulated when changing the number of turns
  • fix #17: Error with integrated_transformer mesh
  • fix #19: Scale update in result plots
  • fix #22: Fix bug for air-gap positions 0 and 100 percent

0.2.1 - 2022-04-28

Updated

  • possibility to assign fixed magnetic loss angle and conductivity in update_core function
  • new isolation scheme (looking from core to all windings): core_cond_isolation=[top, bottom, inner, outer] instead of core_cond_isolation=[prim2core, sec2core]
  • gmsh 4.9.5 as minimum requirement

Added

  • example for foil winding inductor
  • conductor material can be chosen from a small material database, used in update_conductors(), e.g. conductivity_sigma=["copper"]
  • isolations for thermal simulation

Fixed

  • fix #15: Secondary to Core isolation thickness not working

0.2.0 - 2022-02-14

Updated

  • updated the winding generation
  • updated the femm reference model
  • updated project structure
  • updated meshing to hybrid mesh
  • updated class structure

Added

  • add file Analytical_Core_Data.py
  • add example files DAB_Input_Data.py, DAB_trafo_optimization.py
  • add file mu_imag.pro
  • add folder femmt/thermal
  • add result_log_electro_magnetic
  • add horizontal interleaved winding scheme
  • add method write_log() to femmt.py
  • add thermal simulation with onelab
  • add femm heat flow validation with femm

Fixed

  • fix #5: changed typo to L_h_conc = self.M**2 / self.L_22
  • fix #11: rename femmt.py to femmt_classes.py due to package problems

0.1.2 - 2021-08-08

Updated

  • updated strand approximation

Added

  • add option for dedicated stray path
  • add complex permeability and permitivity for core materials for Core Loss estimation
  • add iGSE and GSE for Core Loss estimation

0.1.1 - 2021-08-11

Updated

  • updated inductance calculations
  • code clean up

Fixed

  • fix #2: config.json was not read correct
  • fix #3: Install pyfemm on windows machines in case of not installed pyfemm

0.1.0 - 2021-07-28

Added

Structure

  • add README.md
  • add CHANGELOG.md
  • add femmt/init.py

Essentials

  • add femmt/FEMMT.py
  • add femmt/functions.py
  • add femmt/ind_axi_python_controlled.pro
  • add femmt/solver.pro
  • add femmt/BH.pro

Examples

  • add femmt/FEMMT_geometric.py
  • add femmt/basic_example.py

Additional/Experimental Code

  • add femmt/pandas_json.py
  • add femmt/femm_test.py
  • add femmt/SimComparison.py
  • add femmt/SolidComp.py
  • add femmt/CompRes.py

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 Distribution

femmt-0.3.0-py3-none-any.whl (198.8 kB view hashes)

Uploaded Python 3

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