|
[Sponsors] |
[Gmsh] gmsh and duplicate nodes in adjacent surfaces |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 23, 2015, 17:27 |
gmsh and duplicate nodes in adjacent surfaces
|
#1 |
Member
hekseli
Join Date: Mar 2013
Posts: 49
Rep Power: 13 |
Hey!
As a simple case: make a structured box and add a smaller box on top of it, in a way that your cells are coinciding. In this way there will be 4 duplicate vertices at the vertex coordinates of the smaller box. Coherence functionality did not remove them. Compound Surfaces command did not work either...meshing does not work then. In general, what is the way to merge two adjacent volume blocks together, if their common surface is only a part of the other one? |
|
July 24, 2015, 07:47 |
|
#2 |
Senior Member
Join Date: Mar 2015
Posts: 250
Rep Power: 12 |
Hi,
can you please post a minimal geo file which reproduces the problem? Best regards, Kate |
|
July 24, 2015, 08:17 |
|
#3 |
Member
hekseli
Join Date: Mar 2013
Posts: 49
Rep Power: 13 |
Hey!
Here's an example case. So small box on top of a larger box. In total there should be 36 vertices, but atm there are 40. Code:
--------------------------------------------------- squareSide = 1; gridsize = 1; //Box 1 p01=newp; Point(p01) = {-squareSide/2, -squareSide/2,0,gridsize}; //Extrude line l[] = Extrude {gridsize,0,0}{ Point{p01}; Layers{1}; }; //Extrude Surface s[] = Extrude {0,gridsize,0}{ Line{l[1]}; Layers{1}; Recombine; }; //Extrude volume v[] = Extrude {0,0,gridsize}{ Surface{s[1]}; Layers{1}; Recombine; }; // Box 2 p01=newp; Point(p01) = {-squareSide/2-1 , -squareSide/2-1 ,gridsize,gridsize}; //Extrude line l[] = Extrude {3*gridsize,0,0}{ Point{p01}; Layers{3}; }; //Extrude Surface s[] = Extrude {0,3*gridsize,0}{ Line{l[1]}; Layers{3}; Recombine; }; //Extrude volume v[] = Extrude {0,0,gridsize}{ Surface{s[1]}; Layers{1}; Recombine; }; Coherence; ----------------------------------------------------------------------- |
|
July 24, 2015, 08:35 |
|
#4 | ||
Senior Member
Join Date: Mar 2015
Posts: 250
Rep Power: 12 |
Quote:
By the way, meshing works perfectly on my machine (10 hexaeder). Quote:
Best regards, Kate |
|||
July 24, 2015, 08:51 |
|
#5 |
Member
hekseli
Join Date: Mar 2013
Posts: 49
Rep Power: 13 |
I don't know either how the number of elements is really computed. Yes I get the right number of hexas too (10) but if you look at the vertex numbers from .msh file directly you see 40 vertices, even though there should be 36. So we have duplicates.
With respect to OpenFoam e.g. this kind of mesh works fine and OF checkMesh doesn't complain but I don't feel comfy when I know that there are duplicate vertices!!!! Cheers |
|
July 24, 2015, 10:42 |
|
#6 |
Senior Member
|
Hi,
In mesh generated with Gmsh 2.9.2 vertices 33-36 have the same coordinates as vertices 5-8. And they appear as a result of meshing of two separate volumes. Since cell size of top cuboid is equal to the bottom one you have vertices that looks like duplicate yet belong to different meshes. In any case the problem has only theoretical value as when you start to define physical groups you ether will redo your mesh, or will be able to stitch overlapping physical surfaces. |
|
July 24, 2015, 11:11 |
|
#7 |
Senior Member
|
Hi,
Update It is no just Coherence, it is Coherence Mesh, if you would like to remove duplicate entities from mesh. If you issue the command after generation of mesh, you will get the following in log: Code:
Info : Removing duplicate mesh vertices... Info : Found 4 duplicate vertices Info : Removed 4 duplicate mesh vertices Info : Done removing duplicate mesh vertices Code:
$Nodes 36 1 -0.5 -0.5 0 2 0.5 -0.5 0 ... |
|
July 27, 2015, 05:16 |
|
#8 |
Member
hekseli
Join Date: Mar 2013
Posts: 49
Rep Power: 13 |
Hey again, just started to deal with this thing again after the weekend.
Apparently the Coherence Mesh command in the end of the .geo file is not executed after the meshing (gmsh -3 test.geo) on the command line. So by issuing the command after the mesh generation you mean some kind of command execution outside .geo file? Maybe I could ask at the same time that if I would have that kind of pyramid shape .stl surface file and I would like to get structured mesh like above test code does, is it possible? This far the stl remeshing procedures what I have seen, give only unstructured grids. Direct access to stl surface and its transfinite properties is misty for me with respect to the simple surface topology. Cheers |
|
July 27, 2015, 06:21 |
|
#9 |
Senior Member
|
Hi,
You can generate mesh from geo file. So instead of gmsh -3 test.geo, you add "Mesh 3;" when you would like to generate mesh. The whole procedure should be something like: Code:
... Mesh 3; // Generalte 3D mesh Coherence Mesh; // Remove duplicate entities Save "my-lovely-mesh.msh"; // Save mesh in MSH format 1. http://www.geuz.org/gmsh/doc/texinfo...-mesh-commands |
|
July 27, 2015, 06:39 |
|
#10 |
Member
hekseli
Join Date: Mar 2013
Posts: 49
Rep Power: 13 |
Thanks!
I haven't really found any examples nor experiences about structured meshes from stl's so indeed it is not a common approach. |
|
October 26, 2019, 05:13 |
|
#11 | |
New Member
Vachan Potluri
Join Date: Jul 2017
Posts: 29
Rep Power: 8 |
Quote:
Hi Alexey, I was having a problem with gmshToFoam producing extra default faces (openfoam 7). My 2D mesh is a combination of 3 extrusions and the faces at extrusion interfaces were duplicated. Using Code:
Coherence Mesh; |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] Cgns support for gmsh | robyTKD | OpenFOAM Meshing & Mesh Conversion | 1 | July 13, 2016 11:27 |