Skip to main content

coilEM — local electromagnetic design

coilEM is an open-source application for exploring electric motors and magnetic fields. Edit a motor, inspect its geometry and mesh, run the bundled Magneto2D solver, and compare saved results with field playback and PDF/CSV exports. Everything runs on your computer.

Website: coilem.com

The source identifies as coilEM 0.5.1 Developer Preview, with Magneto2D 0.4.0. Version 0.5.1 passes the registered A-D release qualification gate with source-matched Windows/macOS and Prius software evidence. See release status for packaging and publication. The release notes and 0.5.1 release plan track its scope and remaining gates. The Windows evidence records 46 A–D PASS and 336/336 gates on the integration merge, including a complete overnight fresh FEMM repeat. Proposed cogging coverage records 10 PASS / 2 YELLOW against the selected references and remains under review. The accepted qualification records retain measured commit a4f9f4d; all 64 guarded physics hashes match the versioned release code. The owner accepted reference reuse, one near-zero Prius observation difference, and the experimental cogging scope.

The v0.4.0 evidence report retains the historical Windows A/B/C/D development qualification: 35 supported jobs, 28 PASS, 1 YELLOW and one planned unsupported legacy Prius row at 5b6cb61. The separate exact Pyleecan Prius collection records 17 jobs and 568 fields at d993d76, with all 10 original software checks passing. These measured commits are the baseline for the final-candidate rerun, not measurements of a future tag. The benchmark index preserves the full reports, frozen FEMM references and earlier platform records.

The 0.5.0 freeze measures clean candidate 88aae101 under protocol 1.6.0 on both platforms (qualification update): Windows and macOS each record 46 PASS, the planned unsupported legacy ORNL Prius and 336/336 gates against the reviewed FEMM references, and the exact-candidate Pyleecan Prius passes all 10 software checks. The release qualification gate passes. Version 0.5.0 was published on November 3, 2026; this historical qualification does not qualify the 0.5.1 candidate.

coilEM workspace

Developer preview: the Windows requalification report provides the development evidence for these tested combinations with the current winding model:

  • SPM with concentrated windings, under sinusoidal or ideal six-step current;
  • SPM with two-layer distributed windings, under sinusoidal current; and
  • flat-buried IPM with concentrated windings, under sinusoidal current.

V-shape IPM and untested combinations, such as six-step with distributed windings, are experimental. Of the 0.5.0 performance outputs, phase resistance and copper loss are qualified for a design with a wire, against hand calculations. The others (d/q flux linkage, torque–speed and efficiency maps, iron loss, efficiency and magnet temperature) are experimental. Each says which, with a reason, in the app, PDF and CSV. See Validation for the qualified scope and its limits.

Install

coilEM is published on PyPI as coilem. Install it with uv, then start it:

uv tool install coilem
coilem

coilem starts the app on your computer and opens http://127.0.0.1:2645 in your browser. Press Ctrl+C in its terminal to stop it. To try coilEM once without installing it, run uvx coilem. uv downloads a compatible Python (3.11 to 3.15) if you do not have one, and nothing else is needed: each wheel includes the Magneto2D solver and the built UI.

If you do not have uv yet, install it first, then open a new terminal:

curl -LsSf https://astral.sh/uv/install.sh | sh

On Windows PowerShell:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Platform Requirement
macOS on Apple silicon macOS 12 or newer
macOS on Intel macOS 10.15 or newer
Linux x86_64 glibc 2.27 or newer (for example Ubuntu 18.04, Debian 10, RHEL 8) and the OpenGL and X11 libraries Gmsh needs: sudo apt-get install libglu1-mesa libgl1 libx11-6 libxcursor1 libxext6 libxfixes3 libxft2 libxinerama1 libxrender1 libfontconfig1 libgomp1 on Debian and Ubuntu
Windows x64 64-bit Windows

Linux and Windows on ARM are not supported yet. CI tests the installed wheel on macOS 15 (Apple silicon and Intel), Ubuntu 22.04 and Windows Server 2022 with Python 3.11 to 3.15.

Upgrade with uv tool upgrade coilem and remove it with uv tool uninstall coilem. Saved runs stay in your user-data folder after an uninstall. If coilem is not found after installing, run uv tool update-shell and open a new terminal. pipx install coilem also works when pipx runs on Python 3.11 to 3.15. The coilem launcher describes ports and options.

Start from source

To work on coilEM itself, build it from a checkout instead. You need Python 3.11 to 3.15, Node.js 24 with npm, and stable Rust with Cargo (the locked faer dependency requires Rust 1.84 or newer). Use a fresh checkout and virtual environment. On Ubuntu/Debian, install the system libraries Gmsh needs first: sudo apt-get install libglu1-mesa libgl1 libx11-6 libxcursor1 libxext6 libxfixes3 libxft2 libxinerama1 libxrender1 libfontconfig1 libgomp1.

Windows PowerShell:

py -3.11 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.lock
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"
cargo build --release --locked --manifest-path solvers/magneto2d/Cargo.toml
.\.venv\Scripts\python.exe -m uvicorn backend.public_main:app --host 127.0.0.1 --port 8000

