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

[blockMesh] Remove cells from blockMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Antimony
  • 1 Post By frantov

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 6, 2016, 21:25
Default Remove cells from blockMesh
  #1
New Member
 
Tommy Mello
Join Date: Mar 2015
Posts: 17
Rep Power: 11
twinturbotom is on a distinguished road
I have a block mesh with cell zones created by splitMeshRegions. I would like to remove all cells in one of the zones, creating a void in the mesh.

What is the best approach?


blockMeshDict blocks:

Code:
blocks
(
    hex (0 1 2 3 4 5 6 7) domain (20 6 10) simpleGrading (1 1 1)
    hex (8 9 10 11 12 13 14 15) interior (4 2 2) simpleGrading (1 1 1)
);
Cell Zone command after blockMesh:
Code:
splitMeshRegions -cellZones -overwriteblocks
Right now I'm working with OF 3 and looking into topoSet, setSet, and other utilities after following references listed in another post (http://www.cfd-online.com/Forums/ope...checkmesh.html ). At this point I haven't been able to successfully cut out my "interior" block cell zone.

I look forward to seeing how others approach this. Thank you!
twinturbotom is offline   Reply With Quote

Old   January 6, 2016, 22:58
Default
  #2
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

You can use subsetMesh in conjunction with topoSet.

Use topoSet to create a cellSet that you want to remove. Invert the cellSet so that it keeps everything else except the region that needs to be excluded.

Run subsetMesh with the name of the cellSet and voila, you will get the mesh with the particular zone removed.

Hope this helps.

Cheers,
Antimony
frantov likes this.
Antimony is offline   Reply With Quote

Old   January 7, 2016, 10:51
Default setSet invert followed by subSet created void set
  #3
New Member
 
Tommy Mello
Join Date: Mar 2015
Posts: 17
Rep Power: 11
twinturbotom is on a distinguished road
Antimony, I appreciate your response. The invert set followed by subSet command cut out my obstruction in a new cell set! Your input was very helpful!


The new set has not altered the internal mesh as viewing the "internal mesh" in paraView shows the obstruction meshed.

The obstructed set is exactly what I would like to use, any suggestions on how to instruct my solver to use the obstructed set and not the internal mesh? Is this just a matter of somehow selecting the subSet faces and defining proper wall/patch conditions?

For completeness. I used setSet interactively to define the set and cut it out (only a domain block, not obstruction block or splitMeshRegion used):

Code:
cellSet obstruction new boxToCell (1 1 0) (3 2 1)
cellSet obstruction invert
cellSet obstruction subSet
twinturbotom is offline   Reply With Quote

Old   January 7, 2016, 19:36
Default
  #4
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

I don't quite follow what exactly do you want to do. Do you have an image or something to graphically represent what is it that you are trying to get?

Unless the -overwrite tag is specified, subsetMesh will write the subsetted(if there is such a word) mesh to a new time folder.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   January 8, 2016, 09:37
Default Example
  #5
New Member
 
Tommy Mello
Join Date: Mar 2015
Posts: 17
Rep Power: 11
twinturbotom is on a distinguished road
Thank you for the follow up.
Below is a rough idea of what I'm looking to accomplish; flow moving over an obstruction.

I understand the obstruction is too close to the inlet and the mesh resolution is very poor. Right now I'm just looking to determine how to capture an obstruction with blockmesh. I do have a working model when I use multiple blocks from blockmesh but as the complexity increases I prefer not too.

Eventually some of he obstruction faces will be inlet/outlets to the model (along with the domain inlet/outlet).

The two images are:
1. Flow through domain with an obstruction that is not properly defined
2. mesh of the cellSet with obstruction. IF I were to select "Internal Mesh" in paraView, the cutout would not be present.




Thanks.
Attached Images
File Type: jpg Screenshot from 2016-01-07 19:27:22.jpg (95.8 KB, 351 views)
File Type: jpg Screenshot from 2016-01-07 19:16:53.jpg (104.5 KB, 312 views)
twinturbotom is offline   Reply With Quote

Old   January 8, 2016, 13:23
Default subsetMest vs. setSet subSet
  #6
New Member
 
