Assigning a Default Material in FEMM


David Meeker
02Oct2011

Introduction


In some circumstances, it is convenient to define a default material for FEMM problems. As of the FEMM 4.2 01Oct2011 build, it is possible to define a default material by tagging one of the block labels as the default block label. The material associated with the default block label, in addition to the other properties ascribed to the label, are then applied to any unlabeled regions in the problem.

This example is intended to document the use of default materials in FEMM.

Assigning a Default Block Label


Assigning a default block label via the FEMM user interface is relatively straightforward. Simply click the Set as default block label checkbox on the block label that you desire to be the default, as shown below in Figure 1. Although Figure 1 shows properties for a Magnetics block label, the same procedure is followed for other problem types.

Default Block Label Checkbox on Block Label Properties Dialog
Figure 1: Default block label checkbox shown in block label properties dialog.

A specific example is shown below in Figure 2, and downloadable as DefaultMaterialExample.FEM. A number of small, round regions are defined without block labels. When the domain is meshed, these unlabeled regions appear in gray, as pictured in Figure 2. In this example, an extra block label tagged as Iron has been placed outside the problem domain. This block label is applied to all of the gray areas during subsequent analyses and post-processing. Note that the default label does not have to be separately defined--it would have been equally permissible to label just one of the unlabeled regions, then specify that one label as the default for all unlabeled regions.

Problem Domain Employing Default Material Definition
Figure 2: Domain with default Iron block label defined as default for unlabeled regions.

As a check, the solution is shown in Figure 1. Boundary conditions were set to create a constant magnetic field between the two side boundaries. Figure 3 shows that the circles have all been properly defined as Iron, perturbing the field and the field into the Iron circles.

Solution of Problem Domain Employing Default Material Definition
Figure 3: Domain with default Iron block label defined as default for unlabeled regions.

Lua and Friends Implementation


Default blocks can also be defined using Lua. For magnetics problems mi_attachdefault() command sets the default attribute for a block label that has been previously selected. The mi_detachdefault() command resets the default attribute for all selected block labels. The commands ei_attachdefault(), ci_attachdefault(), and hi_attachdefault() are defined for electrostatic, current flow, and heat flow problems, respectively. Exactly the same commands are used in the OctaveFEMM and SciFEMM interfaces to Matlab/Octave and Scilab. The syntax MIAttachDefault[] and MIDetachDefault[] (and analogous function for other problem types) is used to set/reset the default flag on block labels via the MathFEMM interface to Mathematica.

Limitations


There are a few limitations of the present default material implementation:


Conclusions


A method for defining a default material was implemented in FEMM 4.2 01Oct2011. This method consists of defining one block label as the default, to be applied to any regions lacking a block label. The tagging of a label as "default" can be done manually via the FEMM GUI, or programmatically via Lua, Matlab/Octave, Scilab or Mathematica.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki