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 a coilEM 0.5.6 Developer Preview candidate, with
Magneto2D 0.5.0. The frozen post-version-bump candidate passes
Windows/macOS A-D and Prius qualification;
this version has not been released. Version 0.5.5, released with
Magneto2D 0.4.0, introduced
outer-rotor (outrunner) SPM motors,
which are experimental, and passed the registered A-D release qualification
gate with source-matched Windows/macOS and Prius software evidence. See
release status for packaging and publication and the
release notes for its scope.
The v0.5.5 accepted qualification records
retain measured commit 34de0f4; all 69 guarded physics hashes match the
v0.5.5 release code. Both platforms record 46 A–D PASS and 336/336 gates.
The owner accepted reuse of the reviewed protocol 1.6 FEMM references, backed
by a fresh Windows FEMM collection of all 46 cases, and the same near-zero
macOS Prius observation difference accepted for 0.5.1. A first Windows run of
the proposed outer-rotor benchmark (Phase F) passes all 10 cases against FEMM;
it is not registered yet. Proposed cogging coverage (Phase E) remains under
review, as recorded in the 0.5.1 Windows evidence.
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 later versions.
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 (since 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.6 and the solver is Magneto2D 0.5.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.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| coilem-0.5.6-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for coilem-0.5.6-py3-none-win_amd64.whl |
| coilem-0.5.6-py3-none-manylinux_2_27_x86_64.whl | Python 3 | none | Linux glibc 2.27+ x86-64 | Details for coilem-0.5.6-py3-none-manylinux_2_27_x86_64.whl |
| coilem-0.5.6-py3-none-macosx_12_0_arm64.whl | Python 3 | none | macOS 12.0+ ARM64 | Details for coilem-0.5.6-py3-none-macosx_12_0_arm64.whl |
| coilem-0.5.6-py3-none-macosx_10_15_x86_64.whl | Python 3 | none | macOS 10.15+ x86-64 | Details for coilem-0.5.6-py3-none-macosx_10_15_x86_64.whl |
Total release size: 26.1 MB
Release files / coilem-0.5.6-py3-none-win_amd64.whl
| Download URL | coilem-0.5.6-py3-none-win_amd64.whl |
|---|---|
| Size | 6.6 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
09d6e057cc55c3e05cd48702e25770156c726f8143e200b60e71d9d8b023e0c8
|
|
BLAKE2b-256 checksum How to use checksums |
cd27fb6c18eca82f89aa058e8204fbdb8b3d4cfefbfb96813eb1e9598a1f06f8
|
| 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 9, 2026.
Transparency logRelease files / coilem-0.5.6-py3-none-manylinux_2_27_x86_64.whl
| Download URL | coilem-0.5.6-py3-none-manylinux_2_27_x86_64.whl |
|---|---|
| Size | 6.8 MB |
| Tags | Linux glibc 2.27+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
1a19667d41fcfdbc4b3cc09055f62b383924f645400bd0a08d440a3342aa2be1
|
|
BLAKE2b-256 checksum How to use checksums |
2756652733b819cb781ddc77eac72b0abe2a79873ad6be61f756aca64287989c
|
| 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 9, 2026.
Transparency logRelease files / coilem-0.5.6-py3-none-macosx_12_0_arm64.whl
| Download URL | coilem-0.5.6-py3-none-macosx_12_0_arm64.whl |
|---|---|
| Size | 6.3 MB |
| Tags | Python 3 macOS 12.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c84db47bd09bc5180fb3469bb7412f8c1dd24891636dd9c5f57b4ed09003bd1e
|
|
BLAKE2b-256 checksum How to use checksums |
eb27c4ba77bdc8895b703ca30e334dee69215a405de8229d8b83c563b89072b1
|
| 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 9, 2026.
Transparency logRelease files / coilem-0.5.6-py3-none-macosx_10_15_x86_64.whl
| Download URL | coilem-0.5.6-py3-none-macosx_10_15_x86_64.whl |
|---|---|
| Size | 6.5 MB |
| Tags | Python 3 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
e683c6b0612c6d48747ab3ad7534a8ff1fdb18e2f1febc02b9275c9676f96ec9
|
|
BLAKE2b-256 checksum How to use checksums |
cc51683159136280ccc0c0bbafb62f3e48ae734faf078d9eda608bad7dfb411a
|
| 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 9, 2026.
Transparency logSecurity for coilem 0.5.6
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.
Attestation for coilem-0.5.6-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 9, 2026.
Transparency logA 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.