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

[snappyHexMesh] "Reverse" snapping with snappyHexMesh

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

Like Tree2Likes
  • 1 Post By najimaddin96
  • 1 Post By Antimony

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 7, 2020, 10:09
Default "Reverse" snapping with snappyHexMesh
  #1
New Member
 
Najmiddin
Join Date: Dec 2018
Posts: 15
Rep Power: 3
najimaddin96 is on a distinguished road
Hello folks,

I have got a unusual geometry, a membrane or pores, that looks like bunch of columns and I am trying to snap it onto my basemesh with snappyHexMesh. I have used sHM before, but never did something like this. The problem is that when run sHM it meshes around the pores which means that fluid will flow around them. What I actually want is to sHM it in a way that fluid would flow inside the pores. With attached figures you would understand me better.

If anyone has an idea on this issue please give me a helping hand, I have been dealing with this for 2 days now.

Thanks,

Yours, Nazhmiddin

1.jpg

2.JPG

3.jpg

Pore.zip

and an stl file:

https://www.dropbox.com/s/kuxhyujl24...pore2.stl?dl=0
akizilaslan likes this.
najimaddin96 is offline   Reply With Quote

Old   January 7, 2020, 10:29
Default
  #2
New Member
 
Alex
Join Date: Dec 2018
Posts: 1
Rep Power: 0
io_lio is on a distinguished road
Hello!

I have been working the past month with an internal flow problem. If I have understood correctly what you want to do, then locationInMesh in the answer to your problem, as long as the pores that you want the fluid to move to are connected with each other.

To be more descriptive, if the pores are connected somehow together (from the second picture it doesn't look this way) you can use the definition of locationInMesh inside a random pore that you want and this way snappyHexMesh will generate you the internalMesh of the porous medium you want to simulate.

A cheap and maybe stupid way to do so if the pores aren't connected to each other, you can mesh with snappyHexMesh one pore and then with surfaceTransform points utility generate many independent pores and then connect them with mergeMesh, but still when you are going to simulate your fluid's flow, you are going to have problem with the way that the fluid will be able to run inside those independent pores.

Good luck!
Alex
io_lio is offline   Reply With Quote

Old   January 7, 2020, 10:48
Default
  #3
New Member
 
Najmiddin
Join Date: Dec 2018
Posts: 15
Rep Power: 3
najimaddin96 is on a distinguished road
Hello Alex, thanks for your quick reply. The pores are not connected anyhow. You said I should mesh one pore and with surfaceTransform with other meshed pores (right?). The stl file is one file and I don't have individual stl for each of them.

I have a SketchUp file of it which is damn heavy, and my laptop barely opens it. I have tried to intersect a plane with the pores (which projects the pore crossections onto the plane) and with Push/Pull tool gave it a volume. That was ok for me at the first glance. Then I realized some problems:

1. Not all of the pore crossections are projected onto the plane. I have to retain the original pore number.

2. I hade to make one whole block for the sHM to succesfully work. Now I don't have the middle 8 vertices which I will need to introduce cyclic bc. Instead I tried to use topoSet and creatPatch. While topoSetting, there is no way I can have same number of cell faces on two sides of block because of the contol difficulties of sHM. So when I ran creatPatch it complains me about the incosistency in the number of cell faces.

So, as you see I am stuck terribly.

Yours, nazhmiddin
najimaddin96 is offline   Reply With Quote

Old   January 8, 2020, 02:18
Default
  #4
New Member
 
Najmiddin
Join Date: Dec 2018
Posts: 15
Rep Power: 3
najimaddin96 is on a distinguished road
Here is the update upon Alex's recommendation on locationInMesh.

I choose the point of locationInMesh inside of the pores, resulted mesh is attached down below. As you see, it meshed the whole thing for me. To make it clear again, I want to mesh inside the pores, and I want to have outer parts as solid and to have walls on the upper side and the lower side of pore block.

P.S. In this trial I had my blockMesh with three blocks, one upper side and one lower side of the pore block.

P.P.S. For your better understanding, second attached figure is what I actually want.

1.jpg
2.JPG
najimaddin96 is offline   Reply With Quote

Old   January 8, 2020, 02:47
Default
  #5
Senior Member
 
Join Date: Aug 2013
Posts: 384
Rep Power: 10
Antimony is on a distinguished road
Hi,

What happens if you try locationsInMesh instead of locationInMesh? Does that help? This feature is present in the ESI versions of OpenFOAM AFAIK

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   January 8, 2020, 03:00
Default
  #6
New Member
 
Najmiddin
Join Date: Dec 2018
Posts: 15
Rep Power: 3
najimaddin96 is on a distinguished road
I am using OpenFOAM v4.1 and I donít think my version has that feature. But still even if I had that what would I do with it? Because I have tried inside one of the pores and outside of it, still not successful. Thank you for your reply though.
najimaddin96 is offline   Reply With Quote

Old   January 9, 2020, 02:58
Default
  #7
Senior Member
 
Join Date: Aug 2013
Posts: 384
Rep Power: 10
Antimony is on a distinguished road
Hi,

Actually the locationsInMesh does help you. See the attached images.

I specified 3 separate cellZones in the blockMeshDict & then used the locationsInMesh feature in snappyHexMesh to get the final mesh.

Unfortunately, in order to get non-overlapping patches, it seems like the pipes have to be closed.



The other alternative way is to define your geometry as thw two end blocks + the pipes (with their end surfaces removed) and then use that combined geometry as a STL/OBJ file for snappyHexMesh.

Hope this helps.

Cheers,
Antimony


P.S. Am also attaching the blockMeshDict, snappyHexMeshDict & pipe geometry file that I used if you want to test.

allTogether.PNG

pipeAndUpper.PNG

blockMeshDict.txt

snappyHexMeshDict.txt

pipesFull.stl.txt
najimaddin96 likes this.
Antimony is offline   Reply With Quote

Old   January 9, 2020, 04:13
Default
  #8
New Member
 
Najmiddin
Join Date: Dec 2018
Posts: 15
Rep Power: 3
najimaddin96 is on a distinguished road
Hey Antimony, thanks for taking time and testing things out for me

I don't have the installed ets distribution of OF rn. I will checkout your shared files with me with my OFv4.1.

Thanks again

YOurs, NAzhmiddin
najimaddin96 is offline   Reply With Quote

Reply

Tags
snappy hex mesh

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] snappyHexMesh not snapping to cylinder end wildfire230 OpenFOAM Meshing & Mesh Conversion 0 March 1, 2019 13:09
[snappyHexMesh] snappyHexMesh: Bad snapping on shallow slopes matthiasd OpenFOAM Meshing & Mesh Conversion 5 February 1, 2017 18:23
[snappyHexMesh] SnappyHexMesh : snapping not matching surface Awak OpenFOAM Meshing & Mesh Conversion 4 May 31, 2016 09:23
[snappyHexMesh] snappyHexMesh doesn't do feature edge snapping wc34071209 OpenFOAM Meshing & Mesh Conversion 1 May 7, 2014 17:47
[snappyHexMesh] SnappyHexMesh - snapping the wrong elements A.Wendy OpenFOAM Meshing & Mesh Conversion 1 September 25, 2012 04:52


All times are GMT -4. The time now is 00:01.