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

[snappyHexMesh] SnappyHexMesh with local refinement of ONE STLfile

Register Blogs Community New Posts Updated Threads Search

Like Tree18Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 4, 2020, 13:48
Default
  #21
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hi Franco,

What is surfaceCheck saying when you use it on your concatenated stl file ?

I don't think the blue and red surfaces should be a problem as long as their nodes are coincident with the bluish ones.

Yann
Yann is offline   Reply With Quote

Old   May 4, 2020, 14:15
Default
  #22
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 7
otaolafr is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hi Franco,

What is surfaceCheck saying when you use it on your concatenated stl file ?

I don't think the blue and red surfaces should be a problem as long as their nodes are coincident with the bluish ones.

Yann
hello, yann, it gives this:
Quote:
Reading surface from "combined.stl" ...

Statistics:
Triangles : 44044
Vertices : 21802
Bounding Box : (-1.84733e-20 -3.2147e-19 -3.2147e-19) (0.00525 0.00525 0.02)

Region Size
------ ----
Onshape 44044


Surface has no illegal triangles.

Triangle quality (equilateral=1, collapsed=0):
0 .. 0.05 : 0.217532
0.05 .. 0.1 : 0.411929
0.1 .. 0.15 : 0.203501
0.15 .. 0.2 : 0.0427073
0.2 .. 0.25 : 0.0325356
0.25 .. 0.3 : 0.017369
0.3 .. 0.35 : 0.0144628
0.35 .. 0.4 : 0.00967215
0.4 .. 0.45 : 0.0222278
0.45 .. 0.5 : 0.0069476
0.5 .. 0.55 : 0.00735628
0.55 .. 0.6 : 0.00217964
0.6 .. 0.65 : 0.00220234
0.65 .. 0.7 : 0.00274725
0.7 .. 0.75 : 0.000136227
0.75 .. 0.8 : 0.00413223
0.8 .. 0.85 : 0.00145309
0.85 .. 0.9 : 0.000340569
0.9 .. 0.95 : 0.000272455
0.95 .. 1 : 0.000295159

min 2.15749e-10 for triangle 27068
max 0.981215 for triangle 27329

Edges:
min 1.7735e-06 for edge 4613 points (0.00450998 0.00268749 0.0148749)(0.00450863 0.00268634 0.0148749)
max 0.0100151 for edge 49712 points (0.000549399 0.00522117 0.01)(0.00109276 0.00513501 0.02)

Checking for points less than 1e-6 of bounding box ((0.00525 0.00525 0.02) metre) apart.
Found 0 nearby points.

Surface is not closed since not all edges connected to two faces:
connected to one face : 808
connected to >2 faces : 0
Conflicting face labels:808
Dumping conflicting face labels to "problemFaces"
Paste this into the input for surfaceSubset

Number of unconnected parts : 1

Number of zones (connected area with consistent normal) : 1


End
after a lot of reading in the forum, I think I found why they are not watertight and is from what you were saying, their nodes are not shared, as the software I use it meshes the models when you are exporting them, it creates different meshes that do not share the same points (as when the mesh occurs it is occurring separately for each surface without considering the others.) as if I export the stl of the howl model there is no problem (it is watertight) as in that case when the mesh occurs it is done considering the other surfaces.
I am looking for solutions to this (for the moment the best hint I have is exporting the STEP model to salome and doing it from there, but is already another program to learn, and it is not evident to use it...). for the moment to achieve the good separation, I am doing the exporation of the howl body in one stl (as it is watertight) and doing the snappyHex, and topoSet to create the sets I want and do createPatch from the sets created in topoSet , the issue that I have with this path is that I have the patches after the snappy, so I can not add boundary layers in that specific region (created by the createPatch)...
otaolafr is offline   Reply With Quote

Old   May 4, 2020, 18:01
Default
  #23
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
How does it look at the interface between each STL, when you open it in ParaView with "surface with edges" or "wireframe" representation?

If the nodes are coincident or very close to each other, you can try the surfaceHookUp utility to merge nodes together. I cannot guarantee it will work (it's actually very dependent on the way your CAD software create the STL during the export) and you might need to fiddle with the tolerance parameter in order to have the proper result, going back and forth with surfaceCheck to check your hooked file.

SurfaceCheck will help you to investigate what is wrong with your file :

Code:
Surface is not closed since not all edges connected to two faces:
    connected to one face : 808
    connected to >2 faces : 0

Right now you have 808 open edges and it should not happen with a closed surface since every since every edge should be connected to 2 faces.

Code:
Conflicting face labels:808
Dumping conflicting face labels to "problemFaces"
Paste this into the input for surfaceSubset
In addition, the mentioned surfaceSubset utility might help to write the problemFaces as something like a VTK file to see exactly which faces are wrong.

Cheers
Yann
Yann is offline   Reply With Quote

Old   May 5, 2020, 04:45
Default
  #24
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 7
otaolafr is on a distinguished road
Quote:
Originally Posted by Yann View Post
How does it look at the interface between each STL, when you open it in ParaView with "surface with edges" or "wireframe" representation?

If the nodes are coincident or very close to each other, you can try the surfaceHookUp utility to merge nodes together. I cannot guarantee it will work (it's actually very dependent on the way your CAD software create the STL during the export) and you might need to fiddle with the tolerance parameter in order to have the proper result, going back and forth with surfaceCheck to check your hooked file.

SurfaceCheck will help you to investigate what is wrong with your file :

Code:
Surface is not closed since not all edges connected to two faces:
    connected to one face : 808
    connected to >2 faces : 0

Right now you have 808 open edges and it should not happen with a closed surface since every since every edge should be connected to 2 faces.

Code:
Conflicting face labels:808
Dumping conflicting face labels to "problemFaces"
Paste this into the input for surfaceSubset
In addition, the mentioned surfaceSubset utility might help to write the problemFaces as something like a VTK file to see exactly which faces are wrong.

Cheers
Yann
I didn't know what exactly was looking for so sorry if does not help..


for surfaceHookUp i tried the last time you mention it, but i could not achive to make it work, as i could not find any example in the tutorial folder, and the documentation i could find about was this https://www.openfoam.com/documentati...aceHookUp.html and in .org i can not find anything (and i need to use the .org vr...) and from the -help in the terminal I do not get too much information either...
franco
otaolafr is offline   Reply With Quote

Old   May 5, 2020, 05:21
Default
  #25
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
It is not very clear indeed. It it possible to share your stl files here?

(ideally the separate files, it would be easier to visualize)


Which CAD software are you using to create your stl ?


Yann
Yann is offline   Reply With Quote

Old   May 5, 2020, 06:41
Default
  #26
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 7
otaolafr is on a distinguished road
Quote:
Originally Posted by Yann View Post
It is not very clear indeed. It it possible to share your stl files here?

(ideally the separate files, it would be easier to visualize)


Which CAD software are you using to create your stl ?


Yann
yes, most of the time i find more information in this page thant in the webpages of the software ahaha.
yes of course, actually it is only a test, as i am going to have similar geometries (a quarter of cylinder with or without the faces of the quarter intersected with others).
I upload to drive as it is too big to be uploaded to the web directly https://drive.google.com/file/d/1Znv...ew?usp=sharing
Franco
otaolafr is offline   Reply With Quote

Old   May 5, 2020, 10:52
Default
  #27
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hey Franco,

I just has a look at your files. You can see in the first attached image : in blue, the faces of your inlet file and in red the faces of your walls file.

As you can see on the image, at the interface between the 2 files, there are more nodes on the inlet (in blue) than on the walls (in red). Since you have not the same discretization of the geometry on both files, there are actual holes between the surfaces and this is what surfaceCheck complains about.

In addition I attached a second image showing the surface of the walls file. All the cylinders are really poorly meshed and I doubt you will be able to get anything good from snappy using this file as your geometry input.

I suggest you to rework the way you export your files to get better STL before moving on to meshing in OpenFOAM.

Don't you have any options to control the way the STL is created when doing the export ?


Yann
Attached Images
File Type: jpg img1.jpg (70.5 KB, 27 views)
File Type: jpg img2.jpg (129.0 KB, 24 views)
Yann is offline   Reply With Quote

Old   May 5, 2020, 11:11
Default
  #28
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 7
otaolafr is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hey Franco,

I just has a look at your files. You can see in the first attached image : in blue, the faces of your inlet file and in red the faces of your walls file.

As you can see on the image, at the interface between the 2 files, there are more nodes on the inlet (in blue) than on the walls (in red). Since you have not the same discretization of the geometry on both files, there are actual holes between the surfaces and this is what surfaceCheck complains about.

In addition I attached a second image showing the surface of the walls file. All the cylinders are really poorly meshed and I doubt you will be able to get anything good from snappy using this file as your geometry input.

I suggest you to rework the way you export your files to get better STL before moving on to meshing in OpenFOAM.

Don't you have any options to control the way the STL is created when doing the export ?


Yann
hello yann, i exported in the "finer" mesh size and it still gives a non watertight surface but with less edges connecteds to one face (we have go down to 30)
here is a link https://drive.google.com/file/d/1Vms...ew?usp=sharing
for the software (sorry i forgot to mention it) i use Onshape, and for the exportation it has 3 "normal" levels, coarse, medium and fine, this is the "fine" version, there is also custom, but i would not know what value to enter.
thanks for the help, franco.
otaolafr is offline   Reply With Quote

Old   May 5, 2020, 12:12
Default
  #29
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Good, it looks better! Now you should be able to make it work with surfaceHookUp to get a closed volume. Using a tolerance of 0.0001 worked fine for me.

Despite the volume being closed, surfaceCheck still complains about bad quality faces. I didn't check further but it should be fine. However, I strongly encourage you to dig into the custom option when exporting your files, it might give you better control on the way the STL are generated.

Cheers,
Yann
Yann is offline   Reply With Quote

Old   May 5, 2020, 12:34
Default
  #30
Senior Member
 
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 7
otaolafr is on a distinguished road
Quote:
Originally Posted by Yann View Post
Good, it looks better! Now you should be able to make it work with surfaceHookUp to get a closed volume. Using a tolerance of 0.0001 worked fine for me.

Despite the volume being closed, surfaceCheck still complains about bad quality faces. I didn't check further but it should be fine. However, I strongly encourage you to dig into the custom option when exporting your files, it might give you better control on the way the STL are generated.

Cheers,
Yann
thanks for all the help Yann,
I bother you with a few last questions,
first, how you learned to use surfaceHookUp? i mean i could not find any extra information from the one i got from surfaceHookUp -help, like for example tolerance but what is a normal number or anything else? I am sure that i am missing something (of description or use of functions in general from OF). i mean when you are looking to the usage of a function and you can not find it in the tutorials examples what do you do for example?
what software do you use for the CADs? only by curiosity....
for the custom import i can play with three parameters:
angular deviation (deg) 2.5
chordal tolerance (m) 0.00006
Minimum facet width (m) 0.0000254
the numbers is the "fine" set up of the parameters, any idea which should i lower?

thanks for all the help.
best regards, franco
otaolafr is offline   Reply With Quote

Old   May 5, 2020, 14:03
Default
  #31
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
You are welcome!

Quote:
Originally Posted by otaolafr View Post
first, how you learned to use surfaceHookUp? i mean i could not find any extra information from the one i got from surfaceHookUp -help, like for example tolerance but what is a normal number or anything else? I am sure that i am missing something (of description or use of functions in general from OF). i mean when you are looking to the usage of a function and you can not find it in the tutorials examples what do you do for example?
This is the tricky part with OpenFOAM. You can do a lot a things but this is not always easy to find how to achieve what you want. What you can do :
  1. Use the -help to get information about the command
  2. Check the headers in the source, you can find useful information in it (applications and src)
  3. Check if there are examples in the tutorials
  4. Search for it on the internet (official and non official documentation, cfd-online, etc)
  5. Spend time trying to use it, moving from one error to another until you figure it out.

Quote:
Originally Posted by otaolafr View Post
what software do you use for the CADs? only by curiosity....
CATIA for CAD and ANSA to simplify geometries and generate surface meshes to be exported in STL.

Quote:
Originally Posted by otaolafr View Post
for the custom import i can play with three parameters:
angular deviation (deg) 2.5
chordal tolerance (m) 0.00006
Minimum facet width (m) 0.0000254
the numbers is the "fine" set up of the parameters, any idea which should i lower?
What you need for snappy is a smooth surface mesh: you need to have a good resolution on curved surfaces and edges and this is better to avoid to have very elongated triangles (like the ones on the cylinders in your last STL)

Angular deviation and chordal tolerance should help you to deal with curves resolution. Maybe minimum facet width could help with the high aspect ratio triangles but your value is already quite low so I'm not sure about that.

I don't know if I'm very clear and an image is often better than a thousand words so I attached a picture to give you an example of a STL mesh which should be fine to mesh with snappy.

Cheers,
Yann
Attached Images
File Type: jpg stl-mesh.jpg (106.3 KB, 25 views)
otaolafr likes this.
Yann is offline   Reply With Quote

Old   May 14, 2020, 11:57
Default
  #32
New Member
 
David Smith
Join Date: Jul 2013
Posts: 9
Rep Power: 13
minh khang is on a distinguished road
Actually we dont need to combine stl files. snappyHexmesh works fine with separated shells. Just make sure that all shell form a closed volume.
otaolafr likes this.
minh khang is offline   Reply With Quote

Old   November 21, 2024, 06:32
Default
  #33
New Member
 
Rabin
Join Date: Nov 2024
Posts: 2
Rep Power: 0
rpm2000hot is on a distinguished road
Hello
I got this error
when I run turbo design ccm+

I dont how set command prompt setup Arguments.

---------------------------
Incomplete CCM+ parameters or TURBOdesign1 case in invalid state.
rpm2000hot 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
[snappyHexMesh] SnappyHexMesh running killed! Mark JIN OpenFOAM Meshing & Mesh Conversion 7 June 14, 2022 02:37
pimpleDyMFoam computation randomly stops babapeti OpenFOAM Running, Solving & CFD 5 January 24, 2018 06:28
[snappyHexMesh] snappyHexMesh aborting Tobi OpenFOAM Meshing & Mesh Conversion 0 November 10, 2010 04:23
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 08:36
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07


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