CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

STL to gmsh

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   August 5, 2009, 15:39
Default STL to gmsh
  #1
Member
 
John
Join Date: Aug 2009
Posts: 93
Rep Power: 8
nomad is on a distinguished road
Hi,
I'm trying to import a simple 3-d cube from SolidWorks (saved as STL) into gmsh, but I get the error:

'No facets found in STL file for solid 0'

I would eventually like to import complex structures into gmsh.

Please help.
Thanks.
nomad is offline   Reply With Quote

Old   August 5, 2009, 18:22
Default
  #2
Member
 
John
Join Date: Aug 2009
Posts: 93
Rep Power: 8
nomad is on a distinguished road
Hi,

The STL that is saved in SolidWorks has a weird wireframe as can be seen in the attachment. Is there any way of deleting the diagonal lines that extend from the cylinder to the corners of the block so that they don't have to be deleted individually in gmsh.
Also, gmsh assigns a uniform mesh. Is there a way to refine the mesh in gmsh so that it is finer around the cylinder, or would I have to do this in OpenFOAM.

Thanks.
Attached Images
File Type: jpg CYLINDER_STL.jpg (72.8 KB, 62 views)
nomad is offline   Reply With Quote

Old   August 10, 2009, 04:09
Default
  #3
Member
 
Etienne Lorriaux
Join Date: Mar 2009
Location: Compiegne, France
Posts: 43
Rep Power: 8
elorriaux is on a distinguished road
Hi,

Quote:
Originally Posted by nomad View Post
Hi,

The STL that is saved in SolidWorks has a weird wireframe as can be seen in the attachment. Is there any way of deleting the diagonal lines that extend from the cylinder to the corners of the block so that they don't have to be deleted individually in gmsh.
The diagonal lines are necessary to describe your circle curves, that's the basis principle of STL format.

I am regularly loading STL surfaces (generated with OCC) into gmsh without any problems. Maybe there is a little problem with the Solidworks STL export. Are you using Gmsh under Linux ? If so, don't forget to launch a dos2unix on your STL file.

If you compile gmsh with OCC support, you can also load your surfaces in gmsh as STEP or IGES files.

Quote:
Also, gmsh assigns a uniform mesh. Is there a way to refine the mesh in gmsh so that it is finer around the cylinder, or would I have to do this in OpenFOAM.

Thanks.
Concerning your case, i think it will be a lot faster to draw your front plane in gmsh subdivided in 4 surfaces. Then you will be able to get a structured mesh with a nice grading from your cylinder for the boundary layer. You just have to extrude the mesh in gmsh and define entities before converting the mesh to OF.

Your case can also be easily meshed in OF with blockMesh.

Regards, Etienne.
elorriaux is offline   Reply With Quote

Reply

Tags
error, facets, gmsh, stl

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make boundary patches in STL file nzy102 OpenFOAM Mesh Utilities 3 January 8, 2015 08:56
CAD -> gMsh -> enGrid -> OpenFOAM Problem AlGates OpenFOAM 7 August 6, 2010 12:46
SnappyHexMesh meshes inside and outside of an STL geometry villier OpenFOAM Mesh Utilities 17 June 15, 2010 19:51
How does Gmsh deal with overlap boundaries? yuhai Open Source Meshers: Gmsh, Netgen, CGNS, ... 1 April 24, 2009 13:34
Importing and cleaning STL files Peter FLUENT 2 October 13, 2006 05:41


All times are GMT -4. The time now is 06:05.