[Getdp] Magnetodynamics with cohomology conditions

Maximilian Szczesliwski maximulianszczesliwski at gmail.com
Mon Aug 26 09:59:06 CEST 2013


I'm really feel unconfident to ask you one more time for help. This is the
last study I need to do in the context of test of your very interessting
software. I prepared a mirror symmetric geometry with the (0,y,z)-plane as
the symmetry plane. Unfortunatelly, the results I recieve are really bad. I
guess the problem is caused by the boundary conditions. For the symmetry
plane there should be a "flux normal" while at all other boundaries there
should be a "flux parallel" condition set. Is it possible to adept your
solver for such problems? What changed are need to be done?

Many thanks in advance

Maximilian

/* #######################################################
####################### .GEO ########################
########################################################*/
lc = 0.01; // Mesh characteristic length
lc2 = 0.015;
lc3 = 0;
front3d = 1; // Set to 1 if Frontal 3D mesh algorithm is used
nn = (1./lc)/4.; // Mesh subdivisions per turn, used with Frontal 3D

If(front3d == 1)
Mesh.Algorithm3D = 4; // Frontal 3D
EndIf

DefineConstant
[
 layer =  {1, Min 1, Step 1, Label "Number of coil layers"},
 l_d =  {0.001, Min 0.001, Step 0.001, Label "Layer distance"},
 turns = {5, Label "Number of coil turns"},
 d = {0.05, Label "Distance between the turns"},
 r = {0.11, Label "Coil radius"},
 rh = {0.01, Label "radial height"},
 ah = {0.01, Label "axial height"},
 hc = {turns*(ah+d)-d, Label "Coil height"},
 ch = {0.06, Label "Channel height"},
 dk = {0.1, Label "Distance Channel/Inducktor"}
 lh = {2*r+dk, Min r, Step 0.01, Label "loop height"},
 lb = {1, Label "Infinite box width"}
 a =  {0.01, Step 0.01}
 b =  {0.01, Step 0.01}
];
rk = hc/2+rh+r+dk;
Inductor = 20000;
Skin_Inductor = 20001;
Channel = 10000;
Skin_Channel = 10001;
Air = 30000;
Inf = 30001;
IN = 21000;
OUT =222000;


/* #####################################################
####################### inductor #######################
######################################################*/

vol_coil[] = {};

p = newp;
Point(p+1)={0, -r, -hc/2, lc};
Point(p+2)={rh, -r, -hc/2, lc};
Point(p+3)={0, -r+ah, -hc/2, lc};
Point(p+4)={rh, -r+ah, -hc/2,lc};

l = newl;
Line(l) = {p+1,p+2};
Line(l+1) = {p+3,p+4};
Line(l+2) = {p+1,p+3};
Line(l+3) = {p+2,p+4};
ll = newll;
Line Loop(ll) = {l,l+3,-(l+1),-(l+2)};

s = news;
Plane Surface(s) = {ll};
tmp[] = {s};

For j In {1:4*turns}
If(front3d == 1)
  tmp[] = Extrude { {hc/turns/4,0,0}, {1,0,0} , {0,0,0} , Pi/2}{ Surface
{tmp[0]}; Layers {nn / 4}; };
  vol_coil[] += tmp[1];
EndFor


pin = newp;
Point(pin)={0, -r, -hc/2+ah, lc};
Point(pin+1)={0, -r+ah, -hc/2+ah, lc};
c=newc;
Circle(c)={p+4,p+3,pin+1};
Circle(c+1)={p+2,p+1,pin};
lin=newl;
Line(lin)={pin,pin+1};
Line(lin+1)={p+3,pin+1};
Line(lin+2)={p+1,pin};

Line Loop(ll+1)={l+1,c,-(lin+1)};
Line Loop(ll+2)={l+3,c,-(lin),-(c+1)};
Line Loop(ll+3)={l,c+1,-(lin+2)};
Line Loop(ll+4)={l+2, lin+1,-(lin),-(lin+2)};

sin=news;
Plane Surface(sin)={ll+1};
Plane Surface(sin+1)={ll+2};
Plane Surface(sin+2)={ll+3};
Plane Surface(sin+3)={ll+4};

in = sin+3;

sl=newsl;
Surface Loop(sl)={s,sin,sin+1,sin+2,sin+3};
vin=newv;
Volume(vin) = {sl};
vol_coil[] += vin;

tmp[] = Extrude {0, 0, -lb/2+(hc/2)} { Surface{tmp[0]}; Layers{nn}; };
vol_coil[] += tmp[1];
out = tmp[0];


/* ###################################################
####################### channel ######################
####################################################*/

vol_channel[] = {};
pc=newp;

