Skip to main content

Introduction to Femagtools

logo

Build status

Femagtools is an Open-Source Python-API for FEMAG offering following features:

  • run Femag with a FSL script file anywhere: locally (single and multi-core), remote (ZMQ), HT Condor, Cloud (Amazon AWS, Google Cloud), Docker
  • read I7/ISA7, NC, BCH/BATCH, PLT, ERG files
  • read and write MCV files (magnetizing curves)
  • create a variety of plots
  • create FSL files from model and calculation templates and/or user specific FSL
  • create FSL files from DXF
  • create and analyze symmetrical windings
  • sizing and parameter identification
  • calculate machine characteristics by using analytic machine models
  • execute parameter studies and multi-objective optimization

The package can be used with Python 3.x on Linux, MacOS or Windows and is hosted on github: https://github.com/SEMAFORInformatik/femagtools/ where also many examples can be found in the examples directory. Contributions and feedback to this project are highly welcome.

The installation can be done in the usual ways with pip:

pip install 'femagtools[all]'

[all] pulls in all optional dependencies. Up-to-date information about optional dependencies can be found in the pyproject.toml file under [project.optional-dependencies].

For details see the documentation http://docs.semafor.ch/femagtools

Modules and Scripts

The package provides following modules:

  • mcv, tks, jhb, losscoeffs: handling magnetizing curves and iron losses
  • erg, bch: read ERG, BCH/BATCH files created by FEMAG
  • model, fsl: create machine and calculation models
  • femag: manage the FEMAG calculation
  • airgap: read airgap induction file created by a previous calculation
  • machine: analytical machine models
  • windings: create and analyze windings
  • grid: running parameter variations
  • opt: running multi objective optimizations
  • plot: creating a variety of plots
  • dxfsl: create FSL from DXF
  • isa7, nc: read ISA7/I7, NC (NetCDF) files
  • windings: create and analyze windings
  • forcedens: read PLT files
  • amazon, google, condor, multiproc: engines for the calculation in Cloud and HTCondor environments or locally using multiple cores

The following modules can be executed as script:

  • bch: print content in json format if invoked with a BCH/BATCH file as argument
  • bchxml: produces an XML file when invoked with a BCH/BATCH file as argument
  • plot: produces a graphical report of a BCH/BATCH file
  • airgap: prints the base harmonic amplitude of the radial component of the airgap induction when invoked with the file name of an airgap induction file
  • mcv: print content in json format if invoked with a MC/MCV file as argument
  • dxfsl/conv: show geometry or create fsl from dxf

Usage

For many applications it is sufficient to import femagtools:

import femagtools

The version can be checked with:

femagtools.__version__
'1.0.nn'

Metadata

Release files for femagtools 1.9.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for femagtools 1.9.5
File Size Uploaded Provenance Actions
femagtools-1.9.5.tar.gz 473.2 kB Without provenance Details for femagtools-1.9.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for femagtools 1.9.5
File Interpreter ABI Platform Actions
femagtools-1.9.5-py3-none-any.whl Python 3 none any Details for femagtools-1.9.5-py3-none-any.whl

Total release size: 1.0 MB

Release files / femagtools-1.9.5.tar.gz

Download URL femagtools-1.9.5.tar.gz
Size 473.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7fd0f7d6e28873a16660926eb8127358e4e24e1565c9c6416f6d0e6decdbd4c3
BLAKE2b-256 checksum
How to use checksums
6cee16da6af92106b4b142dd94c7aab63e597e7d44e561eeb6ecfd3978cdf862
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / femagtools-1.9.5-py3-none-any.whl

Download URL femagtools-1.9.5-py3-none-any.whl
Size 543.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd5c9b7a9c0f98a6aca4aeab2d243b92e8fb6c04334444b6b8f21196c0a4dfc1
BLAKE2b-256 checksum
How to use checksums
66b4f48e9477b8eae9876d3a0d327dd8ae2c56fd907717a78823c05e480ce5f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Security for femagtools 1.9.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.9.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page