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/)
-   -   [snappyHexMesh] What CAD software do you use to define STL surfaces? (https://www.cfd-online.com/Forums/openfoam-meshing/168387-what-cad-software-do-you-use-define-stl-surfaces.html)

Awak March 21, 2016 01:34

What CAD software do you use to define STL surfaces?
 
1 Attachment(s)
Hello to everybody,

I want to use OpenFOAM on a complex geometry in which I need to define many patches. From the posts that I read on this forum, SnappyHexMesh seems to require STL files forming a closed surface. In many tutorials that I followed these STL files contained surfaces, but my CAD software (AutoDesk Inventor) refuses to export surfaces to that format (which is normal, since STL was not thought for that purpose).

A solution that I found was to export my parts in STEP format with Inventor, and then convert them, one by one, to STL using Salome. However, because of this, some gaps appear in the STL files and the overall STL geometry is no longer waterproof (I used surfaceCheck to make sure of that). Obviously, SnappyHexMesh doesn't give me the expected output.

Could you advise me on what CAD software I can use, or give me a method to have STL files that are consistent with one another ? Is it possible to use STLs of solid parts instead of surfaces and still define patches easily ?

If some of you guys are curious, you can have a look at me STL files to understand my problem.

Any help would be deeply appreciated ! Thank you ;)

Florian

Gaso April 5, 2016 08:54

You could try Blender.

It can import CAD geometry and export stl.

I think you have to activate an addon to do that, but is provided with the software anyway.

Awak April 5, 2016 09:54

Hi Alejandro,

Thanks for your answer. I know that Blender is a great tool when it comes to editing CAD files, but I was wondering if anybody here was able to avoid this "CAD mesh editing" step and was able to directly generate a set of patches forming a closed volume directly from their CAD software. Designing directly in Blender is of course possible, but I find it to be far less convenient than with conventional CAD software.

Not having to manually edit one's geometry when it is supposed to be clean in the CAD design phase will make me save a lot of time.

I think I am getting closer to find a solution, and this might be very useful for many OpenFOAM new and veteran users, so I will share as soon as I can confirm that my method works.

If you have other suggestions, I am still listening ! ;)

derekm April 6, 2016 03:20

What CAD software do you use to define STL surfaces?
 
I use freecad .16 to create the geometry in the gui or programmatically and then produce the stl

Awak April 6, 2016 04:41

And with FreeCad you're able to define patches that form an overall watertight surface? Especially for circular shapes? I did try to use it a while ago, but I had difficulty defining complex geometries. I guess I didn't spend enough time trying to master it... ;)

derekm April 8, 2016 04:06

cylinders, ellipsiods spheres ... yep its all there in FreeCAD

I create the basic shapes as entries in a spreadsheet, use the spreadsheet to generate a script that creates the shapes and the operations, then tweak around in the GUI and use another script to generate the STL files. I'm using this for a CHTmultiregion problem with 13 regions and 20+ additional geometries for things like fvOptions and baffles. it includes geometries like the intersections between ellipses and ellipses and the ellipses and boxes and well the inverse of everything to realise the air region.

Awak April 8, 2016 04:35

Thank you ! I'll go have a closer look.

Alternatively, Fusion 360 (by AutoDesk) can also be used. The surfaces remain consistent even when placed in separate STL files, and I was able to use SHM successfully using this method. One has to be careful when exporting the different surfaces, though.

Paul Caicedo November 9, 2020 21:44

Patches in Fusion 360
 
Hello Awak,

I use Fusion 360, but don't know how to generate the patches. Could you please help me with some guidance?

Thanks,
Paul

AtoHM November 10, 2020 06:38

Quote:

Originally Posted by derekm (Post 594034)
... use another script to generate the STL files.


Hi, derek, I am curious: are you able to extract stl files with distinct regions (patches) as watertight geometry from FreeCAD? If yes, would you mind pointing me in the direction of how to do that? It's no blocker for me to write some code or implement stuff in order to get it to work, however for FreeCAD I have not come up with a solution of how to define or group faces to patches.

I have successfully implemented a script to extract watertight geometries from another commercial CAD tool, but for FreeCAD a key part of that approach is missing and I can't adapt the same process.

Marpole November 10, 2020 12:17

CAD program Salome is another option and it works for me. It can create geometry, make groups of faces, and export them to STL files. To make the surface enclosure watertight, surface mesh can be built. Then groups of face meshes are created and exported to STL files with finer resolution.

AtoHM November 11, 2020 01:01

Altough I never used it, my colleagues tried with Salome for a period of time, but from what I heard, the process is not suitable for further automation. So I was aiming for FreeCAD, although the topological naming issue seems to be a big obstacle.

Marpole November 12, 2020 11:00

Salome can be programmed with Python script and can be done in a headless mode. If the geometry is not too large and too complex, automation is feasible (otherwise, it will take long time). I did a few projects with this without problems. One can do with FreeCAD as well. But as you have some problems, using Salome may be a work around.


All times are GMT -4. The time now is 20:14.