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

[snappyHexMesh] Obtaining two regions from background mesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 19, 2016, 03:39
Default Obtaining two regions from background mesh
  #1
Member
 
Join Date: Jul 2013
Posts: 39
Rep Power: 13
cfdsolver1 is on a distinguished road
Hello everyone. I am working on a complex geometry so I need to use STL file to generate mesh. What I am doing is, I create a bounding box using blockMesh. Then, I run snappyHexMesh to obtain background mesh and this creates new boundary for me. Using this boundary, I need to split STL file as solid region and the rest of the mesh as fluid region. I run setSet to create zone from boundary:

Code:
setSet 
faceSet f0 new patchToFace myWall
cellSet c0 new faceToCell f0 any
cellZoneSet c0 new setToCellZone c0
Using this cell zone, I want to split my mesh into 2 regions. If I run
Code:
splitMeshRegions -cellZones
command, I get thousands of domains (because of porous structure). If I use cellZonesOnly option of splitMeshRegions, I get an error:

Code:
For the cellZonesOnly option all cells have to be in a cellZone.
I just need to have 2 regions. The cells in the regions are not required to be connected to each other. One of other post here suggests using topoSet but I am lost while using it. Can you help me to split my domain0 into two regions? This is the domain I am working on:



Thank you so much.

Last edited by cfdsolver1; September 19, 2016 at 22:10. Reason: image added
cfdsolver1 is offline   Reply With Quote

Old   September 21, 2016, 17:30
Default
  #2
New Member
 
Roberto
Join Date: May 2016
Posts: 17
Rep Power: 10
RobertoCirolini is on a distinguished road
Hi,
If I understood what you want to do, I would suggest you play around with sHM. Therefore you can split your regions. I do believe topoSet would put you into trouble and make you waste a lot of time.

I think this thread is about what you want.

http://www.cfd-online.com/Forums/ope...ous-media.html

Regards,
Roberto
RobertoCirolini is offline   Reply With Quote

Old   September 21, 2016, 20:38
Default
  #3
Member
 
Join Date: Jul 2013
Posts: 39
Rep Power: 13
cfdsolver1 is on a distinguished road
Dear Roberto,

Thank you so much for your reply. I am able to obtain a mesh using sHM like the post you posted but my problem is, If I use sHM I get the solid region as a boundary. However, I want to name my STL file as cellZone; not as boundary. Is this possible with sHM?
cfdsolver1 is offline   Reply With Quote

Old   September 23, 2016, 12:18
Default
  #4
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 16
Antimony is on a distinguished road
Hi,

Have you tried the option "cellZoneInside inside;" and the associated ones as stated in slide 31 here: http://openfoamwiki.net/images/f/f0/...SlidesOFW7.pdf

Does it do what you want?

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   September 26, 2016, 13:53
Default
  #5
Member
 
Join Date: Jul 2013
Posts: 39
Rep Power: 13
cfdsolver1 is on a distinguished road
Hello again, thanks for the tips. I guess I was able to split mesh into two regions but I am not sure if I did it correctly or not. I used
Quote:
setSet
and starting from boundary, I created a cell zone and inverted it and obtained second zone. Then I applied
Quote:
splitMeshRegions -cellZonesOnly
and created two zones and I was able to run chtMultiRegionSimpleFoam but I have a problem.

If I run chtMultiRegionSolver, the h equation at fluid region decreases and goes to minus values, which is of course wrong. If I solve solid region only, everything is okay. If I run only fluid region using chtMultiRegionSolver, it doesn't work again. So, what might be problem? Can you help me? If I use
Quote:
checkMesh -region fluid
I think everything looks okay. How can I ensure if the problem is boundary conditions or model, or mesh?
cfdsolver1 is offline   Reply With Quote

Reply

Tags
setset, snappyhexmesh, toposet


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
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
pimpleDyMfoam , AMI -- The mesh has multiple regions not connected by any face coolcrasher OpenFOAM Running, Solving & CFD 3 May 16, 2019 06:58
[Gmsh] gmshToFoam - Hybrid mesh conversion creates 2 regions bhanu2204 OpenFOAM Meshing & Mesh Conversion 5 February 18, 2018 08:04
[snappyHexMesh] SnappyHexMesh for internal Flow vishwa OpenFOAM Meshing & Mesh Conversion 24 June 27, 2016 09:54
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38


All times are GMT -4. The time now is 20:40.