Skip to content
Snippets Groups Projects
Commit da81dee5 authored by fontchas5's avatar fontchas5
Browse files

Rendu public

parent 26d55dd0
No related branches found
No related tags found
No related merge requests found
File added
mu0 = 4e-7*Pi;
DefineConstant[
// Données
freq = {50, Choices {50="50 Hz"},
Name "Modèle/Données/01Fréquence", ReadOnly 1},
sigma_corps = {0.2, Choices {0.2="0.2 S/m"},
Name "Modèle/Données/02Conductivitée tissu", ReadOnly 1},
bnorm = {1.25e-6, Choices {1.25e-6="1,25 µT"},
Name "Modèle/Données/03Champ normalisé sur le bord", ReadOnly 1},
// Paramètres
Rd = {0.1, Choices {0.1="100 mm", 0.2="200 mm"},
Name "Modèle/Paramètres/1Rayon du disque",
ServerAction "Reset Modèle/Résultats/2Densité de courant"},
Typesource = {1, Choices {1="Champ uniforme", 2="Fil infini",
3="Ligne bifilaire infinie", 4="Spire circulaire"},
Name "Modèle/Paramètres/2Type de source",
ServerAction "Reset Modèle/Paramètres/3Distance à la source,
Modèle/Paramètres/4Distance entre fils,Modèle/Paramètres/4Rayon de la spire,
Modèle/Résultats/2Densité de courant"}
];
If (Typesource == 2)
DefineConstant[
d = {10e-3, Choices {10e-3="10 mm", 100e-3="100 mm",
1="1000 mm"}, Name "Modèle/Paramètres/3Distance à la source",
ServerAction "Reset Modèle/Résultats/2Densité de courant"}
];
EndIf
If (Typesource == 3)
DefineConstant[
d = {7.5e-3, Choices {7.5e-3="7,5 mm", 97.5e-3="97,5 mm",
900e-3="900 mm"}, Name "Modèle/Paramètres/3Distance à la source",
ServerAction "Reset Modèle/Résultats/1Densité de courant"},
e = {5e-3, Choices {5e-3="5 mm", 10e-3="10 mm", 20e-3="20 mm",
40e-3="40 mm", 80e-3="80 mm"}, Name "Modèle/Paramètres/4Distance entre fils",
ServerAction "Reset Modèle/Résultats/2Densité de courant"}
];
EndIf
If (Typesource == 4)
DefineConstant[
d = {5e-3, Choices {5e-3="5 mm", 850e-3="850 mm"},
Name "Modèle/Paramètres/3Distance à la source",
ServerAction "Reset Modèle/Résultats/1Densité de courant"},
r = {10e-3, Choices {10e-3="10 mm", 50e-3="50 mm", 100e-3="100 mm"},
Name "Modèle/Paramètres/4Rayon de la spire",
ServerAction "Reset Modèle/Résultats/2Densité de courant"}
];
EndIf
npoints = 150;
lc = Pi/2.*Rd/npoints;
lc0 = 5*lc;
BORD = 1000;
DIAMETRE = 1001;
DISQUE = 2000;
Include "data.geo";
//Geometry.Points = 0;
//Geometry.Lines = 0;
//Mesh.SurfaceEdges = 0;
Point(1) = {0,0,0,lc0};
Point(2) = {Rd,0,0,lc};
Point(3) = {0,Rd,0,lc};
Point(4) = {-Rd,0,0,lc};
Point(5) = {0,-Rd,0,lc};
Circle(1) = {2,1,3};
Circle(2) = {3,1,4};
Circle(3) = {4,1,5};
Circle(4) = {5,1,2};
Transfinite Line {1,2,3,4} = npoints+1;
Line(5) = {1,2};
Line(6) = {1,3};
Line(7) = {1,4};
Line(8) = {1,5};
Transfinite Curve {5,6,7,8} = npoints/4 Using Progression 0.95;
Line Loop(1) = {5,1,-6};
Line Loop(2) = {6,2,-7};
Line Loop(3) = {7,3,-8};
Line Loop(4) = {8,4,-5};
Plane Surface(1) = {1};
Plane Surface(2) = {2};
Plane Surface(3) = {3};
Plane Surface(4) = {4};
//Transfinite Surface {1,2,3,4};
Physical Surface(DISQUE) = {1,2,3,4};
Physical Line(BORD) = {1,2,3,4};
Physical Line(DIAMETRE) = {7,5};
Color Pink { Surface{1,2,3,4}; }
Ressources-Onelab/App_Onelab_Norme/NF62226/disque.png

64.4 KiB

Include "data.geo";
Group {
Domaine = Region[{DISQUE}];
Bord = Region[{BORD}];
Diametre = Region[{DIAMETRE}];
Dummy = Region[{100000}];
}
Include "ellipke.pro";
Function{
sigma[] = sigma_corps;
mu[] = mu0;
// cas uniforme
//--------------
If (Typesource == 1)
bs[] = Vector[0,0,bnorm];
EndIf
// fil infini
//------------
If (Typesource == 2)
Is[] = 2*Pi*d*bnorm/mu0;
bs[] = Vector[0,0,mu0*Is[]/(2*Pi)/(Rd+d-X[])];
EndIf
// 2 fils infinis
//----------------
If (Typesource == 3)
Is[] = 2*Pi*d*(d+e)/e*bnorm/mu0;
bs[] = Vector[0,0,mu0*Is[]/(2*Pi)*e/(Rd+d-X[])/(Rd+d+e-X[])];
EndIf
// Spire
//-------
If (Typesource == 4)
k02 = 4*r*(d+r)/(d+2*r)^2;
Is[] = bnorm/mu0*4*(2*r+d)/(Ellipk[k02]+(r^2-(d+r)^2)/d^2*Ellipe[k02]);
Rloc[] = Sqrt[ (Rd+d+r-X[])^2 + Y[]^2 ];
k2[] = 4*r*Rloc[]/(r+Rloc[])^2;
bs[] = Vector[0,0,mu0*Is[]/4/(r+Rloc[])*(Ellipk[k2[]]+(r^2-Rloc[]^2)/(r-Rloc[])^2*Ellipe[k2[]])];
EndIf
//DefineFunction[ bs ];
}
Jacobian {
{ Name JVol;
Case {
{ Region All ; Jacobian Vol; }
}
}
}
Integration {
{ Name I ; Case {
{ Type Gauss ;
Case {
{ GeoElement Triangle ; NumberOfPoints 6 ; }
{ GeoElement Quadrangle ; NumberOfPoints 5 ; }
}
}
}
}
}
Constraint {
{Name Dirichlet;
Case {
{ Region Bord; Type Assign; Value 0; }
}
}
}
FunctionSpace {
{ Name Hcurlp ; Type Form1P ;
BasisFunction {
{ Name sn ; NameOfCoef tn ; Function BF_PerpendicularEdge ;
Support Domaine ; Entity NodesOf[All] ; }
{ Name sn2 ; NameOfCoef tn2 ; Function BF_PerpendicularEdge_2E ;
Support Domaine ; Entity EdgesOf[All] ; }
}
Constraint {
{ NameOfCoef tn ; EntityType NodesOf ; NameOfConstraint Dirichlet ; }
{ NameOfCoef tn2 ; EntityType EdgesOf ; NameOfConstraint Dirichlet ; }
}
}
}
Formulation {
{ Name Tind ; Type FemEquation ;
Quantity {
{ Name t ; Type Local ; NameOfSpace Hcurlp ; }
}
Equation {
Galerkin { [ Dof{d t} , {d t} ] ;
In Domaine; Jacobian JVol ; Integration I ; }
Galerkin { [ Complex[0,1]*2*Pi*freq*sigma[]*bs[] , {t} ] ;
In Domaine; Jacobian JVol ; Integration I ; }
}
}
}
Resolution {
{ Name T_Harmonic;
System {
{ Name A; NameOfFormulation Tind;
Type ComplexValue; Frequency freq;
}
}
Operation {
InitSolution[A];
Generate[A];
Solve[A];
SaveSolution[A];
}
}
}
PostProcessing {
{ Name PostProc_T ; NameOfFormulation Tind ;
Quantity {
{ Name t ; Value { Term { [ {t} ] ; In Domaine ; Jacobian JVol; } } }
{ Name bs ; Value { Term { [ bs[] ] ; In Domaine ; Jacobian JVol; } } }
{ Name j ; Value { Term { [ {d t} ] ; In Domaine ; Jacobian JVol; } } }
{ Name normj ; Value { Term { [ Norm[{d t}] ] ; In Domaine ; Jacobian JVol; } } }
If (Typesource > 1)
{ Name I ; Value { Term { Type Global; [ Is[] ] ; In Dummy ; Jacobian JVol; } } }
EndIf
}
}
}
PostOperation PostOp_T UsingPost PostProc_T {
Print[ t, OnElementsOf Domaine, File "hind.pos"] ;
Print[ bs, OnElementsOf Domaine, File "bs.pos"] ;
Print[ j, OnElementsOf Domaine, File "j.pos"] ;
Print[ normj, OnElementsOf Domaine, File "normj.pos"] ;
Print[ normj, OnLine{ { -Rd,0,0 } { Rd,0,0 } } { 200 } ,
File "tracenormj.dat", Format SimpleTable,
SendToServer "Modèle/Résultats/2Densité de courant" ] ;
// Print[ normj, OnRegion Diametre ,
// File "tracenormj.dat", Format SimpleTable,
// SendToServer "Modèle/Résultats/2Densité de courant" ] ;
If (Typesource > 1)
Print[ I, OnRegion Dummy, File "Ic.dat", Format SimpleTable,
SendToServer "Modèle/Résultats/1Courant source (en A)" ] ;
EndIf
}
Function{
valk2 = {0,0.0101000000000000, 0.0202000000000000, 0.0303000000000000, 0.0404000000000000,
0.0505000000000000, 0.0606000000000000, 0.0707000000000000, 0.0808000000000000,
0.0909000000000000, 0.101000000000000,0.111100000000000,0.121200000000000,0.131300000000000,
0.141400000000000,0.151500000000000,0.161600000000000,0.171700000000000,0.181800000000000,
0.191900000000000,0.202000000000000,0.212100000000000,0.222200000000000,0.232300000000000,
0.242400000000000,0.252500000000000,0.262600000000000,0.272700000000000,0.282800000000000,
0.292900000000000,0.303000000000000,0.313100000000000,0.323200000000000,0.333300000000000,
0.343400000000000,0.353500000000000,0.363600000000000,0.373700000000000,0.383800000000000,
0.393900000000000,0.404000000000000,0.414100000000000,0.424200000000000,0.434300000000000,
0.444400000000000,0.454500000000000,0.464600000000000,0.474700000000000,0.484800000000000,
0.494900000000000,0.505000000000000,0.515100000000000,0.525200000000000,0.535300000000000,
0.545400000000000,0.555500000000000,0.565600000000000,0.575700000000000,0.585800000000000,
0.595900000000000,0.606000000000000,0.616100000000000,0.626200000000000,0.636300000000000,
0.646400000000000,0.656500000000000,0.666600000000000,0.676700000000000,0.686800000000000,
0.696900000000000,0.707000000000000,0.717100000000000,0.727200000000000,0.737300000000000,
0.747400000000000,0.757500000000000,0.767600000000000,0.777700000000000,0.787800000000000,
0.797900000000000,0.808000000000000,0.818100000000000,0.828200000000000,0.838300000000000,
0.848400000000000,0.858500000000000,0.868600000000000,0.878700000000000,0.888800000000000,
0.898900000000000,0.909000000000000,0.919100000000000,0.929200000000000,0.939300000000000,
0.949400000000000,0.959500000000000,0.969600000000000,0.979700000000000,0.989800000000000,
0.999900000000000 };
valKk2 = {
1.57079632679490, 1.57478528011722, 1.57882026576948, 1.58290227757289, 1.58703234121852,
1.59121151563311, 1.59544089441860, 1.59972160736999, 1.60405482207697, 1.60844174561463,
1.61288362632943, 1.61738175572693, 1.62193747046820, 1.62655215448248, 1.63122724120450,
1.63596421594508, 1.64076461840484, 1.64563004534140, 1.65056215340144, 1.65556266213002,
1.66063335717052, 1.66577609366996, 1.67099279990555, 1.67628548115006, 1.68165622379495,
1.68710719975226, 1.69264067115794, 1.69825899540193, 1.70396463051234, 1.70976014092416,
1.71564820366574, 1.72163161499987, 1.72771329756012, 1.73389630802714, 1.74018384539492,
1.74657925988175, 1.75308606254750, 1.75970793568492, 1.76644874406120, 1.77331254709411,
1.78030361205769, 1.78742642842330, 1.79468572345524, 1.80208647919442, 1.80963395098108,
1.81733368768646, 1.82519155384599, 1.83321375391206, 1.84140685887444, 1.84977783553054,
1.85833407872815, 1.86708344694966, 1.87603430166133, 1.88519555091547, 1.89457669776809,
1.90418789416384, 1.91404000104484, 1.92414465556522, 1.93451434644227, 1.94516249865344,
1.95610356890385, 1.96735315354807, 1.97892811096543, 1.99084670077225, 2.00312874272565,
2.01579579875404, 2.02887138226910, 2.04238119981081, 2.05635343120258, 2.07081905581419,
2.08581223433763, 2.10137075779592, 2.11753657849535, 2.13435644152615, 2.15188264053563,
2.17017392829155, 2.18929662166493, 2.20932595301951, 2.23034773696084, 2.25246044499996,
2.27577781399329, 2.30043216196496, 2.32657865454404, 2.35440086872464, 2.38411815769338,
2.41599556441876, 2.45035742070669, 2.48760640735555, 2.52825093636506, 2.57294563248389,
2.62255323082741, 2.67824310112699, 2.74165591924071, 2.81519612024929, 2.90259326426345,
3.01009712431586, 3.14942199375528, 3.34683837070269, 3.68584654682854, 5.99158934050705 };
valEk2 = {
1.57079632679490, 1.56682252317854, 1.56283350521616, 1.55882907679611, 1.55480903733740,
1.55077318164147, 1.54672129973750, 1.54265317672079, 1.53856859258400, 1.53446732204064,
1.53034913434054, 1.52621379307673, 1.52206105598335, 1.51789067472388, 1.51370239466934,
1.50949595466563, 1.50527108678961, 1.50102751609291, 1.49676496033303, 1.49248312969067,
1.48818172647262, 1.48386044479907, 1.47951897027455, 1.47515697964117, 1.47077414041325,
1.46637011049177, 1.46194453775755, 1.45749705964144, 1.45302730267002, 1.44853488198504,
1.44401940083466, 1.43948045003438, 1.43491760739554, 1.43033043711868, 1.42571848914936,
1.42108129849316, 1.41641838448692, 1.41172925002253, 1.40701338071937, 1.40227024404118,
1.39749928835267, 1.39269994191062, 1.38787161178370, 1.38301368269479, 1.37812551577868,
1.37320644724729, 1.36825578695389, 1.36327281684638, 1.35825678929909, 1.35320692531083,
1.34812241255563, 1.34300240327099, 1.33784601196647, 1.33265231293310, 1.32742033753188,
1.32214907123630, 1.31683745040059, 1.31148435872148, 1.30608862335638, 1.30064901065552,
1.29516422145936, 1.28963288590456, 1.28405355767329, 1.27842470760954, 1.27274471661354,
1.26701186770996, 1.26122433716682, 1.25538018451984, 1.24947734132897, 1.24351359846062,
1.23748659164690, 1.23139378502176, 1.22523245226883, 1.21899965493396, 1.21269221735177,
1.20630669750174, 1.19983935293775, 1.19328610070894, 1.18664246989326, 1.17990354496750,
1.17306389770095, 1.16611750452355, 1.15905764529511, 1.15187677795303, 1.14456638142773,
1.13711675614510, 1.12951676681717, 1.12175350509544, 1.11381183833649, 1.10567379212015,
1.09731768236567, 1.08871685601905, 1.07983779181689, 1.07063709549386, 1.06105644669794,
1.05101338621110, 1.04038251282424, 1.02894993693476, 1.01626373360745, 1.00027458243066 };
Kdek2 = ListAlt[valk2(), valKk2()] ;
Edek2 = ListAlt[valk2(), valEk2()] ;
Ellipk[] = 2/Pi*InterpolationLinear[$1]{ Kdek2() } ;
Ellipe[] = 2/Pi*InterpolationLinear[$1]{ Edek2() } ;
}
<?xml version="1.0" encoding="utf-8"?>
<models>
<model>
<title>NF 62226</title>
<summary>Une petite application pour refaire les tests numériques de la norme NF EN 62226-2
</summary>
<file type="pro">disque.pro</file>
<preview type="png">disque.png</preview>
<url>https://gitlab.univ-lorraine.fr/ristagno1i/these-corps-humain.git</url>
</model>
</models>
# Une petite appli Onelab pour la norme NF EN 62226-2
Tout est dans le titre ;-)
* Les fichiers sont dans le dossier [NF62226](./NF62226).
* Pour une utilisation sur smartphone : ouvrir [NF62226.zip](./NF62226.zip) avec l'app Onelab.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment