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

[mesh manipulation] creating faceSet

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By ganeshv

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 8, 2011, 11:55
Default creating faceSet
  #1
Member
 
Ganesh Vijayakumar
Join Date: Jan 2010
Posts: 44
Rep Power: 16
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?

ganesh
ganeshv is offline   Reply With Quote

Old   June 15, 2011, 09:13
Default Wrong method
  #2
Member
 
Ganesh Vijayakumar
Join Date: Jan 2010
Posts: 44
Rep Power: 16
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.
WaterHammer1985 likes this.
ganeshv is offline   Reply With Quote

Reply

Tags
boxtoface, faceset


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
Creating faceSet on stl-surface mjans OpenFOAM Pre-Processing 2 April 17, 2019 02:43
OpenFoam restarting simulation, stops at first Time loop syntex OpenFOAM Running, Solving & CFD 4 April 5, 2019 11:20
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 09:28
Creating nonOrtho faceSet alf12 OpenFOAM Pre-Processing 0 August 7, 2012 11:52
Problem in running ICEM grid in Openfoam Tarak OpenFOAM 6 September 9, 2011 17:51


All times are GMT -4. The time now is 18:07.