Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

// Gmsh project created on Wed Sep 30 11:23:15 2020

SetFactory("OpenCASCADE");

//+
h_okvir=-0.045; //+***********
h_coil=-0.005;
okvir=0.05;
rout=0.009;
rin=0.0071;
Point(1) = {-0, -0, h_okvir, 1.0};

//+
Point(2) = {okvir, 0, h_okvir, 1.0};
//+
Point(3) = {0, okvir, h_okvir, 1.0};
//+
Point(4) = {-okvir, 0, h_okvir, 1.0};
//+
Point(5) = {0, -okvir, h_okvir, 1.0};
//+
//+
Point(6) = {-0, -0, h_coil, 1.0};
//+
Point(7) = {rout, 0, h_coil, 1.0};
//+
Point(8) = {0, rout, h_coil, 1.0};
//+
Point(9) = {-rout, 0, h_coil, 1.0};
//+
Point(10) = {0, -rout, h_coil, 1.0};
//+
Point(11) = {rin, 0, h_coil, 1.0};
//+
Point(12) = {0, rin, h_coil, 1.0};
//+
Point(13) = {-rin, 0, h_coil, 1.0};
//+
Point(14) = {0, -rin, h_coil, 1.0};
//+

Circle(1) = {2, 1, 3};


//+
Circle(2) = {3, 1, 4};
//+
Circle(3) = {4, 1, 5};
//+
Circle(4) = {5, 1, 2};
//+
Circle(5) = {7, 6, 8};
//+
Circle(6) = {8, 6, 9};
//+
Circle(7) = {9, 6, 10};
//+
Circle(8) = {10, 6, 7};
//+
Circle(9) = {11, 6, 12};
//+
Circle(10) = {12, 6, 13};
//+
Circle(11) = {13, 6, 14};
//+
Circle(12) = {14, 6, 11};
//+

//+++++++++++++++++++++++++++++++++++++++++++++
x=-0.005; //+pocetna x koordinata
y=-0.005; //+pocetna y koordinata
n=20;
width=0.01;
vel=1;
i=18;
j=14;
k=1;
m=1;

lx=0;
dy=0;
zry=0;
ly=0.01;
dx=width/(n);
zrx=(width-n*dx)/(n-1);

Point(16)={x,y,h_coil,vel};
Point(17)={x,y+ly,h_coil,vel};
Line(13)={17,16};

y=y+ly;

//+*********************************************
//+
Extrude {0, 0, 0.01} {Curve{13};}
//+

For t In {1:(n)}
Extrude {dx, 0, 0} {Surface{1+(t-1)*5}; Layers{1};Recombine; }
EndFor

//+
Curve Loop(10*n-3) = {11, 12, 9, 10};
//+
Plane Surface(10*n-3) = {10*n-3};
//+
Curve Loop(10*n-2) = {7, 8, 5, 6};
//+
Curve Loop(10*n-1) = {11, 12, 9, 10};
//+
Plane Surface(10*n-2) = {10*n-2, 10*n-1};
//+
Curve Loop(10*n) = {2, 3, 4, 1};
//+
Plane Surface(10*n-1) = {10*n};
//+
Extrude {0, 0, 0.01} {Surface{10*n-3};}
//+
Extrude {0, 0, 0.01} {Surface{10*n-2};}
//+
Extrude {0, 0, -2*h_okvir} {Surface{10*n-1};}
//
//
BooleanFragments{ Volume{n+1}; Delete; }{ Volume{1:n}; Delete; }
//+
BooleanFragments{ Volume{n+3}; Delete; }{ Volume{1:n}; Volume{n+2}; Volume{n+4};
Delete; }
//+
//
Transfinite Curve {13, 15, 16, 14} = 20 Using Bump 0.9;
//For t In {1:(n-1)}
//Transfinite Curve {32+16*(t-1), 30+16*(t-1), 31+16*(t-1), 27+16*(t-1)} = 80 Using
Bump 0.9;
//EndFor
//
//+
Field[1] = Cylinder;
//+
Field[1].Radius = 0.011;
//+
Field[1].VIn = 0.02;
//+
Field[1].VOut = 0.3;
//
Field[1].ZAxis = 0.006;
//+
Field[1].ZCenter = 0.0;
//+
Background Field = 1;
//+
//+
//+

You might also like