Skip to main content

Air-Gap Force FFT

Python postprocessor for motor air-gap flux-density results. It reads Br and Btheta, calculates Maxwell stress, evaluates integrated force and torque, and extracts time-space harmonic modes with 2-D FFT.

The included sample is the healthy-position result for the GL80 PMSM.

The project is open source under the MIT License.

Repository Layout

.
|-- src/                         # Processing scripts and reusable modules
|   |-- airgap_force_fft.py       # CLI entry point
|   |-- airgap_io.py              # JSON/CSV readers and sector expansion
|   |-- airgap_fft.py             # Maxwell stress, FFT, torque comparison
|   `-- airgap_plotting.py        # Plotting utilities
|-- tests/                       # Unit tests
|-- data/
|   `-- GL80/healthy_position/   # Public sample input and generated outputs
|-- docs/                        # Discussion notes and analysis reports
|-- config.yaml                  # Default GL80 example configuration
|-- pyproject.toml               # Packaging metadata
`-- requirements.txt             # Runtime dependencies

Quick Start

Install the published package from PyPI:

python -m pip install airgap-force-fft

For development, create an environment and install the repository dependencies:

python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt

Run the default GL80 example:

python .\src\airgap_force_fft.py --config .\config.yaml

The main outputs are written under data/GL80/healthy_position/fft_output by default.

Input Formats

Supported air-gap flux-density inputs:

  • EMSolution/pyemsol gapB JSON
  • Long-form CSV with columns such as time, theta_deg, Br, and Btheta

For EMSolution JSON, geometry and symmetry metadata can be read from the file when available. For CSV input, set the missing metadata explicitly in config.yaml, especially:

  • input.sector.periods
  • input.sector.symmetricity
  • geometry.radius_m
  • geometry.stack_length_m

For full 360-degree CSV data, use input.sector.periods: 1 and input.sector.symmetricity: 0.

Torque Reference Files

Torque comparison supports two reference formats:

  • The earlier transient_results.json style with Time.data and Torque.*.data
  • pyemsol output_transient.json, where torque is read from postData.forceNodal.forceNodalData entries whose propertyNum is stator or rotor, using forceMZ

The comparison plot uses rotor-positive convention: -Ftheta integrated, -stator, and rotor.

Reports

Key analysis reports are in docs/:

Tests

Run the unit tests with:

python -m unittest discover -s tests -v

Packaging

For editable development installation:

pip install -e .

After installation, the CLI can also be invoked as:

airgap-force-fft --config config.yaml

Release files for airgap-force-fft 0.1.0

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

Source distribution (sdist)

Source distribution for airgap-force-fft 0.1.0
File Size Uploaded
airgap_force_fft-0.1.0.tar.gz 17.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for airgap-force-fft 0.1.0
File Interpreter ABI Platform
airgap_force_fft-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size:35.1 kB

Release files / airgap_force_fft-0.1.0.tar.gz

Download URL airgap_force_fft-0.1.0.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e01216e538104bf49423e669c8044b7c2cdec835e748d88277a84813286b0fae
BLAKE2b-256 checksum
How to use checksums
a64994db2a2beea4a8136d030430cb9b80c56e4af17556f212a4cf3d5adca4fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Release files / airgap_force_fft-0.1.0-py3-none-any.whl

Download URL airgap_force_fft-0.1.0-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c57e9588287d001f6c0595f83dda2415264116d2d2b528eef24f082c60c9f76
BLAKE2b-256 checksum
How to use checksums
046ada233a8ef01da9ec310600f6bb72eb1b4a383cd16f778c58fb2e637f9655
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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