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

[snappyHexMesh] What CAD software do you use to define STL surfaces?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By derekm

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 21, 2016, 01:34
Default What CAD software do you use to define STL surfaces?
  #1
New Member
 
Florian Nguyen
Join Date: Oct 2015
Location: Tokyo, Japan
Posts: 19
Rep Power: 10
Awak is on a distinguished road
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
Attached Files
File Type: gz STLgeometry.tar.gz (4.8 KB, 9 views)
Awak is offline   Reply With Quote

Old   April 5, 2016, 08:54
Default
  #2
New Member
 
Alejandro García Soto
Join Date: May 2013
Posts: 3
Rep Power: 12
Gaso is on a distinguished road
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.
Gaso is offline   Reply With Quote

Old   April 5, 2016, 09:54
Default
  #3
New Member
 
Florian Nguyen
Join Date: Oct 2015
Location: Tokyo, Japan
Posts: 19
Rep Power: 10
Awak is on a distinguished road
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 !
Awak is offline   Reply With Quote

Old   April 6, 2016, 03:20
Default What CAD software do you use to define STL surfaces?
  #4
Senior Member
 
Derek Mitchell
Join Date: Mar 2014
Location: UK, Reading
Posts: 172
Rep Power: 13
derekm is on a distinguished road
I use freecad .16 to create the geometry in the gui or programmatically and then produce the stl
__________________
A CHEERING BAND OF FRIENDLY ELVES CARRY THE CONQUERING ADVENTURER OFF INTO THE SUNSET
derekm is offline   Reply With Quote

Old   April 6, 2016, 04:41
Default
  #5
New Member
 
Florian Nguyen
Join Date: Oct 2015
Location: Tokyo, Japan
Posts: 19
Rep Power: 10
Awak is on a distinguished road
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...
Awak is offline   Reply With Quote

Old   April 8, 2016, 04:06
Default
  #6
Senior Member
 
Derek Mitchell
Join Date: Mar 2014
Location: UK, Reading
Posts: 172
Rep Power: 13
derekm is on a distinguished road
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.
Mehrdad.sadeghi likes this.
__________________
A CHEERING BAND OF FRIENDLY ELVES CARRY THE CONQUERING ADVENTURER OFF INTO THE SUNSET
derekm is offline   Reply With Quote

Old   April 8, 2016, 04:35
Default
  #7
New Member
 
Florian Nguyen
Join Date: Oct 2015
Location: Tokyo, Japan
Posts: 19
Rep Power: 10
Awak is on a distinguished road
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.
Awak is offline   Reply With Quote

Old   November 9, 2020, 21:44
Default Patches in Fusion 360
  #8
New Member
 
Paul
Join Date: Nov 2017
Posts: 15
Rep Power: 8
Paul Caicedo is on a distinguished road
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
Paul Caicedo is offline   Reply With Quote

Old   November 10, 2020, 06:38
Default
  #9
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
Quote:
Originally Posted by derekm View Post
... 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.
AtoHM is offline   Reply With Quote

Old   November 10, 2020, 12:17
Default
  #10
Senior Member
 
Charles
Join Date: Aug 2016
Location: Vancouver, Canada
Posts: 148
Rep Power: 9
Marpole is on a distinguished road
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.
__________________
Charles L.
Marpole is offline   Reply With Quote

Old   November 11, 2020, 01:01
Default
  #11
Senior Member
 
M
Join Date: Dec 2017
Posts: 642
Rep Power: 12
AtoHM is on a distinguished road
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.
AtoHM is offline   Reply With Quote

Old   November 12, 2020, 11:00
Default
  #12
Senior Member
 
Charles
Join Date: Aug 2016
Location: Vancouver, Canada
Posts: 148
Rep Power: 9
Marpole is on a distinguished road
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.
__________________
Charles L.
Marpole is offline   Reply With Quote

Reply


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
[CAD formats] Dividing mesh surfaces in stl file krzychu111 OpenFOAM Meshing & Mesh Conversion 0 December 4, 2018 11:06
Rebuilding the DEM-generated spheres in the CAD software liulimin STAR-CCM+ 1 December 20, 2016 23:23
software that support STL export sayed OpenFOAM 15 December 13, 2009 07:00
What CAD software are you using right now? david Main CFD Forum 22 April 14, 2003 08:20
import CAD surfaces... giosue Siemens 5 February 25, 2003 05:39


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