[Gmsh] Gmsh fails to create a volume mesh around an STL surface mesh

David Colignon David.Colignon at ulg.ac.be
Fri Aug 7 13:47:14 CEST 2009


Mike,

here is the way you should follow with Gmsh:

w3.geo just includes w.geo

No need of an intermediate step with a .stl file. You should avoid to define twice the same line between two patches.

Cheers,

Dave

-- 
David Colignon, Ph.D.
Collaborateur Logistique du F.R.S.-FNRS
CÉCI - Consortium des Équipements de Calcul Intensif
ACE - Applied & Computational Electromagnetics
Sart-Tilman B28
Université de Liège
4000 Liège - BELGIQUE
Tél: +32 (0)4 366 37 32
Fax: +32 (0)4 366 29 10
WWW:    http://hpc.montefiore.ulg.ac.be/
Agenda: http://www.google.com/calendar/embed?src=david.colignon%40gmail.com



Mike B. wrote:
> Hi Dave,
> 
> I generate the STL in Gmsh.  Please find the script attached.
> 
> Cheers and thanks,
> Mike.
> 
> --- On *Fri, 8/7/09, David Colignon /<David.Colignon at ulg.ac.be>/* wrote:
> 
> 
>     From: David Colignon <David.Colignon at ulg.ac.be>
>     Subject: Re: [Gmsh] Gmsh fails to create a volume mesh around an STL
>     surface mesh
>     To: "Mike B." <mb78aa at yahoo.com>
>     Date: Friday, August 7, 2009, 7:19 PM
> 
> 
> 
> 
>     Mike B. wrote:
>      > Hi Dave,
>      >
>      > Thanks for checking this.
>      >
>      > 1. I'm getting : `Tetgen not compiled with this version'. How do
>     I enable it?.
> 
>     Download and run the latest version from the website.
> 
>      >
>      > 2. I generate the STL as a surface mesh of the wing since this
>     gives only a single patch and not tens of them (when the wing is
>     defined by individual ruled surfaces).
> 
>     But with which software do you generate the .stl file ? If it is
>     with Gmsh, can you send the file you use ?
> 
>     Dave
> 
> 
>     I need a single patch since otherwise the
>      > CFD solver fails.
>      >
>      > Cheers and thanks,
>      > Mike.
>      >
>      > Cheers and thanks,
>      > Mike.
>      >
>      > --- On *Fri, 8/7/09, David Colignon /<David.Colignon at ulg.ac.be
>     </mc/compose?to=David.Colignon at ulg.ac.be>>/* wrote:
>      >
>      >
>      >     From: David Colignon <David.Colignon at ulg.ac.be
>     </mc/compose?to=David.Colignon at ulg.ac.be>>
>      >     Subject: Re: [Gmsh] Gmsh fails to create a volume mesh around
>     an STL
>      >     surface mesh
>      >     To: "Mike B.." <mb78aa at yahoo.com
>     </mc/compose?to=mb78aa at yahoo.com>>
>      >     Date: Friday, August 7, 2009, 7:00 PM
>      >
>      >     The following works for me: w2.geo
>      >
>      >     Note that I force the use of the Tetgen 3D Meshing algo. I don't
>      >     understand why Netgen complains and fails.
>      >
>      >     ...
>      >     ...
>      >     Error   : ERROR: Edge 161 - 166 multiple times in surface mesh
>      >     Error   : ERROR: Edge 165 - 166 multiple times in surface mesh
>      >     Error   : ERROR: Surface mesh not consistent
>      >     Error   : ERROR: Stop meshing since surface mesh not consistent
>      >
>      >
>      >     Where do your .stl file comes from ?
>      >
>      >     Cheers,
>      >
>      >     Dave
>      >
>      >
>      >     -- David Colignon, Ph.D..
>      >     Collaborateur Logistique du F.R.S.-FNRS
>      >     CÉCI - Consortium des Équipements de Calcul Intensif
>      >     ACE - Applied & Computational Electromagnetics
>      >     Sart-Tilman B28
>      >     Université de Liège
>      >     4000 Liège - BELGIQUE
>      >     Tél: +32 (0)4 366 37 32
>      >     Fax: +32 (0)4 366 29 10
>      >     WWW:    http://hpc.montefiore.ulg.ac.be/
>      >     Agenda:
>      > 
>        http://www.google.com/calendar/embed?src=david.colignon%40gmail.com
>      >
>      >
>      >
>      >     Mike B. wrote:
>      >      > Hi Dave,
>      >      >
>      >      > Please find them attached..
>      >      >
>      >      > Cheers and thanks,
>      >      > Mike.
>      >      >
>      >      > --- On *Fri, 8/7/09, David Colignon
>     /<David.Colignon at ulg.ac.be </mc/compose?to=David.Colignon at ulg.ac.be>
>      >     </mc/compose?to=David.Colignon at ulg.ac.be
>     </mc/compose?to=David.Colignon at ulg.ac.be>>>/* wrote:
>      >      >
>      >      >
>      >      >     From: David Colignon <David.Colignon at ulg.ac.be
>     </mc/compose?to=David.Colignon at ulg.ac.be>
>      >     </mc/compose?to=David.Colignon at ulg.ac.be
>     </mc/compose?to=David.Colignon at ulg.ac.be>>>
>      >      >     Subject: Re: [Gmsh] Gmsh fails to create a volume mesh
>     around
>      >     an STL
>      >      >     surface mesh
>      >      >     To: "Mike B." <mb78aa at yahoo.com
>     </mc/compose?to=mb78aa at yahoo.com>
>      >     </mc/compose?to=mb78aa at yahoo.com
>     </mc/compose?to=mb78aa at yahoo.com>>>
>      >      >     Cc: "Gmsh mai.. lis." <gmsh at geuz.org
>     </mc/compose?to=gmsh at geuz.org>
>      >     </mc/compose?to=gmsh at geuz.org </mc/compose?to=gmsh at geuz.org>>>
>      >      >     Date: Friday, August 7, 2009, 5:38 PM
>      >      >
>      >      >     Hi Mike,
>      >      >
>      >      >     can you send us your files ?
>      >      >
>      >      >     Cheers,
>      >      >
>      >      >     Dave
>      >      >
>      >      >     -- David Colignon, Ph.D.
>      >      >     Collaborateur Logistique du F.R.S.-FNRS
>      >      >     CÉCI - Consortium des Équipements de Calcul Intensif
>      >      >     ACE - Applied & Computational Electromagnetics
>      >      >     Sart-Tilman B28
>      >      >     Université de Liège
>      >      >     4000 Liège - BELGIQUE
>      >      >     Tél: +32 (0)4 366 37 32
>      >      >     Fax: +32 (0)4 366 29 10
>      >      >     WWW:    http://hpc.montefiore.ulg.ac.be/
>      >      >     Agenda:
>      >      >       
>     http://www.google.com/calendar/embed?src=david.colignon%40gmail.com
>      > 
>        <http://www..google.com/calendar/embed?src=david.colignon%40gmail..com
>     <http://www..google.com/calendar/embed?src=david.colignon%40gmail.com>>
>      >      >
>      >      >
>      >      >
>      >      >     Mike B. wrote:
>      >      >      > Dear All,
>      >      >      >
>      >      >      > I have a surface mesh saved as and STL file (similar to
>      >      >     `sphere-surf..stl' from `demos/sphere-discrete.geo').
>      >      >      >
>      >      >      > I merge the STL file, define a cuboid around it and
>     request a
>      >      >     volume mesh (`Mesh 3;'). Gmsh meshes the cuboid faces but
>      >     fails to
>      >      >     mesh the volume, giving multiple error lines such as:
>      >      >      > Error: ERROR: Edge 190-191 multiple times in
>     surface mesh
>      >      >      >
>      >      >      > This problem is also mentioned in:
>      >      >      >
>      >      >       
>     http://article.gmane.org/gmane.comp.cad.gmsh.general/380/match=multiple+edges
>      >      >      >
>      >      >      > This seems to be a problem with mesh algoritm. Any
>     ideas
>      >     how to
>      >      >     solve this?.
>      >      >      >
>      >      >      > Cheers and thanks,
>      >      >      > Mike.
>      >      >      >
>      >      >      >
>      >      >      > __________________________________________________
>      >      >      > Do You Yahoo!?
>      >      >      > Tired of spam? Yahoo! Mail has the best spam
>     protection around
>      >      >      > http://mail.yahoo.com
>      >      >      >
>      >      >      >
>      >      >      >
>      >      >       
>     ------------------------------------------------------------------------
>      >      >      >
>      >      >      > _______________________________________________
>      >      >      > gmsh mailing list
>      >      >      > gmsh at geuz.org </mc/compose?to=gmsh at geuz.org>
>     </mc/compose?to=gmsh at geuz.org </mc/compose?to=gmsh at geuz.org>>
>      >     </mc/compose?to=gmsh at geuz.org </mc/compose?to=gmsh at geuz.org>
>     </mc/compose?to=gmsh at geuz.org </mc/compose?to=gmsh at geuz..org>>>
>      >      >      > http://www.geuz..org/mailman/listinfo/gmsh
>      >     <http://www.geuz.org/mailman/listinfo/gmsh>
>      >      >
>      >      >
>      >
>      >     -----Inline Attachment Follows-----
>      >
>      >
>      >     Merge "w.stl";
>      >
>      >     Surface Loop( 1 ) = { 1 };
>      >
>      >
>      >     lc1 = 0.1 ;
>      >
>      >     Point( 3001 ) = { -00002.750, -00001.500, -00000.699 , lc1 };
>      >     Point( 3002 ) = { +00003.250, -00001.500, -00000.699 , lc1 };
>      >     Point( 3003 ) = { +00003.250, +00002.500, -00000.699 , lc1 };
>      >     Point( 3004 ) = { -00002.750, +00002.500, -00000.699 , lc1 };
>      >     Point( 3005 ) = { -00002.750, -00001.500, +00001.095 , lc1 };
>      >     Point( 3006 ) = { +00003.250, -00001.500, +00001.095 , lc1 };
>      >     Point( 3007 ) = { +00003..250, +00002.500, +00001.095 , lc1 };
>      >     Point( 3008 ) = { -00002.750, +00002.500, +00001.095 , lc1 };
>      >
>      >     Line( 3001 ) = { 3001, 3002 };
>      >     Line( 3002 ) = { 3002, 3003 };
>      >     Line( 3003 ) = { 3003, 3004 };
>      >     Line( 3004 ) = { 3004, 3001 };
>      >     Line( 3005 ) = { 3001, 3005 };
>      >     Line( 3006 ) = { 3002, 3006 };
>      >     Line( 3007 ) = { 3003, 3007 };
>      >     Line( 3008 ) = { 3004, 3008 };
>      >     Line( 3009 ) = { 3005, 3006 };
>      >     Line( 3010 ) = { 3006, 3007 };
>      >     Line( 3011 ) = { 3007, 3008 };
>      >     Line( 3012 ) = { 3008, 3005 };
>      >
>      >     Line Loop( 3001 ) = { 3001, 3002, 3003, 3004 };
>      >     Plane Surface( 3011 ) = { 3001 };
>      >     Line Loop( 3002 ) = { 3001, 3006, -3009, -3005 };
>      >     Plane Surface( 3012 ) = { 3002 };
>      >     Line Loop( 3003 ) = { 3006, 3010, -3007, -3002 };
>      >     Plane Surface( 3013 ) = { 3003 };
>      >     Line Loop( 3004 ) = { 3007, 3011, -3008, -3003 };
>      >     Plane Surface( 3014 ) = { 3004 };
>      >     Line Loop( 3005 ) = { 3005, -3012, -3008, 3004 };
>      >     Plane Surface( 3015 ) = { 3005 };
>      >     Line Loop( 3006 ) = { 3009, 3010, 3011, 3012 };
>      >     Plane Surface( 3016 ) = { 3006 };
>      >
>      >     Surface Loop( 2 ) = { 3011, 3012, 3013, 3014, 3015, 3016 };
>      >
>      >     Volume( 1 ) = { 1, 2 };
>      >
>      >     Mesh.Algorithm3D = 1; // 3D mesh algorithm
>     (1=Tetgen+Delaunay, 4=Netgen)
>      >
>      >     //Mesh 3;
>      >
>      >
> 
> 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: w3.geo
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20090807/ea831b4e/attachment.geo>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: w.geo
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20090807/ea831b4e/attachment-0001.geo>