Skip to content
Snippets Groups Projects
Commit 62c10cb5 authored by Julien Fontchastagner's avatar Julien Fontchastagner
Browse files

suppression

parent 6953c5e7
No related branches found
No related tags found
No related merge requests found
// Données du problème
// grandeurs géométriques
a = 1.5e-2;
c = 7e-2;
b = 3e-2;
entrefer = 1e-3;
ep = 1e-2;
// Numéros régions physiques
AIRSUP = 2000;
AIRINF = 2001;
ENTREFER = 2002;
CIRCUITMAG = 2003;
BOBINEALLER = 2004;
BOBINERETOUR = 2005;
PLAQUE = 2006;
DIRICHLET = 1000;
Include "data_ventouse.geo";
y1 = entrefer/2.0;
lcE =a/20;
lcdom = 5*(2*a+b)/30;
Point(1) = {a,y1,0,lcE};
Point(2) = {a,y1+c,0,5*lcE};
Point(3) = {a+b,y1+c,0,5*lcE};
Point(4) = {a+b,y1,0,lcE};
Point(5) = {2*a+b,y1,0,lcE};
Point(6) = {2*a+b,y1+c+a,0,5*lcE};
Point(7) = {-(2*a+b),y1+c+a,0,5*lcE};
Point(8) = {-(2*a+b),y1,0,lcE};
Point(9) = {-(a+b),y1,0,lcE};
Point(10) = {-(a+b),y1+c,0,5*lcE};
Point(11) = {-a,y1+c,0,5*lcE};
Point(12) = {-a,y1,0,lcE};
liste_ligne[] = {};
For i In {1:11}
Line(i) = {i,i+1};
liste_ligne[] += {i};
EndFor
Line(13) = {12,1};
liste_ligne[] += {13};
Line Loop(1) = {liste_ligne[]};
Plane Surface (1) = {1};
Line(14) = {1,4};
Line Loop(2) = {14,-3,-2,-1};
Surface(2) = {2};
Line(15) = {12,9};
Line Loop(3) = {9,10,11,15};
Surface(3) = {3};
Point(13) = {2.5*(2*a+b),y1,0,lcdom};
Point(14) = {2.5*(2*a+b),y1+2*(c+a),0,lcdom};
Point(15) = {-2.5*(2*a+b),y1+2*(c+a),0,lcdom};
Point(16) = {-2.5*(2*a+b),y1,0,lcdom};
Line(16) = {5,13};
Line(17) = {13,14};
Line(18) = {14,15};
Line(19) = {15,16};
Line(20) = {16,8};
Line Loop(4) = {16,17,18,19,20,-7,-6,-5};
Plane Surface(4) = {4};
Point(17) = {-2.5*(2*a+b),-y1,0,lcdom};
Point(18) = {-(2*a+b),-y1,0,lcE};
Point(19) = {2*a+b,-y1,0,lcE};
Point(20) = {2.5*(2*a+b),-y1,0,lcdom};
Point(21) = {2.5*(2*a+b),-y1-ep-(c+a),0,lcdom};
Point(22) = {-2.5*(2*a+b),-y1-ep-(c+a),0,lcdom};
Point(23) = {2*a+b,-y1-ep,0,2*lcE};
Point(24) = {-(2*a+b),-y1-ep,0,2*lcE};
Line(21) = {17,18};
Line(22) = {18,24};
Line(23) = {24,23};
Line(24) = {23,19};
Line(25) = {19,20};
Line(26) = {20,21};
Line(27) = {21,22};
Line(28) = {22,17};
Line Loop(5) = {21,22,23,24,25,26,27,28};
Plane Surface(5) = {5};
Line(29) = {18,19};
Line Loop(6) = {29,-24,-23,-22};
Plane Surface(6) = {6};
Line(30) = {17,16};
Line(31) = {13,20};
Line Loop(7) = {20,8,-15,13,14,4,16,31,-25,-29,-21,30};
Plane Surface(7) = {7};
outs[] = CombinedBoundary{Surface{1,2,3,4,5,6,7};};
Physical Surface(CIRCUITMAG) = {1};
Physical Surface(BOBINEALLER) = {2};
Physical Surface(BOBINERETOUR) = {3};
Physical Surface(AIRSUP) = {4};
Physical Surface(AIRINF) = {5};
Physical Surface(PLAQUE) = {6};
Physical Surface(ENTREFER) = {7};
Physical Line(DIRICHLET) = {outs[]};
Color White { Surface{4,5,7}; }
Color LightGray {Surface{1,6}; }
Color Red { Surface{2};}
Color Blue { Surface{3} ;}
Include "data_ventouse.geo";
Group{
Domaine = Region[{AIRINF,AIRSUP,ENTREFER,CIRCUITMAG,BOBINEALLER,BOBINERETOUR,PLAQUE}];
Domaine_NonMag = Region[{AIRINF,AIRSUP,ENTREFER,BOBINEALLER,BOBINERETOUR}];
Domaine_Mag = Region[{CIRCUITMAG,PLAQUE}];
Entrefer = Region[{ENTREFER}];
BobineAller = Region[{BOBINEALLER}];
BobineRetour = Region[{BOBINERETOUR}];
Bobines = Region[{BOBINEALLER,BOBINERETOUR}];
Dirichlet = Region[{DIRICHLET}];
}
Function{
mu0 = 4e-7*Pi;
mur = 500;
N = 200;
I = 0.5*b*c/N*2e6;
Lz = 20e-2;
nu[#{Domaine_NonMag}] = 1.0/mu0;
nu[#{Domaine_Mag}] = 1.0/(mu0*mur);
j[#{BobineAller}] = Vector[0,0,N*I/(b*c)];
j[#{BobineRetour}] = Vector[0,0,-N*I/(b*c)];
}
Jacobian{
{ Name Jvol;
Case {
{ Region All ; Jacobian Vol ; }
}
}
}
Integration {
{ Name Integ;
Case {
{Type Gauss;
Case {
{ GeoElement Line ; NumberOfPoints 2; }
{ GeoElement Triangle ; NumberOfPoints 6; } }
}
}
}
}
Constraint {
{Name Dirichlet ;
Case {
{ Region Dirichlet ; Type Assign ; Value 0. ; }
}
}
}
FunctionSpace {
{ Name Hrot ; Type Form1 ;
BasisFunction {
{ Name se ; NameOfCoef ae ; Function BF_PerpendicularEdge ;
Support Region[{Domaine}] ; Entity NodesOf[All] ; }
}
Constraint {
{ NameOfCoef ae ; EntityType NodesOf ; NameOfConstraint Dirichlet ; }
}
}
}
Formulation {
{ Name Magnetostat ; Type FemEquation ;
Quantity {
{ Name a ; Type Local ; NameOfSpace Hrot ; }
}
Equation {
Galerkin { [ nu[]*Dof{Curl a} , {Curl a} ] ;
In Domaine ; Jacobian Jvol ; Integration Integ ; }
Galerkin { [ -j[] , {a} ] ;
In Bobines ; Jacobian Jvol ; Integration Integ ; }
}
}
}
Resolution {
{ Name analyse ;
System {
{ Name Sys ; NameOfFormulation Magnetostat ; }
}
Operation {
Generate[Sys] ;
Solve[Sys] ;
SaveSolution[Sys] ;
}
}
}
PostProcessing {
{ Name PostProc ; NameOfFormulation Magnetostat ;
Quantity {
{ Name a ; Value { Term { [ {a} ] ; In Domaine ; Jacobian Jvol ; } } }
{ Name az ; Value { Term { [ Norm[{a}] ] ; In Domaine ; Jacobian Jvol ; } } }
{ Name b ; Value { Term { [ {Curl a} ] ; In Domaine ; Jacobian Jvol ; } } }
{ Name h ; Value { Term { [ nu[]*{Curl a} ] ; In Domaine ; Jacobian Jvol ; } } }
{ Name F_TM ; Value { Integral { [ 1/(2*mu0)*(CompY[{Curl a}]^2-CompX[{Curl a}]^2)*Lz/entrefer ] ;
In Entrefer ; Jacobian Jvol ; Integration Integ ;} } }
{ Name L ; Value { Integral { [ N*Lz*Norm[{a}]/(b*c)/I ] ; In Bobines ;
Jacobian Jvol ; Integration Integ ;} } }
}
}
}
PostOperation PostOp UsingPost PostProc {
Print[ a, OnElementsOf Domaine, File "a.pos"] ;
Print[ az, OnElementsOf Domaine, File "az.pos"] ;
Echo[ Str["View[1].IntervalsType = 1;", "View[1].NbIso = 30;", "View[1].LightLines = 0;"],
File "tmp.geo", LastTimeStepOnly ];
Print[ b, OnElementsOf Domaine, File "b.pos"] ;
Print[ h, OnElementsOf Domaine, File "h.pos"] ;
Print[ F_TM[Entrefer], OnGlobal, File "force.dat",
SendToServer "Modele/Resultats/1Force par Tenseur moyenné (N)", Color "AliceBlue" ];
Print[ L[Bobines], OnGlobal, File "inductance.dat",
SendToServer "Modele/Resultats/2Inductance (H)", Color "AliceBlue" ];
}
\ No newline at end of file
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment