Re: [Gmsh] Coherence 'could not find extruded vertex' error
Thanks Christophe, I am trying to work with GMSH. But as I run into many errors I have only two possible answers: 1/ GMSH is error prone (which I doubt somewhat ). 2/ I am not grasping some fundamental concepts, which makes GMSH unintuitive to me. So now I would like to get my head around these fundamental concepts. In your answer you talk about 'non-conformal geometry'. I have no idea what that means. The only thing I could find in the manual is: " A finite element mesh of a model is a tessellation of its geometry by simple geometrical elements of various shapes (in Gmsh: lines, triangles, quadrangles, tetrahedra, prisms, hexahedra and pyramids), arranged in such a way that if two of them intersect, they do so along a face, an edge or a node, and never otherwise. This defines a so-called “conformal” mesh." "// By default, across geometrical dimensions meshes generated by Gmsh are only // conformal if lower dimensional entities are on the boundary of higher // dimensional ones (i.e. if points, curves or surfaces are part of the boundary // of volumes)." I think my geometry conforms to this. Only hidden in t16.geo I find "a conformal manner (without creating duplicate interfaces)". Aha! So, if I understand this correct, conformal also means that if entities intersect, they do this along a unique (the same) face, edge, node. Maybe this should be emphasized in the manual. So I've rewritten the script to make sure this is no longer the case (see below) But I kept getting the same error. So I'm still missing something. What? Thank you. -- KanR = DefineNumber[ 0.1, Name "Parameters/KanR" ]; WanD = DefineNumber[ 0.2, Name "Parameters/WanD" ]; KanMeshsize = DefineNumber[ 0.01, Name "Parameters/KanMeshsize" ]; SetFactory("OpenCASCADE"); Rectangle(1) = {-2.5, -2.5, 0, 5, 5, 0}; Circle(5) = {0, 0, 0, KanR, 0, 2*Pi}; Curve Loop(2) = {5}; Plane Surface(2) = {2}; Extrude {0, 0, WanD } { Surface{1,2}; } Point(23) = {0, -0.1, 0}; Point(24) = {0, -0.05, 0}; Point(25) = {0, -0.05, WanD}; Point(26) = {0, -0.1, WanD}; Line(32) = {25, 24}; Line(33) = {24, 23}; Line(34) = {23, 26}; Line(35) = {26, 25}; Curve Loop(30) = {32, 33, 34, 35}; Plane Surface(14) = {30}; Extrude {{0, 0, 1}, {0, 0, 0}, Pi} { Surface{14}; Layers{25}; } BooleanFragments{ Volume{3}; Volume{1}; Delete; }{ Volume{2}; Delete; } Delete { Volume {5 }; } Delete { Surface {10,14 }; } Field[1] = Distance; Field[1].EdgesList = {16,17,18}; Field[1].NNodesByEdge = 50; Field[2] = Threshold; Field[2].DistMax = 2.5; Field[2].DistMin = 0; Field[2].IField = 1; Field[2].LcMax = 0.25; Field[2].LcMin = KanMeshsize ; Background Field = 2; Mesh.CharacteristicLengthExtendFromBoundary = 0; Mesh.CharacteristicLengthFromPoints = 0; Mesh.CharacteristicLengthFromCurvature = 0; ___ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh
Re: [Gmsh] Coherence 'could not find extruded vertex' error
Thank you again Jeremy, You’re solution (see below as I understand it) works. Yet, I have no clue why yours does and mine doesn’t. Bart. KanR = DefineNumber[ 0.1, Name "Parameters/KanR" ]; WanD = DefineNumber[ 0.2, Name "Parameters/WanD" ]; KanMeshsize = DefineNumber[ 0.01, Name "Parameters/KanMeshsize" ]; SetFactory("OpenCASCADE"); Rectangle(1) = {-2.5, -2.5, 0, 5, 5, 0}; Circle(5) = {0, 0, 0, KanR, 0, 2*Pi}; Curve Loop(2) = {5}; Plane Surface(2) = {2}; BooleanDifference{ Surface{1}; Delete; }{ Surface{2}; Delete; } Extrude {0, 0, WanD } { Surface{1}; } Point(15) = {0.05, 0, 0}; Point(16) = {0.05, 0, WanD}; Line(20) = {5, 15}; Line(21) = {15, 16}; Line(22) = {16, 14}; Curve Loop(8) = {21, 22, -18, 20}; Plane Surface(8) = {8}; Extrude {{0, 0, 1}, {0, 0, 0}, Pi} { Surface{8}; Layers{25}; } Field[1] = Distance; Field[1].EdgesList = {5}; Field[1].NNodesByEdge = 50; Field[2] = Threshold; Field[2].DistMax = 2.5; Field[2].DistMin = 0; Field[2].IField = 1; Field[2].LcMax = 0.25; Field[2].LcMin = KanMeshsize ; Background Field = 2; Mesh.CharacteristicLengthExtendFromBoundary = 0; Mesh.CharacteristicLengthFromPoints = 0; Mesh.CharacteristicLengthFromCurvature = 0; ___ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh
[Gmsh] Coherence 'could not find extruded vertex' error
Hello, Sorry to bother everybody again. I'm a beginner and I seem to run in on one error after another. I'm using GMSH 4.7.0 (I came across GMSH trough the onelab website) on Windows 10. See the script below (from a bigger 3D project where I try to narrow down the errors I get). I get a good 3D mesh but at the curve where the two objects meet, the mesh is not aligned. Using the coherence command I get a large list of errors of the type: Error : could not find extruded vertex (0.08443279255020152, -0.053826794978966, 0). Yet, if I change the point y-coordinates to a positive number: Point(23) = {0, 0.1, 0}; Point(24) = {0, 0.05, 0}; Point(25) = {0, 0.05, WanD}; Point(26) = {0, 0.1, WanD}; All works as expected. Thanks for the help. Bart --- KanR = DefineNumber[ 0.1, Name "Parameters/KanR" ]; WanD = DefineNumber[ 0.2, Name "Parameters/WanD" ]; KanMeshsize = DefineNumber[ 0.01, Name "Parameters/KanMeshsize" ]; SetFactory("OpenCASCADE"); Rectangle(1) = {-2.5, -2.5, 0, 5, 5, 0}; Circle(5) = {0, 0, 0, KanR, 0, 2*Pi}; Curve Loop(2) = {5}; Plane Surface(2) = {2}; BooleanDifference{ Surface{1}; Delete; }{ Surface{2}; Delete; } Extrude {0, 0, WanD } { Surface{1}; } Point(23) = {0, -0.1, 0}; Point(24) = {0, -0.05, 0}; Point(25) = {0, -0.05, WanD}; Point(26) = {0, -0.1, WanD}; Line(32) = {23, 24}; Line(33) = {24, 25}; Line(34) = {25, 26}; Line(35) = {26, 23}; Curve Loop(30) = {34, 35, 32, 33}; Plane Surface(14) = {30}; Extrude {{0, 0, 1}, {0, 0, 0}, Pi} { Surface{14}; Layers{25}; } Field[1] = Distance; Field[1].EdgesList = {5}; Field[1].NNodesByEdge = 50; Field[2] = Threshold; Field[2].DistMax = 2.5; Field[2].DistMin = 0; Field[2].IField = 1; Field[2].LcMax = 0.25; Field[2].LcMin = KanMeshsize ; Background Field = 2; Mesh.CharacteristicLengthExtendFromBoundary = 0; Mesh.CharacteristicLengthFromPoints = 0; Mesh.CharacteristicLengthFromCurvature = 0; ___ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh
Re: [Gmsh] Gaps and overlaps when using extrude command
Thanks again, Jeremy. You seem to have nailed the origin of the problem. It still feels as a bug to me that reloading a script one just created, gives a different result. Or am I missing something on how GMSH works? Stranger still: Action 1: Load the file below (without Coherence in the script). Click: 3D then Coherence then again 3D. This gives an error. Action 2: Load the file below (without Coherence in the script). Click: 3D then Coherence then 1D then again 3D. This gives the wanted results. This seems all unintuitive to me. Am I missing something of the GMSH logic? e.g. doesn’t clicking on the coherence command, execute that coherence command? Bart KanR = DefineNumber[ 0.1, Name "Parameters/KanR" ]; WanD = DefineNumber[ 0.2, Name "Parameters/WanD" ]; KanMeshsize = DefineNumber[ 0.01, Name "Parameters/KanMeshsize" ]; SetFactory("OpenCASCADE"); Rectangle(1) = {-2.5, -2.5, 0, 5, 5, 0}; Circle(5) = {0, 0, 0, KanR, 0, 2*Pi}; Curve Loop(2) = {5}; Plane Surface(2) = {2}; BooleanDifference{ Surface{1}; Delete; }{ Surface{2}; Delete; } Extrude {0, 0, WanD } { Surface{1}; } Point(15) = {0, KanR, 0}; Point(16) = {0, KanR-0.05, 0}; Point(17) = {0, KanR-0.05, WanD}; Point(18) = {0, KanR, WanD}; Line(20) = {15, 16}; Line(21) = {16, 17}; Line(22) = {17, 18}; Line(23) = {18, 15}; Curve Loop(24) = {20, 21, 22, 23}; Plane Surface(8) = {24}; Extrude {{0, 0, 1}, {0, 0, 0}, Pi} { Surface{8}; Layers {10}; } Field[1] = Distance; Field[1].EdgesList = {5}; Field[1].NNodesByEdge = 50; Field[2] = Threshold; Field[2].DistMax = 2.5; Field[2].DistMin = 0; Field[2].IField = 1; Field[2].LcMax = 0.25; Field[2].LcMin = KanMeshsize ; Background Field = 2; Mesh.CharacteristicLengthExtendFromBoundary = 0; Mesh.CharacteristicLengthFromPoints = 0; Mesh.CharacteristicLengthFromCurvature = 0; ___ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh
[Gmsh] Mesh generation error because of rotational extrusion?
Hi all, See the line (below): Extrude {{0, 0, 1}, {0, 0, 0}, 1.4*Pi} { Surface{8}; Layers {25}; } Changing 1.4 to 1.5: gives errors. Extrude {{0, 0, 1}, {0, 0, 0}, 1.5*Pi} { Surface{8}; Layers {25}; } Am I doing something wrong? Bart --- KanR = DefineNumber[ 0.1, Name "Parameters/KanR" ]; WanD = DefineNumber[ 0.2, Name "Parameters/WanD" ]; KanMeshsize = DefineNumber[ 0.01, Name "Parameters/KanMeshsize" ]; SetFactory("OpenCASCADE"); Rectangle(1) = {-2.5, -2.5, 0, 5, 5, 0}; Circle(5) = {0, 0, 0, KanR, 0, 2*Pi}; Curve Loop(2) = {5}; Plane Surface(2) = {2}; BooleanDifference{ Surface{1}; Delete; }{ Surface{2}; Delete; } Extrude {0, 0, WanD } { Surface{1}; } Point(15) = {0, KanR, 0}; Point(16) = {0, KanR-0.05, 0}; Point(17) = {0, KanR-0.05, WanD}; Point(18) = {0, KanR, WanD}; Line(20) = {15, 16}; Line(21) = {16, 17}; Line(22) = {17, 18}; Line(23) = {18, 15}; Curve Loop(24) = {20, 21, 22, 23}; Plane Surface(8) = {24}; Extrude {{0, 0, 1}, {0, 0, 0}, 1.4*Pi} { Surface{8}; Layers {25}; } Field[1] = Distance; Field[1].EdgesList = {5}; Field[1].NNodesByEdge = 50; Field[2] = Threshold; Field[2].DistMax = 2.5; Field[2].DistMin = 0; Field[2].IField = 1; Field[2].LcMax = 0.25; Field[2].LcMin = KanMeshsize ; Background Field = 2; Mesh.CharacteristicLengthExtendFromBoundary = 0; Mesh.CharacteristicLengthFromPoints = 0; Mesh.CharacteristicLengthFromCurvature = 0; ___ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh
Re: [Gmsh] Gaps and overlaps when using extrude command
Thanks Jeremy, Adding “Coherence;” to the script messes with the mesh size. Adding “Coherence;” through the tree menu in the left pane works. But when you reload that script (now with the coherence added at the end), it messes again with the mesh size. (best change the ‘KanMeshsize’ parameter in my script to ‘0.01’ for it to be very clear). Strange that reloading an unchanged script gives different results… Bart ___ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh
[Gmsh] Gaps and overlaps when using extrude command
Hi, I am a beginner. While working on a larger 3D project I noticed some gaps and overlaps. I plan to simulate the heat transfer. I assume gaps and overlaps are to be avoided to get a good simulation. Correct? I tracked down the origin of the gaps and overlaps and it seems to be the extrude command causing the trouble. The file below draws a rectangle with a round hole in the middle. In the hole a ring (annulus) is drawn. If I create the ring with the BooleanDifference command (difference of two circles): all works fine. All triangles line up perfectly around the contact line of ring and hole. If I create the ring with the Extrude command, things don't line up. Of course I could opt for the booleandifference command for this problem but: * I cannot use this booleandifference solution in my 3D problem * I can imagine these holes and overlaps also being produced in other curved contact surfaces. Is this a bug in GMSH or the be expected in more elaborate meshes? How can it be resolved? Thank you! Bart KanR = DefineNumber[ 0.1, Name "Parameters/KanR" ]; KanMeshsize = DefineNumber[ 0.05, Name "Parameters/KanMeshsize" ]; SetFactory("OpenCASCADE"); Rectangle(1) = {-2.5, -2.5, 0, 5, 5, 0}; Circle(5) = {0, 0, 0, KanR, 0, 2*Pi}; Curve Loop(2) = {5}; Plane Surface(2) = {2}; BooleanDifference{ Surface{1}; Delete; }{ Surface{2}; Delete; } Point(15) = {0, KanR, 0}; Point(16) = {0, KanR-0.05, 0}; Line(20) = {15, 16}; Extrude {{0, 0, 1}, {0, 0, 0}, 2*Pi} { Curve{20}; } Field[1] = Distance; //+ Field[1].EdgesList = {5}; //+ Field[1].NNodesByEdge = 50; //+ Field[2] = Threshold; //+ Field[2].DistMax = 2.5; //+ Field[2].DistMin = 0; //+ Field[2].IField = 1; //+ Field[2].LcMax = 0.25; //+ Field[2].LcMin = KanMeshsize ; Background Field = 2; Mesh.CharacteristicLengthExtendFromBoundary = 0; Mesh.CharacteristicLengthFromPoints = 0; Mesh.CharacteristicLengthFromCurvature = 0; ___ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh