[Gmsh] Separate msh files for conforming meshes of two different domains.

Uģis Lācis ugis.lacis at gmail.com
Fri Jun 3 09:33:46 CEST 2016


Hi everyone,

I am using GMSH to generate a 3D mesh to solve fluid and solid equations 
in FreeFem++ in a coupled manner. So far I have generated two different 
*.geo files for fluid and solid part, and that has produced reasonable 
results for me up till now.

However, when investigating the produced meshes in a close up, it seems 
that the generated meshes does not conform exactly... there are some 
tiny differences at some points. I would like to get rid of those.

I have generated a single .geo file for both domains (see example 
attached), but I am not able to export two separate mesh files - one for 
physical volume "50" (and adjacent physical surfaces), and other for 
physical volume "51" (and adjacent physical surfaces).

For me the task seems simple. Is there an easy/automatic way to do that 
using gmsh?

I could of course write a script, that takes the whole mesh and extracts 
the needed elements to other file, but for me it makes sense that such 
functionality would be present within GMSH already.

I am using GMSH version 2.12.0.

Best regards,
Ugis
-------------- next part --------------
cl__1 = 1;
Point(1) = {0, 0, 0, 1};
Point(2) = {0.5, 0.5, 0.5, 1};
Point(3) = {0.5, 0.5, -0.5, 1};
Point(4) = {0.5, -0.5, -0.5, 1};
Point(5) = {0.5, -0.5, 0.5, 1};
Point(6) = {-0.5, 0.5, 0.5, 1};
Point(7) = {-0.5, 0.5, -0.5, 1};
Point(8) = {-0.5, -0.5, -0.5, 1};
Point(9) = {-0.5, -0.5, 0.5, 1};
Point(10) = {0, 0, 0.2, 1};
Point(11) = {0, 0, -0.2, 1};
Point(12) = {0.2, 0, 0, 1};
Point(13) = {-0.2, 0, 0, 1};
Point(14) = {0, -0.2, 0, 1};
Point(15) = {0, 0.2, 0, 1};
Line(1) = {5, 2};
Line(2) = {2, 6};
Line(3) = {6, 9};
Line(4) = {9, 5};
Line(5) = {2, 3};
Line(6) = {3, 4};
Line(7) = {4, 5};
Line(8) = {6, 7};
Line(9) = {7, 8};
Line(10) = {8, 9};
Line(11) = {8, 4};
Line(12) = {3, 7};
Circle(13) = {11, 1, 12};
Circle(14) = {12, 1, 10};
Circle(15) = {10, 1, 13};
Circle(16) = {13, 1, 11};
Circle(17) = {13, 1, 14};
Circle(18) = {14, 1, 12};
Circle(19) = {12, 1, 15};
Circle(20) = {15, 1, 13};
Line Loop(22) = {2, 3, 4, 1};
Plane Surface(22) = {22};
Line Loop(24) = {10, 4, -7, -11};
Plane Surface(24) = {24};
Line Loop(26) = {7, 1, 5, 6};
Plane Surface(26) = {26};
Line Loop(28) = {5, 12, -8, -2};
Plane Surface(28) = {28};
Line Loop(30) = {6, -11, -9, -12};
Plane Surface(30) = {30};
Line Loop(31) = {2, 3, 4, 1};
Plane Surface(31) = {31};
Line Loop(33) = {19, 20, -15, -14};
Ruled Surface(33) = {33};
Line Loop(35) = {14, 15, 17, 18};
Ruled Surface(35) = {35};
Line Loop(37) = {13, -18, -17, 16};
Ruled Surface(37) = {37};
Line Loop(39) = {13, 19, 20, 16};
Ruled Surface(39) = {39};
Line Loop(45) = {3, -10, -9, -8};
Plane Surface(45) = {45};
Surface Loop(43) = {33, 39, 37, 35};
Volume(43) = {43};
Surface Loop(47) = {33, 39, 37, 35, 45, 24, 26, 28, 30, 22};
Volume(47) = {47};
Physical Surface(48) = {22, 24, 26, 28, 30, 45};
Physical Surface(49) = {33, 35, 37, 39};
Physical Volume(50) = {43};
Physical Volume(51) = {47};
Mesh.CharacteristicLengthMax = 0.10;


More information about the gmsh mailing list