OctaveFEMM
OctaveFEMM is a Matlab toolbox that allows for the operation of Finite Element Method Magnetics (FEMM) via a set of Matlab/GNU Octave functions. This toolbox uses ActiveX to communicate to FEMM.
For old versions of Octave (or Octave installations in which the Octave Forge "Windows" package has not been installed), the toolbox use an alternative interprocess communication scheme based on temporary files for passing messages between Octave and FEMM. However, the ActiveX interface is noticeably faster than the file-based interprocess communications method.
When OctaveFEMM starts up a FEMM process, the usual FEMM user interfaceis displayed and is fully functional. The user then has the choice of accomplishing modeling and analysis tasks either exclusively through functions implemented by the toolbox, or by a combination of manual and programmatic operations -- whichever is easiest for the task at hand.
The syntax of the OctaveFEMM toolbox closely mirrors that of FEMM's existing Lua scripting language interface associated with FEMM v4.2. However, there are some differences between the Lua functions and the analogous Octave/Matlab implementations:
- All strings are enclosed in single quotes, rather than double quotes as in Lua.
- Functions in Lua that have no arguments require a set of empty parentheses after the function name (e.g. mi_analyze()). In Octave or Matlab, no parentheses should be used needed (e.g. mi_analyze with the OctaveFEMM toolbox).
- Several commands have also been added to OctaveFEMM that have no analog in Lua. These commands streamline the drawing of new geometries with the OctaveFEMM toolbox, as well is the collection of data from solutions.
Perhaps the most remarkable difference between Lua and OctaveFEMM, however, is due to the matrix-oriented nature of Octave and/or Matlab. In just about any OctaveFEMM function in which it would be desirable to enter an array of points such that multiple copies of an operation are performed, OctaveFEMM will correctly interpret the input perform the requested operation on every element in the array. In addition, for any function in which the coordinates of a point are required, that point can be specified as an array with two elements instead of specifying each element separately. In functions that require the specification of multiple points, those points can be entered as an array of two-element arrays.
As of FEMM 4.2, the OctaveFEMM (and MathFEMM) are included in the standard FEMM distribution. The OctaveFEMM m-files are in the directory
C:\femm42\mfiles
in the standard installation.