CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: blockMesh

Generating cellSets with blockMesh

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 12, 2005, 16:28
Default File under: Solutions nobody a
  #1
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
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, 13:19
Default Nice one. Is it easy to modify
  #2
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
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, 05:37
Default To be honest, I wasn't aware o
  #3
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
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, 05:48
Default Cell zones will give you a uni
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
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, 11:26
Default I started to generate CellZone
  #5
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
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, 11:45
Default Looks like a typo. There is no
  #6
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
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, 18:10
Default I thought so. To work around t
  #7
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
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, 05:09
Default There is no zone visualization
  #8
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 16
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, 06:26
Default @foamToVTK: at least faceZones
  #9
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
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

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difficulty in generating 3-D mesh Rucy FLUENT 3 November 10, 2005 10:53
Generating mesh Jonathan CFX 2 February 13, 2004 01:27
Generating Mesh (CFX) Steven CFX 1 February 25, 2003 12:53
Generating Mesh Steven CFX 0 February 25, 2003 12:31
Generating big meshes with GAMBIT on NT Andrew Ooi FLUENT 12 February 2, 2000 23:26


All times are GMT -4. The time now is 21:06.