It's a bit interesting to get into.=20 I've been waiting two weeks now to get access to the yahoo group, but not h= olding my breath.=20 To me, the LUA scripting is the most useful. I'm looking at modeling indiv= idual turns on a ferrite inductor with 30 to 60 turns in the primary, six i= n the secondary, and looking at core loss, eddy current loss etc. The scripting examples I have seen are not very clear and I don't think the= y are good teaching examples. Here's how I create an object in LUA. I set my sim to millimeters and then= define: mm =3D 1 Inch =3D 25.4 -- so that I can dimension in native units like "CoreLen =3D = (6 * Inch)" etc. FRN and FRP are "FerriteRadiusNegative" (0 in the special case of the ferri= te) =20 FLN and FLP are "FerriteLengthNegative" and "FerriteLengthPositive" These describe the corners of the rectangle which will become the ferrite. -- ASSIGN THE GROUPS -----------------------------------------------------= ------------------------------------------------ AirGroup =3D 0 -- Group 0 is air FerriteGroup =3D 1 -- Group 1 is ferrite core -- and so on.. for all your objects. Nothing special about the group numbe= rs, could be 33 or 7.. It's just a tag. -- Materials --------------------------------------------------------------= ------------------------------------------------- FerriteMaterial =3D "Soft magnetic ferrite (Fe-Ni-Zn-V)" -- adjust = as needed. --FerriteMaterial =3D "Pure Iron" -- adjust as needed. -- These names are pulled from the materials library - This section just assigns "FerriteMaterial" the proper string value for u= se later. ---------------------------------------------------------------------------= ------------------------------------------------- -- Library materials used in this simulation ------------------------------= ------------------------------------------------- mi_getmaterial('Air') mi_getmaterial(FerriteMaterial) -- Assigned to a library material or custo= m material above --mi_modifymaterial can be used to change the BH curve etc. ---------------------------------------------------------------------------= ------------------------------------------------------- -- Create the ferrite core ------------------------------------------------= ------------------------------------------------- -- Define this first because the air size and label position is dependent o= n this FerriteLen =3D (66 * mm) FerriteDia =3D 12=20 FerriteRad =3D (FerriteDia/2) FRN =3D 0 -- Ferrite Radius Negative (because the ferrite is on th= e axis of symmetry!) FRP =3D FerriteRad -- Ferrite Radius Positive FLN =3D (-1 * (FerriteLen/2)) -- Ferrite Length Negative FLP =3D ( 1 * (FerriteLen/2)) -- Ferrite Length Positive ---------------------------------------------------------------------------= ------------------------------------------------ -- Define the ferrite core (Group 1) --------------------------------------= ------------------------------------------- if (EnableFerriteCore > 0) then print("Creating Ferrite Core") -- output to console for debug -- Define where the label will go, insuring it's always inside the geometr= y. FLAX =3D(FRP/2) -- Special case, because the ferrite is on the axis of sy= mmetry FLAY =3D(FLP/2) --=20 -- The label has to be inside the block, wherever you position the block. -- Create the nodes for the corners mi_addnode(FRN,FLP) mi_addnode(FRP,FLP) mi_addnode(FRP,FLN) mi_addnode(FRN,FLN) -- Select those nodes mi_clearselected() mi_selectnode(FRN,FLP) mi_selectnode(FRP,FLP) mi_selectnode(FRP,FLN) mi_selectnode(FRN,FLN) mi_setnodeprop('',FerriteGroup) -- Everything needs a group number so you can manipulate as a group -- Add the segments between the nodes mi_addsegment (FRN,FLP,FRP,FLP) -- top mi_addsegment (FRP,FLP,FRP,FLN) -- right mi_addsegment (FRP,FLN,FRN,FLN) -- bottom mi_addsegment (FRN,FLN,FRN,FLP) -- left -- Now instead of just corner points we have corners and lines. -- Set the segment properties mi_clearselected() mi_selectsegment (FRN,FLP,FRP,FLP) mi_selectsegment (FRP,FLP,FRP,FLN) mi_selectsegment (FRP,FLN,FRN,FLN) mi_selectsegment (FRN,FLN,FRN,FLP) mi_setsegmentprop('',0,0,0,FerriteGroup) -- Now the lines are part of the group and FEMM will see this as an object -- Create a label mi_addblocklabel(FLAX,FLAY) mi_clearselected() mi_selectlabel(FLAX,FLAY) mi_setblockprop(FerriteMaterial,AutoMeshCore,MeshSizeCore,0,0,FerriteGroup= ,0) -- FerriteMaterial is a variable and could be "Air" to turn off the ferrit= e, or "Pure Iron" or any other material=20 -- in the library or that you care to define. -- AutoMeshCore and MeshSizeCore are variables I added to control the mesh= ing. end -- EnableFerriteCore mi_clearselected() --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .