Skip to content
Snippets Groups Projects
Commit d7ce1b2d authored by François Henrotte's avatar François Henrotte
Browse files

update

parent bf511038
No related branches found
No related tags found
No related merge requests found
...@@ -101,6 +101,7 @@ ElseIf( Flag_RegSleeve ) // regular sleeve ...@@ -101,6 +101,7 @@ ElseIf( Flag_RegSleeve ) // regular sleeve
Wires[]= {}; Wires[]= {};
For i In {1:NumWires} For i In {1:NumWires}
e[] = Extrude {0,0,Lz} { Point{ centerWires[i-1] } ; /*Layers{1};*/ } ; e[] = Extrude {0,0,Lz} { Point{ centerWires[i-1] } ; /*Layers{1};*/ } ;
Transfinite Curve{ e[1] } = NbDivision+1;
Physical Line (Sprintf("LWIRE_%g",i), 50+i) = { e[1] }; Physical Line (Sprintf("LWIRE_%g",i), 50+i) = { e[1] };
Physical Point (Sprintf("PANODE_%g",i), 60+i) = { centerWires[i-1] }; Physical Point (Sprintf("PANODE_%g",i), 60+i) = { centerWires[i-1] };
Physical Point (Sprintf("PCATHODE_%g",i), 70+i) = { e[0] }; Physical Point (Sprintf("PCATHODE_%g",i), 70+i) = { e[0] };
...@@ -115,6 +116,7 @@ ElseIf( Flag_RegSleeve ) // regular sleeve ...@@ -115,6 +116,7 @@ ElseIf( Flag_RegSleeve ) // regular sleeve
s1 = news; Plane Surface(s1) = {ll1,-llWires[]}; s1 = news; Plane Surface(s1) = {ll1,-llWires[]};
e[] = Extrude {0,0,Lz} { Surface{ s1 } ; /*Layers{1}; Recombine;*/ } ; e[] = Extrude {0,0,Lz} { Surface{ s1 } ; /*Layers{1}; Recombine;*/ } ;
Physical Volume ("AIR", 1) = { e[1], Wires[] }; Physical Volume ("AIR", 1) = { e[1], Wires[] };
Physical Volume ("BLA", 5) = { e[1] };
Else Else
...@@ -125,6 +127,7 @@ Else ...@@ -125,6 +127,7 @@ Else
Physical Volume ("AIR", 1) = { v1 }; Physical Volume ("AIR", 1) = { v1 };
For i In {1:NumWires} For i In {1:NumWires}
e[] = Extrude {0,0,Lz} { Point{ centerWires[i-1] } ; /*Layers{1};*/ } ; e[] = Extrude {0,0,Lz} { Point{ centerWires[i-1] } ; /*Layers{1};*/ } ;
Transfinite Curve{ e[1] } = NbDivision+1;
//Printf("e=", e[]); //Printf("e=", e[]);
Physical Line (Sprintf("LWIRE_%g",i), 50+i) = { e[1] }; Physical Line (Sprintf("LWIRE_%g",i), 50+i) = { e[1] };
Physical Point (Sprintf("PANODE_%g",i), 60+i) = { centerWires[i-1] }; Physical Point (Sprintf("PANODE_%g",i), 60+i) = { centerWires[i-1] };
......
...@@ -34,6 +34,7 @@ Group{ ...@@ -34,6 +34,7 @@ Group{
INF = Region[ 2 ]; INF = Region[ 2 ];
SKIN = Region[ 3 ]; SKIN = Region[ 3 ];
LINTREE = Region[ 4 ]; // not used LINTREE = Region[ 4 ]; // not used
BLA = Region[ 5 ];
VWIRES = Region[ {} ]; VWIRES = Region[ {} ];
LWIRES = Region[ {} ]; LWIRES = Region[ {} ];
...@@ -82,8 +83,8 @@ Group{ ...@@ -82,8 +83,8 @@ Group{
// additional Groups for the semi_analytic approach // additional Groups for the semi_analytic approach
Dom_Hthin_a = ElementsOf[ Vol_nu, OnOneSideOf LWIRES ]; Dom_Hthin_a = ElementsOf[ Vol_nu, OnOneSideOf LWIRES ];
//Vol_Tree = ElementsOf[ Vol_nu, Not Dom_Hthin_a ]; Vol_Tree = ElementsOf[ Vol_nu, DisjointOf LWIRES ];
Vol_Tree = Region[ { Vol_nu } ]; //Vol_Tree = Region[ { BLA } ];
Sur_Tree = Region[ { Sur_Dirichlet_a /*, SKIN*/ } ]; Sur_Tree = Region[ { Sur_Dirichlet_a /*, SKIN*/ } ];
If( !Flag_SemiAnalytic ) If( !Flag_SemiAnalytic )
Lin_Tree = Region[ {} ]; Lin_Tree = Region[ {} ];
...@@ -434,12 +435,12 @@ Formulation { ...@@ -434,12 +435,12 @@ Formulation {
Integral { [ nu[] * Dof{d a} , {d a} ]; Integral { [ nu[] * Dof{d a} , {d a} ];
In Vol_nu; Jacobian Vol; Integration I1; } In Vol_nu; Jacobian Vol; Integration I1; }
GlobalTerm { [ -Dof{I}*1e1 , {F} ]; GlobalTerm { [ -Dof{I}*NbDivision , {F} ];
In Vol_nu; } In Vol_nu; }
Integral { [ nu[] * Dof{d as} , {d as} ]; Integral { [ nu[] * Dof{d as} , {d as} ];
In Vol_nu; Jacobian Vol; Integration I1; } In Vol_nu; Jacobian Vol; Integration I1; }
GlobalTerm { [ -Dof{Is}*1e1 , {Fs} ]; GlobalTerm { [ -Dof{Is}*NbDivision , {Fs} ];
In Vol_nu; } In Vol_nu; }
// Integral { [ -Dof{i}/A_c , {as} ]; // Integral { [ -Dof{i}/A_c , {as} ];
...@@ -569,7 +570,7 @@ PostProcessing { ...@@ -569,7 +570,7 @@ PostProcessing {
PostOperation map UsingPost MagnetoDynamics { PostOperation map UsingPost MagnetoDynamics {
Print[ b, OnElementsOf Vol_nu, File "b.pos"]; Print[ b, OnElementsOf Vol_Tree, File "b.pos"];
If( !Flag_SemiAnalytic ) If( !Flag_SemiAnalytic )
Print[ J, OnElementsOf Vol_C, File "j.pos"]; Print[ J, OnElementsOf Vol_C, File "j.pos"];
...@@ -579,7 +580,8 @@ PostOperation map UsingPost MagnetoDynamics { ...@@ -579,7 +580,8 @@ PostOperation map UsingPost MagnetoDynamics {
In Vol_nu, File "group.pos"]; In Vol_nu, File "group.pos"];
EndIf EndIf
PrintGroup[ EdgesOfTreeIn[ { Vol_Tree }, StartingOn { Sur_Tree, Lin_Tree } ], PrintGroup[ EdgesOfTreeIn[ { Vol_Tree }, StartingOn { Sur_Tree, Lin_Tree } ],
In Vol_Tree, File "Tree.pos"]; In Vol_nu, File "Tree.pos"];
//PrintGroup[ _CO_Entity_44, In Vol_nu, File "Tree.pos"]; //PrintGroup[ _CO_Entity_44, In Vol_nu, File "Tree.pos"];
} }
......
...@@ -14,7 +14,7 @@ DefineConstant[ ...@@ -14,7 +14,7 @@ DefineConstant[
Flag_Thin = {1, Name "Parameters/01Thin wires", Flag_Thin = {1, Name "Parameters/01Thin wires",
Choices {0,1}, Visible 1} Choices {0,1}, Visible 1}
Flag_RegSleeve = {0, Name "Parameters/02Regular sleeves", Flag_RegSleeve = {1, Name "Parameters/02Regular sleeves",
Choices {0,1}, Visible Flag_Thin} Choices {0,1}, Visible Flag_Thin}
Flag_SemiAnalytic = {1, Name "Parameters/03Semi-analytic approach", Flag_SemiAnalytic = {1, Name "Parameters/03Semi-analytic approach",
...@@ -44,6 +44,8 @@ DefineConstant[ ...@@ -44,6 +44,8 @@ DefineConstant[
A_c = Pi*rw^2 // wire cross section A_c = Pi*rw^2 // wire cross section
rout = box rout = box
Lz = 10*mm Lz = 10*mm
NbDivision = 10
/* 'WireRadius' is the actual radius of the wire. /* 'WireRadius' is the actual radius of the wire.
'MeshSizeWire' is the imposed mesh size at the nodes of the wire, 'MeshSizeWire' is the imposed mesh size at the nodes of the wire,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment