Skip to main content

Analytical electromechanical machine design library

Project description

emachines

Analytical electromechanical machine design library.

emachines is the core physics and mathematics engine behind emdesignlabs.com. It provides well-documented, tested, and citable implementations of the analytical models used in electric motor design.

Scope

  • Winding analysis — winding factors (kp, kd, kw), MMF harmonic spectra, slot/pole geometry
  • Magnetics — BH curve models (Fröhlich, Jiles-Atherton), iron loss (Steinmetz, Bertotti)
  • Motor models — PMSM dq-frame, DC motor, surface-PM analytical design

Every function documents the equation it implements and its bibliographic source.

Installation

pip install emachines

For development (editable install alongside emdesignlabs):

pip install -e path/to/emachines

Quick Start

from emachines.winding.factors import winding_factor
from emachines.magnetics.iron_loss import bertotti
from emachines.motors.pmsm import PMSMParams, torque

# Winding factor for 12s/10p, fundamental harmonic
kw1 = winding_factor(nu=1, Q=12, p=5, coil_span=1)
print(f"kw1 = {kw1:.4f}")  # → 0.9330

# Bertotti iron loss at 400 Hz, 1.5 T
loss = bertotti(f=400, B_peak=1.5, k_h=0.02, k_e=1e-4, k_a=1e-3)
print(f"Total loss = {loss['total']:.2f} W/kg")

# PMSM torque from dq currents
motor = PMSMParams(p=3, Ld=5e-3, Lq=8e-3, psi_m=0.15)
Te = torque(motor, id=-3.0, iq=10.0)
print(f"Torque = {Te:.2f} N·m")

Design Philosophy

  • Equations first — every function documents the formula it implements with LaTeX notation
  • Cited — every formula traces back to a specific reference (textbook, paper, standard)
  • Tested — validated against published datasets and reference tools (emetor, SWAT-EM)
  • Dependency-light — only numpy and scipy required

Status

0.1.x — Alpha. API may change between minor versions.

License

MIT

Project details


Download files

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

Source Distribution

emachines-0.2.0.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

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

emachines-0.2.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file emachines-0.2.0.tar.gz.

File metadata

  • Download URL: emachines-0.2.0.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for emachines-0.2.0.tar.gz
Algorithm Hash digest
SHA256 eae97d620494e84690c18debfdbf264f574620d63f593e5189d4f16093ecb406
MD5 3dd8f03b5fa8904d0036204802285dfd
BLAKE2b-256 96c3b32ef266d931e3d6c9d23a7b347bd63eddbafa02d5a8221a416ab184f000

See more details on using hashes here.

File details

Details for the file emachines-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: emachines-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for emachines-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a8a4f77a337b6b62d73e2a22ac3ea7b9db76bc16e299b8c1fa98cca395e40b4
MD5 d0296d561ac5712441c4f9fd92f5e193
BLAKE2b-256 29479f4b523a50e7d959f28be9aff77f7aef08b25fac334e40a8d6b6003fd316

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