[SOLVED] Repair mesh

Mesh generators, CAD programs, and other tools
Post Reply
zerg
Posts: 16
Joined: 06 Jan 2010, 04:21

[SOLVED] Repair mesh

Post by zerg » 30 Apr 2011, 23:52

I have created a 3D mesh using Gmsh, with 0 errors, 0 warnings. It seems that it contains errors anyway (weird simulation results). I know that meshes can be fixed using MeshLab or Netfabb, but I can't find a mesh format that can be exported from Gmsh and imported into Meshlab or Netfabb. Anyone had some experience with creating and fixing meshes using free softwares?
Last edited by zerg on 16 Aug 2011, 06:49, edited 1 time in total.

mzenker
Posts: 1741
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Repair mesh

Post by mzenker » 11 May 2011, 10:41

Hi,

you should be a little bit more specific. Normally the meshes created with gmsh work fine in Elmer. Could you post your mesh here? What do you mean by "weird simulation results"?

Matthias

zerg
Posts: 16
Joined: 06 Jan 2010, 04:21

Re: Repair mesh

Post by zerg » 12 Aug 2011, 01:54

Hello Matthias,

Sorry for being so long. Let me go back from the start. I created 3D models with Rhino3D and exported them to stp files. There they are:

rhino1.stp: http://ubuntuone.com/p/19pi/
rhino2.stp: http://ubuntuone.com/p/19pm/

Then I created meshes with Gmsh. The procedure went through several warnings. These are the meshes:

rhino1.msh: http://ubuntuone.com/p/19ph/
rhino2.msh: http://ubuntuone.com/p/19pk/

They can be imported into Elmer, but I'm pretty sure they contain several errors, because Elmer's solver does not seem to be able to go through "Reading Model".

Code: Select all

ELMER SOLVER (v 6.1) STARTED AT: 2011/08/11 18:43:18
MAIN: 
MAIN: ==========================================
MAIN:  E L M E R  S O L V E R  S T A R T I N G
MAIN:  Library version: 6.1 (Rev: 5191)
MAIN: ==========================================
MAIN: 
MAIN: 
MAIN: -----------------------
MAIN: Reading Model ...
I'm new to Elmer, so the error could lie somewhere else. In the case it is effectively a mesh problem, are you aware of a technique to create faultless meshes?

Many thanks,

S.-É. Parent
Université Laval
Canada

zerg
Posts: 16
Joined: 06 Jan 2010, 04:21

Re: Repair mesh

Post by zerg » 15 Aug 2011, 22:38

I have tried several unsuccessful solutions. First, Netgen crashes in Ubuntu when it is asked to mesh a healed step file. Salomé in Ubuntu can't load the Geometry module. Netgen in Windows can not import step or iges files without the addition of a module - that should be able to download from CVS, but I could not find any indication about how to get it. GID can produce .msh files that are not loadable in Elmer directly. I could import the msh file from GID to Gmsh, then open it in Elmer. But the result is the same as described above. I'm still looking for a solution.

zerg
Posts: 16
Joined: 06 Jan 2010, 04:21

Re: Repair mesh

Post by zerg » 16 Aug 2011, 06:48

It seems I didn't saved the mesh in Elmer format before modelling. My issues left are on the mesh generation side, so out of topic here.

Thanks anyways!

Jimmy Johnson
Posts: 20
Joined: 11 Feb 2010, 06:04

Re: [SOLVED] Repair mesh

Post by Jimmy Johnson » 16 Aug 2011, 20:18

Nurbs modelers like Rhino are great ways to easily create pictorial representations of three dimensional geometry. However, they tend to be sloppy when it comes to accuracy. The lack of accuracy leads to the existence of open edges, and overlapping geometry that does not show up visually.

When I create a solids drawing in Rhino with the intent of using it for FEA, I do the following:

1. Before starting any drawing input go to the menu File/Properties/Units and significantly reduce the value of allowed tolerances. For example, the default accuracy in Rhino for absolute tolerance is 0.01 and for angles is 3 degrees. These need to be reduced by several orders of magnitude for typical parts of a few inches. The amount of accuracy needed is related to the units being used, the size of the part, and the smallest part features.

2. When the geometry is completed, go to the Analyze/Edge Tools , Analyze/Surface, and Analyze/Diagnostics and check the geometry for broken edges, naked edges, etc. A simple "No Bad Objects" check is not sufficient to find all of model defects.

The above steps reduce the meshing problems with Rhino created solids by orders of magnitude. They do not, unfortunately guarantee that the solid will not have gaps or voids.

Expecting a meshing program to correct open edge models is really asking more than can be reasonably expected. There is a reason why most 3D geometry creation programs are such unpleasant beasts compared to Nurbs modelers: they demand rigor and accuracy.

zerg
Posts: 16
Joined: 06 Jan 2010, 04:21

Re: [SOLVED] Repair mesh

Post by zerg » 19 Aug 2011, 23:55

Mr. Johnson,

Many thanks for this useful information. It helped me a lot.

mzenker
Posts: 1741
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: [SOLVED] Repair mesh

Post by mzenker » 22 Aug 2011, 12:46

Hi,

(I have been on holidays, so I reply only now.)

I have had a look on the geometries and meshes you posted, and found that you succeeded meshing them with gmsh better than I did: For me, gmsh complains about an overlapping surface mesh and does not create a 3D mesh at all, whereas the msh files you posted contain a 3D mesh. So I am curious to know what you did in gmsh to generate this 3D mesh...

Apart from that, I am almost sure that you will have duplicate interfaces between your volumes (I did not check, though). This problem comes from the way bodies are represented in 3D CAD programs and cannot be resolved within gmsh except for very simple geometries (check Options-> Geometry -> General -> Cut and merge faces before opening your step file). For your geometry, this failed (for me, at least). I am working on a solution for this which I will test on your geometries when I have time.

Matthias

zerg
Posts: 16
Joined: 06 Jan 2010, 04:21

Re: [SOLVED] Repair mesh

Post by zerg » 22 Aug 2011, 17:35

Hello Matthias,

I iteratively tried several settings in Gmsh. I finally used Delaunay as 2D algorithm and Frontal as 3D algorithm. Please refer to the screen capture for details. I emailed GID last week about this issue. No news yet.

Regards.
Attachments
Capture.PNG
Screen capture from Gmsh, using file rhino2.stp.
(236.97 KiB) Not downloaded yet

mzenker
Posts: 1741
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: [SOLVED] Repair mesh

Post by mzenker » 22 Aug 2011, 17:39

Thank you, I will try it one of these days...
But you have intersecting elements nevertheless, meaning that you will have problems if you try, for example, to have a heat flow through several bodies of your model.
I might come up with a gmsh-compatible solution for this some time from now...

Matthias

Post Reply