Skip to main content

Python API for FEMAG

Project description

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'

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

femagtools-1.9.2.tar.gz (472.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

femagtools-1.9.2-py3-none-any.whl (542.5 kB view details)

Uploaded Python 3

File details

Details for the file femagtools-1.9.2.tar.gz.

File metadata

  • Download URL: femagtools-1.9.2.tar.gz
  • Upload date:
  • Size: 472.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for femagtools-1.9.2.tar.gz
Algorithm Hash digest
SHA256 105ea1c00b515a5240c220aff253cd205bef63c5e181349b4ee1617cf6911322
MD5 0ad4f92494ac0e389abd902cad523a5f
BLAKE2b-256 33968ee1f2002c07158190daf4b902a14d8a57c40c936f56b018fa4794bf34b1

See more details on using hashes here.

File details

Details for the file femagtools-1.9.2-py3-none-any.whl.

File metadata

  • Download URL: femagtools-1.9.2-py3-none-any.whl
  • Upload date:
  • Size: 542.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for femagtools-1.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e11198e5e35400e507bed7f5f72b1bc2d7311f3c7ba41d9e4931532bc5361d58
MD5 b91289f0f02e21987a8cc924f59fc278
BLAKE2b-256 58f03deb570e32dacebd292e09dee82518855864cb90fd7c1c4381cb64f3d51e

See more details on using hashes here.

Supported by

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