pyFEMM -- A Python Interface to FEMM


pyFEMM is a Python interface to Finite Element Method Magnetics (FEMM). The module uses win32com to communicate with FEMM's out-of-proc activex server. The functions in the module wrap interactions with FEMM, making it easy to script FEMM from a Python program.

FEMM is available from the Download page.

The pyFEMM package is available for download here or from PyPI.

Documentation is available at https://www.femm.info/wiki/pyFEMM/manual.pdf

Versions:
v0.1.3, 20Jul2021

v0.1.1, 11May2020
Bug fix update.

v0.1.0, 17Mar2018
Initial release.

Examples


Several examples show how to use Python to do scripting with FEMM. Most of these examples are presented in Matlab, Mathematica, and Scilab formats in the examples directory of the FEMM distribution.

DC Magnetics: Coilgun Example

Coilgun.zip contains a Python script and a FEMM model for the problem discussed on the CoilGun page. The Python script is a port of the original Lua version. The Matplotlib package is used to make a Matlab-like plot of the resulting forces projectile.

 (image: https://www.femm.info/examples/coilgun/coilgun_files/image002.jpg)  (image: https://www.femm.info/wiki/Images/files.xml?action=download&file=pyFEMM_coilgun_force_sm.png)

Figure 1: Plot of force on projectile created by coilgun.py using the Matplotlib package.

DC Magnetics: Demo2 Example

Demo2.py builds a coil with an iron core and plots flux density in the core.

 (image: https://www.femm.info/wiki/Images/files.xml?action=download&file=pyFEMM_demo2.png)

Electrostatics: Microstrip Example

strips.py computes the capacitance of coupled microstrip lines.

 (image: https://www.femm.info/wiki/Images/files.xml?action=download&file=pyFEMM_strips.png)

Heat Flow: Microstrip Example

htutor.py computes the heat flow through a rectangular chimney.

 (image: https://www.femm.info/wiki/Images/files.xml?action=download&file=pyFEMM_chimney.png)

Current Flow

ACElec2.py
Cylindrical capacitor as described here.
 (image: https://www.femm.info/wiki/Images/files.xml?action=download&file=pyFEMM_ACElec2.png)

DC Magnetics: Roters1b Example

roters1.zip is the same as RotersExample but with a 0.8A coil current.
 (image: https://www.femm.info/examples/roters1b/roters1b_files/image002.jpg)
 (image: https://www.femm.info/wiki/Images/files.xml?action=download&file=pyFEMM_roters_results.png)

AC Magnetics: 3-Phase Power Line Example

Phase3.py models a three-phase power line in an unbounded region carrying balanced currents. The script returns the per-meter impedance of each line:
The per-meter 60Hz impedance of each line is 3.807e-05+0.0001629j Ohms
 (image: https://www.femm.info/wiki/Images/files.xml?action=download&file=Phase3.png)



Attachments
File Last modified Size
ACElec2.py 2018-03-20 22:12 2Kb
Phase3.py 2021-07-17 17:24 1Kb
ReturnErrorMsg.py 2021-07-17 19:44 91b
coilgun.zip 2018-03-19 22:57 1Kb
demo2.py 2018-03-19 22:57 4Kb
htutor.py 2018-03-20 21:51 2Kb
pyfemm-0.1.0.tar.gz 2018-03-21 18:38 12Kb
pyfemm-0.1.1.tar.gz 2020-05-11 19:02 13Kb
pyfemm-013.zip 2021-07-20 20:16 17Kb
pyfemm-manual.pdf 2021-07-20 20:19 826Kb
roters1b.zip 2018-03-21 18:29 2Kb
strips.py 2018-03-20 20:15 5Kb

Valid XHTML :: Valid CSS: :: Powered by WikkaWiki