Skip to content
Snippets Groups Projects
Commit 066e4c75 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

use prisms in air ring

parent 025a463c
No related branches found
No related tags found
No related merge requests found
Pipeline #5339 passed
...@@ -124,12 +124,12 @@ Function Volume2Cube ...@@ -124,12 +124,12 @@ Function Volume2Cube
// //
// input: Volumes() // input: Volumes()
// output: cube() // output: cube()
points() = PointsOf{ Volume{ Volumes() }; }; _points() = PointsOf{ Volume{ Volumes() }; };
point() = Point { points(0) }; point() = Point { _points(0) };
Call ChangeCoordinates; Call ChangeCoordinates;
cube() = {coord(0), coord(1), coord(2), coord(0), coord(1), coord(2)}; cube() = {coord(0), coord(1), coord(2), coord(0), coord(1), coord(2)};
For p In {1 : #points() - 1} For p In {1 : #_points() - 1}
point() = Point{ points(p) }; point() = Point{ _points(p) };
Call ChangeCoordinates; Call ChangeCoordinates;
cube(0) = (coord(0) < cube(0) ? coord(0) : cube(0)); cube(0) = (coord(0) < cube(0) ? coord(0) : cube(0));
cube(1) = (coord(1) < cube(1) ? coord(1) : cube(1)); cube(1) = (coord(1) < cube(1) ? coord(1) : cube(1));
...@@ -146,30 +146,30 @@ Function Cube2Face ...@@ -146,30 +146,30 @@ Function Cube2Face
// //
// input: cube() and FaceId // input: cube() and FaceId
// output: face() // output: face()
bbox() = cube(); _bbox() = cube();
bbox(Modulo(FaceId + 3, 6)) = bbox(FaceId); _bbox(Modulo(FaceId + 3, 6)) = _bbox(FaceId);
face() = {}; face() = {};
surfaces() = Boundary{ Volume{ Volumes() }; }; _surfaces() = Boundary{ Volume{ Volumes() }; };
For s In { 0:#surfaces()-1 } For s In { 0:#_surfaces()-1 }
NbIn = 0; NbIn = 0;
points() = PointsOf { Surface { surfaces(s) } ; }; _points() = PointsOf { Surface { _surfaces(s) } ; };
For p In { 0 : #points() - 1 } For p In { 0 : #_points() - 1 }
point() = Point { points(p) }; point() = Point { _points(p) };
Call ChangeCoordinates; Call ChangeCoordinates;
If((CoordinateSystem == 1) && (coord(0) == 0)) If((CoordinateSystem == 1) && (coord(0) == 0))
coord(1) = bbox(1); coord(1) = _bbox(1);
EndIf EndIf
If((coord(0) > bbox(0) - tol) && If((coord(0) > _bbox(0) - tol) &&
(coord(1) > bbox(1) - tol) && (coord(1) > _bbox(1) - tol) &&
(coord(2) > bbox(2) - tol) && (coord(2) > _bbox(2) - tol) &&
(coord(0) < bbox(3) + tol) && (coord(0) < _bbox(3) + tol) &&
(coord(1) < bbox(4) + tol) && (coord(1) < _bbox(4) + tol) &&
(coord(2) < bbox(5) + tol)) (coord(2) < _bbox(5) + tol))
NbIn++; NbIn++;
EndIf EndIf
EndFor EndFor
If(NbIn == #points()) If(NbIn == #_points())
face() += surfaces(s); face() += _surfaces(s);
EndIf EndIf
EndFor EndFor
Return Return
...@@ -206,10 +206,26 @@ StatorPerSlave() = face(); ...@@ -206,10 +206,26 @@ StatorPerSlave() = face();
FaceId = 5; Call Cube2Face; FaceId = 5; Call Cube2Face;
StatorTop() = face(); StatorTop() = face();
// The width of the air ring region is arbitrary, but it is in general thin, // The width of the air ring region is arbitrary, but it is in general thin,
// especially in machine models where it has to fit into the air gap. // especially in machine models where it has to fit into the air gap.
surfaces() = Boundary { Volume{10}; }; // get boundary surfaces of the air ring by geometric identifiying, in order to
// distinguish lateral surfaces from the top and bottom
Volumes() = {10}; Call Volume2Cube;
surfaces() = {};
FaceId = 0; Call Cube2Face;
surfaces() += face();
FaceId = 1; Call Cube2Face;
surfaces() += face();
FaceId = 2; Call Cube2Face;
surfaces() += face();
FaceId = 3; Call Cube2Face;
surfaces() += face();
FaceId = 4; Call Cube2Face;
surfaces() += face();
FaceId = 5; Call Cube2Face;
surfaces() += face();
lines() = Boundary { Surface{ SlidingSlave() }; }; lines() = Boundary { Surface{ SlidingSlave() }; };
For num In { 0:#surfaces()-1 } For num In { 0:#surfaces()-1 }
lines() += Boundary { Surface{ surfaces(num) }; }; lines() += Boundary { Surface{ surfaces(num) }; };
...@@ -233,9 +249,10 @@ For num In { 0:#lines()-1 } ...@@ -233,9 +249,10 @@ For num In { 0:#lines()-1 }
EndIf EndIf
EndFor EndFor
//Transfinite Surface{ surfaces() } ; Transfinite Surface{ surfaces() } ;
Transfinite Surface{ SlidingMaster() } ; Recombine Surface{ surfaces({1,2,4,5}) };
Transfinite Surface{ SlidingSlave() } ; Transfinite Surface{ SlidingSlave() } ;
Transfinite Volume { 10 };
// Identify 'SlidingSubmaster' Curve // Identify 'SlidingSubmaster' Curve
......
...@@ -8,7 +8,7 @@ If(lc <= 0) ...@@ -8,7 +8,7 @@ If(lc <= 0)
EndIf EndIf
// Number of elements on the sliding surface in rotation direction // Number of elements on the sliding surface in rotation direction
NbrDiv = 50*mm/lc; NbrDiv = 100*mm/lc;
ModelAngleMin = 0. ; ModelAngleMin = 0. ;
ModelAngleMax = 60. ; ModelAngleMax = 60. ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment