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

[snappyHexMesh] snappyHexMesh feature edge

Register Blogs Community New Posts Updated Threads Search

Like Tree18Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 13, 2011, 12:08
Default
  #21
New Member
 
Sebastian Herbst
Join Date: Oct 2011
Location: Germany
Posts: 4
Rep Power: 14
sebasthe is on a distinguished road
Thank you Bastian and Bruno for your quick replies to my problem!

@Bastian: I am not completely sure what you mean by
Quote:
-how is the "box" constructed?
I suppose you mean the blue block one can see in the pictures above. I constructed that block with blockMesh. Actually the construction is part of a script which in the end helps me to automise my mesh generation - once I get I to run :-) According to some geometric settings in a text file this script generates me a bunch of cylinder .stl files and a blockMeshDict fitting to those zylinders.

@Bruno: Just out of curiosity would checking the .eMesh file give me the same information or is there a difference one should have in mind between .obj and eMesh features? According to your suggestion I checked the .obj files which seems to be right.
But not all of the lines lay inside my blockMesh block. Actually this could be the reason for the bad edges I get. I think I have to change my procedure as I used to have stl geoemtries overlapping my blockmesh (see images of my first post). Now I seem to need the stl geometry beeing completely surrounded by a blockmesh. In other words all edges have to be inside the blockmesh. Can you confirm that according to your experience?

Today I only had time for a quick test which actually showed some improvements. Tomorrow I will have some more time for further test and will let you know about my progress.

Kind regards
Sebastian

featureEdge.jpg featureEdge2.jpg
sebasthe is offline   Reply With Quote

Old   December 15, 2011, 05:52
Default
  #22
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Quote:
Originally Posted by sebasthe View Post
@Bastian: I am not completely sure what you mean by I suppose you mean the blue block one can see in the pictures above. I constructed that block with blockMesh.
Ok I expected that. Your geometry intersects the box constructed by blockMesh and there is not feature line for this intersection in the emesh-File, is it? That is why there features are not snapped whereas the features at the geometry itself contain feature lines in the emesh-File and they are snapped.
You need to generate feature lines at the intersections in your emesh-File.

Regards Bastian
bastil is offline   Reply With Quote

Old   December 17, 2011, 04:27
Default
  #23
New Member
 
Sebastian Herbst
Join Date: Oct 2011
Location: Germany
Posts: 4
Rep Power: 14
sebasthe is on a distinguished road
This whole topic seems to be more complicated than expected.

Bastian, I read your answer several times and thought about it. But I'm still not completely sure if I got you right.The white lines in the picture below are my feature lines (eMesh-File). They intersect the block. I think this is what you mean by:
Quote:
Originally Posted by bastil View Post
whereas the features at the geometry itself contain feature lines in the emesh-File and they are snapped.
I suppose the missing features you talk about are feature lines in a shape of what I highlighted red in the picture, right?

I tried some workarounds for this problem:
1.) Having the geometry completely surrounded by the blockMesh box. As front and back are now inside the box, there are now intersection lines. But this didn't solve the problem.

2.) Paradoxically if only the front of the prism lies inside whereas the back overlaps the box I get relatively nice results. Unfortunately I don't understand why as I would expect my first workaround to be better than the second.

As the second workaround doesn't make any sense to me, although I now get a nice prism, I still don't have the impression that I really solved the problem. Was that a lucky strike?

cheers
Sebastian

intersect_fesature_block.jpg
sebasthe is offline   Reply With Quote

Old   December 17, 2011, 08:49
Default
  #24
Senior Member
 
BastiL
Join Date: Mar 2009
Posts: 530
Rep Power: 20
bastil is on a distinguished road
Quote:
Originally Posted by sebasthe View Post
This whole topic seems to be more complicated than expected.
I suppose the missing features you talk about are feature lines in a shape of what I highlighted red in the picture, right?
Exactly. But they need to be placed at the intersections between the box and the shape, not at the end of the shape outside the box. It should not e to hard to create these features.

Regards Bastian
bastil is offline   Reply With Quote

Old   January 14, 2012, 14:03
Default
  #25
New Member
 
Sebastian Herbst
Join Date: Oct 2011
Location: Germany
Posts: 4
Rep Power: 14
sebasthe is on a distinguished road
Hi all,

sorry that I havn't replied until now. I didn't have the time to follow up on this until this week.

@bastil: thank you very much for your input and tips on this!! I tried with several different modifications of the featureEdges - unfortunately without success.

