diff --git a/benchmarks/2d/stator_parametric.geo b/benchmarks/2d/stator_parametric.geo index f04aa0964b36b661e4378a68ff412ff7770fca30..c96ba7d3604a1aa00691047b8023de865cc47cc9 100644 --- a/benchmarks/2d/stator_parametric.geo +++ b/benchmarks/2d/stator_parametric.geo @@ -1,111 +1,111 @@ -Mesh.Algorithm = 6; // test frontal algorithm - -// Einheiten -mm = 1.e-3; -deg = Pi/180.; - -// Charakteristische L�nge -lc = 2*mm; // allgemein -lc_delta = lc/5; // Luftspalt - - -// ----------- -// STATORDATEN -// ----------- - -da = 250.*mm; // Aussendurchmesser -di = 126.*mm; // Bohrungsdurchmesser -n = 10; // Anzahl der Nuten -hNut = 65.*mm; // Nuth�he -bNut_u = 6.*mm; // Nutbreite unten -bNut_o = 10.*mm; // Nutbreite oben -bNutoeffnung = 2.*mm; // Breite der Nut�ffnung -hNutoeffnung = 4.*mm; // H�he der Nut�ffnung -hPolfuss = 5.*mm; // - -// Luftspalt -delta = 1.*mm; - -// Mittelpunkt -x0 = 0; -y0 = 0; -z0 = 0; - -// Punkte berechnen - -// Umriss des Stators -ursprung = newp; Point(ursprung) = {x0, y0, z0, lc}; -Point(2) = {x0, y0 + da, z0, lc}; -Point(3) = {x0 + da, y0, z0, lc}; -Point(4) = {x0, y0 + di, z0, lc_delta}; -Point(5) = {x0 + di, y0, z0, lc_delta}; - -Function Nut - // eine Nut - - x1 = x0 + bNutoeffnung / 2; - y1 = y0 + Sqrt(di^2-x1^2); - - x2 = x1; - y2 = y1 + hNutoeffnung; - - x3 = bNut_u; - y3 = y2 + hPolfuss; - - x4 = bNut_o; - y4 = y3 + hNut; - - p1 = newp; Point(p1) = {x1, y1, z0, lc_delta}; - p2 = newp; Point(p2) = {-x1, y1, z0, lc_delta}; - p3 = newp; Point(p3) = {x2, y2, z0, lc_delta}; - p4 = newp; Point(p4) = {-x2, y2, z0, lc_delta}; - p5 = newp; Point(p5) = {x3, y3, z0, lc}; - p6 = newp; Point(p6) = {-x3, y3, z0, lc}; - p7 = newp; Point(p7) = {x4, y4, z0, lc}; - p8 = newp; Point(p8) = {-x4, y4, z0, lc}; - - first[i] = p2; - last[i] = p1; - - Rotate { {0, 0, 1}, {x0, y0, z0}, winkel} {Point{p1}; Point{p2}; Point{p3}; Point{p4}; Point{p5}; Point{p6}; Point{p7}; Point{p8};} - - l1[i] = newc; Line(l1[i]) = {p1, p3}; - l2[i] = newc; Line(l2[i]) = {p3, p5}; - l3[i] = newc; Line(l3[i]) = {p5, p7}; - l4[i] = newc; Line(l4[i]) = {p7, p8}; - l5[i] = newc; Line(l5[i]) = {p8, p6}; - l6[i] = newc; Line(l6[i]) = {p6, p4}; - l7[i] = newc; Line(l7[i]) = {p4, p2}; - l8[i] = newc; Line(l8[i]) = {p4, p3}; - - theloops[i] = newreg; - Line Loop(theloops[i]) = {l2[i], l3[i], l4[i], l5[i], l6[i], l8[i]}; - - dienut = newreg; - Plane Surface(dienut) = theloops[i]; - -Return - -// Nuten erzeugen - -winkel = 0; -i = 0; -last[0] = 4; - -For i In {1:n} - winkel = -(90 * (i-0.5)/(n)) * deg; - Call Nut; - l[i] = newreg; Circle(l[i]) = {last[i-1], ursprung, first[i]}; -EndFor -l[n+1] = newreg; Circle(l[n+1]) = {last[n], ursprung, 5}; - -// Statorumrisse erzeugen -links = newc; Line(links) = {2, 4}; -rechts = newc; Line(rechts) = {5, 3}; -aussen = newc; Circle(aussen) = {2, ursprung, 3}; - -ll = newll; -Line Loop(ll) = { l1[{1:n}], l2[{1:n}], l3[{1:n}], l4[{1:n}], l5[{1:n}], l6[{1:n}], - l7[{1:n}], -l[{1:n+1}], -links, -rechts, aussen}; -Plane Surface(news) = ll; +Mesh.Algorithm = 6; // test frontal algorithm + +// Einheiten +mm = 1.e-3; +deg = Pi/180.; + +// Charakteristische L�nge +lc = 2*mm; // allgemein +lc_delta = lc/5; // Luftspalt + + +// ----------- +// STATORDATEN +// ----------- + +da = 250.*mm; // Aussendurchmesser +di = 126.*mm; // Bohrungsdurchmesser +n = 10; // Anzahl der Nuten +hNut = 65.*mm; // Nuth�he +bNut_u = 6.*mm; // Nutbreite unten +bNut_o = 10.*mm; // Nutbreite oben +bNutoeffnung = 2.*mm; // Breite der Nut�ffnung +hNutoeffnung = 4.*mm; // H�he der Nut�ffnung +hPolfuss = 5.*mm; // + +// Luftspalt +delta = 1.*mm; + +// Mittelpunkt +x0 = 0; +y0 = 0; +z0 = 0; + +// Punkte berechnen + +// Umriss des Stators +ursprung = newp; Point(ursprung) = {x0, y0, z0, lc}; +Point(2) = {x0, y0 + da, z0, lc}; +Point(3) = {x0 + da, y0, z0, lc}; +Point(4) = {x0, y0 + di, z0, lc_delta}; +Point(5) = {x0 + di, y0, z0, lc_delta}; + +Function Nut + // eine Nut + + x1 = x0 + bNutoeffnung / 2; + y1 = y0 + Sqrt(di^2-x1^2); + + x2 = x1; + y2 = y1 + hNutoeffnung; + + x3 = bNut_u; + y3 = y2 + hPolfuss; + + x4 = bNut_o; + y4 = y3 + hNut; + + p1 = newp; Point(p1) = {x1, y1, z0, lc_delta}; + p2 = newp; Point(p2) = {-x1, y1, z0, lc_delta}; + p3 = newp; Point(p3) = {x2, y2, z0, lc_delta}; + p4 = newp; Point(p4) = {-x2, y2, z0, lc_delta}; + p5 = newp; Point(p5) = {x3, y3, z0, lc}; + p6 = newp; Point(p6) = {-x3, y3, z0, lc}; + p7 = newp; Point(p7) = {x4, y4, z0, lc}; + p8 = newp; Point(p8) = {-x4, y4, z0, lc}; + + first[i] = p2; + last[i] = p1; + + Rotate { {0, 0, 1}, {x0, y0, z0}, winkel} {Point{p1}; Point{p2}; Point{p3}; Point{p4}; Point{p5}; Point{p6}; Point{p7}; Point{p8};} + + l1[i] = newl; Line(l1[i]) = {p1, p3}; + l2[i] = newl; Line(l2[i]) = {p3, p5}; + l3[i] = newl; Line(l3[i]) = {p5, p7}; + l4[i] = newl; Line(l4[i]) = {p7, p8}; + l5[i] = newl; Line(l5[i]) = {p8, p6}; + l6[i] = newl; Line(l6[i]) = {p6, p4}; + l7[i] = newl; Line(l7[i]) = {p4, p2}; + l8[i] = newl; Line(l8[i]) = {p4, p3}; + + theloops[i] = newreg; + Line Loop(theloops[i]) = {l2[i], l3[i], l4[i], l5[i], l6[i], l8[i]}; + + dienut = newreg; + Plane Surface(dienut) = theloops[i]; + +Return + +// Nuten erzeugen + +winkel = 0; +i = 0; +last[0] = 4; + +For i In {1:n} + winkel = -(90 * (i-0.5)/(n)) * deg; + Call Nut; + l[i] = newreg; Circle(l[i]) = {last[i-1], ursprung, first[i]}; +EndFor +l[n+1] = newreg; Circle(l[n+1]) = {last[n], ursprung, 5}; + +// Statorumrisse erzeugen +links = newl; Line(links) = {2, 4}; +rechts = newl; Line(rechts) = {5, 3}; +aussen = newl; Circle(aussen) = {2, ursprung, 3}; + +ll = newll; +Line Loop(ll) = { l1[{1:n}], l2[{1:n}], l3[{1:n}], l4[{1:n}], l5[{1:n}], l6[{1:n}], + l7[{1:n}], -l[{1:n+1}], -links, -rechts, aussen}; +Plane Surface(news) = ll; Recombine Surface {10, 21, 32, 43, 54, 65, 76, 87, 98, 109, 116}; diff --git a/demos/indheat.geo b/demos/indheat.geo index 4b8e100d34292a77b8bc3b45e89f93e68950746a..f169861d668aa563b38c200a35a2d4ccb911bf99 100644 --- a/demos/indheat.geo +++ b/demos/indheat.geo @@ -59,7 +59,7 @@ Point(p+5) = {rt2, 0, -ht/2, lc}; Point(p+6) = {0, rt2, -ht/2, lc}; Point(p+7) = {-rt2, 0, -ht/2, lc}; Point(p+8) = {0, -rt2, -ht/2, lc}; -c = newc; +c = newl; Circle(c) = {p+1, p, p+2}; Circle(c+1) = {p+2, p, p+3}; Circle(c+2) = {p+3, p, p+4}; diff --git a/tutorial/t5.geo b/tutorial/t5.geo index 59069164f8fa5828f77a06f642a934915e6ac7ae..59d4e98ac65967216e174896101059fce09a2c3b 100644 --- a/tutorial/t5.geo +++ b/tutorial/t5.geo @@ -66,7 +66,7 @@ Function CheeseHole // In the following commands we use the reserved variable name // `newp', which automatically selects a new point number. This // number is chosen as the highest current point number, plus - // one. (Note that, analogously to `newp', the variables `newc', + // one. (Note that, analogously to `newp', the variables `newl', // `news', `newv' and `newreg' select the highest number amongst // currently defined curves, surfaces, volumes and `any entities // other than points', respectively.)