CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   STL to gmsh (http://www.cfd-online.com/Forums/openfoam/67153-stl-gmsh.html)

nomad August 5, 2009 15:39

STL to gmsh
 
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 August 5, 2009 18:22

1 Attachment(s)
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.

elorriaux August 10, 2009 04:09

Hi,

Quote:

Originally Posted by nomad (Post 225407)
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.


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