For all who might have some similar issues: unfortunately I couldn't find a clean way to solve my problem. But I now have kind of a smooth solution with which I can deal. I used the described workarround - one side of the geometry overlapping and one side inside the blockMesh block. Even after hours of trying and thinking about, I really don't now why this is working. My best guess is that the featureEdge funtion is not fully developped until now.

With the workaround I used one problem remains: at the edges my wall patch (prism sides) owns one line of cells of the inlet patch. But this I could solve with a combination of autoPatch and createPatch.

Tip: sometimes it helps to run snappyHexMesh a second time.

Thanks for your help!
Sebastian
sebasthe is offline   Reply With Quote

Old   February 27, 2012, 12:39
Default
  #26
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 14
aqua is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi lovecraft22,

I was thinking about this myself... It's here: "tutorials/mesh/snappyHexMesh/flange"
Keep in mind that you must have at least OpenFOAM 2.0.0!

Check the Allrun script on that folder for more details.

And next time you want to find a file, here's two example commands:
Code:
find . -name "snappy*Dict"
find . -iname "snappy*dict"
Best regards,
Bruno
Hello Bruno,
I tried to run the command :
surfaceFeatureExtract -includedAngle 150 icube.stl icube

but the error showed up such as :
--> FOAM FATAL ERROR:
Cannnot read "icube.stl"

From function triSurface::read(const fileName&, const word&, const bool)
in file triSurface/triSurface.C at line 370.

Could you please tell me how to solve this?
my icube.stl file was created by ProE, if i just perform SHM, it worked fine.
But why couldn't I extract the feature?

Thank you so much!
Aqua
aqua is offline   Reply With Quote

Old   February 28, 2012, 07:32
Default
  #27
Disabled
 
Join Date: Mar 2011
Posts: 174
Rep Power: 15
anon_a is on a distinguished road
Hey aqua

Are you sure your STL is located in the right directory?
It should be in constant/triSurface
anon_a is offline   Reply With Quote

Old   February 29, 2012, 07:20
Default
  #28
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 14
aqua is on a distinguished road
Quote:
Originally Posted by anon_a View Post
Hey aqua

Are you sure your STL is located in the right directory?
It should be in constant/triSurface
Hello,anon_a,
Thank you so much for your reply. But yes, I have the stl file under triSurface.
Actually I successfully creat mesh by snappyHexMesh, which should means the stl file is right.
But just couldnt perform surfaceFeatureExtract...

Regards!
Yebo
aqua is offline   Reply With Quote

Old   February 29, 2012, 07:54
Default
  #29
Disabled
 
Join Date: Mar 2011
Posts: 174
Rep Power: 15
anon_a is on a distinguished road
But in this case, shouldn't you also adjust the directory in the surfaceFeatureExtract command as well?

For example, I use
surfaceFeatureExtract -includedAngle 150 -writeObj constant/triSurface/myGeometry.stl myGeometry
anon_a is offline   Reply With Quote

Old   February 29, 2012, 08:17
Default
  #30
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!
Quote:
Originally Posted by anon_a View Post
For example, I use
surfaceFeatureExtract -includedAngle 150 -writeObj constant/triSurface/myGeometry.stl myGeometry
That was going to be my answer...

@Aqua: you had quoted my post #2... on post #4 was the answer to your question!!

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   February 29, 2012, 09:59
Default
  #31
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 14
aqua is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings to all!

That was going to be my answer...

@Aqua: you had quoted my post #2... on post #4 was the answer to your question!!

Best regards,
Bruno
Hi, Bruno,
Yes, I got it! Thank you so much!

Cheers!

Aqua
aqua is offline   Reply With Quote

Old   February 29, 2012, 10:00
Default
  #32
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 14
aqua is on a distinguished road
Quote:
Originally Posted by anon_a View Post
But in this case, shouldn't you also adjust the directory in the surfaceFeatureExtract command as well?

For example, I use
surfaceFeatureExtract -includedAngle 150 -writeObj constant/triSurface/myGeometry.stl myGeometry
Hello anon_a,

You are right! I forgot the directory....

Thank you so much for your help~

Cheers~

Aqua
aqua is offline   Reply With Quote

Old   March 2, 2012, 06:03
Default
  #33
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 14
aqua is on a distinguished road
Hey, Bruno,
I am using foamToCGNS, the mesh is created in OpenFoam by SnappyHexMesh, but when run foamToCGNS, error happens like :