Tommy Mello
Join Date: Mar 2015
Posts: 17
Rep Power: 11
twinturbotom is on a distinguished road
Antimony,
I was using setSet's interactive subSet which didn't work like "subsetMesh".
Once I used subsetMesh with my obstruction cellSet it worked perfectly!

Thank you!

I'll post a completed description of what I did once I work through a few improvements in meshing my obstruction. I have to learn how to select/define mesh and patch condition of the obstruction faces.
twinturbotom is offline   Reply With Quote

Old   January 9, 2016, 00:09
Default
  #7
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

I was just wondering how it is that you were unable to get the region removed in the internalMesh. Your explanation on setSet helped to clear that up.

Personally, I have not used setSet. Rely more on topoSet and/or subsetMesh to get things done.

Just a couple of heads up on subsetMesh. Once you have cut out the obstruction from the blockMesh, the faces of the obstruction will by default be lumped together in "oldInternalFaces". In case you want to split them, you can use topoSet via the faceSet "normalToFace" option and specifying the normal for each of the faces. At least that is the workable solution that I was able to come up with.

Hope this helps.

Cheers,
Antimony
Antimony is offline   Reply With Quote

Old   December 11, 2016, 03:56
Default internalMesh
  #8
New Member
 
razieh khaksari
Join Date: Oct 2016
Posts: 4
Rep Power: 9
baran khaksari is on a distinguished road
Hi friends
I try to simulate a tunnel with one inlet and one outlet in front and back of it. The heat source is in the middle. when I simulate it with para view, some faces are missed, when I checked internalMesh. Also, when I run the simulation with buoyantBoussinesqPimpleFoam, the solver I used, time is negative????!!!!!
The attached file is my blockMesh and 0 file.
Please help me to find out.
thanks.
0.tar.gz

system.tar.gz

datauri-file.png
baran khaksari is offline   Reply With Quote

Old   July 25, 2020, 05:05
Default
  #9
Member
 
Francisco T
Join Date: Nov 2011
Location: Melbourne, Australia
Posts: 64
Blog Entries: 1
Rep Power: 14
frantov is on a distinguished road
Thanks for this post.

It has allowed me to generate a half sphere mesh with an inlet.


whole_sphere.png
half_sphere_mesh.png


Steps:
1. Generate whole sphere mesh using blockMesh See tutorials/mesh/blockMesh/sphere

2. Delete half sphere mesh using topoSet + subsetMesh.
3. Step 2 generates an "oldInternalFaces", checkMesh, fails. Then I use createPatch to set "oldInternalFaces" as wall. checkMesh OK.
4. Use topoSet to generate an inlet using a cylinderToCell
5. Create inlet using createPatch


To have these operations organized I created folders for the topoSet and patch operations. Then I took advantage of the argument -dict, which allows you to call the dictionaries from a folder.

Attached is the system folder, in case is useful or any suggestions are welcome.



blockMesh
topoSet -dict system/topo1/topoSetDict
subsetMesh topRegion -overwrite
createPatch -dict system/patch1/createPatchDict -overwrite
topoSet -dict system/topo2/topoSetDict
createPatch -dict system/patch2/createPatchDict -overwrite
system.zip
PC6823 likes this.
frantov 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
[blockMesh] Sphere mesh with blockMesh - weird cells TheMadHungarian OpenFOAM Meshing & Mesh Conversion 9 March 18, 2023 06:20
[blockMesh] blockMesh | MergePatchPairs | snappyHexMesh |Different number of cells in divisions pythag0ra5 OpenFOAM Meshing & Mesh Conversion 1 September 19, 2020 14:38
[snappyHexMesh] snappyHexMesh does not remove internal cells Manyway OpenFOAM Meshing & Mesh Conversion 1 December 14, 2016 18:57
[blockMesh] Adjacent cells are disjunct after blockMesh run NablaDyn OpenFOAM Meshing & Mesh Conversion 1 October 28, 2015 07:15
[snappyHexMesh] snappyHexMesh aborting Tobi OpenFOAM Meshing & Mesh Conversion 0 November 10, 2010 03:23


All times are GMT -4. The time now is 04:05.