Project · Creator and maintainer

py2femm

Platform-independent FEMM automation through generated Lua and a REST boundary.

Updated

py2femm project mark beside the FEMM geometry of a 12-slot interior permanent-magnet machine generated by the ISPMSM example.
Project mark and a scripted FEMM geometry from the repository's ISPMSM example; torque and ripple are evaluated per candidate in the optimisation loop.

Context

Finite-element models are most useful when geometry, materials, and operating assumptions can be changed systematically in code.

Constraint

The common ActiveX route is Windows-only. Geometry and physics can also become tightly coupled, making studies harder to reuse from notebooks, Linux, containers, or remote clients.

Contribution

I created a Python API that generates Lua instructions, separates geometry from physics, and submits FEMM jobs through a REST server.

Approach

The client serializes a problem into a solver-readable script. A small service runs FEMM where it is installed and returns structured results for magnetic, electrostatic, heat-flow, and current-flow studies.

Outcome

Studies can be parameterized once and executed across different environments without tying every caller to the solver host.

Evidence

The public repository includes the client/server boundary, geometry model, command-line workflow, notebooks, examples, tests, and documentation.

Artifacts