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

STL to gmsh

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

Like Tree2Likes
  • 1 Post By nomad
  • 1 Post By elorriaux

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 5, 2009, 15:39
Default STL to gmsh
  #1
Member
 
John
Join Date: Aug 2009
Posts: 92
Rep Power: 16
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.
sourav90 likes this.
nomad is offline   Reply With Quote

Old   August 5, 2009, 18:22
Default
  #2
Member
 
John
Join Date: Aug 2009
Posts: 92
Rep Power: 16
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, 108 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: 45
Rep Power: 17
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.
sourav90 likes this.
elorriaux is offline   Reply With Quote

Reply

Tags
error, facets, gmsh, stl

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[surface handling] How to make boundary patches in STL file nzy102 OpenFOAM Meshing & Mesh Conversion 4 January 22, 2018 15:03
CAD -> gMsh -> enGrid -> OpenFOAM Problem AlGates OpenFOAM 7 August 6, 2010 12:46
[snappyHexMesh] SnappyHexMesh meshes inside and outside of an STL geometry villier OpenFOAM Meshing & Mesh Conversion 17 June 15, 2010 19:51
[Gmsh] How does Gmsh deal with overlap boundaries? yuhai OpenFOAM Meshing & Mesh Conversion 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 19:38.