|
[Sponsors] |
[snappyHexMesh] With FreeCAD: creating waterproof STL files? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 5, 2017, 15:52 |
With FreeCAD: creating waterproof STL files?
|
#1 |
New Member
Join Date: Apr 2016
Posts: 21
Rep Power: 10 |
How to create waterproof stl files with Freecad?
See this thread for guidance how to do it with Salome. But in Freecad you can't mesh everything and select some mesh parts for the boundaries, or can you? |
|
December 19, 2017, 19:30 |
|
#2 |
New Member
Daniel Norton
Join Date: Feb 2015
Posts: 17
Rep Power: 11 |
I've been creating models in Freecad then exporting them as an STP file to Salome to waterproof them and improve the surface before exporting as STL. So far it's worked fine, even if it's another step.
|
|
December 20, 2017, 06:32 |
|
#3 |
New Member
Join Date: Apr 2016
Posts: 21
Rep Power: 10 |
Ok, thanks for mentioning Freecad -> Salome workflow. But I`m interested to do it in Freecad alone. I have read somewhere, that for tighter cfd integration it needs first be implemented by someone. But currently in all cfd workbenches for freecad its not possible, I guess?
|
|
December 24, 2017, 20:36 |
|
#4 |
Senior Member
Canakkale Dardanelspor
Join Date: Aug 2012
Posts: 135
Rep Power: 14 |
Hi,
Could you please elaborate what exactly you meant in the following? To myself, a CAD program was not expected to produce adequate-quality surface meshes to be utilised in a CFD simulation, because it mainly focuses on providing solutions for improvements of a mechanical design. IMHO, CAD is inherently indifferent to challenges posed by (detailed) flow physics and its modelling. |
|
April 9, 2018, 16:07 |
|
#5 |
New Member
Join Date: Apr 2016
Posts: 21
Rep Power: 10 |
I want to answer my own thread:
these are the links from freecad forum, which explains my problem and which give solutions: https://forum.freecadweb.org/viewtopic.php?f=37&t=16855 https://forum.freecadweb.org/viewtop...hilit=openfoam |
|
April 11, 2018, 17:57 |
|
#6 |
Senior Member
Derek Mitchell
Join Date: Mar 2014
Location: UK, Reading
Posts: 172
Rep Power: 13 |
with freecad I create the item with part then call in a python script
Code:
mobjs=[] mobjs.append(this_obj) # Mesh.export(mobjs,tmp_dir + "/" + str(this_obj.Label)+".ast") del mobjs The combination of FreeCAD driven by python and snappy works well for me.
__________________
A CHEERING BAND OF FRIENDLY ELVES CARRY THE CONQUERING ADVENTURER OFF INTO THE SUNSET |
|
April 12, 2018, 04:24 |
|
#7 |
New Member
Join Date: Apr 2016
Posts: 21
Rep Power: 10 |
Hi Derek Mitchell,
how do you mesh your part? Is it one mesh per part or do you mesh surfaces from this part individually? What do you mean by regions in freecad? How do you create mesh regions in freecad? greets |
|
April 12, 2018, 10:35 |
|
#8 | |
Senior Member
Derek Mitchell
Join Date: Mar 2014
Location: UK, Reading
Posts: 172
Rep Power: 13 |
Quote:
Used it upto 35 regions so far. The FreeCad is used to create STL files these are used in snappyHexMesh to create the mesh and cellZones. Then splitMeshRegions converts the cellZones into Regions. then changeDictionary fixes up the fields. When I cut one region from another I get a watertight interface by using the code above.
__________________
A CHEERING BAND OF FRIENDLY ELVES CARRY THE CONQUERING ADVENTURER OFF INTO THE SUNSET |
||
April 13, 2018, 08:10 |
|
#9 |
New Member
Join Date: Apr 2016
Posts: 21
Rep Power: 10 |
Thanks for your response Derek,
you have explained more the openFOAM side of things... Do you have multiple parts in Freecad or one single part? Do you make some groups in freecad for naming/selecting the faces and surfaces? How do you export the stl files? My workflow in the past, which has its problems (not really watertight) was this: 1. Create one part in Freecad 2. extract/group the wanted surfaces from this part in Freecad 3. for each group of the part mesh it -> get multiple mesh files in Freecad 4. export the mesh files to stl thank again |
|
April 15, 2018, 07:07 |
|
#10 |
Senior Member
Derek Mitchell
Join Date: Mar 2014
Location: UK, Reading
Posts: 172
Rep Power: 13 |
To create in FreeCAD two regions shell and inside.
Using part create a volume inside another outside. Cut the inside volume from outside volume. { select inside and outside then part>boolean>cut } Select the resulting shell and file>export as .ast. Select the inside volume and file>export as .ast. Rename the .ast files as .stl. FreeCAD uses mm, to convert metre scale use surfaceMeshConvert.
__________________
A CHEERING BAND OF FRIENDLY ELVES CARRY THE CONQUERING ADVENTURER OFF INTO THE SUNSET |
|
April 15, 2018, 07:11 |
|
#11 |
New Member
Join Date: Apr 2016
Posts: 21
Rep Power: 10 |
thanks for answering,
I will try it someday |
|
April 29, 2018, 12:33 |
|
#12 |
New Member
Join Date: Apr 2016
Posts: 21
Rep Power: 10 |
okay,
the method which derekm explained, is probably the same as in Freecad: how to prepare a mesh suitable for OpenFOAM?, which I think again is not correct because, it is not watertight. Sorry derekm. The color section approach, specified in the first link of my post #5 https://www.cfd-online.com/Forums/op...tml#post688163 is not very good, because it is not very scriptable, and everytime some geometry is changed in dimension and is new generated you have to set the colors again... So I search again for another approach and now I have this: Freecad -> export as step -> import into GMSH -> make physical groups -> mesh with gmsh -> export as default `.msh` file (or similar) -> use openfoams gmshToFoam script -> then use `surfaceMeshTriangulate` to get the stl/obj. It seems, of course a bit tedious, to generate stl/obj like this. But it has some advantages:
I also found out, that there are gmsh groups from from within FEM workbench: https://forum.freecadweb.org/viewtop...19481&start=10 You export this mesh as FEM mesh formats (*.unv, *.med, *.stl, *.dat, *.inp, *.vtk, *.vtu), I guess, which is an "smesh" object. Unfortunately I have not found out, how to get individual stl/obj files from that. Last edited by robob; April 29, 2018 at 13:34. |
|
Tags |
freecad snappyhexmesh |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating patch on stl surface | obiscolly50 | OpenFOAM Pre-Processing | 17 | March 3, 2020 11:23 |
[snappyHexMesh] Checkinf if SHM stl files are watertight | fracasce | OpenFOAM Meshing & Mesh Conversion | 2 | April 25, 2017 07:50 |
How to create inlet/outlet/wall STL files from a STL CAD model | Gentible | Mesh Generation & Pre-Processing | 1 | June 23, 2015 11:18 |
Problems in compiling paraview in Suse 10.3 platform | chiven | OpenFOAM Installation | 3 | December 1, 2009 08:21 |
Results saving in CFD | hawk | Main CFD Forum | 16 | July 21, 2005 21:51 |