Wrong number of vertices in cell
expected 4,5,6, or 8, found 0

From function foamToCGNS
in file writeCGNS.H at line 219.


Does CGNS deal with polyhedral cell created by snappyHexMesh? If not, is there some other way to convert OF mesh to CFX?

Thank you so much!

Aqua
aqua is offline   Reply With Quote

Old   March 2, 2012, 06:46
Default
  #34
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Aqua,

Quote:
Originally Posted by aqua View Post
Does CGNS deal with polyhedral cell created by snappyHexMesh? If not, is there some other way to convert OF mesh to CFX?
I don't know. But I suggest that you first check if the mesh is sane:
Code:
checkMesh
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   March 2, 2012, 06:56
Default
  #35
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 14
aqua is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Hi Aqua,


I don't know. But I suggest that you first check if the mesh is sane:
Code:
checkMesh
Best regards,
Bruno
Hi, Bruno,
Thank you so much for your reply!
I did checkMesh, but the solution is mesh ok!

" Min volume = 0.0373576. Max volume = 936694. Total volume = 1.02747e+10. Cell volumes OK.
Mesh non-orthogonality Max: 54.4594 average: 10.6017 Threshold = 70
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 1.18109 OK.
Mesh OK.
End"

Do you know some way to convert the polyhedral cell into hex or tetra? as long as no polyhedral is fine for me..

Thank you so much!

Aqua
aqua is offline   Reply With Quote

Old   March 2, 2012, 07:00
Default
  #36
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by aqua View Post
Do you know some way to convert the polyhedral cell into hex or tetra? as long as no polyhedral is fine for me..
I saw here on the forum someone asking the same question... if I remember correctly, the best thing to do is to use NETGEN instead, since that gives you a lot more control over the mesh... but my memory might be failing me...
__________________
wyldckat is offline   Reply With Quote

Old   March 2, 2012, 08:07
Default
  #37
Member
 
Aqua
Join Date: Oct 2011
Posts: 96
Rep Power: 14
aqua is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
I saw here on the forum someone asking the same question... if I remember correctly, the best thing to do is to use NETGEN instead, since that gives you a lot more control over the mesh... but my memory might be failing me...
Dear Bruno,
That was me, too... but no one answers me, so I asked many times...

I will check netgen, thank you so much for your suggestion!

Aqua
aqua is offline   Reply With Quote

Old   March 2, 2012, 08:25
Default
  #38
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Aqua,

Quote:
Originally Posted by aqua View Post
That was me, too... but no one answers me, so I asked many times...
Nope, wasn't you: http://www.cfd-online.com/Forums/ope...dral-mesh.html
And there seems to be some hope:
Quote:
Originally Posted by Martin80 View Post
I have found in openfoam-1.6-ext the application "tetDecomposition", but this application adds additional points.
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   March 23, 2012, 02:14
Default
  #39
Member
 
Albert Tong
Join Date: Dec 2010
Location: Perth, WA, Australia
Posts: 76
Blog Entries: 1
Rep Power: 15
tfuwa is on a distinguished road
Hi there,

Can anyone please guide me on how to control the mesh density at the tip of the cylinder as show in the post picture? Which parameter and how to realize? Thanks in advance.

Quote:
Originally Posted by lovecraft22 View Post
You're right Bastian, that's the key parameter!
Here's the difference between having it set to 10 (on the left) and having it commented out (on the right):

__________________
Kind regards,

Albert
tfuwa is offline   Reply With Quote

Old   March 23, 2012, 04:14
Default
  #40
Senior Member
 
lore
Join Date: Mar 2010
Location: Italy
Posts: 460
Rep Power: 18
lovecraft22 is on a distinguished road
Send a message via Skype™ to lovecraft22
I just set 2 levels for the mesh of the cylinder in snappy and then I used feature edge to have a sharp edge. Read the whole discussion, I think you should be able to sort that out and if not just get back and explain where you're having a hard time.
lovecraft22 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] Failed Edge Snap with box geometry and correct feature capture thiagomarinho OpenFOAM Meshing & Mesh Conversion 7 May 7, 2022 09:19
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 06:09
[snappyHexMesh] snappyHexMesh: Feature snapping of thin membrane edge gooofy OpenFOAM Meshing & Mesh Conversion 7 September 19, 2016 04:29
[snappyHexMesh] snappyHexMesh doesn't do feature edge snapping wc34071209 OpenFOAM Meshing & Mesh Conversion 1 May 7, 2014 16:47
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55


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