CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [CAD formats] Unable to import STL properly to create final geometry (https://www.cfd-online.com/Forums/openfoam-meshing/214237-unable-import-stl-properly-create-final-geometry.html)

miguel.delasheras January 24, 2019 09:17

Unable to import STL properly to create final geometry
 
Hello everyone: first of all, I'm not sure whether this is the correct place to ask for help, but it's my best guess.

I'm trying to create and mesh the geometry for the simulation of the flow around a cylinder (actually, a 2D simulation), so as to study Karman vortices. I need to use snappyHexMesh, so I think the procedure would be:

1) Generate the geometry for the block (a box containing the cylinder), using blockMesh and defining adequate parameters in blockMeshDict.
2) Using blockMesh -blockTopology, generate an ".obj" which can be loaded in ParaView in order to visualize the block.
3) Generate the geometry for the cylinder. I'm currently trying to build it using TinkerCAD, and then exporting it as a ".stl" file, which I save inside the triSurface folder. I'm loading this file in ParaFoam as well.
4) If everything is okay (the STL of the cylinder is contained in the block), then use surfaceFeatures and then snappyHexMesh to build the final geometry (a cylinder embedded in the block).

The problem I'm currently facing is: I don't really know how to place my STL within the larger block.

http://dl.dropbox.com/s/pxi4w6kbe74l...etria.png?dl=0

In fact, as the picture shows, the relative size of the geometries is not consistent at all (you can barely see the "larger" block, whereas the cylinder is huge). I suspect this has to do with the way the STL is exported from TinkerCAD: the unit system seems to be in milimeters, and I've set the block geometry in meters (adjusting, so the final result should be consistent).

This is how I've set the measures in both cases:

http://dl.dropbox.com/s/ai58fjrm0rxl...pshot.png?dl=0

http://dl.dropbox.com/s/f4g5kng4zg5m...pshot.png?dl=0

I am able to run snappyHexMesh and icoFoam, but the simulation is carried out without accounting for the cylinder.

Any ideas?

miguel.delasheras January 26, 2019 14:06

Okay, so I decided TinkerCAD wasn't probably the greatest tool in a general context and decided to go for GMSH. I'm trying to build just the cylinder and then export it as an STL, so I can apply snappyHexMesh to create the final mesh.

I have been able to generate what looks like a proper MSH file, but when I try to export a STL file, it's empty (there are no points defining the geometry of the cylinder).

http://dl.dropbox.com/s/471wh9tsbksr...57.39.png?dl=0

http://dl.dropbox.com/s/q7l5zmj20g2r...57.49.png?dl=0

http://dl.dropbox.com/s/i35l2irfcq17...05.21.png?dl=0

I have looked in the forums for something similar but I still can't manage to get this right. I think it's an easy problem to solve but everyone around here seems to use different approaches to meshing, and as a beginner, this is very confusing.

Any hint would be really appreciated. Thank you guys for your time.

miguel.delasheras January 27, 2019 06:27

I finally made it with Blender (I thought it was harder on the computer's performance, but it's not).

Thanks to those who took the time to read my messages. I'll see you around.


All times are GMT -4. The time now is 03:00.