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

[CAD formats] Creating waterproof STL using snappyHexMesh or salome

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree52Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 8, 2019, 05:04
Default
  #41
Member
 
Priyanka P
Join Date: Apr 2019
Location: Germany
Posts: 40
Rep Power: 6
priyankap is on a distinguished road
Quote:
Originally Posted by Tobi View Post
I do not agree with your statement. I am using Salomes GUI for really high complex geometries and till now I could do anything without the python interface. Of course you can get a lot of information out of the python script and it allows to use it for optimization but the necessity of python for complex geometry - no, I cannot agree.

Sent from my HTC One mini using CFD Online Forum mobile app

Hi Tobias,


I am using Salome to generate mesh for a little complex geometry. I am trying to use NETGEN 1D-2D-3D algorithm to create the mesh with very small cell size. And here are the problems that I am facing:


1. It takes ages to create this mesh.
2. The number of cells are very high.
3. When I import it to OpenFOAM, I get too many non-orthogonal faces.



Is there any other faster way to mesh this complex geometry using Salome to avoid non-orthogonal errors?


Is there any tutorial or something similar which explains complex meshing using salome?


Thanks!
priyankap is offline   Reply With Quote

Old   July 8, 2019, 09:00
Default
  #42
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,705
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

the generation of 3D meshes within the Salome toolbox takes long, that is a fact. However, non-orthogonality in the mesh is not a big deal for OpenFOAM. You have to choose the appropriate numerical schemes for that. E.g. for the laplacian scheme, you can use a limited one.

Good luck, by the way - your reply is off-topic as this thread is about surface triangulation for snappyHexMesh
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 8, 2019, 09:08
Default
  #43
Member
 
Sebastian Trunk
Join Date: Mar 2015
Location: Erlangen, Germany
Posts: 60
Rep Power: 11
sisetrun is on a distinguished road
Hey Priyanka,

Do you need NETGEN 1D-2D-3D?

have you tried to mesh your surface with 2D: Triangle Mefisto (max element area) and 1D: Wire Discretisation (Number of Segments)?
You can define individual 1D or 2D lines/areas in the geometry mode...

Until now, I always got a nice (yes, sometimes big) STL for all my geometries by playing around with these two parameters!
By constructing your patches as individual 2D surfaces in Salome, to can combine them into one big regionSTL and use this 2D STL as input for snappyHexMesh to generate your simulation mesh.

Give it a try!
sisetrun is offline   Reply With Quote

Old   July 9, 2019, 05:40
Default
  #44
Member
 
Priyanka P
Join Date: Apr 2019
Location: Germany
Posts: 40
Rep Power: 6
priyankap is on a distinguished road
Hello sisetrun,


I have no experience in using the snappyHexMesh tool of OpenFOAM. I have been using Salome for meshing and then ideasUnvToFoam to export this mesh to OpenFOAM.


But this time I am using relatively complex geometry and I am not able to do it with a routine meshing in Salome for this geometry.


Is there any OpenFOAM document which explains snappyHexMesh technique in detail?



My main problem is the non-orthogonal faces in my mesh. That too, it has max 89.7 degrees of non-orthogonal faces. So I can't use this for my simulation.


Can you please help me figure out with the possibility to eliminate these non-orthogonal faces?


Thank you!
priyankap is offline   Reply With Quote

Old   July 11, 2019, 05:08
Default
  #45
Member
 
Sebastian Trunk
Join Date: Mar 2015
Location: Erlangen, Germany
Posts: 60
Rep Power: 11
sisetrun is on a distinguished road
Well snappyHexMesh is quite powerful but way to complex to explain it in detail in a post... I have made and still make all my meshes with this tool.

I think you have to search the internet for information. There is a lot of info from videos to ppt available out there... With some experience, just come back and as more specific questions to your problem!
sisetrun is offline   Reply With Quote

Old   July 23, 2019, 21:12
Default Can Salome Mesh Be Used As Precursor For SnappyHexMesh?
  #46
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
HappyS5 is on a distinguished road
Hello,

Forgive my ignorant question but I am new.

I know blockMesh can be used to create a starting mesh for snappyHexMesh. Can Salome be used to create a starting mesh?

Specifically, I will be meshing a flow nozzle with moderately complex geometry.

Thanks!
HappyS5 is offline   Reply With Quote

Old   July 24, 2019, 04:56
Default
  #47
Member
 
Sebastian Trunk
Join Date: Mar 2015
Location: Erlangen, Germany
Posts: 60
Rep Power: 11
sisetrun is on a distinguished road
Hey,

yes it can be used for sure.

Create a proper block and mesh the block in the meshing tool.

Create the mesh by "assign a set of hypotheses" with 3D Automatic Hexahedralization. Select 1D as local length and assign your cell size of the background mesh!

Mesh the Block and export the mesh as UNV file...