Point(pc)={0,r+dk,r+dk, lc2};
Point(pc+1)={0,-r-dk,r+dk, lc2};
Point(pc+2)={0,-r-dk,-r-dk, lc2};
Point(pc+3)={0,r+dk,-r-dk, lc2};

Point(pc+4)={0,r+dk+ch,r+dk+ch, lc2};
Point(pc+5)={0,-r-dk-ch,r+dk+ch, lc2};
Point(pc+6)={0,-r-dk-ch,-r-dk-ch, lc2};
Point(pc+7)={0,r+dk+ch,-r-dk-ch, lc2};




lc=newl;
Line(lc)={pc,pc+1};
Line(lc+1)={pc+1,pc+2};
Line(lc+2)={pc+2,pc+3};
Line(lc+3)={pc+3,pc};

Line(lc+4)={pc+4,pc+5};
Line(lc+5)={pc+5,pc+6};
Line(lc+6)={pc+6,pc+7};
Line(lc+7)={pc+7,pc+4};

llc=newll;

Line Loop(llc)={lc,lc+1,lc+2,lc+3};
Line Loop(llc+1)={lc+4,lc+5,lc+6,lc+7};
Line Loop(llc+2)=Boundary {Surface{in}; };
sc=news;
Plane Surface(sc)={llc, llc+1};
Plane Surface(sc+1)={llc,llc+2};
chin={sc};

tmp[] = Extrude {ch,0,0} {Surface{sc};};
vol_channel[] = tmp[1];
chout = tmp[0];



/* #################################################
######################## box #######################
##################################################*/


p = 1000000;
Point(p) = {0,-lb/2,-lb/2, lc3};
Point(p+1) = {0,lb/2,-lb/2, lc3};
Point(p+2) = {0,-lb/2,lb/2, lc3};
Point(p+3) = {0,lb/2,lb/2, lc3};

Point(p+4) = {lb/2,-lb/2,-lb/2, lc3};
Point(p+5) = {lb/2,lb/2,-lb/2, lc3};
Point(p+6) = {lb/2,-lb/2,lb/2, lc3};
Point(p+7) = {lb/2,lb/2,lb/2, lc3};

l = 1000000;
Line(l) = {p,p+1};
Line(l+1) = {p+1,p+3};
Line(l+2) = {p+2,p+3};
Line(l+3) = {p+2,p};
Line(l+4) = {p+1,p+5};
Line(l+5) = {p+5,p+7};
Line(l+6) = {p+7,p+3};
Line(l+7) = {p+5,p+4};
Line(l+8) = {p+4, p};
Line(l+9) = {p+4, p+6};
Line(l+10) = {p+6, p+2};
Line(l+11) = {p+7, p+6};


ll = newll;
Line Loop(ll)={l,l+1,-(l+2),(l+3)};
Line Loop(ll+1)={l+4,l+5,l+6,-(l+1)};
Line Loop(ll+2)={l+4,l+7,l+8,l};
Line Loop(ll+3)={l+9,l+10,l+3,-(l+8)};
Line Loop(ll+4)={l+11,l+10,l+2,-(l+6)};
Line Loop(ll+5)={l+7,l+9,-(l+11),-(l+5)};

Line Loop(ll+7) = Boundary {Surface{out}; };


s=news;
Plane Surface(s) = {ll, llc+1};
Plane Surface(s+1)={ll+1};
Plane Surface(s+2)={ll+2, ll+7};
Plane Surface(s+3)={ll+3};
Plane Surface(s+4)={ll+4};
Plane Surface(s+5)={ll+5};


skin_coil[] = CombinedBoundary{ Volume{vol_coil[]}; };
skin_coil[] -= {out, in};
skin_channel[] = CombinedBoundary{ Volume{vol_channel[]}; };
skin_channel[] -= {chin};
sl=newsl;

Surface Loop(sl) = {s:s+5};
Surface Loop(sl+1) =  {skin_channel[]};
Surface Loop(sl+2) = {sc+1};
Surface Loop(sl+3) = {skin_coil[]};

v = newv;
Volume(v) = {sl, sl+1, sl+2, sl+3};



/* #####################################################
######################## regions #######################
######################################################*/

Physical Volume(Inductor) = {vol_coil[]};
Physical Volume(Channel) = {vol_channel[]};
Physical Volume(Air) = {v};

// Physical Surface(Inf) = {s:s+5, sc, sc+1};
Physical Surface(Inf) = {s+1:s+5};
Physical Surface(Skin_Inductor) = {skin_coil[]};
Physical Surface(Skin_Channel) = {skin_channel[]};
Physical Surface(IN) = in;
Physical Surface(OUT) = out;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/getdp/attachments/20130826/5fdd788b/attachment.html>


More information about the getdp mailing list