An Open Source 2D FEA Library for Electric Machines in Matlab

Hi folks! Remember earlier, when I promised to start publishing my work as Open Source? Well wait no further – the first version of SMEKlib is now out!

Click here to freely download it from GitHub!

This current version (mid-Jan 2017) only contains the core functionality, so no fancy eddy current models yet. Those will be added in due course. Also, the library does not contain much meshing functionality, so you’ll have to sort that part out yourself. Matlab’s initmesh, and of course gmsh are good starting points.

With that disclaimer out of the way, let’s move on:


SMEKlib is published under the MIT license, meaning you can very freely adapt it to both academic and industrial use.

Right now, it contains almost all functionality for typical 2D analysis of rotating machines. This includes, for example, the following

  • Time-harmonic and time-stepping analysis.
  • Linear and non-linear materials. Non-linear models are solved with the Newton’s method. By default, hysteresis is not included, but you can easily bolt in your material model.
  • Current and voltage supply.
  • Rotation, obviously.
  • Basic post-processing.

Below, you can see some results from time-stepping analysis of a 37 kW induction machine. You can also check my LinkedIn post for more discussion.

Flux lines from time-stepping analysis.
Phase currents from time-stepping and time-harmonic analysis.

Future features

I will keep on adding already-implemented functionality in the near future. For example, you can expect the following:

  • Thin-conductor models for including circulating current effects with practically zero extra computational cost.
  • Reduced basis models for efficient eddy current models. Expect 60-100 x faster analysis.
  • Domain decomposition-type models for the same purpose.
  • Different motion models (sliding surface and air-gap elements).
  • Harmonic balance modeling (tentatively).

Finally, better user interface and machine model templates might be added. That depends on if we can hire somebody to do it. If you’re an Aalto student, there’s still time to apply!


That’s all for today. If you’re interest, please do download SMEKlib, and share this post 🙂

If you happen to use the library for something useful, I’d like you to acknowledge it. Citing my papers would be even better. But of course you don’t have to do this if you don’t want – the MIT license is quite permissive indeed.


Check out EMDtool - Electric Motor Design toolbox for Matlab.

Need help with electric motor design or design software? Let's get in touch - satisfaction guaranteed!
SMEKlib now Published – Take your FEA to the Next Level!

Leave a Reply

Your email address will not be published. Required fields are marked *