[Gmsh] Error when switching from Built-In to OpenCascade Factory

Martin.Raedel at dlr.de Martin.Raedel at dlr.de
Mon Jul 9 20:48:44 CEST 2018


Hello,

I’ll test your suggestions. I did have a look at the line numbers in Gmsh. It looks like each of my original lines is replaced by 3 new lines.

Concerning transfinite: The mesh creation in Gmsh is part of a larger tool I am working on which partially requires structured meshes. So this test also checks this feature. This is also the reason why I do need to use the physical attribute as this is a flag for me required to advance after the Gmsh mesh is created.

I was also playing around with Coherence but also found that it has no effect.

So far I am stuck.

Von: Hector Espinoza [mailto:espinozahg at gmail.com]
Gesendet: Montag, 9. Juli 2018 20:04
An: Rädel, Martin
Betreff: Re: [Gmsh] Error when switching from Built-In to OpenCascade Factory

Hello:

You can use Geometry.LineNumbers=1; to see what is happening

There are no 48 lines, 48 is the max id, but the min line id is 13.

Additionally, I recommend to make it work with built in and occ kernels without transfinite. Furthermore, do not use physical point/line/surface, I dont see the use of it at this stage.

I was testing your .geo file and gmsh+occ is duplicating lines after surface creation. I added Coherence; after the creation of all surfaces to delete duplicated lines. It should do Coherence automatically with AutoCoherence=1 or 2 but it does'nt.

Cheers,
Héctor Espinoza

On Mon, Jul 9, 2018 at 8:38 AM, <Martin.Raedel at dlr.de<mailto:Martin.Raedel at dlr.de>> wrote:
Hello Hector,

thanks for the hints. Interestingly, creating all line loops first and creating the surfaces afterwards indeed helps. I get no errors anymore. This is not very intuitive, but I could live with it.

However, when it comes to meshing I have some serious difficulties with the OpenCASCADE geometry. There seems to be a lot more (internal?) geometry created than I specify in geo-file. This is the log for meshing unplanebrick_mod.geo with the geometry from the built-in factory:

Info    : Finalized high order topology of periodic connections
Info    : Meshing 1D...
Info    : Meshing curve 1 (Line)
Info    : Meshing curve 2 (Line)
Info    : Meshing curve 3 (Line)
Info    : Meshing curve 4 (Line)
Info    : Meshing curve 5 (Line)
Info    : Meshing curve 6 (Line)
Info    : Meshing curve 7 (Line)
Info    : Meshing curve 8 (Line)
Info    : Meshing curve 9 (Circle)
Info    : Meshing curve 10 (Circle)
Info    : Meshing curve 11 (Circle)
Info    : Meshing curve 12 (Circle)
Info    : Done meshing 1D (0.0156001 s)
Info    : Meshing 2D...
Info    : Meshing surface 1 (transfinite)
Info    : Meshing surface 2 (transfinite)
Info    : Meshing surface 3 (transfinite)
Info    : Meshing surface 4 (transfinite)
Info    : Meshing surface 5 (transfinite)
Info    : Meshing surface 6 (transfinite)
Info    : Done meshing 2D (0 s)
Info    : Meshing 3D...
Info    : Meshing volume 1 (transfinite)
Info    : Done meshing 3D (0 s)
Info    : Optimizing 3D mesh...
Info    : Done optimizing 3D mesh (0 s)
Info    : 367 vertices 580 elements

So as I expect for the brick example, I have 12 curves, 6 surfaces and 1 volume. When I use the OpenCASCADE factory instead I get the following log:

