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 latest complete benchmark reports, v1.7 on macOS and
v1.8 on Windows, measure the selected A/B/C/D matrix on
coilEM 0.3.0 (1fac3a1): 29 PASS, one planned unsupported Prius fixture and
42/42 BLDC gates on both platforms. The two platforms agree on every verdict
and gate status. They run fresh Magneto2D fields against frozen, data-only
FEMM references; no new FEMM solves were executed. The
benchmark index retains earlier runs, the compiled
v1.2 selection, archived runs and the scoped preview qualification record.
Developer preview: the published A/B/C/D benchmark report v1.1 qualifies these tested combinations against matched FEMM references, and reports v1.7 and v1.8 confirm that every qualified fixture still passes on coilEM 0.3.0, on macOS and Windows:
- 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. 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.14) 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 GLU library: sudo apt-get install libglu1-mesa 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.14.
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 Python 3.11 or newer is
installed. 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.14, 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 Gmsh system
library first: sudo apt-get install libglu1-mesa.
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.
- 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.
- Solver-backed electromagnetics lessons and cylindrical and linear Halbach workspaces.
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. Two of six V-shape IPM fixtures fail, so V-shape results are experimental. Cogging, THD, airgap harmonics, losses and thermal behavior are not covered. It is not a hardware measurement.
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 dedicated cogging result view is not included. Six-step excitation models ideal commanded currents, without PWM, switching, ESC dynamics or thermal behavior. See Release notes and Materials.
The application is coilEM 0.3.0 and the solver is Magneto2D 0.3.3. 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) from the
checkout with python -m tools.run_benchmarks --out-dir ../benchmark-output/my-run --pdf.
It measures the current public native solver against saved FEMM data, with no
reference solver installation or adapter required. See the benchmark commands,
reference compatibility and version policy.
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.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| coilem-0.3.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| coilem-0.3.0-py3-none-manylinux_2_27_x86_64.whl | Python 3 | none | Linux glibc 2.27+ x86-64 | Details |
| coilem-0.3.0-py3-none-macosx_12_0_arm64.whl | Python 3 | none | macOS 12.0+ ARM64 | Details |
| coilem-0.3.0-py3-none-macosx_10_15_x86_64.whl | Python 3 | none | macOS 10.15+ x86-64 | Details |
Total release size: 23.1 MB
Release files / coilem-0.3.0-py3-none-win_amd64.whl
| Download URL | coilem-0.3.0-py3-none-win_amd64.whl |
|---|---|
| Size | 5.8 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d339c7481deca5212ca456e1d34b025fb51202e05ecb03efac6c1dfe23eab349
|
|
BLAKE2b-256 checksum How to use checksums |
09c347c2440f536bd4d9c3bccb24f2d83307bb15569dccadaf1eea487010a054
|
| 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 Oct 13, 2026.
Transparency logRelease files / coilem-0.3.0-py3-none-manylinux_2_27_x86_64.whl
| Download URL | coilem-0.3.0-py3-none-manylinux_2_27_x86_64.whl |
|---|---|
| Size | 6.0 MB |
| Tags | Linux glibc 2.27+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
420eed2f5e2248f2f2649b8d9c842def9b5935f2e463c4b439ec747747e72162
|
|
BLAKE2b-256 checksum How to use checksums |
c74c454361368f6418e14448b2b4485a7d01a139e5a8ba7b276c82253ed306c7
|
| 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 Oct 13, 2026.
Transparency logRelease files / coilem-0.3.0-py3-none-macosx_12_0_arm64.whl
| Download URL | coilem-0.3.0-py3-none-macosx_12_0_arm64.whl |
|---|---|
| Size | 5.5 MB |
| Tags | Python 3 macOS 12.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2a2b42b80e5884c0c499890115d8540f12575243899cbf43bb31462c173c1d4d
|
|
BLAKE2b-256 checksum How to use checksums |
ca1dec31759fd49b6a03a723966d87ea040551a58d2369aa5b7f30402a94c8d6
|
| 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 Oct 13, 2026.
Transparency logRelease files / coilem-0.3.0-py3-none-macosx_10_15_x86_64.whl
| Download URL | coilem-0.3.0-py3-none-macosx_10_15_x86_64.whl |
|---|---|
| Size | 5.7 MB |
| Tags | Python 3 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
97e58b7378ff8db87edf0d5e2a0825f189e9468395fc4fbcb762d7e627905fc0
|
|
BLAKE2b-256 checksum How to use checksums |
1cbae098fd06301e7bb4e491dc28752ebb1fb6651f84c3312acc7935c0b42d3d
|
| 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 Oct 13, 2026.
Transparency log