Lua#2 Hall Bach Effect

Problem Statement:
In this document there are four magnets (N42) is taken and are kept in room filled with air as shown in the Fig-1. Out of 4, 3 magnets are of square size of 7.4mm and the rest one is of 15mm X 3mm. In this figure generated mesh for finite element analysis is also shown. Arrow sign on each magnet indicates its magnetic orientation.
Fig-1: Generated Mesh

Code:

With the help of lua script all the magnets and its environment is created.

newdocument(0);
mi_probdef(0,'millimeters','planar',1e-8,0,30);
mi_addmaterial('air' ,1,1,0,0,0,0,0,1,0,0,0);
mi_addmaterial("N42", 1.05, 1.05, 943000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
magnet="N42";
--mi_addboundprop('abc',0,0,0,0,0,0,1/(r*0.0254*pi*4.e-7),0,2);

--block D
Wd=7.4;
Hd=7.4;
Xd=-(Wd+1);
Yd=0;
mi_addnode(Xd,Yd);
mi_addnode(Xd,Hd+Yd);
mi_addnode(Wd+Xd,Yd);
mi_addnode(Wd+Xd,Hd+Yd);

mi_addsegment(Xd,Yd,Xd,Hd+Yd);
mi_addsegment(Xd,Hd+Yd,Wd+Xd,Hd+Yd);
mi_addsegment(Wd+Xd,Hd+Yd,Wd+Xd,Yd);
mi_addsegment(Wd+Xd,Yd,Xd,Yd);
mi_addblocklabel(Xd+Wd/2,Yd+Hd/2);


--block A
Wa=7.4;
Ha=7.4;
Xa=0;
Ya=0;
mi_addnode(Xa,Ya);
mi_addnode(Xa,Ha+Ya);
mi_addnode(Wa+Xa,Ya);
mi_addnode(Wa+Xa,Ha+Ya);

mi_addsegment(Xa,Ya,Xa,Ha+Ya);
mi_addsegment(Xa,Ha+Ya,Wa+Xa,Ha+Ya);
mi_addsegment(Wa+Xa,Ha+Ya,Wa+Xa,Ya);
mi_addsegment(Wa+Xa,Ya,Xa,Ya);
mi_addblocklabel(Xa+Wa/2,Ya+Ha/2);


--block B
Wb=7.4;
Hb=7.4;
Xb=Wa+1;
Yb=0;
mi_addnode(Xb,Yb);
mi_addnode(Xb,Hb+Yb);
mi_addnode(Wb+Xb,Yb);
mi_addnode(Wb+Xb,Hb+Yb);

mi_addsegment(Xb,Yb,Xb,Hb+Yb);
mi_addsegment(Xb,Hb+Yb,Wb+Xb,Hb+Yb);
mi_addsegment(Wb+Xb,Hb+Yb,Wb+Xb,Yb);
mi_addsegment(Wb+Xb,Yb,Xb,Yb);
mi_addblocklabel(Xb+Wb/2,Yb+Hb/2);

--block C
Wc=15;
Hc=3;
Xc=40;
Yc=0;
mi_addnode(Xc,Yc);
mi_addnode(Xc,Hc+Yc);
mi_addnode(Wc+Xc,Yc);
mi_addnode(Wc+Xc,Hc+Yc);

mi_addsegment(Xc,Yc,Xc,Hc+Yc);
mi_addsegment(Xc,Hc+Yc,Wc+Xc,Hc+Yc);
mi_addsegment(Wc+Xc,Hc+Yc,Wc+Xc,Yc);
mi_addsegment(Wc+Xc,Yc,Xc,Yc);
mi_addblocklabel(Xc+Wc/2,Yc+Hc/2);




gap=30;
airH=gap+Hc+gap;
airW=gap+Xc+Wc+gap;
airx0=-gap;
airy0=-gap;
mi_addnode(airx0,airy0);
mi_addnode(airx0+airW,airy0);
mi_addnode(airx0+airW,airy0+airH);
mi_addnode(airx0,airy0+airH);

mi_addsegment(airx0,airy0,airx0+airW,airy0);
mi_addsegment(airx0+airW,airy0,airx0+airW,airy0+airH);
mi_addsegment(airx0+airW,airy0+airH,airx0,airy0+airH);
mi_addsegment(airx0,airy0+airH,airx0,airy0);
mi_addblocklabel(airx0+5,airy0+5);


mi_selectlabel(airx0+5,airy0+5); -- Air
mi_setblockprop("air",0,0,0,0,0,0);
mi_clearselected();

mi_getmaterial(magnet);

mi_selectlabel(Xd+Wd/2,Yd+Hd/2); --Magnets for block D
mi_setblockprop(magnet,0,0,0,0,0,0);
mi_clearselected();

mi_selectlabel(Xa+Wa/2,Ya+Ha/2); --Magnets for block A
mi_setblockprop(magnet,0,0,0,90,0,0);
mi_clearselected();

mi_selectlabel(Xb+Wb/2,Yb+Hb/2); --Magnets for block B
mi_setblockprop(magnet,0,0,0,180,0,0);
mi_clearselected();

mi_selectlabel(Xc+Wc/2,Yc+Hc/2); --Magnet for block C
mi_setblockprop(magnet,0,0,0,90,0,0);
mi_clearselected();



--adding boundary prop
mi_addboundprop('airbound', 0, 0, 0, 0, 0, 0, 0, 0, 0);

mi_selectsegment(airx0,airy0+airH/2) --left side
mi_setsegmentprop('airbound',0,1,0,0)
mi_clearselected()

mi_selectsegment(airx0+airW,airH/2) --righ side
mi_setsegmentprop('airbound',0,1,0,0)
mi_clearselected()

mi_selectsegment(airx0+airW/2,airy0+airH) --top side
mi_setsegmentprop('airbound',0,1,0,0)
mi_clearselected()

mi_selectsegment(airx0+airW/2,airy0) --bottom side
mi_setsegmentprop('airbound',0,1,0,0)
mi_clearselected()


mi_saveas('D:\\Desktop from D drive\\Motor Study using lua\\sizeVsfieldstrength.fem');
Output:

Once the code is loaded in the FEMM software, it will automatically show the generated environment, Now follow the steps to get the problem solved. Click on the 
  • mesh generator (shows the Fig-1)
  • mesh solver (solves the problem)
  • output icon (shows the Fig-2)
First three magnets from the left are having their magnetic orientation in such a way that the generated magnetic field on one side is higher than the other. This special magnetic orientation is known as Hall Bach arrangement and the effect that produces the stronger field on one side than the other is known as Hall Bach effect. This effect is named after the scientist Hall Bach.

Fig-2: Solved Mesh with the red contour to measure the magnetic field strength at 1-mm distance from the magnet north pole. Magenta colored vertical lines with labels A, B, C, D, E, and F are used to relate the magnetic field strength vs position shown in Fig-3. 

There is a red line in Fig-2 that passes at 1-mm distance from the north pole of both the magnets. Magnetic field strength (B) is recorded along the red line when moving from left to right and plotted in Fig-3. It is evident from the Fig-3 that the magnetic field produced by north pole of the Hall Bach arrangement is higher than the single magnet with no Hall Bach. For example: the peak magnetic field strength recorded near Hall Bach arrangement is nearly equal to the 0.62 Tesla while approximately 0.27 Tesla is recorded near the single magnet.

Fig-3: Magnetic field strength vs distance plot: This figure shows the variation in magnetic field when measured at 1-mm distance when moving from left to right by following the red line. Dotted lines are for making a comparative analysis with the Fig-2.

Comments