# gmsh: how to match nodes from different geometries

 Register Blogs Members List Search Today's Posts Mark Forums Read

May 5, 2015, 04:49
gmsh: how to match nodes from different geometries
#1
Member

thomas
Join Date: Jul 2014
Posts: 49
Rep Power: 4
Dear all,

I have been having some troubles with matching the nodes from different geometries. I am working on a 2D simulation in OpenFOAM. Since I have this issue, all the further steps for making a suitable 3D mesh for a 2D case in OpenFOAM have been commented.
I copied the code and I also attached a picture of my case/issue.

Thank you very much in advance!

Code:
```el = 1;
pi = 3.14159265;
theta = (pi/4);
theta2 = (pi-pi/4);
u=20; //dimensión u
v=15; //dimensión v
z=40; //dimensión z
r = z;
r2 = r+u*Sin(theta);
r3 = 4; //Radius inlet, outlet

Point(1) = {0, 0, 0, el};
Point(2) = {0, 15, 0, el};
Point(3) = {r2*Cos(theta2), 15+r2*Sin(theta2), 0, el};
Point(4) = {r*Cos(theta2), 35+r*Sin(theta2), 0, el};
Point(5) = {0, 35, 0, el};
Point(6) = {0, 40, 0, el};
Point(7) = {120, 40, 0, el};
Point(8) = {120, 35, 0, el};
Point(9) = {160, 35, 0, el};
Point(10) = {160, 15, 0, el};
Point(11) = {120, 15, 0, el};
Point(12) = {120, 0, 0, el};
//Point(13) = {u*Cos(theta2)*Sin(theta), v+u*Sin(theta2)*Sin(theta), 0, el};
Point(14) = {120, 35+r3, 0};
Point(15) = {120+r3, 35, 0};
Point(16) = {120+r3, 35+r3, 0};
Point(17) = {120, 15-r3, 0};
Point(18) = {120+r3, 15, 0};
Point(19) = {120+r3, 15-r3, 0};

//Circle(21) = {14, 16, 15};
//Circle(22) = {17, 19, 18};
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 5};
Line(5) = {5, 6};
Line(6) = {6, 7};
Line(7) = {7, 14};
Line(8) = {8, 15};
Line(9) = {9, 10};
Line(10) = {10, 18};
Line(11) = {11, 17};
Line(12) = {12, 1};
Line(13) = {2, 5};
Line(14) = {8, 11};
Line(15) = {8, 9};
Line(16) = {10, 11};
Line(17) = {15, 9};
Line(18) = {18, 11};
Line(19) = {14, 8};
Line(20) = {17, 12};
Line(27) = {14, 15};
Line(28) = {18, 17};
Line(23) = {11,12};
Line(24) = {7,8};
//Line(25) = {5,8};
//Line(26) = {2,11};

Line Loop(15) = {2, 3, 4, -13};
Plane Surface(16) = {15};
Line Loop(17) = {1, 13, 5, 6, 24, 14, 23, 12};
Plane Surface(18) = {17};
Line Loop(19) = {15, 9, 16, -14};
Plane Surface(20) = {19};
Line Loop(21) = {27, -8, -19};
Plane Surface(22) = {21};
Line Loop(23) = {28, -11, -18};
Plane Surface(24) = {23};

Transfinite Line {6,12} = 240; //x
Transfinite Line {1,23} = 30;  //v
Transfinite Line {3,13,9,14} = 40; //inlet y outlet
Transfinite Line {4,2} = 80; //z inlet
Transfinite Line {5,24} = 10;  //w
Transfinite Line {15,16} = 80; //z outlet
//Transfinite Line {19,11,8,18} = 9; // triangles
Transfinite Line {27, 28} = 15;
Transfinite Surface {16} = {2,3,4,5};
Transfinite Surface {18} = {1,6,7,12};
Transfinite Surface {20} = {11,8,9,10};
//Transfinite Surface {22} = {8,14,15};
//Transfinite Surface {24} = {11,18,17};
Recombine Surface{16,18,20};//22,24};

//Extrude {0, 0, 10} {
//  Surface{16, 18, 20, 22, 24};
//  Layers{1};
//  Recombine;
//}

//Physical Surface("back") = {18,42,16,20,24,22};
//Physical Surface("front") = {98,46,120,154,137};
//Physical Surface("inlet") = {37};
//Physical Surface("outlet") = {111};
//Physical Surface("walls") = {97,61,33,41,69,77,128,107,115,153,93};
//Physical Volume("interior") = {1, 2, 3, 4, 5};```
Attached Images
 snapshot4.jpg (36.9 KB, 12 views)

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Touré Open Source Meshers: Gmsh, Netgen, CGNS, ... 1 July 5, 2016 06:48 [ANSYS Meshing] Match control at interface between two separate geometries davidrobinson50 ANSYS Meshing & Geometry 35 May 19, 2016 13:46 ARC Open Source Meshers: Gmsh, Netgen, CGNS, ... 0 February 27, 2010 11:56 sarajags_89 OpenFOAM 0 November 24, 2009 23:50 Chie Min CFX 5 July 12, 2001 23:19

All times are GMT -4. The time now is 02:33.