Info    : Finalized high order topology of periodic connections
Info    : Meshing 1D...
Info    : Meshing curve 13 (Circle)
Info    : Meshing curve 14 (Line)
Info    : Meshing curve 15 (Circle)
Info    : Meshing curve 16 (Line)
Info    : Meshing curve 17 (Circle)
Info    : Meshing curve 18 (Line)
Info    : Meshing curve 19 (Circle)
Info    : Meshing curve 20 (Line)
Info    : Meshing curve 21 (Circle)
Info    : Meshing curve 22 (Line)
Info    : Meshing curve 23 (Circle)
Info    : Meshing curve 24 (Line)
Info    : Meshing curve 25 (Line)
Info    : Meshing curve 26 (Line)
Info    : Meshing curve 27 (Line)
Info    : Meshing curve 28 (Line)
Info    : Meshing curve 29 (Circle)
Info    : Meshing curve 30 (Line)
Info    : Meshing curve 31 (Circle)
Info    : Meshing curve 32 (Line)
Info    : Meshing curve 33 (Line)
Info    : Meshing curve 34 (Line)
Info    : Meshing curve 35 (Line)
Info    : Meshing curve 36 (Line)
Info    : Meshing curve 37 (Circle)
Info    : Meshing curve 38 (Line)
Info    : Meshing curve 39 (Circle)
Info    : Meshing curve 40 (Line)
Info    : Meshing curve 41 (Line)
Info    : Meshing curve 42 (Circle)
Info    : Meshing curve 43 (Line)
Info    : Meshing curve 44 (Line)
Info    : Meshing curve 45 (Circle)
Info    : Meshing curve 46 (Line)
Info    : Meshing curve 47 (Line)
Info    : Meshing curve 48 (Line)
Info    : Done meshing 1D (0 s)
Info    : Meshing 2D...
Info    : Meshing surface 1 (transfinite)
Info    : Meshing surface 2 (transfinite)
Info    : Meshing surface 3 (transfinite)
Info    : Meshing surface 4 (transfinite)
Info    : Meshing surface 5 (transfinite)
Info    : Meshing surface 6 (transfinite)
Info    : Meshing surface 7 (BSpline surface, MeshAdapt)
Info    : Meshing surface 8 (BSpline surface, MeshAdapt)
Info    : Meshing surface 9 (BSpline surface, MeshAdapt)
Info    : Meshing surface 10 (BSpline surface, MeshAdapt)
Info    : Meshing surface 11 (BSpline surface, MeshAdapt)
Info    : Meshing surface 12 (BSpline surface, MeshAdapt)
Info    : Done meshing 2D (0.0312002 s)
Info    : Meshing 3D...
Info    : Meshing volume 1 (transfinite)
.Error   : Incompatible surface 7 in transfinite volume 1
Info    : Delaunay Meshing 1 volumes with 1 connected components
Info    : Tetrahedrization of 50 points in 0 seconds
Info    : Reconstructing mesh ...
Info    : Creating surface mesh...
Info    : Identifying boundary edges...
Info    : Boundary Recovery...
Info    : Writing to GRegion...
Info    : Reconstruct time : 0 sec
Info    : Found void region
.Error   : No tetrahedra in region 1 0
Info    : 3D point insertion terminated (42 points created):
Info    :  - 0 Delaunay cavities modified for star shapeness
Info    :  - 0 points could not be inserted
Info    :  - 0 tetrahedra created in 0 sec. (-2147483648 tets/sec.)
@.Warning : Volume 1 consists of no elements
Info    : Done meshing 3D (0 s)
Info    : 76 vertices 188 elements
.Error   : ------------------------------
.Error   : Mesh generation error summary
.Error   :     1 warning
.Error   :     2 errors
.Error   : Check the full log for details
.Error   : ------------------------------

So somehow, I now have 48 lines, 12 surfaces and 1 volume. How can that be? That the volume mesh is not created at all and the lines do not seem to recognize the regression is another point.

Has someone an idea if this is a feature or a bug and how I can fix that?

Best regards
Martin

Von: Hector Espinoza [mailto:espinoz<mailto:espinoz>ahg at gmail.com<mailto:ahg at gmail.com>]
Gesendet: Montag, 9. Juli 2018 14:46
An: Rädel, Martin
Betreff: Re: [Gmsh] Error when switching from Built-In to OpenCascade Factory

Hello Martin:

In my experience gmsh 3.0.6 with opencascade does some renumbering not done with the built in kernel. I have noticed it when creating surfaces.

Just do things step by step and you will notice it.

For surfaces, to know for sure what will happen, I leave the creation of surfaces as last step. I can create all points, lines and line loops in any order in the script, but not surfaces.

Cheers,

Hector Espinoza

On Sun, Jul 8, 2018, 13:23 <Martin.Raedel at dlr.de<mailto:Martin.Raedel at dlr.de>> wrote:
Hello,

I just recently tried to switch from the built-in Factory to OpenCascade to use Boolean operations.

However, all of my tests involving more than one surface crash after the switch with the same error:

OpenCascade wire or line loop with tag 2 already exists

The same error occurs for all other surfaces except the first.

I added a simple brick geometry example. In case I comment out “SetFactory("OpenCASCADE"); “ everything works fine. If I use the line, the errors occur.

Can someone please point out what causes these errors and how I can fix them?

Best regards
Martin Rädel

————————————————————————
Deutsches Zentrum für Luft- und Raumfahrt e.V. (DLR)
German Aerospace Center
Institute of Composite Structures and Adaptive Systems | Structural Mechanics | Lilienthalplatz 7 | 38108 Braunschweig | Germany<https://maps.google.com/?q=Lilienthalplatz+7+%7C+38108+Braunschweig+%7C+Germany&entry=gmail&source=g>

Dipl.-Ing. Martin Rädel
Telephone +49 (0)531 295-2048 | Telefax +49 (0)531 295-2232 | martin.raedel at dlr.de<mailto:martin.raedel at dlr.de>
www.DLR.de<http://www.dlr.de/>

_______________________________________________
gmsh mailing list
gmsh at onelab.info<mailto:gmsh at onelab.info>
http://onelab.info/mailman/listinfo/gmsh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20180709/033949fe/attachment-0001.html>


More information about the gmsh mailing list