Before you start snappy, create the background mesh by typing ideasUnvToFoam in the command line... this will create the background mesh in the constant/polymesh!
HappyS5 likes this.
sisetrun is offline   Reply With Quote

Old   November 6, 2019, 01:04
Default
  #48
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 14
haze_1986 is on a distinguished road
I am curious which function is used in blender to produce the watertight geometry?
haze_1986 is offline   Reply With Quote

Old   November 12, 2019, 04:53
Default Work around for AutoCAD
  #49
Member
 
Rasmus Iwersen
Join Date: Jan 2019
Location: Denmark
Posts: 81
Rep Power: 8
Rasmusiwersen is on a distinguished road
Hi Tobias and all readers,

Thank you for the post, I've been troubled with coarse .stl files created by AutoCAD. Instead of exporting a "perfect" circle the .stl file was more like a polygon with 12 edges. I found a workaround in AutoCAD which helped me to a satisfacory (read not optimal!!) result, namely settings FACERES=10 instead of 0.5, the latter being the default value. The polygon now has a lot more edges, although it is not a "perfect" cylinder still.¨

Hopefully this will help whoever might deal with similar problems.

/Rasmus
Rasmusiwersen is offline   Reply With Quote

Old   November 20, 2019, 07:08
Default Snappyhexmesh
  #50
New Member
 
Deutschland
Join Date: Jun 2019
Posts: 21
Rep Power: 6
Arghavani is on a distinguished road
Hi,
I am doing a project that it needs a stl file but due to the snappyhexmesh I dont have uniform hex mesh but I want to have uniform hex mesh inside and outside of stl file (I mean in the background geometry as well) is there any suggestion how to make it with out using snappyhexmesh ?


kind regards,
Arghavn
Arghavani is offline   Reply With Quote

Old   November 20, 2019, 18:28
Default LocationinMesh
  #51
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
HappyS5 is on a distinguished road
Quote:
Originally Posted by Arghavani View Post
Hi,
I am doing a project that it needs a stl file but due to the snappyhexmesh I dont have uniform hex mesh but I want to have uniform hex mesh inside and outside of stl file (I mean in the background geometry as well) is there any suggestion how to make it with out using snappyhexmesh ?


kind regards,
Arghavn
I apologize if I am misunderstanding your question. Is it possible that you can specify locationinmesh in a region outside the inside region to get meshing throughout? locationinmesh is part of snappyHexMesh programming.
HappyS5 is offline   Reply With Quote

Old   November 21, 2019, 02:52
Default
  #52
New Member
 
Deutschland
Join Date: Jun 2019
Posts: 21
Rep Power: 6
Arghavani is on a distinguished road
Quote:
Originally Posted by HappyS5 View Post
I apologize if I am misunderstanding your question. Is it possible that you can specify locationinmesh in a region outside the inside region to get meshing throughout? locationinmesh is part of snappyHexMesh programming.
No Problem. let me make it clear. in my stl file, I have two-cylinder and they are located in front of each other with some distances what I meant about the inside of the geometry is actually only the surface of these two cylinders and about outside I meant the mesh between these two cylinders.

kind regards,
Arghavan
Arghavani is offline   Reply With Quote

Old   November 21, 2019, 02:57
Default
  #53
Senior Member
 
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 15
Bazinga is on a distinguished road
Quote:
Originally Posted by Arghavani View Post
No Problem. let me make it clear. in my stl file, I have two-cylinder and they are located in front of each other with some distances what I meant about the inside of the geometry is actually only the surface of these two cylinders and about outside I meant the mesh between these two cylinders.

kind regards,
Arghavan
If you really need a uniform mesh you might want to consider using blockMesh.
Bazinga is offline   Reply With Quote

Old   November 21, 2019, 03:06
Default
  #54
New Member
 
Deutschland
Join Date: Jun 2019
Posts: 21
Rep Power: 6
Arghavani is on a distinguished road
Quote:
Originally Posted by Bazinga View Post
If you really need a uniform mesh you might want to consider using blockMesh.
Thank you. I am doing my background mesh by blockMesh, but I think I can do the uniform mesh by fluent for the stl file.
Arghavani is offline   Reply With Quote

Old   May 1, 2020, 11:04
Default
  #55
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 128
Rep Power: 6
otaolafr is on a distinguished road
hello, I have always worked with Onshape software as it is a great CAD software and free for educational porpuses. but if I separate the surfaces in the exportation, they are not watertight. I come across this post that is super interesting and helpful, but there is one thing I not sure of understanding, from what I read, Salome and blender can generate separate STL for each patch and that together they WILL be watertight. but is it possible to import an STEP file to salome to recover the separate patches stls? as I want to keep using Onshape to generate my geometries, can I export them and import them in salome this purpose?

so add two previous step where I create the CAD model in Onshape and copy it to salome for the patch separation.
for info, Onshape has several exportation type files including: parasolid, acis, step, iges, solidworks, collada, rhino, gltf, stl.
can it be done? or should I stop looking around for a solution for this issue?
thanks in advance, franco
otaolafr is offline   Reply With Quote

Old   May 1, 2020, 11:13
Default
  #56
New Member
 
Deutschland
Join Date: Jun 2019
Posts: 21
Rep Power: 6
Arghavani is on a distinguished road
Hello,
Unfortunately, I am not using Salome. I don't have any information about it.


best,
Arghavan
Arghavani is offline   Reply With Quote

Old   May 12, 2020, 14:31
Default
  #57
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 128
Rep Power: 6
otaolafr is on a distinguished road
hello, i am having issues with salome when creating the mesh,
i exported my STEP file and wanted to mesh the surface,
I followed as tobi have done in this video: https://youtu.be/oZi1TAri4fk?t=419
i created the groups of each patch (in geometry, new entry/group/new group and select the respectively faces), inlet, outlet, symmetry plane1, symmetry plane2, and walls (all the others) (for the walls group I choose select all option and then deselect the inlet, outlet symmetry plane1 and 2).
then went to mesh,
mesh/create mesh/assign a set of hypotheses/3D automatic hexahedralization (then in hypotesis construction i did not select anything)
went to 1D option hypotesis, local lenght and selected a really small length (0.00005)
but when I generate the mesh I got several errors (645 in total) with the types are the followings:
inverted elements generated.
unexpected geometry. wrong number of wires: 134.
unexpected geometry. face must have 4 sides but not 3.
bug 3 sides found instead of 4.
I known that my geometry has absurdly small details, and the step is watertight as i created myself.
any idea where to go? if necessary here is the step file (sorry it was too big for the forum directly) https://drive.google.com/file/d/15-K...ew?usp=sharing
thanks, a lot
otaolafr is offline   Reply With Quote

Old   May 13, 2020, 06:40
Default
  #58
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,705
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by otaolafr View Post
hello, I have always worked with Onshape software as it is a great CAD software and free for educational porpuses. but if I separate the surfaces in the exportation, they are not watertight. I come
....
....
can it be done? or should I stop looking around for a solution for this issue?
thanks in advance, franco
Dear Franco,

I did not read your last post but to the one above. Yes, you can export the STEP file from your CAD system, import it to SALOME, create your patches there, triangulate the whole surface, use the previous created patches for your single STL´s, export all single STL files and combine it to one. Done.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   May 13, 2020, 07:01
Default
  #59
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 128
Rep Power: 6
otaolafr is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Dear Franco,

I did not read your last post but to the one above. Yes, you can export the STEP file from your CAD system, import it to SALOME, create your patches there, triangulate the whole surface, use the previous created patches for your single STL´s, export all single STL files and combine it to one. Done.
hello tobi! i tried this, as the video of you doing it (that someone post it was not functional anymore...) but as I was following you in youtube i found the video about suzanne case and follow the steps that you created the "external box".
but when i gave my geometry (my last post) the mesh in salome shows a lot of errors,
i have done several approaches,
1. export the model in 1 stl, it is watertight, but as i can not achive to separate the patches with surfaceAutoPatch, i finish with only one patch for the snappyHex so i can not add the boundary layers in the "wall" patch. (after this i separate the patches (post snappy) with topoSet and creatPatch -overwrite) but if is not perfect by all means.
2. export the model in several stls, it is not watertight and from what i get from surfaceCheck (the quantity of defects I am not sure that a surfaceHook would work...). also i am in the finer resolution i can export the mesh from the CAD.
3. export the model in STEP, and tried your method with SALOME, following the same steps as you for suzanne https://youtu.be/oZi1TAri4fk?t=395 but i got a lot of errors (that i copied in last post).
the model is watertight, and it is a solid before i exported in STEP file...
it would be possible to have a look about my file?
thanks, best regards, franco
otaolafr is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[snappyHexMesh] Creating STL files with regions for snappyHexMesh nusivares OpenFOAM Meshing & Mesh Conversion 4 August 7, 2018 21:09
[snappyHexMesh] With FreeCAD: creating waterproof STL files? robob OpenFOAM Meshing & Mesh Conversion 11 April 29, 2018 12:33
[snappyHexMesh] Creating stl file for snappyHexMesh from xyz coordinates Vignesh2508 OpenFOAM Meshing & Mesh Conversion 2 April 25, 2017 09:43
[snappyHexMesh] What types of stl files are needed in snappyhexmesh? phandy OpenFOAM Meshing & Mesh Conversion 1 February 19, 2015 06:36
[snappyHexMesh] Experimentally obtained STL file for internal Flow SnappyHexMesh Irish09 OpenFOAM Meshing & Mesh Conversion 9 April 7, 2012 09:50


All times are GMT -4. The time now is 02:49.