[Gmsh] 2D mesh generation problem

Zenker, Dr. Matthias Matthias.Zenker at erbe-med.com
Mon Feb 21 12:50:08 CET 2011


Hi,

I have had the same problem. For me, the solution was to make sure that the 3rd coordinate is really exactly equal (e.g. to zero) for all points. If it isn't, Elmer will detect a 3D geometry.

HTH,

Matthias

-----Ursprüngliche Nachricht-----
Von: Geordie McBain [mailto:gdmcbain at freeshell.org] 
Gesendet: Montag, 21. Februar 2011 00:37
An: Paavo Mäkelä
Cc: gmsh at geuz.org
Betreff: Re: [Gmsh] 2D mesh generation problem

2011/2/21 Paavo Mäkelä <pamakela at gmail.com>:
> Hi,
>
> I have had a working workflow for making 2D meshes from trimmed NURBS 
> geometry made in Aliasstudio. I use the Elmer solver to perform flow 
> simulations.
>
> I recently continued my work on my personal design project and noticed 
> that GMSH will produce meshes that contain 3 dimensional elements (as 
> per Elmer software's log) and sometimes Elmer software detects 3 
> dimensional mesh, even though the original geometry is/was a 2D plane! 
> What am I doing wrong here? Loading the original IGES file straight 
> into Elmer software results in 2D mesh with 2D elements which implies 
> the exported cad file is Ok (but because elmer can't handle trimmed 2d 
> NURBS planes, I must always go through Gmsh). I think only 2D elements 
> should be generated if you only use the 2D meshing functionality in 
> Gmsh? I can post my IGES file if there is need for that.

Hello, I haven't tried Elmer (yet), but I believe Gmsh only outputs three-dimensional meshes, even if your geometry is two-dimensional or even one-dimensional; i.e. the nodes always have three coordinates.

Which output format do you use?  For FreeFem++, for two-dimensional problems, I output in MEDIT .mesh from Gmsh, but then modify it in AWK to cull the z-coordinates.  Perhaps a workaround like that would be reasonable?