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.1.0.tar.gz (9.7 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.1.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for emachines-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1dfeb2f3c276f6058d7bcd0110fc5bed9205f6dc63e50b1348052234fa43d438
MD5 b00a6f35155f690421ccf2a8d956fa0e
BLAKE2b-256 71ce7d6e230c0023ea7afe3599b9dbb5140a4e9ce76e8b5ed227611e3076298d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: emachines-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8749fd8063a128e7eb513dda2c67559f0a335fcb2767bdc13849a1cb0439646
MD5 e8c0361322f7faffdd502776d1447a22
BLAKE2b-256 44709f3f346e038a947051c7568b9ef1b8d00bd1df6516c942820da9294293d3

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