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] Converting curved surfaces problem (https://www.cfd-online.com/Forums/openfoam-meshing/61892-converting-curved-surfaces-problem.html)

markdowlinguk August 1, 2007 05:58

Converting curved surfaces problem
 
Can anybody tell me what might be wrong here..

I'm having problems whenever I try to convert a GMSH .msh file which contains a curved surface (as generated by the circle arc option in Gmsh). It generates a reasonably looking mesh in Gmsh but when I run gmshToFoam I get a whole load of the following type of error...

--> FOAM Warning : Not using gmsh face 3(21 2 20) since zero vertex is not on boundary of polyMesh
--> FOAM Warning :
From function gmshToFoam
in file gmshToFoam.C at line 799
Could not match gmsh face 3(21 2 20) to any of the interior or exterior faces that share the same 0th point
--> FOAM Warning :
From function gmshToFoam
in file gmshToFoam.C at line 799
Could not match gmsh face 3(3 2 21) to any of the interior or exterior faces that share the same 0th point



Viewing the resulting mesh on paraFoam shows that only the parts of the mesh enclosed by straight lines have been converted (and correctly!) but areas enclosed in one or more curved line are omitted from the mesh in paraFoam

Any ideas - I'm completely confused - I think Im defining the curves okay in Gmsh, but Im a beginner to all this, so I might be wrong!

Is Gmsh the best free mesh generator available on the net or is there something more useful for generating 3D meshes as trying to write out a complex blockMeshDict manually is making my head spin.

Regards
Mark

7islands August 1, 2007 20:52

Hi, A likely cause in such a
 
Hi,
A likely cause in such a case is you forgot to define a physical volume that includes the volume enclosed by the curved surfaces (if there's any physical group defined), thus there's no volumetric elements (tet/hex etc.) for the volume in the .msh file. If you use physical group definition in your .geo please check the definition carefully, or save the .msh file with Mesh.SaveAll set to 1.

Takuya

markdowlinguk August 2, 2007 05:42

Hi Takuya, My experience with
 
Hi Takuya,
My experience with Gmsh is limited but I think I have the physical volume set up correctly - see the included simple .geo file...

Point (1) = {-25, -50, 0, 25};
Point (2) = {25, -50, 0, 25};
Point (3) = {25, 50, 0, 25};
Point (4) = {-25, 50, 0, 25};
Point (5) = {25, -50, 1, 25};
Point (6) = {25, 50, 1, 25};
Point (10) = {-25, 50, 1, 25};
Point (14) = {-25, -50, 1, 25};
Point (15) = {0, 50, 0, 25};
Point (16) = {0, 50, 1, 25};
Line (1) = {1, 2};
Line (2) = {2, 3};
Line (3) = {3, 4};
Line (4) = {4, 1};
Line (8) = {5, 6};
Line (9) = {6, 10};
Line (10) = {10, 14};
Line (11) = {14, 5};
Line (13) = {2, 5};
Line (14) = {3, 6};
Line (18) = {4, 10};
Line (22) = {1, 14};
Circle (29) = {6, 16, 10};
Circle (30) = {3, 15, 4};
Line Loop (6) = {2, 3, 4, 1};
Plane Surface (6) = {6};
Line Loop (15) = {2, 14, -8, -13};
Ruled Surface (15) = {15};
Line Loop (19) = {3, 18, -9, -14};
Ruled Surface (19) = {19};
Line Loop (23) = {4, 22, -10, -18};
Ruled Surface (23) = {23};
Line Loop (27) = {1, 13, -11, -22};
Ruled Surface (27) = {27};
Line Loop (28) = {8, 9, 10, 11};
Plane Surface (28) = {28};
Line Loop (32) = {14, 29, -18, -30};
Ruled Surface (32) = {32};
Line Loop (34) = {9, -29};
Plane Surface (34) = {34};
Line Loop (36) = {30, -3};
Plane Surface (36) = {36};
Surface Loop (1) = {6, 28, 15, 19, 23, 27};
Volume (1) = {1};
Physical Point(37) = {6,3,16,15,10,4,14,1,5,2};
Physical Line(38) = {11,1,8,2,10,4,9,3,29,30,14,18,22,13};
Physical Surface(39) = {28,6,27,23,15,19,32,34,36};
Physical Volume(40) = {1};

From this I generated the 1D, 2D and 3D mesh and then saved as .msh, but when I try to run gmshToFoam i get lots of error like...

--> FOAM Warning : Not using gmsh face 3(20 3 2) since zero vertex is not on boundary of polyMesh
--> FOAM Warning :
From function gmshToFoam
in file gmshToFoam.C at line 799
Could not match gmsh face 3(20 3 2) to any of the interior or exterior faces that share the same 0th point

If you can work out what I'm doing wrong then please let me know
Many thanks
mark

mattijs August 2, 2007 06:50

gmshToFoam expects all faces o
 
gmshToFoam expects all faces of the surface mesh to match an external face of the volume mesh. It uses the surface mesh regions to denote patches of the volume mesh.

I haven't really used gmsh but seems to me you have extraneous information in your file.

7islands August 2, 2007 08:05

Hi Mark, Try replacing the li
 
Hi Mark,
Try replacing the line

Surface Loop (1) = {6, 28, 15, 19, 23, 27};

to

Surface Loop (1) = {6, 28, 15, 23, 27, 32, 34, 36};

(remove surface 19 and add 32, 34 and 36).

I haven't tried the final gmshToFoam conversion test by myself but the physical volume definition clearly lacks the part which is enclosed by the curved surface, while the physical surface definition seems to be OK.

And just fyi the last part of the thread
http://www.cfd-online.com/OpenFOAM_D...es/1/3841.html
might be helpful for checking if physical group definition is exactly as you intended.

Takuya


All times are GMT -4. The time now is 05:06.