CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Gmsh] AMI - boundaries in gmsh (https://www.cfd-online.com/Forums/openfoam-meshing/197729-ami-boundaries-gmsh.html)

Benji January 15, 2018 05:22

AMI - boundaries in gmsh
 
1 Attachment(s)
Hey everyone

I'm setting up a case where I have an inner volume (cylinder) that is rotating and an outer volume that is stationary ("cylinder with a hole"). Now I understand that at the boundaries, I need cyclicAMI patches to couple the rotating and stationary volumes (see attached image).

What I want to do is define the inner volume, define the boundary surface. Then define the outer volume and its boundary surface (which is located at the same coordinates). What I'm struggling with is how I can define the AMI patches (which are at the same location) corresponding to each volume (gmsh). What I've been doing so far is setting the 2 AMI patches slightly apart, but isn't it possible to have them on the same location?

Any help would be greatly appreciated!

Ben


Start of simple geo-File:
Code:

Point(1) = {0, 0, 0, 1};
Point(2) = {2, 0, 0, 1};
Point(3) = {-2, 0, 0, 1};
Point(4) = {0, 0, 2, 1};
Point(5) = {0, 0, -2, 1};

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

Point(6) = {3, 0, 0, 1};
Point(7) = {-3, 0, 0, 1};
Point(8) = {0, 0, 3, 1};
Point(9) = {0, 0, -3, 1};

Circle(5) = {8, 1, 7};
Circle(6) = {7, 1, 9};
Circle(7) = {9, 1, 6};
Circle(8) = {6, 1, 8};

Line(9) = {4, 8};
Line(10) = {3, 7};
Line(11) = {5, 9};
Line(12) = {2, 6};
Line Loop(13) = {5, -10, -1, 9};
Plane Surface(14) = {13};
Line Loop(15) = {8, -9, -4, 12};
Plane Surface(16) = {15};
Line Loop(17) = {3, 12, -7, -11};
Plane Surface(18) = {17};
Line Loop(19) = {2, 11, -6, -10};
Plane Surface(20) = {19};
Extrude {0, 1, 0} {
  Surface{16};
}
Extrude {0, 1, 0} {
  Surface{14};
}
Extrude {0, 1, 0} {
  Surface{18};
}
Extrude {0, 1, 0} {
  Surface{20};
}
Physical Surface("wallss") = {51, 29, 81, 103, 108, 20, 64, 14, 42, 16, 18, 86};
Physical Surface("ami2") = {59, 95, 37, 73};
Physical Volume("stator") = {2, 4, 3, 1};

//rotor
Point(110) = {1.99, 0, 0, 1};
Point(111) = {-1.99, 0, 0, 1};
Point(112) = {0, 0, 1.99, 1};
Point(113) = {0, 0, -1.99, 1};

Circle(109) = {112, 1, 111};
Circle(110) = {111, 1, 113};
Circle(111) = {113, 1, 110};
Circle(112) = {110, 1, 112};
Line Loop(113) = {109, 110, 111, 112};
Plane Surface(114) = {113};
Extrude {0, 1, 0} {
  Surface{114};
}
Physical Surface("wallsr") = {114, 136};
Physical Surface("ami1") = {123, 135, 131, 127};
Physical Volume("rotor") = {5};


arashgmn March 16, 2020 10:23

Quote:

Originally Posted by Benji (Post 678122)
Hey everyone

I'm setting up a case where I have an inner volume (cylinder) that is rotating and an outer volume that is stationary ("cylinder with a hole"). Now I understand that at the boundaries, I need cyclicAMI patches to couple the rotating and stationary volumes (see attached image).

What I want to do is define the inner volume, define the boundary surface. Then define the outer volume and its boundary surface (which is located at the same coordinates). What I'm struggling with is how I can define the AMI patches (which are at the same location) corresponding to each volume (gmsh). What I've been doing so far is setting the 2 AMI patches slightly apart, but isn't it possible to have them on the same location?

Any help would be greatly appreciated!

Ben


Start of simple geo-File:
Code:

Point(1) = {0, 0, 0, 1};
Point(2) = {2, 0, 0, 1};
Point(3) = {-2, 0, 0, 1};
Point(4) = {0, 0, 2, 1};
Point(5) = {0, 0, -2, 1};

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

Point(6) = {3, 0, 0, 1};
Point(7) = {-3, 0, 0, 1};
Point(8) = {0, 0, 3, 1};
Point(9) = {0, 0, -3, 1};

Circle(5) = {8, 1, 7};
Circle(6) = {7, 1, 9};
Circle(7) = {9, 1, 6};
Circle(8) = {6, 1, 8};

Line(9) = {4, 8};
Line(10) = {3, 7};
Line(11) = {5, 9};
Line(12) = {2, 6};
Line Loop(13) = {5, -10, -1, 9};
Plane Surface(14) = {13};
Line Loop(15) = {8, -9, -4, 12};
Plane Surface(16) = {15};
Line Loop(17) = {3, 12, -7, -11};
Plane Surface(18) = {17};
Line Loop(19) = {2, 11, -6, -10};
Plane Surface(20) = {19};
Extrude {0, 1, 0} {
  Surface{16};
}
Extrude {0, 1, 0} {
  Surface{14};
}
Extrude {0, 1, 0} {
  Surface{18};
}
Extrude {0, 1, 0} {
  Surface{20};
}
Physical Surface("wallss") = {51, 29, 81, 103, 108, 20, 64, 14, 42, 16, 18, 86};
Physical Surface("ami2") = {59, 95, 37, 73};
Physical Volume("stator") = {2, 4, 3, 1};

//rotor
Point(110) = {1.99, 0, 0, 1};
Point(111) = {-1.99, 0, 0, 1};
Point(112) = {0, 0, 1.99, 1};
Point(113) = {0, 0, -1.99, 1};

Circle(109) = {112, 1, 111};
Circle(110) = {111, 1, 113};
Circle(111) = {113, 1, 110};
Circle(112) = {110, 1, 112};
Line Loop(113) = {109, 110, 111, 112};
Plane Surface(114) = {113};
Extrude {0, 1, 0} {
  Surface{114};
}
Physical Surface("wallsr") = {114, 136};
Physical Surface("ami1") = {123, 135, 131, 127};
Physical Volume("rotor") = {5};



Did you manage to solve this? And one more question, does having a gap between rotor/stator causes any problem in your simulation (as long as the gap is less than some threshold)?

Best,
Arash


All times are GMT -4. The time now is 12:25.