macOS or Linux:

python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.lock
.venv/bin/python -m pip install -e ".[dev]"
cargo build --release --locked --manifest-path solvers/magneto2d/Cargo.toml
.venv/bin/python -m uvicorn backend.public_main:app --host 127.0.0.1 --port 8000

In a second terminal:

cd frontend
npm ci
npm run dev

Open http://127.0.0.1:5173, choose Use Example Motor, and follow Design → Solve → Results. The Getting started guide explains the example, solve settings and exports. The backend must stay bound to loopback.

Contributors can also try the packaged launcher from a checkout. Run python -m pip install . in a separate virtual environment; this builds the UI and Magneto2D, so it still needs Node.js and Cargo. Then run coilem: it serves the UI and API together and opens http://127.0.0.1:2645. See the coilem launcher.

What you can explore

  • Radial-flux SPM and IPM (flat-buried and V-shape) motor geometry, native Gmsh meshes, sinusoidal current, and ideal wye-connected 120-degree six-step excitation for SPM.
  • Loaded torque, phase and line Back-EMF, field plots, and harmonic spectra.
  • Solver convergence in Results, PDF and CSV, including recorded residuals, iteration limits and warnings.
  • Loaded d/q flux linkage, apparent Ld and Lq, and a torque cross-check from them that includes reluctance torque.
  • An optional Torque–speed map under Solve → Analysis. It solves a flux-linkage map over current and current angle, then draws peak and continuous torque–speed and power–speed curves (MTPA, field weakening and MTPV) for a DC bus and current limit, and an efficiency map.
  • Wire size, strands in hand, end-turn extension and winding temperature in Design, giving phase resistance and slot fill. Copper loss, stator iron loss and efficiency at the solved point, with a map of where the iron loss is. Iron loss is available for M350-50A and for the Pyleecan Prius's M400-50A.
  • A magnet temperature under Solve → Operating point. Br and HcJ are derated from the grade's cited coefficients for N35, N42, N48, N52 and N48SH.
  • Cogging torque, under Solve → Analysis (on main, for 0.5.1). It solves one cogging period with no current; Results, the run PDF and the CSV give the waveform, peak-to-peak and peak, the harmonics per mechanical revolution and the share of the loaded torque. Experimental until it has a FEMM gate.
  • Preview, Standard and High accuracy mesh/solve presets. These names describe resolution and sampling; they do not certify accuracy.
  • Saved runs, comparison, project save/reopen, PDF, CSV and replay downloads. Torque–speed results download as a performance PDF, a performance CSV, an id/iq table CSV and the map points CSV.
  • Solver-backed electromagnetics lessons and cylindrical and linear Halbach workspaces.

The Pyleecan 2004 Prius software benchmark adds two fixed examples under Examples → Benchmarks: tutorial BEMF at 1000 rpm / 20°C and loaded torque at 2000 rpm / 60°C / 250 A peak. They preserve the pinned analytic model and embedded M400-50A curve through save and reopen. These experimental software references remain separate from ORNL hardware validation.

Limits to understand

Qualification means agreement with FEMM, a reference 2D finite-element solver, on the measured benchmark fixtures: mean torque within 8%, Back-EMF fundamental and peak within 10%, plus fourteen six-step gates for BLDC. It covers only the tested combinations listed above, with M350-50A steel. One of six V-shape IPM fixtures is YELLOW against FEMM, so V-shape results are experimental. THD, airgap harmonics, losses and thermal behavior are not covered. Cogging torque is reported but not covered: it has no FEMM gate yet (its claim boundary). It is not a hardware measurement.

Of the 0.5.0 performance outputs, only phase resistance and copper loss pass a gate so far:

  • Phase resistance passes a gate against independent hand calculations, for a design with a wire. A design without one gets a wire sized to fill the slot, and its resistance stays experimental. The gate checks the calculation, not a measured winding.
  • Loaded λd/λq and magnet temperature have FEMM gates registered for the freeze, so they are experimental until then. Ld and Lq, the maps, iron loss and efficiency have no gate.
  • Losses leave out magnet and rotor eddy-current loss, AC copper loss (skin and proximity effects) and inverter loss. Mechanical loss is a single constant you enter, the same at every speed.
  • Iron loss comes from the steel grade's guaranteed loss limits, not from measured motor data, and other steels show it as unavailable.
  • Magnet temperature derates Br linearly. It does not model demagnetisation, and there is no thermal solver: magnet and winding temperatures are inputs.
  • The torque–speed envelope ignores inverter voltage drops and dead time. Its continuous curve is a current limit, not a thermal rating.

Motor sweeps use per-angle meshes, with symmetry-based reuse where applicable, without a sliding-band interface. Mesh changes can introduce numerical noise into torque ripple and cogging. Check mesh and angular convergence before interpreting small variations. A cogging sweep reports two noise measures, its mean over the period and the mismatch between its two ends; on the example design both are under 0.5% of its peak-to-peak (convergence study). Six-step excitation models ideal commanded currents, without PWM, switching, ESC dynamics or thermal behavior. See Release notes and Materials.

The source application is coilEM 0.5.1 and the solver is Magneto2D 0.4.0. There are no accounts, hosted services or telemetry in this distribution. Elmer is an optional development-only lane; see its setup.

Reproducibility and contributing

Run the versioned A/B/C/D suite (SPM, IPM, Distributed Winding and BLDC) on your own computer with coilem benchmark, or coilem benchmark --quick for one case per phase in about 5 minutes. It solves each case with the installed Magneto2D and grades it against the frozen FEMM reference that ships with coilEM. It then checks that the result matches the published record for your platform, and writes a shareable report with no local paths. It needs no Git, Rust, Node.js or FEMM. From a checkout, python -m tools.run_benchmarks --out-dir ../benchmark-output/my-run --pdf runs the same suite with the developer options. See the benchmark commands, reference compatibility and version policy.

The motor benchmark collection also includes Pyleecan Prius 8p48s and the exploratory Honda Accord 2005 comparison. From a clean checkout, python -m tools.run_model_benchmarks --list lists the named selections; --out ../benchmark-output/all-models runs all three workflows. Prius has software acceptance checks; Honda retains its hardware residuals without a pass/fail claim. Deferred legacy ORNL Prius coverage is separate.

The public Magneto2D path ignores inherited numerical solver switches. It derives native options from the request and records its environment policy and options in new motor results. Runtime settings lists public configuration names. New design files use .coilem; existing .openem files remain compatible with the same JSON project format.

Completed runs live outside the checkout in your OS user-data directory and retain requests, results and hashes. See local storage. The root snapshot manifest records the original source export, listed public patches, and current file hashes. It is an integrity record, not evidence of numerical accuracy.

See Architecture, Magneto2D, the public API boundary, and Validation for checks and numerical limitations. Report bugs through Support, and vulnerabilities privately through Security. Source is licensed under AGPL-3.0-or-later; see LICENSE, third-party notices and trademark terms.

Metadata

Release files for coilem 0.5.1

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

Built distributions (wheels)

Table of built distributions (wheels) for coilem 0.5.1
File Actions
coilem-0.5.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for coilem-0.5.1-py3-none-win_amd64.whl
coilem-0.5.1-py3-none-manylinux_2_27_x86_64.whl Python 3 none Linux glibc 2.27+ x86-64 Details for coilem-0.5.1-py3-none-manylinux_2_27_x86_64.whl
coilem-0.5.1-py3-none-macosx_12_0_arm64.whl Python 3 none macOS 12.0+ ARM64 Details for coilem-0.5.1-py3-none-macosx_12_0_arm64.whl
coilem-0.5.1-py3-none-macosx_10_15_x86_64.whl Python 3 none macOS 10.15+ x86-64 Details for coilem-0.5.1-py3-none-macosx_10_15_x86_64.whl

Total release size: 25.7 MB

Release files / coilem-0.5.1-py3-none-win_amd64.whl

Download URL coilem-0.5.1-py3-none-win_amd64.whl
Size 6.5 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
52cba5d131f37ba60f7b9e210680cbffb5d69a581182055f4abe2cc275542731
BLAKE2b-256 checksum
How to use checksums
67841069bf69a9290565f1b4d352941d909d74f53fd0663de4462b3d3f4450bc
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 Nov 6, 2026.

Transparency log

Release files / coilem-0.5.1-py3-none-manylinux_2_27_x86_64.whl

Download URL coilem-0.5.1-py3-none-manylinux_2_27_x86_64.whl
Size 6.7 MB
Tags Linux glibc 2.27+ x86-64 Python 3
SHA-256 checksum
How to use checksums
618eebcfa9caa902e173a84e3a37e16d3f840aaa8483515f266b4d9af359087e
BLAKE2b-256 checksum
How to use checksums
0fd77a07bbf725212102246af946a5835e2adda8f172e4ae96cc8e00644afac7
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 Nov 6, 2026.

Transparency log

Release files / coilem-0.5.1-py3-none-macosx_12_0_arm64.whl

Download URL coilem-0.5.1-py3-none-macosx_12_0_arm64.whl
Size 6.2 MB
Tags Python 3 macOS 12.0+ ARM64
SHA-256 checksum
How to use checksums
c84e46a677868afe58937f25e956acc27b8c0cbcd929af9880f5521065b5f3e6
BLAKE2b-256 checksum
How to use checksums
f072c2b7dd51e9199a9419123bdb6c21c6086a83eefb693f822bbc0c2fd6a16c
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 Nov 6, 2026.

Transparency log

Release files / coilem-0.5.1-py3-none-macosx_10_15_x86_64.whl

Download URL coilem-0.5.1-py3-none-macosx_10_15_x86_64.whl
Size 6.4 MB
Tags Python 3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
00ec5b68c81937291c49f4118b01fea0921820ce22d99f920c88da87ed10ce72
BLAKE2b-256 checksum
How to use checksums
c0d620a2ec73aad61d5869307e171c9e38d71c357e0e3b1782f7474ef32d429c
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 Nov 6, 2026.

Transparency log

Security for coilem 0.5.1

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.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for coilem-0.5.1-py3-none-win_amd64.whl

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 Nov 6, 2026.

Transparency log

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.

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