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
//
// input: Volumes()
// output: cube()
points() = PointsOf{ Volume{ Volumes() }; };
point() = Point { points(0) };
_points() = PointsOf{ Volume{ Volumes() }; };
point() = Point { _points(0) };
Call ChangeCoordinates;
cube() = {coord(0), coord(1), coord(2), coord(0), coord(1), coord(2)};
For p In {1 : #points() - 1}
point() = Point{ points(p) };
For p In {1 : #_points() - 1}
point() = Point{ _points(p) };
Call ChangeCoordinates;
cube(0) = (coord(0) < cube(0) ? coord(0) : cube(0));
cube(1) = (coord(1) < cube(1) ? coord(1) : cube(1));
......@@ -146,30 +146,30 @@ Function Cube2Face
//
// input: cube() and FaceId
// output: face()
bbox() = cube();
bbox(Modulo(FaceId + 3, 6)) = bbox(FaceId);
_bbox() = cube();
_bbox(Modulo(FaceId + 3, 6)) = _bbox(FaceId);
face() = {};
surfaces() = Boundary{ Volume{ Volumes() }; };
For s In { 0:#surfaces()-1 }
_surfaces() = Boundary{ Volume{ Volumes() }; };
For s In { 0:#_surfaces()-1 }
NbIn = 0;
points() = PointsOf { Surface { surfaces(s) } ; };
For p In { 0 : #points() - 1 }
point() = Point { points(p) };
_points() = PointsOf { Surface { _surfaces(s) } ; };
For p In { 0 : #_points() - 1 }
point() = Point { _points(p) };
Call ChangeCoordinates;
If((CoordinateSystem == 1) && (coord(0) == 0))
coord(1) = bbox(1);
coord(1) = _bbox(1);
EndIf
If((coord(0) > bbox(0) - tol) &&
(coord(1) > bbox(1) - tol) &&
(coord(2) > bbox(2) - tol) &&
(coord(0) < bbox(3) + tol) &&
(coord(1) < bbox(4) + tol) &&
(coord(2) < bbox(5) + tol))
If((coord(0) > _bbox(0) - tol) &&
(coord(1) > _bbox(1) - tol) &&
(coord(2) > _bbox(2) - tol) &&
(coord(0) < _bbox(3) + tol) &&
(coord(1) < _bbox(4) + tol) &&
(coord(2) < _bbox(5) + tol))
NbIn++;
EndIf
EndFor
If(NbIn == #points())
face() += surfaces(s);
If(NbIn == #_points())
face() += _surfaces(s);
EndIf
EndFor
Return
......@@ -206,10 +206,26 @@ StatorPerSlave() = face();
FaceId = 5; Call Cube2Face;
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.
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() }; };
For num In { 0:#surfaces()-1 }
lines() += Boundary { Surface{ surfaces(num) }; };
......@@ -233,9 +249,10 @@ For num In { 0:#lines()-1 }
EndIf
EndFor
//Transfinite Surface{ surfaces() } ;
Transfinite Surface{ SlidingMaster() } ;
Transfinite Surface{ surfaces() } ;
Recombine Surface{ surfaces({1,2,4,5}) };
Transfinite Surface{ SlidingSlave() } ;
Transfinite Volume { 10 };
// Identify 'SlidingSubmaster' Curve
......
......@@ -8,7 +8,7 @@ If(lc <= 0)
EndIf
// Number of elements on the sliding surface in rotation direction
NbrDiv = 50*mm/lc;
NbrDiv = 100*mm/lc;
ModelAngleMin = 0. ;
ModelAngleMax = 60. ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment