CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Mesh Utilities

creating faceSet

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

LinkBack Thread Tools Display Modes
Old   June 8, 2011, 11:55
Default creating faceSet
Ganesh Vijayakumar
Join Date: Jan 2010
Posts: 44
Rep Power: 9
ganeshv is on a distinguished road
I need to create a list of faceSets as follows

PtrList<faceSet> faceSetList(hFaceLevelsTotal) ;
forAll(faceSetList,hLevel) {
boxToFace thisLevel(mesh, treeBoundBox(point(0.0, 0.0, double(hLevel)*dz-dz/10.0),point(L,L, double(hLevel)*dz+dz/10.0))) ;
faceSetList.set(hLevel, new faceSet(mesh,"blah",0)) ;
thisLevel.applyToSet(topoSetSource::NEW, faceSetList[hLevel]) ;

I then loop over the faces to get the average in the faceSet as follows.

forAll(faceSetList, hLevel) {
bAvg[hLevel] = 0 ;
forAllConstIter(faceSet, faceSetList[hLevel], iter) {
label faceI = iter.key() ;
bAvg[hLevel] = bAvg[hLevel]+[faceI];

This seems to work on a smaller grid with 32 procs. But when I scale it up to a much larger grid with 96 procs it always fails after 3 iterations no matter what my initial condition is. The code runs fine without this averaging step. I have a feeling it has something to do with how I am using iter.key(). Can anyone throw some light on this? Also is there a way to make the boxToFace avoid boundary faces?

ganeshv is offline   Reply With Quote

Old   June 15, 2011, 09:13
Default Wrong method
Ganesh Vijayakumar
Join Date: Jan 2010
Posts: 44
Rep Power: 9
ganeshv is on a distinguished road
This is the wrong way to create the faceSet. It turns out that if we try to create the faceSet after domain decomposition, additional processor boundary faces are added. The best way to do this was to use a script with setSet, use setsToZones and then use simpleFunctionObjects like before to average them. The only problem was that I had to write a script to write the functionObjects part of the controlDict.
ganeshv is offline   Reply With Quote


boxtoface, faceset

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
Problems in creating a wedge type mesh Joscha OpenFOAM Native Meshers: blockMesh 27 November 3, 2015 12:27
Meshing Regions Problem m.nichols19 OpenFOAM 2 January 12, 2011 03:09
interFoam - stratified flow - problem with shear stress at interface AnjaMiehe OpenFOAM Running, Solving & CFD 8 June 14, 2010 06:49
Problems with Meshing: Collapsed Cells Emmanuel Resch Siemens 1 July 30, 2007 03:02
Gerris software installation mer Main CFD Forum 2 November 12, 2005 09:50

All times are GMT -4. The time now is 02:44.