Source Opened

Posted on February 8, 2008

5


Now that my Lua scripts have grown to a respectable size, I’ve decided to publish them in an Open Source repository.

What started out as a simple script to draw a few rectangles in FEMM has grown into the start of a full-blown framework for developing electric motors… and it is still growing and changing every day.

I’ve created a SourceForge.net project for this. I haven’t spent any time with the aesthetic aspects, so there is no web page yet. However, you can access the file repository here, and it is also accessible via anonymous Subversion (SVN) access. Keep in mind that it is obviously work-in-progress.

In the future, if there is enough interest from anyone, I may give out permissions for other developers to contribute… but I don’t expect to see dozens of people rushing at the opportunity… 😉

My scripts currently include 3 different motor models:

  1. Axial flux with single rotor and normal (sparse) magnetic poles;
  2. Radial flux with double rotor and sparse magnetic poles;
  3. Radial flux with double rotor and Halbach magnetic poles.

As well as a couple of handy “libraries” that I use in all of those models:

  1. A FEMM related library, containing just about anything FEMM-related that can be reused;
  2. A geometry related library, containing trigonometry related functions that I tend to stumble upon in those models.

There are also a few simulation scripts, that make use of the models and try to find the best answers to some smart questions…

  1. A “magnet size scanner“, that tries out all the magnets I have in a list and sees which ones fit in the motor; for those that do fit, it also computes the maximum torque;
  2. A “rotation simulator“, that emulates the behavior of a motor controller, by switching the phase currents in order to keep the motor running (by calculating the torque at each degree position).

To glue it all together, there is also a “model loader“, which is an attempt at a “main program” to load a model and run the simulations.

Advertisements