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

[blockMesh] Generating cellSets with blockMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 12, 2005, 17:28
Default Generating cellSets with blockMesh
  #1
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
File under: Solutions nobody asked for

Something missing from the original blockMesh (in my opinion) is the posibility to generate cell sets.
With some minor modifications to the original blockMesh (and the syntax of the dictionaries) I produced a utility that can do this.

The utility (and further descriptions) can be found at:

http://openfoamwiki.net/index.php/Contrib_blockMe shWithSets
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   October 13, 2005, 14:19
Default Nice one. Is it easy to modify
  #2
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Nice one. Is it easy to modify so it writes cellZones instead (see polyMesh::addZones()) ?

(since zones are preserved across topology changes)
mattijs is offline   Reply With Quote

Old   October 14, 2005, 06:37
Default To be honest, I wasn't aware o
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
To be honest, I wasn't aware of the cellZones and I'm looking at the documentation. Is my impression correct, that cellZones are cellSets on steroids? In other words, what is the advantage of using cellSets (if there is any)?

But: Yes. It should be doable (I'll have a go at it next week, if I succeed I'll make a similar modification to the fluentMeshToFoam utility)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   October 14, 2005, 06:48
Default Cell zones will give you a uni
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Cell zones will give you a unique decomposition of the mesh or a part of it: each cell will only below to zero or one cell zone. Also, there are facitilies to ask the cell which zone it belongs to (well, a bit different, but that's the idea). This is used a lot in topological mesh changes.

In cell sets, you can have several sets containing the same cell.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   October 19, 2005, 12:26
Default I started to generate CellZone
  #5
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
I started to generate CellZones, but they were never added. When looking at polyMesh.C (method addZones) I found a fz.size() where in my opinion a cz.size() should be. My question: Is this a copy/past-typo or is there an interdependence between cell- and faceZones and this guards against cellZones being added without faceZones?`

The code in question:

// Cell zones
if (fz.size())
{
cellZones_.setSize(cz.size());

// Copy the zone pointers
forAll (cz, cI)
{
cellZones_.hook(cz[cI]);
}

cellZones_.writeOpt() = IOobject::AUTO_WRITE;
}
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   October 19, 2005, 12:45
Default Looks like a typo. There is no
  #6
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Looks like a typo. There is no special interdependence between cell and face zones at this level.
mattijs is offline   Reply With Quote

Old   October 19, 2005, 19:10
Default I thought so. To work around t
  #7
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
I thought so. To work around this the program creates a dummy faceZone of size 0.

The modified utility can be downloaded from the Wiki. In default mode it writes cellSets. If the switch -writeZones is used it writes cellZones instead (plus the dummy faceZone).

Also on the Wiki is a modified version of fluentMeshToFoam that behaves similar (-writeZones writes face- and cellZones instead of sets). This modification isn't completely tested.

Question: How do I visualize cellZones? The foamToVTK-utility generates data for faceZones, but not for cellZones.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   October 20, 2005, 06:09
Default There is no zone visualization
  #8
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
There is no zone visualization in foamToVTK. You can go from zone to set with faceSet (or setSet) and use source zoneToFace.

(You might want to have your blockMesh always write the cellSets, even when writing cellZones)
mattijs is offline   Reply With Quote

Old   October 20, 2005, 07:26
Default @foamToVTK: at least faceZones
  #9
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
@foamToVTK: at least faceZones get converted (like the patches)

@write both: my impression was, that if you have a region you don't need sets and I wanted to keep the amount of data writte to a minimum (not that it matters much).
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider 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] Generating blockMesh for modified Bubble Column dashsubhankar OpenFOAM Meshing & Mesh Conversion 1 December 29, 2017 05:17
[blockMesh] generating tetrhedral mesh using blockmesh pavan OpenFOAM Meshing & Mesh Conversion 0 January 9, 2012 23:21
Doxygen documentation Tanay OpenFOAM Installation 9 September 23, 2011 12:40
[blockMesh] Generating a surface of revolution unsing blockMesh Rachit OpenFOAM Meshing & Mesh Conversion 0 June 23, 2011 04:39
ParaView and Qt 4.3.5 on Mac OS X 10.6 Adrian OpenFOAM 3 August 8, 2010 04:16


All times are GMT -4. The time now is 09:54.